浏览代码

Name changed

Dennis Hernández 10 年之前
父节点
当前提交
c005b67ae4

+ 3 - 3
docs/_i18n/en/extensions/reorder.md

@@ -11,12 +11,12 @@ Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must incl
 <link rel="stylesheet" href=".../dragtable.css">
 <link rel="stylesheet" href=".../dragtable.css">
 <script src=".../jquery-ui.js"></script>
 <script src=".../jquery-ui.js"></script>
 <script src=".../jquery.dragtable.js"></script>
 <script src=".../jquery.dragtable.js"></script>
-<script src="extensions/cookie/bootstrap-table-reorder.js"></script>
+<script src="extensions/cookie/bootstrap-table-reorder-columns.js"></script>
 ```
 ```
 
 
 ## Options
 ## Options
 
 
-### reorderable
+### reorderableColumns
 
 
 * type: Boolean
 * type: Boolean
 * description: Set true to allow the reorder feature.
 * description: Set true to allow the reorder feature.
@@ -30,6 +30,6 @@ Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must incl
 
 
 ## Events
 ## Events
 
 
-### onReorder(reorder.bs.table)
+### onReorderColumn(reorder.bs.table)
 
 
 Fired when the column was dropped, receive as parameter the new header fields order
 Fired when the column was dropped, receive as parameter the new header fields order

+ 3 - 3
docs/_i18n/es/extensions/reorder.md

@@ -11,12 +11,12 @@ Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must incl
 <link rel="stylesheet" href=".../dragtable.css">
 <link rel="stylesheet" href=".../dragtable.css">
 <script src=".../jquery-ui.js"></script>
 <script src=".../jquery-ui.js"></script>
 <script src=".../jquery.dragtable.js"></script>
 <script src=".../jquery.dragtable.js"></script>
-<script src="extensions/cookie/bootstrap-table-reorder.js"></script>
+<script src="extensions/cookie/bootstrap-table-reorder-columns.js"></script>
 ```
 ```
 
 
 ## Options
 ## Options
 
 
-### reorderable
+### reorderableColumns
 
 
 * type: Boolean
 * type: Boolean
 * description: Set true to allow the reorder feature.
 * description: Set true to allow the reorder feature.
@@ -30,6 +30,6 @@ Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must incl
 
 
 ## Events
 ## Events
 
 
-### onReorder(reorder.bs.table)
+### onReorderColumn(reorder.bs.table)
 
 
 Fired when the column was dropped, receive as parameter the new header fields order
 Fired when the column was dropped, receive as parameter the new header fields order

+ 3 - 3
docs/_i18n/zh-cn/extensions/reorder.md

@@ -11,12 +11,12 @@ Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must incl
 <link rel="stylesheet" href=".../dragtable.css">
 <link rel="stylesheet" href=".../dragtable.css">
 <script src=".../jquery-ui.js"></script>
 <script src=".../jquery-ui.js"></script>
 <script src=".../jquery.dragtable.js"></script>
 <script src=".../jquery.dragtable.js"></script>
-<script src="extensions/cookie/bootstrap-table-reorder.js"></script>
+<script src="extensions/cookie/bootstrap-table-reorder-columns.js"></script>
 ```
 ```
 
 
 ## Options
 ## Options
 
 
-### reorderable
+### reorderableColumns
 
 
 * type: Boolean
 * type: Boolean
 * description: Set true to allow the reorder feature.
 * description: Set true to allow the reorder feature.
@@ -30,6 +30,6 @@ Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must incl
 
 
 ## Events
 ## Events
 
 
-### onReorder(reorder.bs.table)
+### onReorderColumn(reorder.bs.table)
 
 
 Fired when the column was dropped, receive as parameter the new header fields order
 Fired when the column was dropped, receive as parameter the new header fields order

+ 4 - 4
src/extensions/reorder/README.md

@@ -1,6 +1,6 @@
 # Table Reorder
 # Table Reorder
 
 
