don't reload groups when changing list view or list sort
This commit is contained in:
parent
bd88297eb9
commit
ef30225ed7
6 changed files with 41 additions and 17 deletions
|
|
@ -47,6 +47,7 @@ pandora.ui.list = function() { // fixme: remove view argument
|
|||
}), callback);
|
||||
},
|
||||
scrollbarVisible: true,
|
||||
selected: pandora.user.ui.lists[pandora.user.ui.list].selected,
|
||||
sort: pandora.user.ui.lists[pandora.user.ui.list].sort
|
||||
})
|
||||
.bindEvent({
|
||||
|
|
@ -413,7 +414,8 @@ pandora.ui.list = function() { // fixme: remove view argument
|
|||
},
|
||||
select: function(event, data) {
|
||||
var $still, $timeline;
|
||||
pandora.user.ui.lists[pandora.user.ui.list].selected = data.ids;
|
||||
pandora.UI.set(['lists', pandora.user.ui.list, 'selected'].join('|'), data.ids);
|
||||
//pandora.user.ui.lists[pandora.user.ui.list].selected = data.ids;
|
||||
if (data.ids.length) {
|
||||
pandora.$ui.mainMenu.enableItem('copy');
|
||||
pandora.$ui.mainMenu.enableItem('openmovie');
|
||||
|
|
@ -438,6 +440,7 @@ pandora.ui.list = function() { // fixme: remove view argument
|
|||
});
|
||||
},
|
||||
sort: function(event, data) {
|
||||
Ox.print('--SORT--', pandora.user.ui.sort[0].key)
|
||||
/* some magic has already set user.ui.sort
|
||||
Ox.print(':', user.ui.sort[0])
|
||||
if (data.key != user.ui.sort[0].key) {
|
||||
|
|
|
|||
|
|
@ -17,18 +17,17 @@ pandora.ui.sortSelect = function() {
|
|||
})
|
||||
.bindEvent({
|
||||
change: function(event, data) {
|
||||
var id = data.selected[0].id,
|
||||
operator = pandora.getSortOperator(id);
|
||||
/*
|
||||
pandora.user.ui.lists[pandora.user.ui.list].sort[0] = {
|
||||
key: id,
|
||||
operator: operator
|
||||
};
|
||||
*/
|
||||
pandora.$ui.mainMenu.checkItem('sortMenu_sortmovies_' + id);
|
||||
var key = data.selected[0].id,
|
||||
operator = pandora.getSortOperator(key);
|
||||
pandora.$ui.mainMenu.checkItem('sortMenu_sortmovies_' + key);
|
||||
pandora.$ui.mainMenu.checkItem('sortMenu_ordermovies_' + (operator === '' ? 'ascending' : 'descending'));
|
||||
pandora.$ui.list.sortList(id, operator);
|
||||
pandora.URL.set(pandora.Query.toString());
|
||||
pandora.$ui.list.options({
|
||||
sort: [{key: key, operator: operator}]
|
||||
});
|
||||
// fixme: why does this not work??
|
||||
//pandora.UI.set(['lists', pandora.user.ui.list, 'sort'].join('|'), [{key: key, operator: operator}]);
|
||||
pandora.user.ui.lists[pandora.user.ui.list].sort[0] = {key: key, operator: operator};
|
||||
pandora.URL.push(pandora.Query.toString());
|
||||
}
|
||||
});
|
||||
return that;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
pandora.ui.toolbar = function() {
|
||||
var that = Ox.Bar({
|
||||
size: 24
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ pandora.ui.viewSelect = function() {
|
|||
var id = data.selected[0].id;
|
||||
pandora.$ui.mainMenu.checkItem('viewMenu_movies_' + id);
|
||||
pandora.UI.set(['lists', pandora.user.ui.list, 'listView'].join('|'), id);
|
||||
pandora.URL.set(pandora.Query.toString());
|
||||
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.list = pandora.ui.list());
|
||||
pandora.URL.push(pandora.Query.toString());
|
||||
} : function(event, data) {
|
||||
var id = data.selected[0].id;
|
||||
//pandora.UI.set({itemView: id});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue