diff --git a/common/js/plugins/uploader/uploader.js b/common/js/plugins/uploader/uploader.js index 2eac29527..0232c91d0 100644 --- a/common/js/plugins/uploader/uploader.js +++ b/common/js/plugins/uploader/uploader.js @@ -443,7 +443,7 @@ runtimes.flash = { var self = this; var rand = random(); var name = 'xe_flashuploader_object'+rand; - var swf = '/common/swf/uploader.swf'; + var swf = (window.request_uri||'/')+'common/js/plugins/uploader/uploader.swf?'+rand; if (!window.xe_flashuploaders) window.xe_flashuploaders = []; @@ -454,6 +454,7 @@ runtimes.flash = { var oh = b.offsetHeight; var ot = b.offsetTop; var ol = b.offsetLeft; + var $div, flash, css; if (typeof uploader.flashindex == 'undefined') { uploader.flashindex = xe_flashuploaders.length; @@ -477,11 +478,11 @@ runtimes.flash = { }); } - var flash = $.browser.msie?window[name]:document[name]; - var css = {position:'absolute',width:ow+'px',height:oh+'px',left:ol+'px',top:ot+'px',margin:0,padding:0,overflow:'hidden'}; + div = $('#'+name+'-container'); + css = {position:'absolute',width:ow+'px',height:oh+'px',left:ol+'px',top:ot+'px',margin:0,padding:0,overflow:'hidden'}; - if (!flash) { - var div = $('
').css(css).appendTo(op); + if (!div.length) { + div = $('').attr('id', name+'-container').css(css).appendTo(op); div[0].innerHTML = '' + ''; - flash = $.browser.msie?window[name]:document[name]; } + flash = window[name] || document[name]; + if (!uploader.flash) { try { + if (!flash) throw ''; + var _settings = {}; var pass_keys = ['filters','params','url']; @@ -511,6 +515,7 @@ runtimes.flash = { return setTimeout(arguments.callee, 10); } } + if (uploader.flash) { uploader.flash_box.css(css); uploader.flash.setIndex(uploader.flashindex); diff --git a/common/js/plugins/uploader/uploader.swf b/common/js/plugins/uploader/uploader.swf index bcc4946df..2cf2b63ec 100644 Binary files a/common/js/plugins/uploader/uploader.swf and b/common/js/plugins/uploader/uploader.swf differ