From 9499dbdd72d387bb8d0cafa569d749a46b6c51f3 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Thu, 12 Mar 2009 16:10:53 +0000 Subject: Moved functionality of toggling 'Not Spam' and 'Shred' buttons to app.js instead of in the skin, where it seemed impossible to implement it cleanly. --- roundcubemail/program/js/app.js | 22 ++++++++++++++++++++++ .../program/localization/en_US/labels.inc | 9 +++++---- 2 files changed, 27 insertions(+), 4 deletions(-) (limited to 'roundcubemail/program') diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index d8721fdde..626756af6 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -547,6 +547,28 @@ function rcube_webmail() this.reset_qsearch(); this.list_mailbox(props); + + // Only show the "Not Spam" button if we are currently + // in the configured Junk mailbox + notjunkbutton_elm = rcube_find_object('notjunkbutton'); + if (notjunkbutton_elm) + { + if (this.env.mailbox == this.env.junk_mailbox) + notjunkbutton_elm.style.display = 'inline'; + else + notjunkbutton_elm.style.display = 'none'; + } + + // Only show the "Shred" button if we are currently + // in the configured Trash mailbox + shredbutton_elm = rcube_find_object('shredbutton'); + if (shredbutton_elm) + { + if (this.env.mailbox == this.env.trash_mailbox) + shredbutton_elm.style.display = 'inline'; + else + shredbutton_elm.style.display = 'none'; + } if (this.env.trash_mailbox) this.set_alttext('delete', this.env.mailbox != this.env.trash_mailbox ? 'movemessagetotrash' : 'deletemessage'); diff --git a/roundcubemail/program/localization/en_US/labels.inc b/roundcubemail/program/localization/en_US/labels.inc index 994d05b48..38a70f21b 100644 --- a/roundcubemail/program/localization/en_US/labels.inc +++ b/roundcubemail/program/localization/en_US/labels.inc @@ -37,7 +37,7 @@ $labels['inbox'] = 'Inbox'; $labels['drafts'] = 'Drafts'; $labels['sent'] = 'Sent'; $labels['trash'] = 'Trash'; -$labels['junk'] = 'Junk'; +$labels['junk'] = 'Spam'; // message listing $labels['subject'] = 'Subject'; @@ -179,17 +179,18 @@ $labels['buttonbarreplyall'] = 'Reply to all'; $labels['buttonbarforward'] = 'Forward'; $labels['buttonbarmove'] = 'Move'; $labels['buttonbarcopy'] = 'Copy'; -$labels['buttonbarnotspam'] = 'Not Spam'; +$labels['buttonbarnotjunk'] = 'Not Spam'; $labels['buttonbarviewsource'] = 'Source'; $labels['buttonbarback'] = 'Back'; $labels['buttonbarsend'] = 'Send'; +$labels['buttonbarshred'] = 'Shred'; $labels['buttonbarspellcheck'] = 'Spellcheck'; $labels['archivemessages'] = 'Move to archives folder'; $labels['movemessages'] = 'Move to selected folder'; $labels['copymessages'] = 'Copy to selected folder'; -$labels['notspammessages'] = 'Copy to INBOX, then move to HamNotSpam'; -$labels['deletemessages'] = 'Delete message(s)'; +$labels['notjunkmessages'] = 'Copy to Inbox, then move to HamNotSpam'; +$labels['shredmessages'] = 'Permanently delete message(s)'; // message compose $labels['compose'] = 'Compose a message'; -- cgit v1.2.3