mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
33_readingsGroup.pm: allow automatic sorting in reverse
git-svn-id: https://svn.fhem.de/fhem/trunk@12774 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f31dca6dab
commit
6e3f6fbb74
@ -1857,8 +1857,9 @@ readingsGroup_Attr($$$;$)
|
||||
<li>headerRows<br>
|
||||
</li>
|
||||
<li>sortColumn<br>
|
||||
-1 -> allows sorting of the table by clicking on a column header
|
||||
>= 0 -> automatically sort the table by this column after page loading
|
||||
> 0 -> automatically sort the table by this column after page loading
|
||||
0 -> do not sort automatically but allow sorting of the table by clicking on a column header
|
||||
< 0 -> automatically sort the table in reverse by this column after page loading
|
||||
</li>
|
||||
<br><li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
|
||||
</ul><br>
|
||||
|
@ -12,13 +12,10 @@ FW_readingsGroupReadyFn() {
|
||||
setTimeout( function() {
|
||||
$(".readingsGroup").each(function() {
|
||||
var sort = parseInt($(this).attr('sortColumn'));
|
||||
if( sort >= 0 ) {
|
||||
var col = $(this).find('tr').eq(0).find('td').eq(sort).get(0);
|
||||
if( sorttable && col !== undefined )
|
||||
sorttable.innerSortFunction.apply(col, []);
|
||||
}
|
||||
if( sort )
|
||||
sorttable.doSort(this, Math.abs(sort)-1, sort<0?true:false );
|
||||
} );
|
||||
}, 10 );
|
||||
}, 100 );
|
||||
} );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user