From 2608213f1d19cef393bdd97277e1bee907ebebc1 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 4 Jan 2011 00:09:10 +0000 Subject: [PATCH] fix for a bug where the results list would not re-sorted after changing the sort order, via select, for the first time --- static/js/pandora.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/static/js/pandora.js b/static/js/pandora.js index f8f8442eb..5281d855a 100755 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -1674,7 +1674,9 @@ var pandora = new Ox.App({ operator = getSortOperator(id); app.$ui.mainMenu.checkItem('sortMenu_ordermovies_' + (operator === '' ? 'ascending' : 'descending')); app.$ui.sortSelect.selectItem(id); + //alert(id + ' ' + operator) app.$ui.list.sortList(id, operator); + URL.set(Query.toString()); } else if (data.id == 'viewmovies') { var view = data.checked[0].id; url('#view=' + view); @@ -2159,9 +2161,15 @@ var pandora = new Ox.App({ .bindEvent('change', function(event, data) { var id = data.selected[0].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_ordermovies_' + (operator === '' ? 'ascending' : 'descending')); + //alert(id + ' ' + operator) app.$ui.list.sortList(id, operator); URL.set(Query.toString()); });