$atc = Util::getPost('atc_indices');
if (!is_null($atc)) {
$imp_compose = IMP_Compose::singleton(Util::getPost('imp_compose'));
- $imp_compose->deleteAttachment($atc);
+ foreach ($imp_compose->deleteAttachment($atc) as $val) {
+ $notification->push(sprintf(_("Deleted the attachment \"%s\"."), Horde_Mime::decode($val)), 'horde.success');
+ }
}
break;
{
var span = new Element('SPAN').insert(name),
div = new Element('DIV').insert(span).insert(' [' + type + '] (' + size + ' KB) '),
- input = new Element('INPUT', { type: 'button', atc_id: atc_num, value: DIMP.text_compose.remove });
+ input = new Element('SPAN', { atc_id: atc_num, className: 'remove' }).insert(DIMP.text_compose.remove);
div.insert(input);
$('attach_list').insert(div);
var ids = [];
e.each(function(n) {
n = $(n);
- ids.push(n.down('INPUT').readAttribute('atc_id'));
+ ids.push(n.down('SPAN.remove').readAttribute('atc_id'));
n.remove();
});
DimpCore.doAction('DeleteAttach', { atc_indices: ids, imp_compose: $F('composeCache') });
break;
case 'attach_list':
- if (orig.match('INPUT')) {
+ if (orig.match('SPAN.remove')) {
this.removeAttach([ orig.up() ]);
} else if (orig.match('SPAN.attachName')) {
atc_num = orig.next().readAttribute('atc_id');
'cancel' => _("Cancelling this message will permanently discard its contents and will delete auto-saved drafts.\nAre you sure you want to do this?"),
'nosubject' => _("The message does not have a Subject entered.") . "\n" . _("Send message without a Subject?"),
'fillform' => _("You have already changed the message body, are you sure you want to drop the changes?"),
- 'remove' => _("remove"),
+ 'remove' => _("Remove"),
'uploading' => _("Uploading..."),
'attachment_limit' => _("The attachment limit has been reached."),
'sending' => _("Sending..."),
#attach_list {
padding-top: 5px;
}
-#attach_list input {
- background: none;
+#attach_list span.remove {
border: 1px solid #ccc;
font-weight: bold;
+ padding: 1px 2px;
+}
+#attach_list span.remove:hover {
+ text-decoration: underline;
}
#attach_list div, span.attachmentImg {
background-image: url("graphics/attachment.png");