return to the correct url after closing the site dialog; don't cancel requests when opening the site dialog

This commit is contained in:
rolux 2011-10-08 15:03:13 +00:00
parent c14effdf9c
commit c63677fd1f
2 changed files with 6 additions and 8 deletions

View file

@ -100,11 +100,6 @@ pandora.URL = (function() {
Ox.print('SET STATE:', state) Ox.print('SET STATE:', state)
var find, previousUI = pandora.UI.getPrevious(); var find, previousUI = pandora.UI.getPrevious();
Ox.Request.cancel();
$('video').each(function() {
$(this).trigger('stop');
});
pandora.user.ui._groupsState = pandora.getGroupsState(pandora.user.ui.find); pandora.user.ui._groupsState = pandora.getGroupsState(pandora.user.ui.find);
pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find); pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find);
@ -207,6 +202,11 @@ pandora.URL = (function() {
} }
//*/ //*/
Ox.Request.cancel();
$('video').each(function() {
$(this).trigger('stop');
});
if (!pandora.$ui.appPanel && state.item && pandora.user.ui.find) { if (!pandora.$ui.appPanel && state.item && pandora.user.ui.find) {
// on page load, if item is set and there is or was a query, // on page load, if item is set and there is or was a query,
// we have to check if the item actually matches the query, // we have to check if the item actually matches the query,

View file

@ -62,9 +62,7 @@ pandora.ui.siteDialog = function(section) {
}).bindEvent({ }).bindEvent({
click: function() { click: function() {
$dialog.close(); $dialog.close();
//fixme: this should be using URL.push / UI.set pandora.URL.update();
//but that currenlty causes a reload
history.pushState({}, '', '/');
} }
}) })
], ],