diff --git a/static/js/pandora/helpDialog.js b/static/js/pandora/helpDialog.js index 820bd595..15a6bbc5 100644 --- a/static/js/pandora/helpDialog.js +++ b/static/js/pandora/helpDialog.js @@ -30,7 +30,7 @@ pandora.ui.helpDialog = function() { buttons: [ Ox.Button({ id: 'switch', - title: pandora.site.site.name + ' API...' + title: 'API Documentation...' }).bindEvent({ click: function() { pandora.UI.set({page: 'api', 'hash.anchor': ''}) @@ -59,7 +59,7 @@ pandora.ui.helpDialog = function() { }) .bindEvent({ close: function() { - pandora.UI.set({page: '', 'hash.anchor': ''}); + pandora.user.ui.page == 'help' && pandora.UI.set({page: '', 'hash.anchor': ''}); }, resize: function() { $list.size(); diff --git a/static/js/pandora/preferencesDialog.js b/static/js/pandora/preferencesDialog.js index a67aaa44..de640c8f 100644 --- a/static/js/pandora/preferencesDialog.js +++ b/static/js/pandora/preferencesDialog.js @@ -133,7 +133,6 @@ pandora.ui.preferencesDialog = function() { title: 'Sign Out...' }).bindEvent({ click: function() { - $dialog.close(); pandora.UI.set({page: 'signout'}); } }), @@ -154,13 +153,12 @@ pandora.ui.preferencesDialog = function() { minWidth: 432, title: 'Preferences', width: 432 - }), - closeDialog = $dialog.close; - - $dialog.close = function() { - closeDialog(); - pandora.UI.set({page: ''}); - }; + }) + .bindEvent({ + close: function() { + pandora.user.ui.page == 'preferences' && pandora.UI.set({page: ''}); + } + }); return $dialog; diff --git a/static/js/pandora/siteDialog.js b/static/js/pandora/siteDialog.js index d49d0e23..583038d0 100644 --- a/static/js/pandora/siteDialog.js +++ b/static/js/pandora/siteDialog.js @@ -118,7 +118,7 @@ pandora.ui.siteDialog = function(section) { }) .bindEvent({ close: function(data) { - pandora.UI.set({page: ''}); + Ox.getObjectById(tabs, pandora.user.ui.page) && pandora.UI.set({page: ''}); }, resize: function(data) { var selected = $tabPanel.selected();