corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 # Table Reorder Rows
2  
3 Use Plugin: [bootstrap-table-reorder-rows](https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/reorder-rows) </br>
4 Dependence: [tablednd](https://github.com/isocra/TableDnD) v0.9, </br>
5 if you want you can include the bootstrap-table-reorder-rows.css file to use the default dragClass
6  
7  
8 ## Usage
9  
10 ```html
11 <link rel="stylesheet" href=".../bootstrap-table-reorder-rows.css">
12 <script src=".../jquery.tablednd.js"></script>
13 <script src="extensions/reorder-rows/bootstrap-table-reorder-rows.js"></script>
14 ```
15  
16 ## Options
17  
18 ### reorderableRows
19  
20 * type: Boolean
21 * description: Set true to allow the reorder feature.
22 * default: `false`
23  
24 ### onDragStyle
25  
26 * type: String
27 * description: This is the style that is assigned to the row during drag. There are limitations to the styles that can be associated with a row (such as you can't assign a border�well you can, but it won't be displayed).
28 * default: `null`
29  
30 ### onDropStyle
31  
32 * type: String
33 * description: This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations to what you can do. Also this replaces the original style, so again consider using onDragClass which is simply added and then removed on drop.
34 * default: `null`
35  
36 ### onDragClass
37  
38 * type: String
39 * description: This class is added for the duration of the drag and then removed when the row is dropped. It is more flexible than using onDragStyle since it can be inherited by the row cells and other content.
40 * default: `reorder_rows_onDragClass`
41  
42 ### dragHandle
43  
44 * type: String
45 * description: This is the cursor to use
46 * default: `null`
47  
48 ### useRowAttrFunc
49  
50 * type: Boolean
51 * description: This function must be use if your `tr` elements won't have the `id` attribute. If your `tr` elements don't have the `id` attribute this plugin don't fire the onDrop event.
52 * default: `false`
53  
54 ### onReorderRowsDrag
55  
56 * type: Function
57 * description: Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the table and the row which the user has started to drag.
58 * default: `empty function`
59  
60 ### onReorderRowsDrop
61  
62 * type: Function
63 * description: Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table and the row that was dropped.
64 * default: `empty function`
65  
66 ## Events
67  
68 ### onReorderRow(reorder-row.bs.table)
69  
70 Fired when the row was dropped, receive as parameter the new data order
71  
72 ## The existing problems
73  
74 * After search if the user reorder the rows the data is not shown properly after that.