업로더 플러그인의 Flash Runtime이 정상적으로 동작하지 않던 버그 수정(계속)

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7793 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2010-11-04 10:33:55 +00:00
parent 363b02b1d6
commit 3b625eb2f1
2 changed files with 11 additions and 6 deletions

View file

@ -443,7 +443,7 @@ runtimes.flash = {
var self = this; var self = this;
var rand = random(); var rand = random();
var name = 'xe_flashuploader_object'+rand; 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 = []; if (!window.xe_flashuploaders) window.xe_flashuploaders = [];
@ -454,6 +454,7 @@ runtimes.flash = {
var oh = b.offsetHeight; var oh = b.offsetHeight;
var ot = b.offsetTop; var ot = b.offsetTop;
var ol = b.offsetLeft; var ol = b.offsetLeft;
var $div, flash, css;
if (typeof uploader.flashindex == 'undefined') { if (typeof uploader.flashindex == 'undefined') {
uploader.flashindex = xe_flashuploaders.length; uploader.flashindex = xe_flashuploaders.length;
@ -477,11 +478,11 @@ runtimes.flash = {
}); });
} }
var flash = $.browser.msie?window[name]:document[name]; div = $('#'+name+'-container');
var css = {position:'absolute',width:ow+'px',height:oh+'px',left:ol+'px',top:ot+'px',margin:0,padding:0,overflow:'hidden'}; css = {position:'absolute',width:ow+'px',height:oh+'px',left:ol+'px',top:ot+'px',margin:0,padding:0,overflow:'hidden'};
if (!flash) { if (!div.length) {
var div = $('<div />').css(css).appendTo(op); div = $('<div />').attr('id', name+'-container').css(css).appendTo(op);
div[0].innerHTML = '' div[0].innerHTML = ''
+ '<object id="'+name+'" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" width="100%" height="100%">' + '<object id="'+name+'" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" width="100%" height="100%">'
+ '<param name="movie" value="'+swf+'" />' + '<param name="movie" value="'+swf+'" />'
@ -490,11 +491,14 @@ runtimes.flash = {
+ '<embed src="'+swf+'" width="100%" height="100%" name="'+name+'" type="application/x-shockwave-flash" pluginpage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" allowscriptaccess="always" />' + '<embed src="'+swf+'" width="100%" height="100%" name="'+name+'" type="application/x-shockwave-flash" pluginpage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" allowscriptaccess="always" />'
+ '</object>'; + '</object>';
flash = $.browser.msie?window[name]:document[name];
} }
flash = window[name] || document[name];
if (!uploader.flash) { if (!uploader.flash) {
try { try {
if (!flash) throw '';
var _settings = {}; var _settings = {};
var pass_keys = ['filters','params','url']; var pass_keys = ['filters','params','url'];
@ -511,6 +515,7 @@ runtimes.flash = {
return setTimeout(arguments.callee, 10); return setTimeout(arguments.callee, 10);
} }
} }
if (uploader.flash) { if (uploader.flash) {
uploader.flash_box.css(css); uploader.flash_box.css(css);
uploader.flash.setIndex(uploader.flashindex); uploader.flash.setIndex(uploader.flashindex);