From 34c0e9879804c8aec408b84904dad5526c95a7b9 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 12 Jul 2013 12:32:45 +0200 Subject: [PATCH] URL controller: don't store ui.hash --- static/js/pandora/URL.js | 42 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 34 deletions(-) diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index d7f955ecd..65769c019 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -63,20 +63,6 @@ pandora.URL = (function() { } - if ( - pandora.user.ui.hash && ( - pandora.user.ui.hash.anchor || !Ox.isEmpty(pandora.user.ui.hash.query) - ) - ) { - state.hash = {}; - if (pandora.user.ui.hash.anchor) { - state.hash.anchor = pandora.user.ui.hash.anchor; - } - if (!Ox.isEmpty(pandora.user.ui.hash.query)) { - state.hash.query = pandora.user.ui.hash.query; - } - } - Ox.Log('URL', 'GOT STATE ...', state) return state; @@ -100,26 +86,14 @@ pandora.URL = (function() { } else { - if (state.hash) { - set.hash = state.hash; - if (!state.hash.anchor) { - state.hash.anchor = ''; - } - if (state.hash.query) { - if (state.hash.query.embed === true) { - // ... - } else if (state.hash.query.print == true) { - // ... - } else { - state.hash.query.forEach(function(kv) { - set[kv.key] = kv.value; - }); - } - } else { - set.hash.query = []; - } - } else { - set.hash = Ox.clone(pandora.site.user.ui.hash, true); + if ( + state.hash + && !Ox.contains(['embed', 'print'], state.hash.anchor) + && state.hash.query + ) { + state.hash.query.forEach(function(kv) { + set[kv.key] = kv.value; + }); } if (state.page) {