From: Michael M Slusarz Date: Thu, 30 Sep 2010 21:54:30 +0000 (-0600) Subject: Alter buttons when in Drafts mailbox X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ba07223fe4914281def4deba824852ec8991086f;p=horde.git Alter buttons when in Drafts mailbox --- diff --git a/imp/js/dimpbase.js b/imp/js/dimpbase.js index 4e3185ada..c3085fc38 100644 --- a/imp/js/dimpbase.js +++ b/imp/js/dimpbase.js @@ -609,23 +609,31 @@ var DimpBase = { } } - if (this.viewport.getMetaData('spam')) { - if (!DIMP.conf.spam_spammbox) { - spam = 'hide'; + if (this.viewport.getMetaData('drafts')) { + $('button_resume').show(); + $('button_reply', 'button_forward', 'button_spam', 'button_ham').compact().invoke('up').invoke('hide'); + } else { + $('button_resume').hide(); + $('button_reply', 'button_forward').compact().invoke('up').invoke('show'); + + if (this.viewport.getMetaData('spam')) { + if (!DIMP.conf.spam_spammbox) { + spam = 'hide'; + } + } else if (DIMP.conf.ham_spammbox) { + ham = 'hide'; } - } else if (DIMP.conf.ham_spammbox) { - ham = 'hide'; - } - if ($('button_ham')) { - [ $('button_ham').up(), $('ctx_message_ham') ].invoke(ham); - } - if ($('button_spam')) { - [ $('button_spam').up(), $('ctx_message_spam') ].invoke(spam); + if ($('button_ham')) { + [ $('button_ham').up(), $('ctx_message_ham') ].invoke(ham); + } + if ($('button_spam')) { + [ $('button_spam').up(), $('ctx_message_spam') ].invoke(spam); + } } /* Read-only changes. 'oa_setflag' is handled elsewhere. */ - tmp = [ $('button_deleted') ].compact().invoke('up', 'SPAN').concat($('ctx_message_deleted', 'ctx_message_setflag', 'ctx_message_undeleted')); + tmp = [ $('button_deleted') ].compact().invoke('up').concat($('ctx_message_deleted', 'ctx_message_setflag', 'ctx_message_undeleted')); if (this.viewport.getMetaData('readonly')) { tmp.compact().invoke('hide'); @@ -2070,6 +2078,11 @@ var DimpBase = { this.composeMailbox(id == 'button_reply' ? 'reply_auto' : 'forward_auto'); break; + case 'button_resume': + this.composeMailbox('resume'); + e.stop(); + return; + case 'button_ham': case 'button_spam': this.reportSpam(id == 'button_spam'); diff --git a/imp/templates/dimp/index.inc b/imp/templates/dimp/index.inc index 945169d17..70fa52fd5 100644 --- a/imp/templates/dimp/index.inc +++ b/imp/templates/dimp/index.inc @@ -185,6 +185,7 @@ function _simpleButton($id, $text, $image, $nodisplay = false)
'noselectDisable', 'icon' => 'Ham', 'id' => 'button_ham', 'title' => _("Innocent"))) ?>
+
'noselectDisable', 'icon' => 'Resume', 'id' => 'button_resume', 'title' => _("Resume"))) ?>
'noselectDisable', 'icon' => 'Delete', 'id' => 'button_deleted', 'title' => _("Delete"))) ?>
'Compose', 'title' => _("Compose"))) ?>
'Checkmail', 'title' => _("Get Mail"))) ?>
diff --git a/imp/themes/dimp/screen.css b/imp/themes/dimp/screen.css index 15010d2f9..2cd7f8a8d 100644 --- a/imp/themes/dimp/screen.css +++ b/imp/themes/dimp/screen.css @@ -928,6 +928,9 @@ span.dimpactionDrafts { span.dimpactionEditsearch { background-image: url("../graphics/edit.png"); } +span.dimpactionResume { + background-image: url("../graphics/mail_draft.png"); +} /* Context menu images */ #ctx_message_reply span.contextImg {