diff --git a/dialogs/video/video.js b/dialogs/video/video.js index 7d4d6218..64a47eca 100644 --- a/dialogs/video/video.js +++ b/dialogs/video/video.js @@ -40,6 +40,7 @@ me.lang = lang; me.editor = editor; + me.$widget = $widget; me.root().html( $.parseTmpl( me.tpl, $.extend( { video_url: video_url }, lang['static'] ) ) ); me.initController( lang ); @@ -48,7 +49,7 @@ initEvent:function(){ var me = this, - url = $("#eduiVideoUrl")[0]; + url = $("#eduiVideoUrl", me.$widget)[0]; if( 'oninput' in url ) { url.oninput = function(){ @@ -71,9 +72,9 @@ //编辑视频时初始化相关信息 if(img && img.className == "edui-faked-video"){ - $("#eduiVideoUrl")[0].value = url = img.getAttribute("_url"); - $("#eduiVideoWidth")[0].value = img.width; - $("#eduiVideoHeight")[0].value = img.height; + $("#eduiVideoUrl", me.$widget)[0].value = url = img.getAttribute("_url"); + $("#eduiVideoWidth", me.$widget)[0].value = img.width; + $("#eduiVideoHeight", me.$widget)[0].value = img.height; var align = domUtils.getComputedStyle(img,"float"), parentAlign = domUtils.getComputedStyle(img.parentNode,"text-align"); me.updateAlignButton(parentAlign==="center"?"center":align); @@ -93,10 +94,10 @@ conUrl = me.convert_url(url); if(!me.endWith(conUrl,[".swf",".flv",".wmv"])){ - $("#eduiVideoPreview").html( lang.urlError ); + $("#eduiVideoPreview", me.$widget).html( lang.urlError ); return; } - $("#eduiVideoPreview")[0].innerHTML = '