diff --git a/static/js/pandora.js b/static/js/pandora.js index 837b31d77..b76eefd49 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -130,12 +130,11 @@ appPanel } function loadOxJS(callback) { - var head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement, - script = document.createElement('script'); + var script = document.createElement('script'); script.onload = callback; script.src = '/static/oxjs/dev/Ox.js'; script.type = 'text/javascript'; - head.appendChild(script); + document.head.appendChild(script); } function loadOxUI(callback) { @@ -374,7 +373,7 @@ appPanel .attr({ src: Ox.PATH + 'Ox.UI/png/browser' + browser.name.replace(' ', '') + '128.png' }) - .css({border: 0, width: '32px', height: '32px', margin: '4px'}) + .css({width: '32px', height: '32px', margin: '4px'}) ) .appendTo($images); }); diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index f19f26197..e4583e267 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -79,7 +79,8 @@ pandora.URL = (function() { var set = { section: state.type == pandora.site.itemsSection ? 'items' : state.type, - item: state.item + item: state.item, + page: '' }; if (state.view) { @@ -132,6 +133,7 @@ pandora.URL = (function() { $(this).trigger('stop'); }); + Ox.Log('URL', 'UI.set', set) if (!pandora.$ui.appPanel && state.item && pandora.user.ui.find) { // on page load, if item is set and there was a query, // we have to check if the item actually matches the query, diff --git a/static/js/pandora/appPanel.js b/static/js/pandora/appPanel.js index 40fdfef67..9bcd7998e 100644 --- a/static/js/pandora/appPanel.js +++ b/static/js/pandora/appPanel.js @@ -37,11 +37,9 @@ pandora.ui.appPanel = function() { }); function setPage(page) { if (page === '') { - /* - if (pandora.$ui.home) { - pandora.$ui.home.fadeOutScreen(); - } else - */ + ['site', 'account', 'preferences', 'help'].forEach(function(dialog) { + pandora.$ui[dialog + 'Dialog'] && pandora.$ui[dialog + 'Dialog'].close(); + }); if (pandora.$ui.tv) { pandora.$ui.tv.fadeOutScreen(); } diff --git a/static/js/pandora/home.js b/static/js/pandora/home.js index 530bfaf31..4d10d03c0 100644 --- a/static/js/pandora/home.js +++ b/static/js/pandora/home.js @@ -137,7 +137,7 @@ pandora.ui.home = function() { }) .bindEvent({ click: function() { - pandora.UI.set({page: ''}); + pandora.UI.set({page: pandora.user.ui.page}); that.fadeOutScreen(); } }) diff --git a/static/js/pandora/home.padma.js b/static/js/pandora/home.padma.js index 72a7366b4..0b40f5612 100644 --- a/static/js/pandora/home.padma.js +++ b/static/js/pandora/home.padma.js @@ -145,7 +145,7 @@ pandora.ui.home = function() { }) .bindEvent({ click: function() { - pandora.UI.set({page: ''}); + pandora.UI.set({page: pandora.user.ui.page}); that.fadeOutScreen(); } })