summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/edit.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-06-26 19:17:26 +0200
committerAleksander Machniak <alec@alec.pl>2012-06-26 19:17:26 +0200
commita1426f8345043b0275327a9c9b6c484a4d7c7916 (patch)
treead01af8b4e00ea89801a7b471c56f5cc7f000e9c /program/steps/addressbook/edit.inc
parente742744a53010c1a65eb07ea47c30b6ca72cecce (diff)
parent0be8bd11e2efa5ddabe576fb535e086cb78cc42c (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps/addressbook/edit.inc')
-rw-r--r--program/steps/addressbook/edit.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc
index f96ad6747..0f1fd6697 100644
--- a/program/steps/addressbook/edit.inc
+++ b/program/steps/addressbook/edit.inc
@@ -262,12 +262,27 @@ function rcmail_source_selector($attrib)
}
+/**
+ * Register container as active area to drop photos onto
+ */
+function rcmail_photo_drop_area($attrib)
+{
+ global $OUTPUT;
+
+ if ($attrib['id']) {
+ $OUTPUT->add_gui_object('filedrop', $attrib['id']);
+ $OUTPUT->set_env('filedrop', array('action' => 'upload-photo', 'fieldname' => '_photo', 'single' => 1, 'filter' => '^image/.+'));
+ }
+}
+
+
$OUTPUT->add_handlers(array(
'contactedithead' => 'rcmail_contact_edithead',
'contacteditform' => 'rcmail_contact_editform',
'contactphoto' => 'rcmail_contact_photo',
'photouploadform' => 'rcmail_upload_photo_form',
'sourceselector' => 'rcmail_source_selector',
+ 'filedroparea' => 'rcmail_photo_drop_area',
));
if ($RCMAIL->action == 'add' && $OUTPUT->template_exists('contactadd'))