mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
sorttable.js: added version, catch errors for tables without headings
git-svn-id: https://svn.fhem.de/fhem/trunk@13106 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
284cb98689
commit
8f4085741b
@ -5,6 +5,8 @@
|
||||
** resorting after fhemweb longpoll updates
|
||||
*/
|
||||
|
||||
var version="$Id$";
|
||||
|
||||
/*
|
||||
SortTable
|
||||
version 2
|
||||
@ -190,7 +192,11 @@ sorttable = {
|
||||
doSort: function(table, column, reverse) {
|
||||
if( typeof column !== 'object' ) {
|
||||
if( table === undefined ) {
|
||||
console.log( 'reSort: no table given' );
|
||||
console.log( 'doSort: no table given' );
|
||||
return;
|
||||
}
|
||||
if( table.tHead === undefined ) {
|
||||
console.log( 'doSort: table has no heading' );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -204,7 +210,7 @@ sorttable = {
|
||||
}
|
||||
|
||||
if( column === undefined ) {
|
||||
console.log( 'reSort: no current column' );
|
||||
console.log( 'doSort: no current column' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user