Refactor multiple JavaScript classes to use ES6 syntax, including Download, Pdf, Printer, PrinterPos, PoleDisplay, and Simulator. Update method names for consistency and improve error handling. Modify AJAX requests to enhance functionality and user experience.
This commit is contained in:
+3
-6
@@ -784,7 +784,7 @@ class Request_JSF extends Request {
|
||||
|
||||
const opsi = {
|
||||
responsive: true,
|
||||
columnDefs: [{ responsivePriority: 1, targets: 0 }, { responsivePriority: 2, targets: 1 }, { responsivePriority: 0, targets: -1 }],
|
||||
columnDefs: [{ responsivePriority: 1, targets: 0 }, { responsivePriority: 2, targets: 1 }],
|
||||
lengthMenu: [],
|
||||
dom: '<"row"<"col-sm-12"tr>><"row"<"col-sm-12 col-lg-auto"<"toolbar">><"col-sm-3 col-lg-auto ms-lg-auto"l><"col-sm-9 col-lg-auto"p>>',
|
||||
autoWidth: false,
|
||||
@@ -866,7 +866,7 @@ class Request_JSF extends Request {
|
||||
};
|
||||
}
|
||||
|
||||
if (ini.option.length > 0) opsi.columnDefs.push({ responsivePriority: 3, targets: -1 }, { orderable: false, targets: -1 });
|
||||
if (ini.option.length > 0) opsi.columnDefs.push({ responsivePriority: 0, targets: -1 }, { orderable: false, targets: -1 });
|
||||
if (ini.navi.no_navi === true) opsi.paging = false;
|
||||
|
||||
if (ini.config.scrollbar === true) {
|
||||
@@ -900,7 +900,7 @@ class Request_JSF extends Request {
|
||||
}
|
||||
};
|
||||
|
||||
opsi.drawCallback = () => {
|
||||
opsi.drawCallback = function() {
|
||||
$(`#${ini.id}Tabel tbody td:last-child:has(span.rowcss)`).each((i, el) => {
|
||||
const span = $(el).find('span').attr('class').replace('rowcss ', '');
|
||||
$(el).parent().addClass(span);
|
||||
@@ -1014,9 +1014,6 @@ class Request_JSF extends Request {
|
||||
}
|
||||
}
|
||||
|
||||
//const Request = (options) => new _Request(options);
|
||||
//RequestF = (options) => new _Request_JSONF(options);
|
||||
|
||||
// jQuery Validator setup
|
||||
if (jQuery.validator) {
|
||||
jQuery.validator.setDefaults({
|
||||
|
||||
Reference in New Issue
Block a user