mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-24 02:59:22 +00:00
sorttable.js: docu change
git-svn-id: https://svn.fhem.de/fhem/trunk@12762 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
949ef851a8
commit
833c2c30cd
@ -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
|
SortTable
|
||||||
version 2
|
version 2
|
||||||
@ -91,12 +98,14 @@ sorttable = {
|
|||||||
headrow[i].sorttable_columnindex = i;
|
headrow[i].sorttable_columnindex = i;
|
||||||
headrow[i].sorttable_tbody = table.tBodies[0];
|
headrow[i].sorttable_tbody = table.tBodies[0];
|
||||||
dean_addEvent(headrow[i],"click", sorttable.innerSortFunction = function(e) {
|
dean_addEvent(headrow[i],"click", sorttable.innerSortFunction = function(e) {
|
||||||
|
//moved inline code to _doSort()
|
||||||
sorttable._doSort.bind(this)();
|
sorttable._doSort.bind(this)();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//added force and reverse parameters
|
||||||
_doSort: function(force, reverse) {
|
_doSort: function(force, reverse) {
|
||||||
if (!force && this.className.search(/\bsorttable_sorted\b/) != -1) {
|
if (!force && this.className.search(/\bsorttable_sorted\b/) != -1) {
|
||||||
// if we're already sorted by this column, just
|
// if we're already sorted by this column, just
|
||||||
@ -177,6 +186,7 @@ sorttable = {
|
|||||||
delete row_array;
|
delete row_array;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//added table, column and reverse paramters
|
||||||
doSort: function(table, column, reverse) {
|
doSort: function(table, column, reverse) {
|
||||||
if( typeof column !== 'object' ) {
|
if( typeof column !== 'object' ) {
|
||||||
if( table === undefined ) {
|
if( table === undefined ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user