ソースを参照

Merge pull request #36 from wenzhixin/master

Update my repo
Dennis Hernández 10 年 前
コミット
a37c4abeef

+ 1 - 1
docs/README.md

@@ -8,7 +8,7 @@ Bootstrap table's documentation, included in this repo in the root directory, is
   - **Windows users:** Read [this unofficial](http://jekyll-windows.juthilo.com/) guide to get Jekyll up and running without problems.
   - **Windows users:** Read [this unofficial](http://jekyll-windows.juthilo.com/) guide to get Jekyll up and running without problems.
 
 
 2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.
 2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.
-3. From the root /docs directory, run `jekyll serve` in the command line.
+3. From the root / directory, run `jekyll serve` in the command line.
 4. Open http://localhost:4000 in your browser, and voilà.
 4. Open http://localhost:4000 in your browser, and voilà.
 
 
 Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).
 Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).

+ 2 - 2
src/extensions/export/README.md

@@ -1,6 +1,6 @@
 # Table Export
 # Table Export
 
 
-Use Plugin: [tableExport.jquery.plugin](https://github.com/kayalshri/tableExport.jquery.plugin)
+Use Plugin: [tableExport.jquery.plugin](https://github.com/hhurz/tableExport.jquery.plugin)
 
 
 ## Usage
 ## Usage
 
 
@@ -25,5 +25,5 @@ Use Plugin: [tableExport.jquery.plugin](https://github.com/kayalshri/tableExport
 ### exportOptions
 ### exportOptions
 
 
 * type: Object
 * type: Object
-* description: export [options](https://github.com/kayalshri/tableExport.jquery.plugin#options) of `tableExport.jquery.plugin`
+* description: export [options](https://github.com/hhurz/tableExport.jquery.plugin#options) of `tableExport.jquery.plugin`
 * default: `{}`
 * default: `{}`

+ 8 - 32
src/extensions/resizable/bootstrap-table-resizable.js

@@ -7,14 +7,12 @@
 (function ($) {
 (function ($) {
     'use strict';
     'use strict';
 
 
-    var initResizable = function (el) {
-        var that = el;
-
+    var initResizable = function (that) {
         //Deletes the plugin to re-create it
         //Deletes the plugin to re-create it
-        $(el.$el).colResizable({disable: true});
+        that.$el.colResizable({disable: true});
 
 
         //Creates the plugin
         //Creates the plugin
-        $(el.$el).colResizable({
+        that.$el.colResizable({
             liveDrag: that.options.liveDrag,
             liveDrag: that.options.liveDrag,
             fixed: that.options.fixed,
             fixed: that.options.fixed,
             headerOnly: that.options.headerOnly,
             headerOnly: that.options.headerOnly,
@@ -43,46 +41,24 @@
     });
     });
 
 
     var BootstrapTable = $.fn.bootstrapTable.Constructor,
     var BootstrapTable = $.fn.bootstrapTable.Constructor,
-        _init = BootstrapTable.prototype.init,
-        _toggleColumn = BootstrapTable.prototype.toggleColumn,
         _toggleView = BootstrapTable.prototype.toggleView,
         _toggleView = BootstrapTable.prototype.toggleView,
         _resetView = BootstrapTable.prototype.resetView;
         _resetView = BootstrapTable.prototype.resetView;
 
 
-    BootstrapTable.prototype.init = function () {
-        _init.apply(this, Array.prototype.slice.apply(arguments));
-
-        if (this.options.resizable) {
-            initResizable(this);
-        }
-    };
-
-    BootstrapTable.prototype.toggleColumn = function () {
-        _toggleColumn.apply(this, Array.prototype.slice.apply(arguments));
-
-        if (this.options.resizable) {
-            initResizable(this);
-        }
-    };
-
     BootstrapTable.prototype.toggleView = function () {
     BootstrapTable.prototype.toggleView = function () {
         _toggleView.apply(this, Array.prototype.slice.apply(arguments));
         _toggleView.apply(this, Array.prototype.slice.apply(arguments));
 
 
-        if (this.options.resizable) {
-            if (this.options.cardView) {
-                //Deletes the plugin
-                $(this.$el).colResizable({disable: true});
-                return;
-            }
-            initResizable(this);
+        if (this.options.resizable && this.options.cardView) {
+            //Deletes the plugin
+            $(this.$el).colResizable({disable: true});
         }
         }
     };
     };
 
 
     BootstrapTable.prototype.resetView = function () {
     BootstrapTable.prototype.resetView = function () {
-        _resetView.apply(this, Array.prototype.slice.apply(arguments));
-
         if (this.options.resizable) {
         if (this.options.resizable) {
             initResizable(this);
             initResizable(this);
         }
         }
+
+        _resetView.apply(this, Array.prototype.slice.apply(arguments));
     };
     };
 
 
     BootstrapTable.prototype.onResize = function (e) {
     BootstrapTable.prototype.onResize = function (e) {