This commit is contained in:
j 2011-10-09 13:49:27 +02:00
commit ce8e012fc3
3 changed files with 15 additions and 4 deletions

View file

@ -36,14 +36,16 @@ pandora.URL = (function() {
state.view = 'map'; state.view = 'map';
state.span = pandora.user.ui.mapSelection state.span = pandora.user.ui.mapSelection
? '@' + pandora.user.ui.mapSelection : ''; ? '@' + pandora.user.ui.mapSelection : '';
state.sort = pandora.user.ui.sort; state.sort = !pandora.user.ui.item
? pandora.user.ui.listSort : pandora.user.ui.itemSort;
} }
if (!keys || keys.indexOf('mapFind') > -1) { if (!keys || keys.indexOf('mapFind') > -1) {
state.item = pandora.user.ui.item; state.item = pandora.user.ui.item;
state.view = 'map'; state.view = 'map';
state.span = pandora.user.ui.mapFind state.span = pandora.user.ui.mapFind
? '@' + pandora.user.ui.mapFind : ''; ? '@' + pandora.user.ui.mapFind : '';
state.sort = pandora.user.ui.sort; state.sort = !pandora.user.ui.item
? pandora.user.ui.listSort : pandora.user.ui.itemSort;
} }
if (!keys || keys.filter(function(key) { if (!keys || keys.filter(function(key) {
return /^videoPoints/.test(key); return /^videoPoints/.test(key);
@ -77,6 +79,11 @@ pandora.URL = (function() {
state.view = pandora.user.ui.itemView; state.view = pandora.user.ui.itemView;
state.sort = pandora.user.ui.itemSort; state.sort = pandora.user.ui.itemSort;
} }
if (pandora.user.ui.mapSelection) {
state.span = '@' + pandora.user.ui.mapSelection;
} else if (pandora.user.ui.mapFind) {
state.span = '@' + pandora.user.ui.mapFind;
}
/* /*
: pandora.isClipView(pandora.user.ui.itemView) : pandora.isClipView(pandora.user.ui.itemView)
? pandora.user.ui.itemSort : [], ? pandora.user.ui.itemSort : [],

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