From 4b591eeaacd90411db284fb27d62bac2f6b4112d Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> 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 f8f8442..5281d85 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()); });