diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index 1775a8c7..e90cf73a 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -9,13 +9,17 @@ pandora.URL = (function() { if (/^\?url=/.test(search)) { document.location = decodeURIComponent(search.substr(5)); } else { - pandora.Query.fromString(search); - pandora.UI.set({ - section: 'items', - item: '' - }); if (!search && pandora.user.ui.showHome) { pandora.$ui.home = pandora.ui.home().showScreen(); + pandora.user.ui.list && pandora.Query.fromString( + 'find=list:' + pandora.user.ui.list + ); + } else { + pandora.Query.fromString(search); + pandora.UI.set({ + section: 'items', + item: '' + }); } } }, @@ -139,7 +143,6 @@ pandora.URL = (function() { + document.location.search + document.location.hash; */ - pandora.Query.updateGroups(); Ox.forEach(regexps, function(fn, re) { re = new RegExp(re); if (re.test(pathname)) { @@ -148,6 +151,7 @@ pandora.URL = (function() { return false; } }); + pandora.Query.updateGroups(); pandora.user.ui.showHome = false; }, diff --git a/static/js/pandora/ui/folderBrowserList.js b/static/js/pandora/ui/folderBrowserList.js index 4b0e5c39..47caa4b0 100644 --- a/static/js/pandora/ui/folderBrowserList.js +++ b/static/js/pandora/ui/folderBrowserList.js @@ -181,10 +181,10 @@ pandora.ui.folderBrowserList = function(id) { Ox.forEach(pandora.$ui.folderList, function($list, id_) { id != id_ && $list.options('selected', []); }); - pandora.UI.set({list: data.ids[0]}); + //pandora.UI.set({list: data.ids[0]}); pandora.URL.set('?find=list:' + data.ids[0]); } else { - pandora.UI.set({list: ''}); + //pandora.UI.set({list: ''}); pandora.URL.set(''); } } diff --git a/static/js/pandora/ui/foldersList.js b/static/js/pandora/ui/foldersList.js index 0156df50..8a0cdfd5 100644 --- a/static/js/pandora/ui/foldersList.js +++ b/static/js/pandora/ui/foldersList.js @@ -361,6 +361,7 @@ pandora.ui.folderList = function(id) { Ox.forEach(pandora.$ui.folderList, function($list, id_) { id != id_ && $list.options('selected', []); }); + //pandora.UI.set({list: data.ids[0]}); pandora.URL.set('?find=' + (id == 'volumes' ? 'volume' : 'list') + ':' + data.ids[0]); } else { //pandora.UI.set({list: ''}); diff --git a/static/js/pandora/ui/home.js b/static/js/pandora/ui/home.js index 6973cc0c..61cb8eb6 100644 --- a/static/js/pandora/ui/home.js +++ b/static/js/pandora/ui/home.js @@ -2,6 +2,8 @@ pandora.ui.home = function() { + // fixme: if a list was selected previously, it will steal focus from the input element + var that = $('