diff --git a/Assets/js/global-revenue.js b/Assets/js/global-revenue.js index 31ed246..d070548 100644 --- a/Assets/js/global-revenue.js +++ b/Assets/js/global-revenue.js @@ -1,5 +1,6 @@ Mautic.loadGlobalRevenueWidget = function () { var $globaltarget = mQuery('#global-revenue'); + var $globalwrapper = mQuery('#global-revenue_wrapper'); if ($globaltarget.length) { mQuery('#global-revenue:not(.table-initialized):first').addClass('table-initialized').each(function () { mQuery.getScriptCachedOnce(mauticBasePath + '/' + mauticAssetPrefix + 'plugins/MauticContactLedgerBundle/Assets/js/datatables.min.js', function () { @@ -22,6 +23,7 @@ Mautic.loadGlobalRevenueWidget = function () { }, data: response.rows, autoFill: true, + autoWidth: true, columns: response.columns, order: [[2, 'asc']], bLengthChange: false, @@ -57,8 +59,8 @@ Mautic.loadGlobalRevenueWidget = function () { targets: 10 }, {visible: false, targets: [1]}, - {width: '5%', targets: [0]}, - {width: '20%', targets: [2]} + // {width: '5%', targets: [0]}, + // {width: '20%', targets: [2]} ], footerCallback: function (row, data, start, end, display) { @@ -122,6 +124,9 @@ Mautic.loadGlobalRevenueWidget = function () { } // FooterCallback }); //.DataTables mQuery('#global-revenue_wrapper .dt-buttons').css({float: "right", marginLeft: "10px"}); + mQuery('#global-revenue').css('width', 'auto'); + mQuery('#global-revenue').css("font-size", ".8em") + mQuery('#global-revenue_wrapper').css('overflow-x', 'scroll'); } //success }); //ajax }); //getScriptsCachedOnce - fonteawesome css diff --git a/Assets/js/source-revenue.js b/Assets/js/source-revenue.js index a490b43..16f4671 100644 --- a/Assets/js/source-revenue.js +++ b/Assets/js/source-revenue.js @@ -65,8 +65,8 @@ Mautic.loadSourceRevenueWidget = function () { }, {visible: false, targets: [1, 3]}, {width: '5%', targets: [0]}, - {width: '20%', targets: [2]}, - {width: '15%', targets: [4]} + {width: '15%', targets: [2]}, + {width: '12%', targets: [4]} ], footerCallback: function (row, data, start, end, display) { @@ -84,7 +84,7 @@ Mautic.loadSourceRevenueWidget = function () { var tr2 = mQuery(''); tr.append(mQuery('Page totals')); tr2.append(mQuery('Grand totals')); - for (var i = 2; i < columns; i++) { + for (var i = 5; i < columns; i++) { tr.append(mQuery('')); tr2.append(mQuery('')); } @@ -134,6 +134,9 @@ Mautic.loadSourceRevenueWidget = function () { }); //.DataTables mQuery('#source-revenue_wrapper .dt-buttons').css({float: "right", marginLeft: "10px"}); + mQuery('#source-revenue').css("width", "auto"); + mQuery('#source-revenue').css("font-size", ".8em") + mQuery('#source-revenue_wrapper').css("overflow-x", "scroll"); } //success });//ajax }); //getScriptsCachedOnce - fonteawesome css