* finish task #2371.

This commit is contained in:
wangyidong
2015-10-14 11:11:52 +08:00
parent c5546d215e
commit 9ec0520b34
6 changed files with 51 additions and 26 deletions
+11 -5
View File
@@ -3,26 +3,32 @@
js::import($jsRoot . 'jquery/tablesorter/min.js');
js::import($jsRoot . 'jquery/tablesorter/metadata.js');
?>
<style>
table.tablesorter tr.tablesorter-headerRow .header.tablesorter-headerUnSorted .tablesorter-header-inner:after{font-family: ZenIcon; font-weight: normal; content: " \e6bd"; font-size: 14px;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortUp .tablesorter-header-inner:after{font-family: ZenIcon; font-weight: normal; content: " \e6b9"; font-size: 14px; color: #03C;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortDown .tablesorter-header-inner:after{font-family: ZenIcon; font-weight: normal; content: " \e6b8"; font-size: 14px; color: #03C;}
table.tablesorter tr.tablesorter-headerRow .header.sorter-false .tablesorter-header-inner:after{content:"";}
</style>
<script language='javascript'>
/* sort table after page load. */
$(function() { sortTable(); } );
$(function(){sortTable('.tablesorter');});
function sortTable()
function sortTable(obj)
{
$('.tablesorter').tablesorter(
$(obj).tablesorter(
{
saveSort: true,
widgets: ['zebra', 'saveSort'],
widgetZebra: {css: ['odd', 'even'] }
});
$('.tablesorter tbody tr').hover(
$(obj + ' tbody tr').hover(
function(){$(this).addClass('hoover')},
function(){$(this).removeClass('hoover')}
);
$('.tablesorter tbody tr').click(
$(obj + ' tbody tr').click(
function()
{
if($(this).attr('class').indexOf('clicked') > 0)