Skip to content

Commit

Permalink
xiaomi_vac plugin: remove webif pagelength init from web interface, n…
Browse files Browse the repository at this point in the history
…ot needed anymore
  • Loading branch information
onkelandy committed Sep 22, 2023
1 parent 0d50ed4 commit c1bd02d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions xiaomi_vac/webif/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,8 @@
<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;
}
try {
table = $('#maintable').DataTable( {
pageLength: webif_pagelength,
pageResize: resize});
table = $('#maintable').DataTable( {});
}
catch (e) {
console.log("Datatable JS not loaded, showing standard table without reorder option " +e);
Expand Down

0 comments on commit c1bd02d

Please sign in to comment.