Merge "Fixes JavaScript count bug in tables." into stable/folsom

This commit is contained in:
Jenkins 2012-11-14 20:51:27 +00:00 committed by Gerrit Code Review
commit 7f038bddc2
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ horizon.datatables.update_footer_count = function (el, modifier) {
else {
$footer = $el.find('tr:last span:first');
}
row_count = $el.find('tbody tr:visible').length + modifier;
row_count = $el.find('tbody tr:visible').length + modifier - $el.find('.empty').length;
footer_text_template = ngettext("Displaying %s item", "Displaying %s items", row_count);
footer_text = interpolate(footer_text_template, [row_count]);
$footer.text(footer_text);
@ -279,7 +279,7 @@ horizon.datatables.set_table_filter = function (parent) {
horizon.addInitFunction(function() {
horizon.datatables.validate_button();
horizon.datatables.update_footer_count($.find('table'),0);
// Bind the "select all" checkbox action.
$('div.table_wrapper, #modal_wrapper').on('click', 'table thead .multi_select_column :checkbox', function(evt) {
var $this = $(this),