fix a bug with switching list view while viewing an item
This commit is contained in:
parent
5c983597c4
commit
4329922d6b
1 changed files with 16 additions and 15 deletions
|
@ -40,10 +40,10 @@ pandora.ui.toolbar = function() {
|
|||
);
|
||||
that.bindEvent({
|
||||
pandora_listview: function(data) {
|
||||
var isNavigationView = ['map', 'calendar'].indexOf(data.value) > -1,
|
||||
wasNavigationView = ['map', 'calendar'].indexOf(data.previousValue) > -1,
|
||||
action = isNavigationView ? 'hide' : 'show';
|
||||
Ox.Log('', 'IS/WAS', isNavigationView, wasNavigationView);
|
||||
var isNavigationView, wasNavigationView;
|
||||
if (!pandora.user.ui.item) {
|
||||
isNavigationView = ['map', 'calendar'].indexOf(data.value) > -1;
|
||||
wasNavigationView = ['map', 'calendar'].indexOf(data.previousValue) > -1;
|
||||
if (isNavigationView != wasNavigationView) {
|
||||
if (isNavigationView) {
|
||||
pandora.$ui.sortSelect.remove();
|
||||
|
@ -58,6 +58,7 @@ pandora.ui.toolbar = function() {
|
|||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
return that;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue