fix for sort operators

This commit is contained in:
rolux 2011-10-09 10:35:09 +00:00
parent 106b2a5577
commit 5d2821534f
2 changed files with 6 additions and 2 deletions

View file

@ -31,7 +31,11 @@ pandora.ui.sortSelect = function() {
}) })
.bindEvent({ .bindEvent({
change: function(data) { change: function(data) {
pandora.UI.set(sortKey, [{key: data.selected[0].id, operator: ''}]); var key = data.selected[0].id;
pandora.UI.set(sortKey, [{
key: key,
operator: pandora.getSortOperator(key)
}]);
}, },
pandora_listsort: function(data) { pandora_listsort: function(data) {
that.selectItem(data.value[0].key); that.selectItem(data.value[0].key);

View file

@ -598,7 +598,7 @@ pandora._getSortOperator = function(type) {
) > -1 ? '+' : '-'; ) > -1 ? '+' : '-';
} }
pandora.getSortOperator = function(key) { // fixme: remove pandora.getSortOperator = function(key) { // fixme: remove?
var type = Ox.getObjectById( var type = Ox.getObjectById(
/^clip:/.test(key) ? pandora.site.clipKeys : pandora.site.itemKeys, /^clip:/.test(key) ? pandora.site.clipKeys : pandora.site.itemKeys,
key key