make cancelling requests and clearing cache part of appPanel.reload

This commit is contained in:
rolux 2013-07-29 08:46:55 +00:00
parent a8fca7f07a
commit b0ecc8b077
3 changed files with 2 additions and 3 deletions

View file

@ -26,6 +26,8 @@ pandora.ui.appPanel = function() {
return that; return that;
}; };
that.reload = function() { that.reload = function() {
Ox.Request.cancel();
Ox.Request.clearCache();
pandora.$ui.appPanel.remove(); pandora.$ui.appPanel.remove();
pandora.$ui.appPanel = pandora.ui.appPanel().appendTo(pandora.$ui.body); pandora.$ui.appPanel = pandora.ui.appPanel().appendTo(pandora.$ui.body);
return that; return that;

View file

@ -421,7 +421,6 @@ pandora.ui.mainMenu = function() {
} else if (data.id == 'clearcache') { } else if (data.id == 'clearcache') {
Ox.Request.clearCache(); Ox.Request.clearCache();
} else if (data.id == 'reloadapplication') { } else if (data.id == 'reloadapplication') {
Ox.Request.clearCache();
pandora.$ui.appPanel.reload(); pandora.$ui.appPanel.reload();
} else if (data.id == 'debugmode') { } else if (data.id == 'debugmode') {
if (pandora.localStorage('enableDebugMode')) { if (pandora.localStorage('enableDebugMode')) {

View file

@ -1540,7 +1540,6 @@ pandora.signin = function(data) {
pandora.URL.init(); pandora.URL.init();
pandora.URL.update(); pandora.URL.update();
Ox.Theme(pandora.user.ui.theme); Ox.Theme(pandora.user.ui.theme);
Ox.Request.clearCache();
pandora.$ui.appPanel.reload(); pandora.$ui.appPanel.reload();
}; };
@ -1554,7 +1553,6 @@ pandora.signout = function(data) {
pandora.URL.init(); pandora.URL.init();
pandora.URL.update(); pandora.URL.update();
Ox.Theme(pandora.user.ui.theme); Ox.Theme(pandora.user.ui.theme);
Ox.Request.clearCache();
pandora.$ui.appPanel.reload(); pandora.$ui.appPanel.reload();
}; };