From b571b9133868152158a142c2a49f45417b18a652 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 16 Nov 2010 15:59:34 +0100 Subject: [PATCH] Merge from DIMP. --- kronolith/js/kronolith.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 3f010788c..92d828078 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -254,13 +254,16 @@ KronolithCore = { this.redirect(url || (Kronolith.conf.URI_AJAX + 'logOut')); }, - redirect: function(url, force) + // url = (string) URL to redirect to + // hash = (boolean) If true, url is treated as hash information to alter + // on the current page + redirect: function(url, hash) { - window.location.assign(this.addURLParam(url)); - - // Catch browsers that don't redirect on assign(). - if (force && !Prototype.Browser.WebKit) { - (function() { window.location.reload(); }).delay(0.5); + if (hash) { + window.location.hash = escape(url); + window.location.reload(); + } else { + window.location.assign(this.addURLParam(url)); } }, @@ -292,7 +295,7 @@ KronolithCore = { var loc = locParts.shift(); if (this.inPrefs && loc != 'prefs') { - this.redirect(window.location.href.sub(window.location.hash, '#' + fullloc), true); + this.redirect(fullloc, true); return; } -- 2.11.0