mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-28 02:44:53 +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
|
** resorting after fhemweb longpoll updates
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var version="$Id$";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
SortTable
|
SortTable
|
||||||
version 2
|
version 2
|
||||||
@ -190,7 +192,11 @@ sorttable = {
|
|||||||
doSort: function(table, column, reverse) {
|
doSort: function(table, column, reverse) {
|
||||||
if( typeof column !== 'object' ) {
|
if( typeof column !== 'object' ) {
|
||||||
if( table === undefined ) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +210,7 @@ sorttable = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( column === undefined ) {
|
if( column === undefined ) {
|
||||||
console.log( 'reSort: no current column' );
|
console.log( 'doSort: no current column' );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user