Skip to content

Commit

Permalink
Merge pull request #823 from onkelandy/uzsu
Browse files Browse the repository at this point in the history
uzsu plugin: adjust webif pagelength handling to most recent approach
  • Loading branch information
onkelandy authored Sep 18, 2023
2 parents 9b057f4 + 9aa9654 commit da33cb7
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions uzsu/webif/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,9 @@
<script>
$(document).ready( function () {
$(window).trigger('datatables_defaults');
/* get pagelength from http module or plugin. */
{% if webif_pagelength is defined %}webif_pagelength = {{ webif_pagelength|int }};{% endif %}
if (isNaN(parseFloat(webif_pagelength)) || webif_pagelength == 0) {
resize = true;
webif_pagelength = -1;
}
else {
resize = false;
}
console.log("Webif page length " + webif_pagelength + ", pageResize: " + resize);

try {
table = $('#maintable').DataTable( {
columnDefs: [{ "targets": [8], "className": "none"}].concat($.fn.dataTable.defaults.columnDefs),
pageLength: webif_pagelength,
pageResize: resize});
columnDefs: [{ "targets": [8], "className": "none"}].concat($.fn.dataTable.defaults.columnDefs)});
}
catch (e) {
console.log("Datatable JS not loaded, showing standard table without reorder option " +e);
Expand Down

0 comments on commit da33cb7

Please sign in to comment.