summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-05-26 13:21:57 +0000
committerthomascube <thomas@roundcube.net>2009-05-26 13:21:57 +0000
commita25d3969a00e60bcbfdf6907f7ce77d4651c1179 (patch)
treea857f062fa5988eddac5393dbaefbb315b43de28 /program/js
parent9c0280b6070b52cf16396e70c180d351d993585b (diff)
Re-enable the permalink command (allows one to choose right-click and open-in-new-tab)
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/program/js/app.js b/program/js/app.js
index b29a3575d..b9fce8b11 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -150,6 +150,9 @@ function rcube_webmail()
// enable general commands
this.enable_command('logout', 'mail', 'addressbook', 'settings', true);
+ if (this.env.permaurl)
+ this.enable_command('permaurl', true);
+
switch (this.task)
{
case 'mail':
@@ -559,14 +562,21 @@ function rcube_webmail()
this.switch_task(command);
break;
+ case 'permaurl':
+ if (obj && obj.href && obj.target)
+ return true;
+ else if (this.env.permaurl)
+ parent.location.href = this.env.permaurl;
+ break;
+
case 'open':
- var uid;
+ var uid;
if (uid = this.get_single_uid())
- {
- obj.href = '?_task='+this.env.task+'&_action=show&_mbox='+urlencode(this.env.mailbox)+'&_uid='+uid;
- return true;
- }
- break;
+ {
+ obj.href = '?_task='+this.env.task+'&_action=show&_mbox='+urlencode(this.env.mailbox)+'&_uid='+uid;
+ return true;
+ }
+ break;
// misc list commands
case 'list':