diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-03 19:12:27 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-03 19:12:27 +0000 |
| commit | 84b7551737fb20228dd52b0868a2421d7b51b5e2 (patch) | |
| tree | 53db6fe2023a1e009f3fe2d3ecb6cac709095b9b /roundcubemail/program/steps | |
| parent | c019b35abd0731afbb3519aee9f4965a39ed00fd (diff) | |
- Added attachment upload indicator with parallel upload (#1486058)
git-svn-id: https://svn.roundcube.net/trunk@3011 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/mail/attachments.inc | 7 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/compose.inc | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/attachments.inc b/roundcubemail/program/steps/mail/attachments.inc index b57037d05..28d6108d4 100644 --- a/roundcubemail/program/steps/mail/attachments.inc +++ b/roundcubemail/program/steps/mail/attachments.inc @@ -74,6 +74,8 @@ if (!is_array($_SESSION['compose']['attachments'])) { // clear all stored output properties (like scripts and env vars) $OUTPUT->reset(); +$uploadid = get_input_value('_uploadid', RCUBE_INPUT_GET); + if (is_array($_FILES['_attachments']['tmp_name'])) { foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath) { $attachment = array( @@ -109,7 +111,7 @@ if (is_array($_FILES['_attachments']['tmp_name'])) { $content .= Q($attachment['name']); - $OUTPUT->command('add2attachment_list', "rcmfile$id", $content); + $OUTPUT->command('add2attachment_list', "rcmfile$id", $content, $uploadid); } else { // upload failed $err = $_FILES['_attachments']['error'][$i]; @@ -124,6 +126,7 @@ if (is_array($_FILES['_attachments']['tmp_name'])) { } $OUTPUT->command('display_message', $msg, 'error'); + $OUTPUT->command('remove_from_attachment_list', $uploadid); } } } @@ -135,10 +138,10 @@ else if ($_SERVER['REQUEST_METHOD'] == 'POST') { else $msg = rcube_label('fileuploaderror'); $OUTPUT->command('display_message', $msg, 'error'); + $OUTPUT->command('remove_from_attachment_list', $uploadid); } // send html page with JS calls as response -$OUTPUT->command('show_attachment_form', false); $OUTPUT->command('auto_save_start', false); $OUTPUT->send('iframe'); diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc index 4a03cd7c3..e3c7fda16 100644 --- a/roundcubemail/program/steps/mail/compose.inc +++ b/roundcubemail/program/steps/mail/compose.inc @@ -94,7 +94,7 @@ if (!is_array($_SESSION['compose']) || $_SESSION['compose']['id'] != get_input_v // add some labels to client $OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'nobodywarning', 'notsentwarning', 'savingmessage', 'sendingmessage', 'messagesaved', - 'converting', 'editorwarning', 'searching'); + 'converting', 'editorwarning', 'searching', 'uploading', 'fileuploaderror'); // add config parameters to client script if (!empty($CONFIG['drafts_mbox'])) { @@ -809,6 +809,8 @@ function rcmail_compose_attachment_list($attrib) if ($attrib['deleteicon']) $_SESSION['compose']['deleteicon'] = $CONFIG['skin_path'] . $attrib['deleteicon']; + if ($attrib['loadingicon']) + $OUTPUT->set_env('loadingicon', $CONFIG['skin_path'] . $attrib['loadingicon']); $OUTPUT->add_gui_object('attachmentlist', $attrib['id']); |