-Use Plugin: [bootstrap-table-reorder](https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/reorder) </br>
+Use Plugin: [bootstrap-table-reorder-columns](https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/reordercolumns) </br>
 Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must include the css file), </br>
 Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must include the css file), </br>
 [jquery-ui](https://code.jquery.com/ui/) v1.11
 [jquery-ui](https://code.jquery.com/ui/) v1.11
 
 
@@ -11,12 +11,12 @@ Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must incl
 <link rel="stylesheet" href=".../dragtable.css">
 <link rel="stylesheet" href=".../dragtable.css">
 <script src=".../jquery-ui.js"></script>
 <script src=".../jquery-ui.js"></script>
 <script src=".../jquery.dragtable.js"></script>
 <script src=".../jquery.dragtable.js"></script>
-<script src="extensions/cookie/bootstrap-table-reorder.js"></script>
+<script src="extensions/reordercolumns/bootstrap-table-reorder-columns.js"></script>
 ```
 ```
 
 
 ## Options
 ## Options
 
 
-### reorderable
+### reorderableColumns
 
 
 * type: Boolean
 * type: Boolean
 * description: Set true to allow the reorder feature.
 * description: Set true to allow the reorder feature.
@@ -30,6 +30,6 @@ Dependence: [dragTable](https://github.com/akottr/dragtable/) v2.0.14 (must incl
 
 
 ## Events
 ## Events
 
 
-### onReorder(reorder.bs.table)
+### onReorderColumn(reorder-column.bs.table)
 
 
 Fired when the column was dropped, receive as parameter the new header fields order
 Fired when the column was dropped, receive as parameter the new header fields order

+ 13 - 13
src/extensions/reorder/bootstrap-table-reorder.js

@@ -22,15 +22,15 @@
     };
     };
 
 
     $.extend($.fn.bootstrapTable.defaults, {
     $.extend($.fn.bootstrapTable.defaults, {
-        reorderable: false,
+        reorderableColumns: false,
         maxMovingRows: 10,
         maxMovingRows: 10,
-        onReorder: function (headerFields) {
+        onReorderColumn: function (headerFields) {
             return false;
             return false;
         }
         }
     });
     });
 
 
     $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
     $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
-        'reorder.bs.table': 'onReorder'
+        'reorder-column.bs.table': 'onReorderColumn'
     });
     });
 
 
     var BootstrapTable = $.fn.bootstrapTable.Constructor,
     var BootstrapTable = $.fn.bootstrapTable.Constructor,
@@ -42,27 +42,27 @@
     BootstrapTable.prototype.initHeader = function () {
     BootstrapTable.prototype.initHeader = function () {
         _initHeader.apply(this, Array.prototype.slice.apply(arguments));
         _initHeader.apply(this, Array.prototype.slice.apply(arguments));
 
 
-        if (!this.options.reorderable) {
+        if (!this.options.reorderableColumns) {
             return;
             return;
         }
         }
 
 
-        this.makeColumnsReorderable();
+        this.makeRowsReorderable();
     };
     };
 
 
     BootstrapTable.prototype.toggleColumn = function () {
     BootstrapTable.prototype.toggleColumn = function () {
         _toggleColumn.apply(this, Array.prototype.slice.apply(arguments));
         _toggleColumn.apply(this, Array.prototype.slice.apply(arguments));
 
 
-        if (!this.options.reorderable) {
+        if (!this.options.reorderableColumns) {
             return;
             return;
         }
         }
 
 
-        this.makeColumnsReorderable();
+        this.makeRowsReorderable();
     };
     };
 
 
     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.reorderable) {
+        if (!this.options.reorderableColumns) {
             return;
             return;
         }
         }
 
 
@@ -70,20 +70,20 @@
             return;
             return;
         }
         }
 
 
-        this.makeColumnsReorderable();
+        this.makeRowsReorderable();
     };
     };
 
 
     BootstrapTable.prototype.resetView = function () {
     BootstrapTable.prototype.resetView = function () {
         _resetView.apply(this, Array.prototype.slice.apply(arguments));
         _resetView.apply(this, Array.prototype.slice.apply(arguments));
 
 
-        if (!this.options.reorderable) {
+        if (!this.options.reorderableColumns) {
             return;
             return;
         }
         }
 
 
-        this.makeColumnsReorderable();
+        this.makeRowsReorderable();
     };
     };
 
 
-    BootstrapTable.prototype.makeColumnsReorderable = function () {
+    BootstrapTable.prototype.makeRowsReorderable = function () {
 
 
         var that = this;
         var that = this;
         try {
         try {
@@ -111,7 +111,7 @@
                 that.options.columns = that.options.columns.concat(columns);
                 that.options.columns = that.options.columns.concat(columns);
                 that.header.fields = ths;
                 that.header.fields = ths;
                 that.resetView();
                 that.resetView();
-                that.trigger('reorder', ths);
+                that.trigger('reorder-column', ths);
             }
             }
         });
         });
     };
     };