Browse Source

Applied changes requested

Dennis Hernández 9 years ago
parent
commit
1a501fda5a

+ 6 - 6
src/bootstrap-table.js

@@ -697,7 +697,7 @@
             return;
         }
 
-        this.fromHtml = this.options.sidePagination === 'server' ? false : true;
+        this.fromHtml = this.options.sidePagination === 'client';
         var m = [];
         this.$el.find('>tbody>tr').each(function (y) {
             var row = {};
@@ -2104,7 +2104,7 @@
         });
 
         var visibleFields = this.getVisibleFields(),
-            ths = this.$header_.find('th');
+            $ths = this.$header_.find('th');
 
         this.$body.find('>tr:first-child:not(.no-records-found) > *').each(function (i) {
             var $this = $(this),
@@ -2117,12 +2117,12 @@
                 index = i - 1;
             }
 
-            var th = that.$header_.find(sprintf('th[data-field="%s"]', visibleFields[index]));
-            if (th.length > 1) {
-                th = $(ths[$this[0].cellIndex]);
+            var $th = that.$header_.find(sprintf('th[data-field="%s"]', visibleFields[index]));
+            if ($th.length > 1) {
+                $th = $($ths[$this[0].cellIndex]);
             }
 
-            th.find('.fht-cell').width($this.innerWidth());
+            $th.find('.fht-cell').width($this.innerWidth());
         });
         // horizontal scroll event
         // TODO: it's probably better improving the layout than binding to scroll event

+ 1 - 1
src/extensions/cookie/extension.json

@@ -1,6 +1,6 @@
 {
   "name": "Cookie",
-  "version": "1.2.0",
+  "version": "1.2.1",
   "description": "Plugin to use the cookie of the browser.",
   "url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/cookie",
   "example": "http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/cookie.html",

+ 1 - 1
src/extensions/filter-control/extension.json

@@ -1,6 +1,6 @@
 {
   "name": "Filter Control",
-  "version": "1.0.0",
+  "version": "2.1.0",
   "description": "Plugin to add input/select element on the top of the columns in order to filter the data.",
   "url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/filter-control",
   "example": "http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/filter-control.html",