sync sort menu and text list
This commit is contained in:
parent
39a5219267
commit
fe8e821095
6 changed files with 91 additions and 60 deletions
|
|
@ -106,9 +106,9 @@ pandora.Query = (function() {
|
|||
}
|
||||
if ('sort' in query) {
|
||||
sort = query.sort.split(',');
|
||||
pandora.UI.set(['lists', pandora.user.ui.list, 'sort'].join('|'), $.map(query.sort.split(','), function(v, i) {
|
||||
pandora.UI.set(['lists', pandora.user.ui.list, 'sort'].join('|'), query.sort.split(',').map(function(v) {
|
||||
var hasOperator = '+-'.indexOf(v[0]) > -1,
|
||||
key = hasOperator ? query.sort.substr(1) : query.sort,
|
||||
key = hasOperator ? v.substr(1) : v,
|
||||
operator = hasOperator ? v[0]/*.replace('+', '')*/ : pandora.getSortOperator(key);
|
||||
return {
|
||||
key: key,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue