From eb684206067a151a8b417bb1e4f7e48d4a56e5bf Mon Sep 17 00:00:00 2001 From: thomascube Date: Sun, 9 Sep 2007 18:49:23 +0000 Subject: Fixed wrong delete button tooltip (#1483965) --- program/js/app.js | 35 ++++++++++++++++++++++++++++------- program/localization/de_CH/labels.inc | 3 ++- program/localization/de_DE/labels.inc | 3 ++- program/localization/en_US/labels.inc | 3 ++- program/steps/mail/func.inc | 2 +- 5 files changed, 35 insertions(+), 11 deletions(-) (limited to 'program') diff --git a/program/js/app.js b/program/js/app.js index 581e25512..5af98a256 100644 --- a/program/js/app.js +++ b/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; nset_env('junk_mailbox', $CONFIG['junk_mbox']); if (!$OUTPUT->ajax_call) - rcube_add_label('checkingmail'); + rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash'); -- cgit v1.2.3