allow multisort with selectable sort order
This commit is contained in:
parent
3336decac8
commit
fcca6bfc34
2 changed files with 6 additions and 2 deletions
2
js/core.min.js
vendored
2
js/core.min.js
vendored
|
|
@ -278,4 +278,4 @@ wn.request.call({args:args,success:opts.callback,error:opts.error,btn:opts.btn,f
|
|||
* lib/js/core.js
|
||||
*/
|
||||
if(!console){var console={log:function(txt){}}}
|
||||
window._version_number="1e94c62f61174cfb7f98c2bdd377674ef06b81eff2e4d1c2dff88107";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
|
||||
window._version_number="6123c7881505af8bdcadcac363d143df24a587186c90a50f40a97664";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
|
||||
|
|
@ -235,13 +235,17 @@ _r.DataTable.prototype.update_query = function(no_limit) {
|
|||
if((_r.rb_con.cur_rb && _r.rb_con.cur_rb.get_query) || (this.search_criteria && this.search_criteria.custom_query)) {
|
||||
// no sorting if custom_query or get_query
|
||||
} else {
|
||||
var me = this;
|
||||
var sort_by = null,
|
||||
sort_order = "";
|
||||
if (sel_val(this.sort_sel)) {
|
||||
sort_by = sel_val(this.sort_sel);
|
||||
sort_order = this.sort_order;
|
||||
} else if(_r.rb_con.cur_rb.sc.sort_by) {
|
||||
sort_by = _r.rb_con.cur_rb.sc.sort_by;
|
||||
sort_by = (_r.rb_con.cur_rb.sc.sort_by || "").split(",");
|
||||
sort_by = $.map(sort_by, function(v) {
|
||||
return v.trim() + " " + (me.sort_order || "");
|
||||
}).join(", ");
|
||||
sort_order = "";
|
||||
} else {
|
||||
this.sort_sel.selectedIndex = 0; // select the first value (IE)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue