Skip to content

Commit

Permalink
telegram plugin: remove unneccassary webif pagelength from webif inde…
Browse files Browse the repository at this point in the history
…x.html
  • Loading branch information
onkelandy committed Sep 24, 2023
1 parent 52b08b6 commit 163bf20
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions telegram/webif/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,14 @@
<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
{
tableout = $('#table_out').DataTable( {pageLength: webif_pagelength,
pageResize: resize} );
tablein = $('#table_in').DataTable( {pageLength: webif_pagelength,
pageResize: resize} );
tablecontrol = $('#table_control').DataTable( {pageLength: webif_pagelength,
pageResize: resize} );
tablecontrol = $('#table_chatids').DataTable( {pageLength: webif_pagelength,
pageResize: resize} );
tablecontrol = $('#table_info').DataTable( {pageLength: webif_pagelength,
pageResize: resize} );
tableout = $('#table_out').DataTable( {} );
tablein = $('#table_in').DataTable( {} );
tablecontrol = $('#table_control').DataTable( {} );
tablecontrol = $('#table_chatids').DataTable( {} );
tablecontrol = $('#table_info').DataTable( {} );
}
catch (e)
{
Expand Down Expand Up @@ -204,4 +189,4 @@
{% endfor %}
</tbody>
</table>
{% endblock bodytab5 %}
{% endblock bodytab5 %}

0 comments on commit 163bf20

Please sign in to comment.