summaryrefslogtreecommitdiff
path: root/program/steps/mail/upload.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-04-28 18:07:12 +0000
committerthomascube <thomas@roundcube.net>2007-04-28 18:07:12 +0000
commitf1154163b0a9efb21d722bc658352739040ffd61 (patch)
tree28ccaa50bc27fa2c3d10eb8650a9862710668494 /program/steps/mail/upload.inc
parent9e5d051e97441794d765b094ed46d8cc732c3944 (diff)
Merged branch devel-addressbook from r443 back to trunk
Diffstat (limited to 'program/steps/mail/upload.inc')
-rw-r--r--program/steps/mail/upload.inc39
1 files changed, 17 insertions, 22 deletions
diff --git a/program/steps/mail/upload.inc b/program/steps/mail/upload.inc
index 06ed26591..a28c3e8e2 100644
--- a/program/steps/mail/upload.inc
+++ b/program/steps/mail/upload.inc
@@ -47,23 +47,22 @@ foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath)
'path' => $tmpfname);
if (is_file($CONFIG['skin_path'] . '/images/icons/remove-attachment.png'))
- $button = sprintf('<img src="%s/images/icons/remove-attachment.png" alt="%s" border="0" style="padding-right:2px;vertical-align:middle" />',
- $CONFIG['skin_path'],
- Q(rcube_label('delete')));
+ $button = sprintf(
+ '<img src="%s/images/icons/remove-attachment.png" alt="%s" border="0" style="padding-right:2px;vertical-align:middle" />',
+ $CONFIG['skin_path'],
+ Q(rcube_label('delete')));
else
$button = Q(rcube_label('delete'));
- $content = sprintf('<a href="#delete" onclick="return %s.command(\\\'remove-attachment\\\', \\\'rcmfile%d\\\', this)" title="%s">%s</a>%s',
- $JS_OBJECT_NAME,
- $id,
- Q(rcube_label('delete')),
- $button,
- Q($_FILES['_attachments']['name'][$i]));
-
- $response .= sprintf('parent.%s.add2attachment_list(\'rcmfile%d\',\'%s\');',
- $JS_OBJECT_NAME,
- $id,
- $content);
+ $content = sprintf(
+ '<a href="#delete" onclick="return %s.command(\'remove-attachment\', \'rcmfile%d\', this)" title="%s">%s</a>%s',
+ JS_OBJECT_NAME,
+ $id,
+ Q(rcube_label('delete')),
+ $button,
+ Q($_FILES['_attachments']['name'][$i]));
+
+ $OUTPUT->command('add2attachment_list', "rcmfile$id", $content);
}
else // upload failed
{
@@ -73,18 +72,14 @@ foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath)
else
$msg = rcube_label('fileuploaderror');
- $response = sprintf("parent.%s.display_message('%s', 'error');", $JS_OBJECT_NAME, JQ($msg));
+ $OUTPUT->command('display_message', $msg, 'error');
}
}
// send html page with JS calls as response
-$frameout = <<<EOF
-$response
-parent.$JS_OBJECT_NAME.show_attachment_form(false);
-parent.$JS_OBJECT_NAME.auto_save_start();
-EOF;
-
-rcube_iframe_response($frameout);
+$OUTPUT->command('show_attachment_form', false);
+$OUTPUT->command('auto_save_start', false);
+$OUTPUT->send('iframe');
?>