Я использую Tablesorter вместе с виджлетом Grouping, а также включен виджет Pager. Я столкнулся с некоторыми проблемами:Виджет сгруппировки TableSorter и Paging
Количество элементов, которые считаются для подкачки, также включает группу, которую я хочу исключить.
Также, когда я нажимаю на следующую кнопку, на предыдущей странице отображаются записи.
У меня есть флажок «Выбрать все», а на 2-й странице, когда я устанавливаю флажок «Выбрать все», группировка теряется.
Можете ли вы помочь мне
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// hide bottom pageBlockbuttons
$(".pbBottomButtons").last().hide();
});
function toggleBottomPageBlockButtons() {
setTimeout(function(){
var availableRows = $('table[id$="casesTable"] tr').not(":hidden").length;
if(availableRows > 12) {
$(".pbBottomButtons").last().show();
}
else {
$(".pbBottomButtons").last().hide();
}
},500);
}
</script>
<script type="text/javascript" charset="utf-8">
$('table[id$="casesTable"]').tablesorter({
sortList: [ [1, 0] ],
sortForce: [ [1, 0] ],
widgets: ["filter","group", "columns", "zebra" ],
widgetOptions : {
// css class applied to the table row containing the filters & the inputs within that row
filter_cssFilter : 'tablesorter-filter',
// filter widget: If there are child rows in the table (rows with class name from "cssChildRow" option)
// and this option is true and a match is found anywhere in the child row, then it will make that row
// visible; default is false
filter_childRows : false,
// Set this option to true to use the filter to find text from the start of the column
//
filter_startsWith : false,
group_collapsible : true,
group_collapsed : false,
group_count : " ({num})",
group_dateString : function(date) {
return date.toLocaleString();
},
group_formatter : function(txt, col, table, c, wo) {
return txt === "" ? "Empty" : txt;
},
group_callback : function($cell, $rows, column, table){
// var subtotal = 0;
// $rows.each(function(){
// subtotal += parseInt($(this).find("td").eq(column).text());
//});
//$cell.find(".group-count").append("; subtotal: " + subtotal);
},
group_complete : "groupingComplete"
}
}).tablesorterPager({container: $("#pager")});;
// check uncheck all functionality
$("#checkUncheckAll").click(function() {
$(".selectionCheckbox").not(":hidden").attr('checked', this.checked);
});
// uncheck all checkboxes when user clicks on next/previous page
$("#pager a img:not(.disabled)").click(function(){
$("#checkUncheckAll").attr('checked', false);
/* $(".selectionCheckbox").attr('checked', false); */
});
</script>
Мотти, пожалуйста, помогите мне. Я был бы рад поделиться любыми дополнительными деталями, если это необходимо. – user3180502
Я создал js скрипку для того же http://jsfiddle.net/vnt_manu/hM6gD/ – user3180502