From: Michael M Slusarz Date: Tue, 17 Aug 2010 05:32:11 +0000 (-0600) Subject: Add DimpBase.setHash(). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7750dd566dc1d50f87e32e2616cd0af53c50f430;p=horde.git Add DimpBase.setHash(). --- diff --git a/imp/js/dimpbase.js b/imp/js/dimpbase.js index ee968de78..d14308f8e 100644 --- a/imp/js/dimpbase.js +++ b/imp/js/dimpbase.js @@ -189,7 +189,7 @@ var DimpBase = { // This catches the refresh case - no need to re-add to history if (!Object.isUndefined(this.folder) && !this.search) { - location.hash = encodeURIComponent(loc); + this.setHash(loc); } } @@ -209,7 +209,7 @@ var DimpBase = { return; } this.highlightSidebar('app' + app); - location.hash = encodeURIComponent(loc); + this.setHash(loc); if (data) { this.iframeContent(loc, data); } else if (DIMP.conf.app_urls[app]) { @@ -232,20 +232,25 @@ var DimpBase = { case 'portal': this.highlightSidebar('appportal'); - location.hash = encodeURIComponent(loc); + this.setHash(loc); DimpCore.setTitle(DIMP.text.portal); DimpCore.doAction('showPortal', {}, { callback: this._portalCallback.bind(this) }); break; case 'options': this.highlightSidebar('appoptions'); - location.hash = encodeURIComponent(loc); + this.setHash(loc); DimpCore.setTitle(DIMP.text.prefs); this.iframeContent(loc, DIMP.conf.URI_PREFS_IMP); break; } }, + setHash: function(loc) + { + location.hash = escape(encodeURIComponent(loc)); + }, + highlightSidebar: function(id) { // Folder bar may not be fully loaded yet. @@ -1219,7 +1224,7 @@ var DimpBase = { eval(r.js.join(';')); } - location.hash = encodeURIComponent('msg:' + row.view + ':' + row.imapuid); + this.setHash('msg:' + row.view + ':' + row.imapuid); }, _stripAttachmentCallback: function(r) @@ -2978,7 +2983,7 @@ var DimpBase = { } if (!tmp.empty()) { - this.go(decodeURIComponent(tmp)); + this.go(decodeURIComponent(unescape(tmp))); } else if (DIMP.conf.login_view == 'inbox') { this.go('folder:INBOX'); } else {