From 37cb5934a4c5fa0cc457152c49ef883557edb906 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 24 May 2012 13:44:34 +0200 Subject: [PATCH] fix #796 - preserve list selection on item reload --- static/js/pandora/URL.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index 34fe356c..a6843640 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -66,7 +66,6 @@ pandora.URL = (function() { if (Ox.isEmpty(state)) { if (pandora.user.ui.showHome) { - //Ox.print('*** showScreen via URL') pandora.$ui.home = pandora.ui.home().showScreen(); } callback && callback(); @@ -123,14 +122,12 @@ pandora.URL = (function() { set[!state.item ? 'listSort' : 'itemSort'] = state.sort; } - if (state.find) { - if (!state.item) { + if (!state.item) { + if (state.find) { set.find = state.find; - } - } else { - if (!pandora.$ui.appPanel) { - // on page load without find, clear find, so that - // removing query and reloading works as expected + } else if (!pandora.$ui.appPanel) { + // when loading results without find, clear find, so that + // removing a query and reloading works as expected set.find = pandora.site.user.ui.find; } }