From 4b235420dc72419c5cc44cae51e7cf3e2e9c7913 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 12 Oct 2009 06:10:23 -0600 Subject: [PATCH] Another stab at fixing redirection on hash change --- imp/js/DimpBase.js | 2 +- imp/js/DimpCore.js | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index 419e0b075..5db5530f9 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -202,7 +202,7 @@ var DimpBase = { loc != 'options' && $('appoptions') && $('appoptions').hasClassName('on')) { - return DimpCore.redirect(DIMP.conf.URI_DIMP + '#' + loc, true); + return DimpCore.redirect(DIMP.conf.URI_DIMP + '#' + loc); } if (loc.startsWith('compose:')) { diff --git a/imp/js/DimpCore.js b/imp/js/DimpCore.js index f273f1d5e..fa4bb35d6 100644 --- a/imp/js/DimpCore.js +++ b/imp/js/DimpCore.js @@ -10,7 +10,7 @@ /* DimpCore object. */ var DimpCore = { // Vars used and defaulting to null/false: - // DMenu, Growler, inAjaxCallback, is_init, is_logout, is_redirect, + // DMenu, Growler, inAjaxCallback, is_init, is_logout // onDoActionComplete growler_log: true, is_ie6: Prototype.Browser.IE && !window.XMLHttpRequest, @@ -271,15 +271,13 @@ var DimpCore = { this.redirect(url || (DIMP.conf.URI_AJAX + '/LogOut')); }, - redirect: function(url, force) + redirect: function(url) { - if (!this.is_redirect) { - var ptr = parent.frames.horde_main ? parent : window; - this.is_redirect = true; - ptr.location = this.addURLParam(url); - if (force) { - setTimeout(function() { ptr.location.reload() }, 300); - } + var ptr = parent.frames.horde_main ? parent : window; + ptr.location.assign(this.addURLParam(url)); + // IE doesn't automatically reload on a hash difference + if (Prototype.Browser.IE) { + ptr.location.reload(); } }, -- 2.11.0