fix for a bug where the results list would not re-sorted after changing the sort order, via select, for the first time

This commit is contained in:
rlx 2011-01-04 00:09:10 +00:00
parent e146f4a650
commit 4b591eeaac

View file

@ -1674,7 +1674,9 @@ var pandora = new Ox.App({
operator = getSortOperator(id); operator = getSortOperator(id);
app.$ui.mainMenu.checkItem('sortMenu_ordermovies_' + (operator === '' ? 'ascending' : 'descending')); app.$ui.mainMenu.checkItem('sortMenu_ordermovies_' + (operator === '' ? 'ascending' : 'descending'));
app.$ui.sortSelect.selectItem(id); app.$ui.sortSelect.selectItem(id);
//alert(id + ' ' + operator)
app.$ui.list.sortList(id, operator); app.$ui.list.sortList(id, operator);
URL.set(Query.toString());
} else if (data.id == 'viewmovies') { } else if (data.id == 'viewmovies') {
var view = data.checked[0].id; var view = data.checked[0].id;
url('#view=' + view); url('#view=' + view);
@ -2159,9 +2161,15 @@ var pandora = new Ox.App({
.bindEvent('change', function(event, data) { .bindEvent('change', function(event, data) {
var id = data.selected[0].id, var id = data.selected[0].id,
operator = getSortOperator(id); operator = getSortOperator(id);
app.user.ui.sort[0].key = id; /*
app.user.ui.sort[0] = {
key: id,
operator: operator
};
*/
app.$ui.mainMenu.checkItem('sortMenu_sortmovies_' + id); app.$ui.mainMenu.checkItem('sortMenu_sortmovies_' + id);
app.$ui.mainMenu.checkItem('sortMenu_ordermovies_' + (operator === '' ? 'ascending' : 'descending')); app.$ui.mainMenu.checkItem('sortMenu_ordermovies_' + (operator === '' ? 'ascending' : 'descending'));
//alert(id + ' ' + operator)
app.$ui.list.sortList(id, operator); app.$ui.list.sortList(id, operator);
URL.set(Query.toString()); URL.set(Query.toString());
}); });