浏览代码

Support pagination server

with addtional url params extension can support multisort in pagination server. Added array url parameter:  multiSort
bleeloe 9 年之前
父节点
当前提交
1d19c0ddf7
共有 1 个文件被更改,包括 15 次插入2 次删除
  1. 15 2
      src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

+ 15 - 2
src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

@@ -119,9 +119,22 @@
                         $($alert).remove();
                     }
 
-                    that.options.sortName = "";
-                    that.onMultipleSort();
                     that.$sortModal.modal('hide');
+                    that.options.sortName = "";                    
+
+                    if (that.options.sidePagination === 'server') {
+                        
+                        that.options.queryParams = function(params){                            
+                            params.multiSort = that.options.sortPriority;
+                            return params;
+                        }
+                        
+                        that.initServer(that.options.silentSort);
+                        return;
+                    } 
+
+                    that.onMultipleSort();
+                    
                 }
             });