forked from 0x2620/pandora
make filter sort persistent
This commit is contained in:
parent
b5cecee034
commit
6fb9aee717
2 changed files with 6 additions and 4 deletions
|
@ -174,9 +174,11 @@ pandora.ui.documentFilter = function(id) {
|
||||||
},
|
},
|
||||||
sort: function(data) {
|
sort: function(data) {
|
||||||
Ox.Log('', 'SORT', data)
|
Ox.Log('', 'SORT', data)
|
||||||
var filters = Ox.clone(pandora.user.ui.documentFilters);
|
var filters = Ox.clone(pandora.user.ui.documentFilters, true);
|
||||||
|
/*
|
||||||
pandora.$ui.mainMenu.checkItem('sortMenu_sortfilters_sortfilter' + id + '_' + data.key);
|
pandora.$ui.mainMenu.checkItem('sortMenu_sortfilters_sortfilter' + id + '_' + data.key);
|
||||||
pandora.$ui.mainMenu.checkItem('sortMenu_orderfilters_orderfilter' + id + '_' + (data.operator == '+' ? 'ascending' : 'descending'));
|
pandora.$ui.mainMenu.checkItem('sortMenu_orderfilters_orderfilter' + id + '_' + (data.operator == '+' ? 'ascending' : 'descending'));
|
||||||
|
*/
|
||||||
filters[i].sort = [{key: data.key, operator: data.operator}];
|
filters[i].sort = [{key: data.key, operator: data.operator}];
|
||||||
pandora.UI.set({documentFilters: filters});
|
pandora.UI.set({documentFilters: filters});
|
||||||
}
|
}
|
||||||
|
@ -201,7 +203,7 @@ pandora.ui.documentFilter = function(id) {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
var filters = Ox.clone(pandora.user.ui.documentFilters),
|
var filters = Ox.clone(pandora.user.ui.documentFilters, true),
|
||||||
find,
|
find,
|
||||||
id_ = data.checked[0].id,
|
id_ = data.checked[0].id,
|
||||||
i_ = Ox.getIndexById(pandora.user.ui.documentFilters, id_);
|
i_ = Ox.getIndexById(pandora.user.ui.documentFilters, id_);
|
||||||
|
|
|
@ -174,7 +174,7 @@ pandora.ui.filter = function(id) {
|
||||||
},
|
},
|
||||||
sort: function(data) {
|
sort: function(data) {
|
||||||
Ox.Log('', 'SORT', data)
|
Ox.Log('', 'SORT', data)
|
||||||
var filters = Ox.clone(pandora.user.ui.filters);
|
var filters = Ox.clone(pandora.user.ui.filters, true);
|
||||||
pandora.$ui.mainMenu.checkItem('sortMenu_sortfilters_sortfilter' + id + '_' + data.key);
|
pandora.$ui.mainMenu.checkItem('sortMenu_sortfilters_sortfilter' + id + '_' + data.key);
|
||||||
pandora.$ui.mainMenu.checkItem('sortMenu_orderfilters_orderfilter' + id + '_' + (data.operator == '+' ? 'ascending' : 'descending'));
|
pandora.$ui.mainMenu.checkItem('sortMenu_orderfilters_orderfilter' + id + '_' + (data.operator == '+' ? 'ascending' : 'descending'));
|
||||||
filters[i].sort = [{key: data.key, operator: data.operator}];
|
filters[i].sort = [{key: data.key, operator: data.operator}];
|
||||||
|
@ -201,7 +201,7 @@ pandora.ui.filter = function(id) {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
var filters = Ox.clone(pandora.user.ui.filters),
|
var filters = Ox.clone(pandora.user.ui.filters, true),
|
||||||
find,
|
find,
|
||||||
id_ = data.checked[0].id,
|
id_ = data.checked[0].id,
|
||||||
i_ = Ox.getIndexById(pandora.user.ui.filters, id_);
|
i_ = Ox.getIndexById(pandora.user.ui.filters, id_);
|
||||||
|
|
Loading…
Reference in a new issue