Browse Source

Fix #144: fix onCheck and onUncheck events are reversed bug.

zhixin 11 years ago
parent
commit
42667cd995
1 changed files with 1 additions and 6 deletions
  1. 1 6
      src/bootstrap-table.js

+ 1 - 6
src/bootstrap-table.js

@@ -1044,7 +1044,7 @@
             if (that.options.clickToSelect) {
                 if (that.header.clickToSelects[$tr.children().index($(this))]) {
                     $tr.find(sprintf('[name="%s"]',
-                        that.options.selectItemName)).trigger('click');
+                        that.options.selectItemName))[0].click(); // #144: .trigger('click') bug
                 }
             }
         });
@@ -1056,11 +1056,6 @@
         this.$selectItem.off('click').on('click', function (event) {
             event.stopImmediatePropagation();
 
-            // radio trigger click event bug!
-            if ($(this).is(':radio')) {
-                $(this).prop('checked', true);
-            }
-
             var checkAll = that.$selectItem.filter(':enabled').length ===
                     that.$selectItem.filter(':enabled').filter(':checked').length,
                 checked = $(this).prop('checked'),