浏览代码

Formating the code

Dennis Hernández 10 年之前
父节点
当前提交
2502d585b6
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/extensions/filter-control/bootstrap-table-filter-control.js

+ 5 - 5
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -322,7 +322,7 @@
     };
 
     BootstrapTable.prototype.initToolbar = function () {
-        if (!this.showToolbar) {
+        if ((!this.showToolbar) && (this.options.filterControl)) {
             this.showToolbar = this.options.filterControl;
         }
 
@@ -340,7 +340,7 @@
                     '</button>',
                     '</ul>'].join('')).appendTo($btnGroup);
 
-                $btnClear.off('click').on('click', $.proxy(this.refreshFilterControl, this));
+                $btnClear.off('click').on('click', $.proxy(this.clearFilterControl, this));
             }
         }
     };
@@ -435,9 +435,9 @@
         this.trigger('column-search', $field, text);
     };
 
-    BootstrapTable.prototype.refreshFilterControl = function () {
-        $.each(this.options.values, function (i, obj) {
-            obj.value = '';
+    BootstrapTable.prototype.clearFilterControl = function () {
+        $.each(this.options.values, function (i, item) {
+            item.value = '';
         });
 
         setValues(this);