From bb96d98c2f2a3a3a9cdfa9c6af4926f1f7c19128 Mon Sep 17 00:00:00 2001 From: Jinqn <459452372@qq.com> Date: Tue, 18 Mar 2014 19:01:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=86=E9=A2=91=E7=9A=84di?= =?UTF-8?q?alog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dialogs/video/video.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) 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 = '