From: Michael M Slusarz Date: Fri, 12 Nov 2010 21:59:46 +0000 (-0700) Subject: More attempts to work around inconsistent browser location redirection X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=80c86b51d65beacc9a7ce24e3f562b74a1014cbc;p=horde.git More attempts to work around inconsistent browser location redirection --- diff --git a/imp/js/dimpbase.js b/imp/js/dimpbase.js index 1467ef46f..d85a5eb3d 100644 --- a/imp/js/dimpbase.js +++ b/imp/js/dimpbase.js @@ -162,7 +162,7 @@ var DimpBase = { $('appprefs').hasClassName('on')) { $('dimpPage').hide(); $('dimpLoading').show(); - return DimpCore.redirect(DIMP.conf.URI_DIMP + '#' + escape(loc), true); + return DimpCore.redirect(loc, true); } if (loc.startsWith('compose:')) { diff --git a/imp/js/dimpcore.js b/imp/js/dimpcore.js index da720a9e5..362b0803f 100644 --- a/imp/js/dimpcore.js +++ b/imp/js/dimpcore.js @@ -321,13 +321,16 @@ var DimpCore = { this.redirect(url || (DIMP.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)); } },