Another stab at fixing redirection on hash change
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 12 Oct 2009 12:10:23 +0000 (06:10 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 12 Oct 2009 12:10:23 +0000 (06:10 -0600)
imp/js/DimpBase.js
imp/js/DimpCore.js

index 419e0b0..5db5530 100644 (file)
@@ -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:')) {
index f273f1d..fa4bb35 100644 (file)
@@ -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();
         }
     },