in updateItemContext, reload list if context stays the same

This commit is contained in:
rolux 2013-02-11 17:48:49 +05:30
parent 16162505ed
commit 1533e2ca64

View file

@ -1245,8 +1245,8 @@ pandora.unloadWindow = function() {
}; };
pandora.updateItemContext = function() { pandora.updateItemContext = function() {
if (!Ox.isEqual(pandora.user.ui.find, pandora.site.user.ui.find)) {
Ox.Request.clearCache('find'); Ox.Request.clearCache('find');
if (!Ox.isEqual(pandora.user.ui.find, pandora.site.user.ui.find)) {
pandora.api.find({ pandora.api.find({
query: pandora.user.ui.find, query: pandora.user.ui.find,
positions: [pandora.user.ui.item], positions: [pandora.user.ui.item],
@ -1256,8 +1256,12 @@ pandora.updateItemContext = function() {
pandora.stayInItemView = true; pandora.stayInItemView = true;
pandora.UI.set({find: pandora.site.user.ui.find}); pandora.UI.set({find: pandora.site.user.ui.find});
pandora.$ui.contentPanel.replaceElement(0, pandora.$ui.browser = pandora.ui.browser()); pandora.$ui.contentPanel.replaceElement(0, pandora.$ui.browser = pandora.ui.browser());
} else {
pandora.$ui.browser.reloadList();
} }
}); });
} else {
pandora.$ui.browser.reloadList();
} }
}; };