From a41aaf3352fe0d69f662132d8e70885993ed4d9a Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 12 Jun 2014 19:18:07 +0200 Subject: Move some code to legacy_browser plugin --- program/js/app.js | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) (limited to 'program') diff --git a/program/js/app.js b/program/js/app.js index 499e2a2de..9909a02fe 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -7497,8 +7497,10 @@ function rcube_webmail() // post the given form to a hidden iframe this.async_upload_form = function(form, action, onload) { - var frame, ts = new Date().getTime(), - frame_name = 'rcmupload'+ts; + // create hidden iframe + var ts = new Date().getTime(), + frame_name = 'rcmupload' + ts, + frame = this.async_upload_form_frame(frame_name); // upload progress support if (this.env.upload_progress_name) { @@ -7513,21 +7515,7 @@ function rcube_webmail() field.val(ts); } - // have to do it this way for IE - // otherwise the form will be posted to a new window - if (document.all) { - document.body.insertAdjacentHTML('BeforeEnd', ''); - frame = $('iframe[name="'+frame_name+'"]'); - } - // for standards-compliant browsers - else { - frame = $('