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>headerRows<br>
|
||||||
</li>
|
</li>
|
||||||
<li>sortColumn<br>
|
<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>
|
</li>
|
||||||
<br><li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
|
<br><li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
|
||||||
</ul><br>
|
</ul><br>
|
||||||
|
@ -12,13 +12,10 @@ FW_readingsGroupReadyFn() {
|
|||||||
setTimeout( function() {
|
setTimeout( function() {
|
||||||
$(".readingsGroup").each(function() {
|
$(".readingsGroup").each(function() {
|
||||||
var sort = parseInt($(this).attr('sortColumn'));
|
var sort = parseInt($(this).attr('sortColumn'));
|
||||||
if( sort >= 0 ) {
|
if( sort )
|
||||||
var col = $(this).find('tr').eq(0).find('td').eq(sort).get(0);
|
sorttable.doSort(this, Math.abs(sort)-1, sort<0?true:false );
|
||||||
if( sorttable && col !== undefined )
|
|
||||||
sorttable.innerSortFunction.apply(col, []);
|
|
||||||
}
|
|
||||||
} );
|
} );
|
||||||
}, 10 );
|
}, 100 );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user