Merge pull request #7479 from abpframework/issue/7183

Datatables pagination: use "col-auto"
pull/7484/head
Halil İbrahim Kalkan 5 years ago committed by GitHub
commit 7e902d7ccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,7 +30,7 @@
var htmlEncode = function (html) { var htmlEncode = function (html) {
return $('<div/>').text(html).html(); return $('<div/>').text(html).html();
} }
var _createDropdownItem = function (record, fieldItem, tableInstance) { var _createDropdownItem = function (record, fieldItem, tableInstance) {
var $li = $('<li/>'); var $li = $('<li/>');
var $a = $('<a/>'); var $a = $('<a/>');
@ -90,15 +90,15 @@
} }
$button.append(htmlEncode(firstItem.text)); $button.append(htmlEncode(firstItem.text));
} }
if (firstItem.enabled && !firstItem.enabled({ record: record, table: tableInstance })) { if (firstItem.enabled && !firstItem.enabled({ record: record, table: tableInstance })) {
$button.addClass('disabled'); $button.addClass('disabled');
} }
if (firstItem.action) { if (firstItem.action) {
$button.click(function (e) { $button.click(function (e) {
e.preventDefault(); e.preventDefault();
if (!$(this).hasClass('disabled')) { if (!$(this).hasClass('disabled')) {
if (firstItem.confirmMessage) { if (firstItem.confirmMessage) {
abp.message.confirm(firstItem.confirmMessage({ record: record, table: tableInstance })) abp.message.confirm(firstItem.confirmMessage({ record: record, table: tableInstance }))
@ -217,7 +217,7 @@
var renderRowActions = function (tableInstance, nRow, aData, iDisplayIndex, iDisplayIndexFull) { var renderRowActions = function (tableInstance, nRow, aData, iDisplayIndex, iDisplayIndexFull) {
var columns; var columns;
if (tableInstance.aoColumns) { if (tableInstance.aoColumns) {
columns = tableInstance.aoColumns; columns = tableInstance.aoColumns;
} else { } else {
@ -463,7 +463,7 @@
datatables.defaultConfigurations.scrollX = true; datatables.defaultConfigurations.scrollX = true;
datatables.defaultConfigurations.responsive = true; datatables.defaultConfigurations.responsive = true;
datatables.defaultConfigurations.language = function () { datatables.defaultConfigurations.language = function () {
return { 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 mr-auto"i><"col-auto"p>>';
})(jQuery); })(jQuery);

Loading…
Cancel
Save