add pandora.updateItemContext()
This commit is contained in:
parent
bf80598696
commit
5351cf498d
1 changed files with 17 additions and 0 deletions
|
@ -1244,6 +1244,23 @@ pandora.unloadWindow = function() {
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pandora.updateItemContext = function() {
|
||||||
|
if (!Ox.isEqual(pandora.user.ui.find, pandora.site.user.ui.find)) {
|
||||||
|
Ox.Request.clearCache('find');
|
||||||
|
pandora.api.find({
|
||||||
|
query: pandora.user.ui.find,
|
||||||
|
positions: [pandora.user.ui.item],
|
||||||
|
sort: pandora.user.ui.sort
|
||||||
|
}, function(result) {
|
||||||
|
if (result.data.positions[pandora.user.ui.item] === void 0) {
|
||||||
|
pandora.stayInItemView = true;
|
||||||
|
pandora.UI.set({find: pandora.site.user.ui.find});
|
||||||
|
pandora.$ui.contentPanel.replaceElement(0, pandora.$ui.browser = pandora.ui.browser());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
// Note: getFindState has to run after getListState and getFilterState
|
// Note: getFindState has to run after getListState and getFilterState
|
||||||
|
|
Loading…
Reference in a new issue