1/** 2 * created by WEVEN on 2020-03-02 3 * ìëì ìì¤ë WEVENì ì ìê¶ì´ ìì¼ë¯ë¡ ë¬´ë¨ ì¬ì© ë° ì¬ ë°°í¬ë¥¼ ê¸í©ëë¤. 4 */ 5var ToolBtnDomBackgroundVideo = function (btnType) { 6 7 this.type = btnType; 8 9 this.element = $("[data-wv-toolset=ToolDomBackgroundVideo]"); 10 this.colorPicker = ToolOpColorPicker.get(this, btnType); 11 this.addOption(this.colorPicker, "videoDimColorExpand"); 12 13 this.playerTmplt; 14 this.dimColor; 15 16 this.blockJsTmplt; 17 18 this.onOptionChange = function (type, value) { 19 var targetElementList = []; 20 21 if(!this['target']) { 22 bm.toast(systemLangPack.getMessage("SLSAT0222")); //ì íë ë¸ë¡ì´ ììµëë¤. 23 return false; 24 } 25 targetElementList.push(this.target); 26 if (bm.toolManager.isMultiSelectMode) { 27 targetElementList = bm.toolManager.targetElementList.concat(); 28 } 29 30 if (type === "apply") { 31 for (var i = 0; i < targetElementList.length; i++) { 32 if ($(targetElementList[i]).attr('data-wv-layout-element-type') === 'video') { 33 bm.toast(systemLangPack.getMessage("SLSATTB0005")); //ìì ë¸ë¡ì ë°°ê²½ëììì ì¤ì í ì ììµëë¤. 34 return false; 35 } else if ($(targetElementList[i]).closest('[data-wv-inc="header"]').length > 0) { 36 bm.toast(systemLangPack.getMessage("SLSATTB0006")); //í¤ë ììì ë°°ê²½ëììì ì¤ì í ì ììµëë¤. 37 return false; 38 } else if ($(targetElementList[i]).attr('data-wv-layout-element-type') === 'map') { 39 bm.toast(systemLangPack.getMessage("SLSATTB0007")); //ì§ë ë¸ë¡ì ë°°ê²½ëììì ì¤ì í ì ììµëë¤. 40 return false; 41 } else if ($(targetElementList[i]).attr('data-wv-layout-element-type') === 'bbs') { 42 bm.toast(systemLangPack.getMessage("SLSATTB0008")); //ê²ìí ë¸ë¡ì ë°°ê²½ëììì ì¤ì í ì ììµëë¤. 43 return false; 44 } else if ( $(targetElementList[i]).find('.video-bg-wrap').length === 0 && wvAdminIFrameBridge._WVContentArea.$contentBody.find("script[data-block-js='" + $(targetElementList[i]).attr('data-wv-res-id') + "']").length > 0) { 45 //í¹ì 기ë¥ì ê°ì§ ë¸ë¡ì ë°°ê²½ëììì ì¤ì í ì ììµëë¤. 46 bm.toast(systemLangPack.getMessage("SLSATTB0009")); // 기존ì js를 ê°ì§ ë¸ë¡ì ì¤ì íë©´ jsê° ê²¹ì¹ë¯ë¡ ë§ì 47 return false; 48 } 49 50 } 51 52 if (!this.validVideo()) return false; 53 this.addPlayer(targetElementList); 54 55 } else if(type === "ToolOpColorPicker"){ 56 if(typeof(value) === 'string' && value.indexOf('#') > -1) { 57 value = bm.number.hexToRgb(value); 58 } 59 this.dimColor = 'background-color: rgba(' + value.r + ',' + value.g + ',' + value.b + ',' + value.a/100 + ')'; 60 $(this.target).find(".dim").css("background-color", 'rgba(' + value.r + ',' + value.g + ',' + value.b + ',' + value.a/100 + ')'); 61 $(this.element).find('input[name="videoDim"]').val((bm.number.rgbToHex('rgb(' + value.r + ',' + value.g + ',' + value.b + ',)')).toUpperCase()); 62 $(this.element).find("#videoDimColorPicker").val(bm.number.rgbToHex('rgb(' + value.r + ',' + value.g + ',' + value.b + ',)')); 63 $(this.btnList.videoDimOpacity).val(value.a + '%'); 64 }else { 65 // delete 66 this.removeVideo(targetElementList); 67 } 68 69 // ë²í¼ í´ë¦ ì ìµì ë«ì 70 $(this.btnList[0]).trigger('click'); 71 72 } 73 74 this.removeVideo = function (targetElementList) { 75 var iframeContents = wvAdminIFrameBridge._WVContentArea.$content; 76 var css = {backgroundImage : '', backgroundRepeat: '', backgroundSize: '', backgroundPosition: ''}; 77 78 bm.toolManager.toolBtnEditBefore(this, targetElementList, HistoryType.EDITOR_DOM_BACKGROUND_VIDEO); 79 80 for (var i = 0; i < targetElementList.length; i++) { 81 var target = targetElementList[i]; 82 83 if ($(target).find('.video-bg-wrap').length > 0) { 84 $(target).find('.video-bg-wrap').remove(); 85 } 86 87 if (bm.getStyle(target, "backgroundImage") === 'none') { 88 $(target).css('background-image', ''); 89 } else { 90 var styleObj = WVAdminResourceManager.getEmbededStyleObject(null, target); 91 css = { 92 backgroundImage : bm.getStyle(target, "backgroundImage"), 93 backgroundRepeat : bm.getStyle(target, "backgroundRepeat"), 94 backgroundSize : bm.getStyle(target, "backgroundSize"), 95 backgroundPosition : bm.getStyle(target, "backgroundPosition") 96 } 97 styleObj.applyResourceStyle(target, css, false, true, false, false ); 98 styleObj.refreshStyleElementText(); 99 } 100 101 if ($(target).attr('data-wv-layout-element-param')) { 102 var param = JSON.parse($(target).attr('data-wv-layout-element-param').replace(/\'/g, '"')); 103 104 if (param.videoType) delete param.videoType; 105 if (param.videoId) delete param.videoId; 106 if (param.videoSrc) delete param.videoSrc; 107 if (param.videoLoop) delete param.videoLoop; 108 if (param.videoAutoplay) delete param.videoAutoplay; 109 110 if (Object.keys(param).length === 0) { 111 param = ""; 112 } else { 113 param = JSON.stringify(param).replace(/\"/g, "'"); 114 } 115 116 $(target).attr('data-wv-layout-element-param', param); 117 } 118 119 var resId = $(target).attr('data-wv-res-id'); 120 121 if (iframeContents.find("script[data-block-js='" + resId + "']").length === 1) {
122 iframeContents.find("script[data-block-js='" + resId + "']").remove(); 123 delete wvAdminIFrameBridge.iframeWindow.wevenBlock[resId]; 124 } 125 } 126 127 bm.toolManager.toolBtnEditAfter(this, targetElementList, HistoryType.EDITOR_DOM_BACKGROUND_VIDEO); 128 } 129 130 this.validVideo = function () { 131 // ìì주ì ì ë ¥ íì¸ 132 if(isExpertMode) { 133 var url = $(this['btnList']['url']); 134 }else { 135 var url = $(this.bgVideoOpt.element).find('[data-wv-tool-option-value="url"]'); 136 } 137 138 if (!url.val()) { 139 bm.toast(systemLangPack.getMessage('SLSATTB0045')); //ìì주ì를 ì ë ¥í´ì£¼ì¸ì. 140 url.focus(); 141 return false; 142 } 143 144 // url ì ë³´ íì¸ 145 var videoInfo = this.getVideoInfo(null, url.val()); 146 147 if (!videoInfo.videoType) { 148 bm.toast(systemLangPack.getMessage('SLSATTB0100')); //ìì매체ë Youtubeì Vimeoë§ ê°ë¥í©ëë¤. 149 url.focus(); 150 return false; 151 } 152 153 // ìì주ì ì í¨ì± íì¸ 154 if (!videoInfo.videoId) { 155 bm.toast(systemLangPack.getMessage('SLSATTB0048')); //ìì주ìê° ì¬ë°ë¥´ì§ ììµëë¤. 156 url.focus(); 157 return false; 158 } 159 160 return true; 161 } 162 163 this.getUrlType = function (url) { 164 165 url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/); 166 var videoType; 167 if (RegExp.$3.indexOf('youtu') > -1) { 168 videoType = "youtube"; 169 } else if (RegExp.$3.indexOf('vimeo') > -1) { 170 videoType = "vimeo"; 171 } 172 173 return {videoType: videoType, videoId: RegExp.$6}; 174 } 175 176 this.getVideoInfo = function (target, url) { 177 var info = {}; 178 179 if (target && $(target).attr('data-wv-layout-element-param')) { 180 info = bm.object.deepCopy(JSON.parse($(target).attr('data-wv-layout-element-param').replace(/\'/g, '"'))); 181 } 182 183 if (url) { 184 var urlInfo = this.getUrlType(url); 185 186 info['videoType'] = urlInfo['videoType']; 187 info['videoId'] = urlInfo['videoId']; 188 } 189 190 return info; 191 } 192 193 this.getVideoParam = function (target) { 194 195 196 if(isExpertMode) { 197 var videoParam = this.getVideoInfo(target, $(this['btnList']['url']).val()); 198 }else { 199 var videoParam = this.getVideoInfo(target, $(this.bgVideoOpt.element).find('[data-wv-tool-option-value="url"]').val()); 200 } 201 202 videoParam.videoLoop = true; 203 videoParam.videoAutoplay = true; 204 205 var webRoot = WEB_ROOT; 206 if (webRoot.indexOf('/webadm') > -1) webRoot.replaceAll('/webadm', '/web'); 207 208 if (videoParam.videoType === "youtube") { 209 videoParam.videoSrc = "https://www.youtube.com/embed/" + videoParam.videoId + "?autoplay=1&mute=1&controls=0&disablekb=1&enablejsapi=1&modestbranding=1&iv_load_policy=3&loop=1&playlist=" + videoParam.videoId + "&origin=" + encodeURIComponent(webRoot); 210 } else if (videoParam.videoType === "vimeo") { 211 videoParam.videoSrc = "https://player.vimeo.com/video/" + videoParam.videoId + "?autoplay=1&muted=1&autopause=0&loop=1&controls=0&background=1"; 212 } 213 214 return videoParam; 215 216 } 217 218 this.addVideoBg = function (videoParam, target, responsiveSize) { //ë¹ëì¤ ì´ê¸°ë°°ê²½ ì¤ì *cys 219 let css = {backgroundRepeat: 'no-repeat', backgroundSize: 'cover', backgroundPosition: 'center'}; 220 let styleObj = WVAdminResourceManager.getEmbededStyleObject(null, target); 221 222 responsiveSize = responsiveSize ? responsiveSize : wvAdminIFrameBridge._WVAdminTopBar.getResponsiveCheckSizeList(
222); 223 224 if (videoParam.videoType === 'vimeo') { 225 let ajaxUrl = 'http://vimeo.com/api/v2/video/' + videoParam.videoId + '.json'; 226 $.ajax({ 227 url: ajaxUrl, 228 dataType: "json" 229 }).done((data) => { 230 let url = data[0]['thumbnail_large']; 231 css['backgroundImage'] = 'url("' + url + '")'; 232 styleObj.applyResourceStyle(target, css, false, true, false, false, responsiveSize ); 233 styleObj.refreshStyleElementText(); 234 }).fail(() => { 235 console.log('ì¸ë¤ì¼ ì¶ì¶ ì¤í¨'); 236 }); 237 } else if (videoParam.videoType === 'youtube') { 238 var url = 'https://img.youtube.com/vi/' + videoParam.videoId + '/maxresdefault.jpg'; 239 240 // ì¸ë¤ì¼ 못ê°ì ¸ì¤ë ê²½ì° widthë¡ ìì ì²´í¬ 241 var thumb = new Image(); 242 thumb.src = url; 243 css['backgroundImage'] = 'url("' + url + '")'; 244 styleObj.applyResourceStyle(target, css, false, true, false, false, responsiveSize ); 245 styleObj.refreshStyleElementText(); 246 } 247 } 248 249 this.setVideo = function () { //ë¹ëì¤íë ì ì¸í 250 251 this.playerTmplt = '<div class="video-bg-wrap">' 252 + '<div class="dim" style="position: absolute;top: 0;left: 0;height: 100%;width: 100%;z-index: 1;"></div>' 253 + '<div class="video-bg">' 254 + '<iframe id="'+ $(this.target).attr('data-wv-res-id') +'" src="{{videoSrc}}" frameborder="0" allowfullscreen="1" allow="autoplay; fullscreen" style="position:absolute; top:0; left:0;"></iframe>' 255 + '</div>' 256 + '</div>'; 257 258 this.blockJsTmplt = "{ videoInfo: null, videoWidth : 0, videoHeight : 0 ,init : function(){ this.registEvent(); this.onLoadHandler(); } ,registEvent : function() { } ,onLoadHandler : function(){ var _this = this; if(_this.block && $(_this.block).attr('data-wv-layout-element-param')) { _this.videoInfo = JSON.parse($(_this.block).attr('data-wv-layout-element-param').replace(/\'/g, '\"')); if($(_this.block).find('.video-bg-wrap').length > 0) { $(_this.block).find('.video-bg-wrap').remove(); } $(_this.block).prepend(_this.getPlayer()); _this.observer = new ResizeObserver(function (entries, observer) { var width = entries[0].borderBoxSize[0].inlineSize; var height = entries[0].borderBoxSize[0].blockSize; if(width !== _this.videoWidth || height !== _this.videoHeight) { _this.setVideoFullSize(width, height); } _this.videoWidth = width; _this.videoHeight = height; }); _this.observer.observe(_this.block); } } , setVideoFullSize : function ( w, h ) { var iframe = $(this.block).find('iframe'); var ratio = 1.778; var extraValue = 200; iframe.height(Math.round(w / ratio)); iframe.width(Math.round(iframe.height() * ratio)); if (w > iframe.width()) { iframe.width(w + extraValue); iframe.height(iframe.width() / ratio ); } if (h > iframe.height()) { iframe.height(h + extraValue); iframe.width(iframe.height() * ratio); } iframe.parent().css('left', '-' + (iframe.width() - w) / 2 + 'px' ); iframe.parent().css('top', '-' + (iframe.height() - h) / 2 + 'px' ); } ,getPlayer : function() { return '" + this.playerTmplt + "'; } ,removeEvent : function(){ if(this.observer) this.observer.disconnect(); } ,destroy : function(){ this.videoWidth = 0; this.videoHeight = 0; this.removeEvent(); } }" 259 } 260 261 this.addPlayer = function (targetElementList) { 262 263 bm.toolManager.toolBtnEditBefore(this, targetElementList, HistoryType.EDITOR_DOM_BACKGROUND_VIDEO); 264 265 for (var i = 0; i < targetElementList.length; i++) { 266 var target = targetElementList[i]; 267 268 var videoParam = this.getVideoParam(target); 269 270 if ($(target).find('.video-bg-wrap').length > 0) { 271 $(target).find('.video-bg-wrap').remove(); 272 } 273 274 if ($(target).attr('data-wv-layout-element-param')) { 275 var param = JSON.parse($(target).attr('data-wv-layout-element-param').replace(/\'/g, '"')); 276 277 param['videoType'] = videoParam.videoType; 278 param['videoId'] = videoParam.videoId; 279 param['videoSrc'] = videoParam.videoSrc; 280 param['videoLoop'] = videoParam.videoLoop; 281 param['videoAutoplay'] = videoParam.videoAutoplay; 282 283 $(target).attr('data-wv-layout-element-param', JSON.stringify(param).replace(/\"/g, "'")); 284 } else { 285 $(target).attr('data-wv-layout-element-param', JSON.stringify(videoParam).replace(/\"/g, "'")); 286 } 287 288 // res-idë block-idê° ìì¼ë©´ block jsê° ì ì©ëì§ ìì ì¶ê°í´ì¤ 289 if (!$(target).attr('data-wv-res-id')) { 290 var blockId = $(target).attr('data-wv-block-id'); 291 $(target).attr('data-wv-res-id', WVAdminResourceManager.createResourceId(blockId)) 292 } 293 294 if (!$(target).attr('data-wv-block-id')) { 295 $(target).attr('data-wv-block-id', "___block" + $(target).attr('data-wv-res-id')); 296 } 297 298 this.addVideoBg(videoParam, $(target)); 299 300 this.setVideo(); 301 this.addBlockJs($(target).attr('data-wv-res-id'), videoParam.videoSrc); 302 } 303 304 bm.toolManager.toolBtnEditAfter(this, targetElementList, HistoryType.EDITOR_DOM_BACKGROUND_VIDEO); 305 306 this.setStyleBtn(); 307 } 308 309 this.addBlockJs = function (resId, videoSrc) { 310 311 var contentArea = wvAdminIFrameBridge._WVContentArea; 312 var jsContent = "wevenBlock['" + resId + "'] = " + this.blockJsTmplt; 313 var scriptElement = contentArea.innerWindow.document.createElement('script'); 314 315 scriptElement.setAttribute('type', 'text/javascript'); 316 scriptElement.setAttribute('data-block-js', resId); 317 318 if($(this.target).closest('data-wv-inc').length > 0) { 319 scriptElement.setAttribute('data-inc-js', resId); 320 } else if ($(this.target).closest('[data-wv-layout-element="layout"]').length > 0) { 321 scriptElement.setAttribute('data-layout-js', ''); 322 } 323 324 if (jsContent.indexOf('{{videoSrc}}') > -1) jsContent = jsContent.replace(/{{videoSrc}}/g, videoSrc); 325 326 scriptElement.text = jsContent; 327 328 if (contentArea.$contentBody.find("script[data-block-js='" + resId + "']").length > 0) { 329 var prevScript = contentArea.$contentBody.find("script[data-block-js='" + resId + "']"); 330 prevScript.each(function () { 331 if(this.innerHTML.indexOf("video-bg-wrap")) { // í´ë¹ res-idì js ì¤ ë°°ê²½ëìì scriptê° ìì¼ë©´ ì¤ë³µë°©ì§ ìí´ ì§ì 332 $(this).remove(); 333 delete wvAdminIFrameBridge.iframeWindow.wevenBlock[resId]; 334 } 335 }); 336 } 337 338 contentArea.$contentBody.append(scriptElement); 339 340 app.childApp.wvLayoutTargetCrawling(resId, true); 341 } 342 343} 344
345bm.extend(ToolBtnBase, ToolBtnDomBackgroundVideo); 346 347ToolBtnDomBackgroundVideo.prototype.setStyleBtn = function () { 348 if (!this.target || this.target.length) { 349 this.resetStyleBtn(); 350 return false; 351 } 352 353 // ìì, ì§ë, í¤ë, ê²ìí ë¸ë¡ì ë°°ê²½ëìì ì¤ì ë¶ê° 354 if ($(this.target).attr('data-wv-layout-element-type') === "video" || $(this.target).attr('data-wv-layout-element-type') === "map" 355 || $(this.target).closest('[data-wv-inc="header"]').length > 0 || $(this.target).attr('data-wv-layout-element-type') === "bbs" 356 || $(this.target).attr('data-wv-layout-element-type') === "line" || $(this.target).closest('[data-wv-layout-element-type="shop_list"]').length > 0 357 || $(this.target).closest('[data-wv-layout-element-type="shop_review"]').length > 0 || $(this.target).closest('[data-wv-layout-element-type="shop_BBS_recent"]').length > 0 358 || $(this.target).closest('[data-wv-layout-element-type="insta"]').length > 0) { 359 this.resetStyleBtn(); 360 return false; 361 } 362 363 if(!isExpertMode) { 364 this.bgVideoOpt = this.optionList["backgroundVideo"]; 365 var optionBtnList = this.bgVideoOpt.optionBtnList; 366 }else { 367 this.bgVideoOpt = {'element' : this.element}; 368 } 369 370 const videoDimNode = $(this.target).find('.dim')[0]; 371 let videoDimStyle; 372 if(videoDimNode) { 373 videoDimStyle = bm.getStyle(videoDimNode, 'backgroundColor'); 374 }else { 375 videoDimStyle = 'rgba(0,0,0,0)'; 376 } 377 378 var param = $(this.target).attr('data-wv-layout-element-param'); 379 380 if (param && !param.includes('vertical') && !param.includes('horizon')) { 381 try{ 382 var param = JSON.parse($(this.target).attr('data-wv-layout-element-param').replace(/\'/g, '"')); 383 }catch(e){ 384 var param = bm.parsing.parseStrToObj($(this.target).attr('data-wv-layout-element-param').replace(/\'/g, '"')); 385 } 386 387 if (param.videoType && param.videoId) { 388 var url = ""; 389 390 if (param.videoType === "youtube") { 391 url = "https://youtu.be/" + param.videoId; 392 } else if (param.videoType === "vimeo") { 393 url = "https://vimeo.com/" + param.videoId; 394 } 395 396 if(isExpertMode) { 397 $(this.element).find('input[name=url]').val(url); 398 $(this.element).find('input[name=videoDim]').val(bm['number'].rgbToHex(videoDimStyle)); 399 $('#videoDimColorPicker').val(bm['number'].rgbToHex(videoDimStyle)); 400 $(this.element).find('input[name=videoDimOpacity]').val((bm['number'].rgbaToObj(videoDimStyle)['a'] * 100) + '%'); 401 402 bm.toolManager.toolList['ToolDomBackgroundVideo'].openControl(null, true); 403 } else{ 404 $(this.bgVideoOpt.element).find('[data-wv-tool-option-value="url"]').val(url); 405 406 $(optionBtnList['delete']).show(); 407 } 408 } 409 } else { 410 //무ìí 411 if(isExpertMode) { 412 $(this.element).find('input[name=url]').val(''); 413 $(this.element).find('input[name=videoDim]').val('#000000'); 414 $('#videoDimColorPicker').val('#000000'); 415 $(this.element).find('input[name=videoDimOpacity]').val('0%'); 416 bm.toolManager.toolList['ToolDomBackgroundVideo'].openControl(null, false); 417 } else { 418 $(this.bgVideoOpt.element).find('[data-wv-tool-option-value="url"]').val(''); 419 $(optionBtnList['delete']).hide(); 420 } 421 } 422} 423 424ToolBtnDomBackgroundVideo.prototype.resetStyleBtn = function () { 425 var _this = this; 426 if(isExpertMode) { 427 $(this.element).find('input[name=url]').val(''); 428 $(this.element).find('input[name=videoDim]').val('#000000'); 429 $('#videoDimColorPicker').val('#000000'); 430 $(this.element).find('input[name=videoDimOpacity]').val('0%'); 431 } 432} 433 434ToolBtnDomBackgroundVideo.prototype.showOption = function(option, btn){ 435 ToolBtnBase.prototype.showOption.call(this, option, btn); 436 437 if(option.type === "ToolOpColorPicker") { 438 $(option.element).closest('.tool_form_style_0_content').append(option.element); 439 } 440} 441
442ToolBtnDomBackgroundVideo.prototype.addEvent = function () { 443 var _this = this; 444 445 if(isExpertMode) { 446 this.onOptionHide = function( btn, option ) { 447 if( option.status == 1) { 448 option.deactive(); 449 } 450 } 451 452 this.onOptionShow = function (btn, option) { 453 var rgb = bm.number.hexToRgb($(this.element).find('input[name="videoDim"]').val()); 454 rgb.a = parseFloat($(this.element).find('input[name="videoDimOpacity"]').val()) / 100; 455 option.setStyleValue(rgb.r, rgb.g, rgb.b, rgb.a); 456 } 457 458 $(this.element).find('input[name="url"]').on('keydown', function(e) { 459 if( e.keyCode == 13 ){ 460 _this.onOptionChange('apply'); 461 } 462 }); 463 464 $(this.element).find('input[name="videoDim"]').on('keydown', function(e) { 465 if( e.keyCode == 13 ){ 466 var val = this.value; 467 468 if( bm.number.isHex(val) == false ){ 469 bm.toast(systemLangPack.getMessage('SLSATTB0038'), systemLangPack.getMessage('SLSATTB0101')); //ì¬ë°ë¥¸ ììì½ë를 ì ë ¥í´ì£¼ì¸ì., ìì ë¤ ìì 470 return false; 471 } 472 473 _this.onOptionChange('apply'); 474 } 475 }); 476 477 $('#videoDimColorPicker').on('change', function(e) { 478 $(_this.element).find('input[name="videoDim"]').val(this.value); 479 _this.onOptionChange('apply'); 480 }); 481 482 $(this.element).find('input[name="videoDimOpacity"]').on('keydown', function(e) { 483 if( e.keyCode == 13 ){ 484 var opacity = parseInt(this.value); 485 486 if( opacity < 0 || opacity > 100 ){ 487 bm.toast(systemLangPack.getMessage('SLSATTB0102'), systemLangPack.getMessage('SLSATTB0103')); //0ë¶í° 100 ì¬ì´ ê°ë§ ì ì©í ì ììµëë¤., ìì ë¤ í¬ëª ë 488 return false; 489 } 490 491 _this.onOptionChange('apply'); 492 } 493 }); 494 495 //ì í¨ì±ê²ì¬ 496 $(this.element).find('input[name="videoDimOpacity"]').on('keyup', function() { 497 var value = $(this).val(); 498 // % 1ê° í¬í¨ ì íµê³¼ 499 if ( value.indexOf('%') === -1 && !bm.valid.isOnlyNum(value) || !/^\d+(%{0,1})$/.test(value) ) { 500 $(this).val(0); 501 bm.toast(systemLangPack.getMessage('SLSATTB0058'), systemLangPack.getMessage('SLSATTB0103')); //ì«ì를 ì ë ¥í´ì£¼ì¸ì., ìì ë¤ í¬ëª ë 502 return false; 503 } 504 }); 505 } else { 506 $(this.element).find('input[name="videoDim"]').on("keyup", function (e) { //dim ì¡°ì *cys 507 var dim = $(this).val(); 508 if (bm.valid.isOnlyNumDot(dim)) { 509 if (dim < 0 || dim > 1) { 510 $(this).val(0.2); 511 bm.toast(systemLangPack.getMessage('SLSATTB0104'), systemLangPack.getMessage('SLSATTB0105')); //0 ~ 1ì¬ì´ì ìì¹ë¥¼ ì ë ¥í´ì£¼ì¸ì., ììí¬ëª ë 512 return; 513 } 514 } else { 515 $(this).focus(); 516 $(this).val(0.2); 517 bm.toast(systemLangPack.getMessage('SLSATTB0058'), systemLangPack.getMessage('SLSATTB0105')); //ì«ì를 ì ë ¥í´ì£¼ì¸ì., ììí¬ëª ë 518 return; 519 } 520 }); 521 } 522} 523 524ToolBtnDomBackgroundVideo.prototype.removeEvent = function () { 525 var _this = this; 526 if(isExpertMode) { 527 $(this.element).find('input[name="videoDim"]').off("keydown"); 528 $('#videoDimColorPicker').off("change"); 529 $(this.element).find('input[name="videoDimOpactiy"]').off("keydown"); 530 $(this.element).find('input[name="videoDimOpactiy"]').off("keyup"); 531 } else { 532 $(this.element).find('input[name="videoDim"]').off("keyup"); 533 } 534} 535 536ToolBtnDomBackgroundVideo.prototype.resetProperty = function() { 537 this.onOptionChange('delete'); 538}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.