summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-09-09 18:49:23 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-09-09 18:49:23 +0000
commit9071f383cb84e06fafbe1f2fc1d7a317fda84571 (patch)
tree7f60076ef61eceee261fe652f1343a9b32e4a3ad /roundcubemail/program/js
parentc3bf4d795bba4dd5f2d2f4345a9b3f8268299efe (diff)
Fixed wrong delete button tooltip (#1483965)
git-svn-id: https://svn.roundcube.net/trunk@789 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
-rw-r--r--roundcubemail/program/js/app.js35
1 files changed, 28 insertions, 7 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 581e25512..5af98a256 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -164,6 +164,9 @@ function rcube_webmail()
this.enable_command('firstmessage', true);
}
}
+
+ if (this.env.trash_mailbox && this.env.mailbox != this.env.trash_mailbox)
+ this.set_alttext('delete', 'movemessagetotrash');
// make preview/message frame visible
if (this.env.action == 'preview' && this.env.framed && parent.rcmail)
@@ -482,6 +485,9 @@ function rcube_webmail()
this.reset_qsearch();
this.list_mailbox(props);
+
+ if (this.env.trash_mailbox)
+ this.set_alttext('delete', this.env.mailbox != this.env.trash_mailbox ? 'movemessagetotrash' : 'deletemessage');
}
else if (this.task=='addressbook')
{
@@ -2835,6 +2841,28 @@ function rcube_webmail()
}
};
+ // display a specific alttext
+ this.set_alttext = function(command, label)
+ {
+ if (!this.buttons[command] || !this.buttons[command].length)
+ return;
+
+ var button, obj, link;
+ for (var n=0; n<this.buttons[command].length; n++)
+ {
+ button = this.buttons[command][n];
+ obj = document.getElementById(button.id);
+
+ if (button.type=='image' && obj)
+ {
+ obj.setAttribute('alt', this.get_label(label));
+ if ((link = obj.parentNode) && link.tagName == 'A')
+ link.setAttribute('title', this.get_label(label));
+ }
+ else if (obj)
+ obj.setAttribute('title', this.get_label(label));
+ }
+ };
// mouse over button
this.button_over = function(command, id)
@@ -2911,13 +2939,6 @@ function rcube_webmail()
};
- // display a specific alttext
- this.alttext = function(text)
- {
-
- };
-
-
// display a system message
this.display_message = function(msg, type, hold)
{