diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2009-03-12 16:10:53 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2009-03-12 16:10:53 +0000 |
| commit | 9499dbdd72d387bb8d0cafa569d749a46b6c51f3 (patch) | |
| tree | 7f12803b4474ebfa85fb7c8fe1c4b36021820676 /roundcubemail/program/js | |
| parent | 328ab0054b24d376f77e6fe6f9c602877d5d3ee4 (diff) | |
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.
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 22 |
1 files changed, 22 insertions, 0 deletions
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'); |
