summaryrefslogtreecommitdiff
path: root/program/steps/mail/compose.inc
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-06-06 17:35:21 +0200
committerThomas Bruederli <thomas@roundcube.net>2012-06-06 17:35:21 +0200
commitae6d2de17f740915e47c64d210680eb5e9850335 (patch)
treed385b6a56aaca33cadeda6ece5bf7e2ae2b4c8e7 /program/steps/mail/compose.inc
parente29515a504e862065684f6f41ab632ab38087c8d (diff)
New feature to add mail attachments using drag & drop on HTML5 enabled browsers
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r--program/steps/mail/compose.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 306de3608..70f657d8d 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -1590,6 +1590,19 @@ function rcmail_contacts_list($attrib = array())
}
+/**
+ * Register a certain container as active area to drop files onto
+ */
+function compose_file_drop_area($attrib)
+{
+ global $OUTPUT;
+
+ if ($attrib['id']) {
+ $OUTPUT->add_gui_object('filedrop', $attrib['id']);
+ $OUTPUT->set_env('filedrop', array('action' => 'upload', 'fieldname' => '_attachments'));
+ }
+}
+
// register UI objects
$OUTPUT->add_handlers(array(
@@ -1599,6 +1612,7 @@ $OUTPUT->add_handlers(array(
'composeattachmentlist' => 'rcmail_compose_attachment_list',
'composeattachmentform' => 'rcmail_compose_attachment_form',
'composeattachment' => 'rcmail_compose_attachment_field',
+ 'filedroparea' => 'compose_file_drop_area',
'priorityselector' => 'rcmail_priority_selector',
'editorselector' => 'rcmail_editor_selector',
'receiptcheckbox' => 'rcmail_receipt_checkbox',