From d8c84da6a3e9d536da3e3b4811ccf7ca42fdeb85 Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Tue, 13 Dec 2016 15:54:18 +0000 Subject: [PATCH] sorttable.js: docu change git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@12762 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- www/pgm2/sorttable.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/www/pgm2/sorttable.js b/www/pgm2/sorttable.js index b872847a0..763b85da7 100644 --- a/www/pgm2/sorttable.js +++ b/www/pgm2/sorttable.js @@ -1,3 +1,10 @@ + +/* +** please note: this file should still be compatible to the original +** but has additions and modifications to allow triggered +** resorting after fhemweb longpoll updates +*/ + /* SortTable version 2 @@ -91,12 +98,14 @@ sorttable = { headrow[i].sorttable_columnindex = i; headrow[i].sorttable_tbody = table.tBodies[0]; dean_addEvent(headrow[i],"click", sorttable.innerSortFunction = function(e) { + //moved inline code to _doSort() sorttable._doSort.bind(this)(); }); } } }, + //added force and reverse parameters _doSort: function(force, reverse) { if (!force && this.className.search(/\bsorttable_sorted\b/) != -1) { // if we're already sorted by this column, just @@ -177,6 +186,7 @@ sorttable = { delete row_array; }, + //added table, column and reverse paramters doSort: function(table, column, reverse) { if( typeof column !== 'object' ) { if( table === undefined ) {