From cbc61af768dd4ffc786df47db0038856bf3e6fcc Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 27 Jan 2021 11:22:13 +0300 Subject: [PATCH 1/2] Datatables pagination: use "col-auto" resolves https://github.com/abpframework/abp/issues/7183 --- .../datatables/datatables-extensions.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js index b0c4873b59a..45dadb54416 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js @@ -30,7 +30,7 @@ var htmlEncode = function (html) { return $('
').text(html).html(); } - + var _createDropdownItem = function (record, fieldItem, tableInstance) { var $li = $('
  • '); var $a = $(''); @@ -90,15 +90,15 @@ } $button.append(htmlEncode(firstItem.text)); } - + if (firstItem.enabled && !firstItem.enabled({ record: record, table: tableInstance })) { $button.addClass('disabled'); } - + if (firstItem.action) { $button.click(function (e) { e.preventDefault(); - + if (!$(this).hasClass('disabled')) { if (firstItem.confirmMessage) { abp.message.confirm(firstItem.confirmMessage({ record: record, table: tableInstance })) @@ -217,7 +217,7 @@ var renderRowActions = function (tableInstance, nRow, aData, iDisplayIndex, iDisplayIndexFull) { var columns; - + if (tableInstance.aoColumns) { columns = tableInstance.aoColumns; } else { @@ -463,7 +463,7 @@ datatables.defaultConfigurations.scrollX = true; - datatables.defaultConfigurations.responsive = true; + datatables.defaultConfigurations.responsive = true; datatables.defaultConfigurations.language = function () { return { @@ -484,6 +484,6 @@ }; }; - datatables.defaultConfigurations.dom = '<"dataTable_filters"f>rt<"row dataTable_footer"<"col-auto"l><"col-auto"i><"col"p>>'; + datatables.defaultConfigurations.dom = '<"dataTable_filters"f>rt<"row dataTable_footer"<"col-auto"l><"col-auto"i><"col-auto"p>>'; })(jQuery); From afb9175e30c62b76fc2d7138e7d6211b3730e7ec Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 27 Jan 2021 11:28:15 +0300 Subject: [PATCH 2/2] Update datatables-extensions.js --- .../datatables/datatables-extensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js index 45dadb54416..1808f267ebe 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js @@ -484,6 +484,6 @@ }; }; - datatables.defaultConfigurations.dom = '<"dataTable_filters"f>rt<"row dataTable_footer"<"col-auto"l><"col-auto"i><"col-auto"p>>'; + datatables.defaultConfigurations.dom = '<"dataTable_filters"f>rt<"row dataTable_footer"<"col-auto"l><"col-auto mr-auto"i><"col-auto"p>>'; })(jQuery);