1if(DM_LOADED == undefined) var DM_LOADED; 2if(DM_DESIGN_MODE == undefined) var DM_DESIGN_MODE; 3 4var EYEEDITOR_WINDOW = null; 5var DMPNListResizeBarY = 0; 6var DMPNListResizeBarStartDPNListHeight = 0; 7var DMPNListResizeBarResizing = false; 8var DMTemplatePath = ''; 9 10if(typeof gl_operation_type != 'undefined' && gl_operation_type == undefined) var gl_operation_type = ''; 11 12function DM_init(template_path){ 13 if(!DM_LOADED){ 14 15 DM_LOADED = true; 16 DM_loadingStart(); 17 DMTemplatePath = template_path; 18 19 $.ajax({ 20 'url' : '/admin/design/get_panel_html', 21 'cache' : false, 22 'async' : false, 23 'data' : {'area':'init','template_path':template_path,'location':window.location.href}, 24 'success' : function(result){ 25 26 $('body').prepend(result); 27 28 $(function(){ 29 30 /* ëìì¸ìëí°ëª¨ë ì¿ í¤ */ 31 setDesignEditMode($.cookie('designEditMode')?true:false); 32 33 // ëìì¸ ìë¦¬ë¨¼í¸ ì´ë²¤í¸ ë°ì¸ë© 34 setDesignElementEvent('body',template_path); 35 36 //íë¡ëª¨ì ì¿ í° > ì´ë²¤í¸íì´ì§ > ìì¤ìì 37 $(".designCouponlist").click(function(){ 38 if(DM_DESIGN_MODE){ 39 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 40 DM_window_sourceeditor(templatePath); 41 return false; 42 } 43 }); 44 45 // ë¤ë¹ê²ì´í° : í´ë¦í í´ë ì´ê¸° 46 $(".DMPNListDepth1ItemTitle").bind('click',function(){ 47 if($(this).parent().children(".DMPNListDepth2").is(':hidden')){ 48 $(".DMPNListDepth1Item").removeClass("opened"); 49 $(this).parent().addClass("opened"); 50 }else{ 51 $(".DMPNListDepth1Item").removeClass("opened"); 52 } 53 54 $(".DMPNListDepth2Item").removeClass("controlMenuOpened"); 55 $("#DMPanelNavigatorControlMenu").data('template_path','').hide(); 56 57 }); 58 59 60 // ë¤ë¹ê²ì´í° : 컨í¸ë¡¤ë©ë´ open 61 controlMenuOpen = function(DMPNListDepth2Item){ 62 $(".DMPNListDepth2Item").removeClass("opened"); 63 $(".DMPNListDepth2Item").removeClass("controlMenuOpened"); 64 DMPNListDepth2Item.addClass("opened"); 65 DMPNListDepth2Item.addClass("controlMenuOpened"); 66 DMPanelNavigatorControlMenuOpen(DMPNListDepth2Item,DMPNListDepth2Item.attr('path')); 67 } 68 $("#DMPanelNavigator").bind('contextmenu',function(event){ 69 event.preventDefault(); 70 }); 71 $(".DMPNListDepth2Item").bind('contextmenu',function(event){ 72 event.preventDefault(); 73 controlMenuOpen($(this)); 74 }); 75 $(".DMPNListDepth2Item span.dn_icon").bind('click',function(event){ 76 event.preventDefault(); 77 controlMenuOpen($(this).closest(".DMPNListDepth2Item")); 78 return false; 79 }); 80 81 // ë¤ë¹ê²ì´í° : ì¤í¬ë¡¤ì 컨í¸ë¡¤ë©ë´ ì¨ê¸°ê¸° 82 $("#DMPanelNavigator .DMPNList").scroll(function(){ 83 $(".DMPNListDepth2Item").removeClass("controlMenuOpened"); 84 //$("#DMPanelNavigatorControlMenu").data('template_path','').hide(); 85 }); 86 87 // ë¤ë¹ê²ì´í° : 컨í¸ë¡¤ë©ë´ ìì´í í´ë¦ 88 $("#DMPanelNavigatorControlMenu .DMPNCMItem").bind('click',function(){ 89 var template_path = $("#DMPanelNavigatorControlMenu").data('template_path'); 90 var cmd = $(this).attr('cmd'); 91 92 switch(cmd){ 93 case 'image_insert': 94 DM_window_image_insert(template_path); 95 break; 96 case 'flash_insert': 97 DM_window_flash_insert(template_path); 98 break; 99 case 'banner_insert': 100 DM_window_banner_insert(template_path); 101 break; 102 case 'video_insert': 103 DM_window_video_insert(template_path); 104 break; 105 case 'display_insert': 106 if (typeof gl_mobile_mode == 'undefined') { 107 gl_mobile_mode = 0; 108 } 109 DM_window_display_insert(template_path,'design',gl_mobile_mode?'mobile':'pc'); 110 break; 111 case 'lastest_insert': 112 DM_window_lastest_insert(template_path); 113 break; 114 case 'popup_insert': 115 DM_window_popup_insert(template_path); 116 break; 117 case 'source_edit': 118 DM_window_sourceeditor(template_path); 119 break; 120 case 'layout_edit': 121 DM_window_layout(template_path); 122 break; 123 case 'broadcast_insert': 124 DM_window_broadcast_insert(template_path); 125 break; 126 case 'instagramFeed_insert': 127 DM_window_instagramFeed_insert(template_path); 128 break; 129 } 130 });
131 132 // ë¤ë¹ê²ì´í° : ëìì¸í¸ì§ëª¨ë On/Off 133 $("#DMPanelNavigator .DMPNHSwitch").bind('click',function(){ 134 if(DM_DESIGN_MODE){ 135 setDesignEditMode(false); 136 }else{ 137 setDesignEditMode(true); 138 } 139 }); 140 141 /* ëìì¸ë¤ë¹ê²ì´ì ìì ì´ë ¤ìë íì¼ë¡ ì¤í¬ë¡¤ ì´ë */ 142 $(".DMPNListDepth2Item.opened").each(function(){ 143 var stop = $(this).closest(".DMPNListDepth1Item").position().top 144 + $(this).position().top; 145 146 $(this).closest(".DMPNList").scrollTop(stop); 147 148 }); 149 150 /* ëìì¸ë¤ë¹ê²ì´ì 리ì¬ì´ì§ */ 151 $(".DMPNListResizeBar") 152 .bind('mousedown',function(e){ 153 DMPNListResizeBarResizing = true; 154 DMPNListResizeBarStartDPNListHeight = $(".DMPNList:eq(0)").height(); 155 DMPNListResizeBarY = e.clientY; 156 }); 157 $(document) 158 .bind('dragstart selectstart',function(){ 159 if(DMPNListResizeBarResizing){ 160 return false; 161 } 162 }) 163 .bind('mousemove',function(e){ 164 if(DMPNListResizeBarResizing){ 165 var moveY = DMPNListResizeBarY-e.clientY; 166 $(".DMPNList:eq(0)").css('height',DMPNListResizeBarStartDPNListHeight-moveY); 167 } 168 }) 169 .bind('mouseup',function(e){ 170 if(DMPNListResizeBarResizing){ 171 var moveY = DMPNListResizeBarY-e.clientY; 172 $(".DMPNList:eq(0)").css('height',DMPNListResizeBarStartDPNListHeight-moveY); 173 DMPNListResizeBarResizing = false; 174 175 $.cookie("DPNListHeight",DMPNListResizeBarStartDPNListHeight-moveY,{path:'/'});
176 } 177 }); 178 179 $(document).bind('keydown', 'F8', function(){ 180 setDesignEditMode(!DM_DESIGN_MODE); 181 if(!DM_DESIGN_MODE){ 182 $(".designElement").each(function(){ 183 var designElementType = $(this).attr('designElement'); 184 $(this).css({'opacity':'1'}).removeClass("designElementHover"); 185 if($(this).is("div")){ 186 $('.designElementEditBtn',this).css('opacity','0'); 187 }; 188 }); 189 } 190 return false; 191 }); 192 193 DM_loadingStop(); 194 195 }); 196 } 197 }); 198 199 } 200} 201 202function setDesignElementEvent(wrap,template_path){ 203 /* ëìì¸í¸ì§ëª¨ëì¼ë ëìì¸ì리먼í¸(ì´ë¯¸ì§,íëì,ëì¤íë ì´,íì ) ì´ë²¤í¸ ì ì */ 204 // ìë 주ìì ì¶í ìì´ëìì¸ í ì¤í¸ ìì ê¸°ë¥ ì¤íì ì ê±° 205 $("a[designElement],span[designElement],p[designElement],img[designElement],table[designElement],td[designElement],th[designElement],div[designElement],input[designElement]",wrap).addClass('designElement') 206// $("img[designElement],table[designElement],td[designElement],th[designElement],div[designElement],input[designElement]",wrap).addClass('designElement') 207 .each(function(){ 208 var designElementType = $(this).attr('designElement'); 209 210 switch(designElementType){ 211 case 'text': 212 // templatePath ì¬ë¶ì ë°ë¼ ììë¡ templatePath ì¤ì 213 var isDirectPath = $(this).attr('textTemplatePath') ? true : false; 214 if(!isDirectPath){ 215 $(this).attr('textTemplatePath', template_path); 216 } 217 default: 218 break; 219 } 220 221 }).off('mouseover').off('mouseout').off('mousedown contextmenu') 222 .on('mouseover',function(){ 223 if(DM_DESIGN_MODE){ 224 var designElementType = $(this).attr('designElement'); 225 $(this).css({'opacity':'0.5'}).addClass("designElementHover"); 226 if($(this).is("div")){ 227 $('.designElementEditBtn',this).css('opacity','0.5'); 228 }; 229 } 230 }) 231 .on('mouseout',function(){ 232 if(DM_DESIGN_MODE){ 233 var designElementType = $(this).attr('designElement'); 234 $(this).css({'opacity':'1'}).removeClass("designElementHover"); 235 if($(this).is("div")){ 236 $('.designElementEditBtn',this).css('opacity','0'); 237 }; 238 } 239 }) 240 .on('mousedown contextmenu',function(event){ 241 if(DM_DESIGN_MODE){ 242 event.preventDefault(); 243 var designElementType = $(this).attr('designElement'); 244 245 switch(designElementType){ 246 case 'image' : 247 var designImageLabel = $(this).attr('alt') ? $(this).attr('alt') : ''; 248 var linkOri = this.tagName=='IMG' && $(this).parent().attr('hrefOri') ? $(this).parent().attr('hrefOri') : ''; 249 var link = this.tagName=='IMG' && $(this).parent().attr('href') ? $(this).parent().attr('href') : ''; 250 251 link = linkOri ? Base64.decode(linkOri) : link; 252 var target = this.tagName=='IMG' && $(this).parent().attr('target') ? $(this).parent().attr('target') : ''; 253 var viewSrc = $(this).attr('src'); 254 DM_window_image_edit($(this).attr('designTplPath'),$(this).attr('designImgSrc'),$(this).attr('designImgSrcOri'),designImageLabel,link,this.tagName,target,viewSrc); 255 break; 256 case 'video' : 257 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 258 DM_window_video_edit(templatePath,$(this).attr('videoSeq'),$(this).attr('realwidth'),$(this).attr('realheight')); 259 break; 260 case 'displaylastest' : 261 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 262 DM_window_lastest_edit(templatePath,$(this).attr('id')); 263 break; 264 case 'flash' : 265 var flashSeq = $(this).attr('flashSeq') ? $(this).attr('flashSeq') : ''; 266 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 267 DM_window_flash_edit(templatePath,flashSeq,true); 268 break; 269 case 'banner' : 270 var bannerSeq = $(this).attr('bannerSeq') ? $(this).attr('bannerSeq') : ''; 271 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 272 DM_window_banner_edit(templatePath,bannerSeq,true); 273 break; 274 case 'display' : 275 case 'mshopGoodsDisplay' : 276 case 'searchGoodsDisplay' : 277 case 'goodsRelationDisplay' : 278 case 'goodsBigdataDisplay' : 279 case 'goodsSellerRelationDisplay': 280 var displaySeq = $(this).attr('displaySeq') ? $(this).attr('displaySeq') : ''; 281 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 282 var perpage = $(this).attr('perpage') ? $(this).attr('perpage') : ''; 283 if (typeof gl_mobile_mode == 'undefined') { 284 gl_mobile_mode = 0; 285 } 286 kind = 'design' 287 if (designElementType == 'goodsRelationDisplay') 288 kind = 'relation'; 289 if (designElementType == 'goodsSellerRelationDisplay') 290 kind = 'relation_seller'; 291 if (designElementType == 'goodsBigdataDisplay') 292 kind = 'bigdata'; 293 if (designElementType == 'searchGoodsDisplay') 294 kind = 'search'; 295 if (designElementType == 'mshopGoodsDisplay') 296 kind = 'mshop'; 297 298 // light ì¤ì íë«í¼ ì¶ê° 299 var platform = 'pc'; 300 if(typeof gl_operation_type != 'undefined' && gl_operation_type == 'light'){ 301 platform = 'responsive'; 302 }else{ 303 platform = gl_mobile_mode ? 'mobile' : 'pc'; 304 } 305 306 DM_window_display_edit(templatePath,displaySeq,true,perpage,kind, platform); 307 break; 308 /* ì°ì¸¡ íµë©ë´ ì¶ì²ìí ì¶ê° */ 309 case 'goodsRecommDisplay' : 310 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 311 var elementImg = $(this).find("img"); 312 var designImageLabel = elementImg.attr('alt') ? elementImg.attr('alt') : ''; 313 var linkOri = elementImg.tagName=='IMG' && elementImg.parent().attr('hrefOri') ? elementImg.parent().attr('hrefOri') : ''; 314 var link = elementImg.tagName=='IMG' && elementImg.parent().attr('href') ? elementImg.parent().attr('href') : ''; 315 316 link = linkOri ? Base64.decode(linkOri) : link; 317 var target = elementImg.tagName=='IMG' && elementImg.parent().attr('target') ? elementImg.parent().attr('target') : ''; 318 var viewSrc = elementImg.attr('src'); 319 320 DM_window_recomm_goods_edit(templatePath,elementImg.attr('designTplPath'),elementImg.attr('designImgSrc'),elementImg.attr('designImgSrcOri'),designImageLabel,link,elementImg.tagName,target,viewSrc); 321 break; 322 case 'popup' : 323 var popupSeq = $(this).attr('popupSeq') ? $(this).attr('popupSeq') : ''; 324 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 325 DM_window_popup_edit(templatePath,popupSeq,true); 326 break; 327 case 'categoryNavigation' : 328 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 329 DM_window_category_navigation_design(templatePath); 330 break; 331 case 'brandNavigation' : 332 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 333 DM_window_brand_navigation_design(templatePath); 334 break; 335 case 'locationNavigation' : 336 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 337 DM_window_location_navigation_design(templatePath); 338 break; 339 case 'categoryRecommendDisplay' : 340 openDialogAlert("ê´ë¦¬ì모ë > í매ìí > ìí리ì¤í¸ íì´ì§ > ì¹´í ê³ ë¦¬ > ê²ìíí° > 꾸미기를 íµí´ ë³ê²½íì¤ ì ììµëë¤.",500,140); 341 break; 342 case 'categoryGoodsDisplay' : 343 openDialogAlert("ê´ë¦¬ì모ë > í매ìí > ìí리ì¤í¸ íì´ì§ > ì¹´í ê³ ë¦¬ > ê²ìíí° > 꾸미기를 íµí´ ë³ê²½íì¤ ì ììµëë¤.",500,140); 344 break; 345 case 'brandRecommendDisplay' : 346 openDialogAlert("ê´ë¦¬ì모ë > í매ìí > ìí리ì¤í¸ íì´ì§ > ë¸ëë > ê²ìíí° > 꾸미기를 íµí´ ë³ê²½íì¤ ì ììµëë¤.",500,140); 347 break; 348 case 'brandGoodsDisplay' : 349 openDialogAlert("ê´ë¦¬ì모ë > í매ìí > ìí리ì¤í¸ íì´ì§ > ë¸ëë > ê²ìíí° > 꾸미기를 íµí´ ë³ê²½íì¤ ì ììµëë¤.",500,140); 350 break; 351 case 'locationRecommendDisplay' : 352 openDialogAlert("ê´ë¦¬ì모ë > í매ìí > ìí리ì¤í¸ íì´ì§ > ì§ì > ê²ìíí° > 꾸미기를 íµí´ ë³ê²½íì¤ ì ììµëë¤.",500,140); 353 break; 354 case 'locationGoodsDisplay' : 355 openDialogAlert("ê´ë¦¬ì모ë > í매ìí > ìí리ì¤í¸ íì´ì§ > ì§ì > ê²ìíí° > 꾸미기를 íµí´ ë³ê²½íì¤ ì ììµëë¤.",500,140); 356 break; 357 case 'topBar' : 358 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 359 DM_window_topBar_design(templatePath); 360 break; 361 case 'mainTopBar' : 362 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 363 DM_window_mainTopBar_design(templatePath); 364 case 'text' : 365 // 기본 ë³ì ì ì 366 var allow_tags = ['p', 'span', 'a']; 367 var tag_name = $(this)[0].tagName.toLowerCase(); 368 369 // p, span, a íê·¸ê° ìëê²½ì° ë¸ë½ì²ë¦¬ 370 if($.inArray(tag_name, allow_tags) == -1){ 371 openDialogAlert("í´ë¹ 기ë¥ì ì§ìíì§ ìë íê·¸ì ëë¤.",500,140); 372 return false; 373 } 374 375 // ìì í í ì¤í¸ì í´ë¹ íì¼ ë´ í ì¤í¸ìì íê·¸ì ìì¹ê° íµì¬ 376 var templatePath = $(this).attr('texttemplatepath'); 377 var txt = $(this).html(); 378 var txt_index = $(this).attr('textindex') - 1; 379 var link = $(this).attr('href') != null ? $(this).attr('href') : ''; 380 var target = $(this).attr('target') != null ? $(this).attr('target') : '_self'; 381 382 // ìì ì°½ ì¤í 383 DM_window_text_edit(templatePath, txt, txt_index, tag_name, link, target); 384 break; 385 case 'designBroadcast' : 386 var templatePath = $(this).attr('templatePath') ? $(this).attr('templatePath') : template_path; 387 var displaySeq = $(this).attr('displaySeq') ? $(this).attr('displaySeq') : ''; 388 DM_window_broadcast_edit(templatePath,displaySeq); 389 break; 390 } 391 return false; 392 } 393 394 }); 395} 396 397/* ëìì¸ìëí°ëª¨ë ON/OFF */ 398function setDesignEditMode(flag){ 399 if(flag){ 400 DM_DESIGN_MODE = true;
401 $.cookie('designEditMode',true,{path:'/'}); 402 $("#DMPanelNavigator .DMPNHeader").addClass('designEditMode'); 403 $("#DMPanelNavigatorBtn").addClass('designEditMode'); 404 405 $("div[designElement]").each(function(){ 406 if(!$(this).is("div[designElement='popup']")){ 407 $(this).css('position','relative'); 408 } 409 $(this).append("<div class='designElementEditBtn'></div>"); 410 }); 411 412 $(".designElementEditBtn").css('opacity',0); 413 $(".designPopupIcon").show(); 414 415 //ëìì¸ ìë¦¬ë¨¼í¸ ì´ë²¤í¸ ë¤ì ë°ì¸ë© 416 setDesignElementEvent('body',DMTemplatePath); 417 }else{ 418 DM_DESIGN_MODE = false; 419 $.cookie('designEditMode',null,{path:'/'}); 420 $("#DMPanelNavigator .DMPNHeader").removeClass('designEditMode'); 421 $("#DMPanelNavigatorBtn").removeClass('designEditMode'); 422 $(".designElementEditBtn").remove(); 423 $(".designPopupIcon").hide(); 424 } 425} 426 427/* ë¤ë¹ê²ì´í° ë©ë´ ì¤í */ 428function DMPanelOpen(animation){ 429 //DM_window_close(); 430 431 if(animation){ 432 $("#DMPanelNavigator").css('margin-left','0px').show().animate({ 433 'margin-left' : '-200px' 434 }); 435 }else{ 436 $("#DMPanelNavigator").css('margin-left','0px').show().css({ 437 'margin-left' : '-200px' 438 }); 439 } 440 441 $.cookie('DMPanelClosed',null,{path:'/'});
442 443 $("#DMPanelNavigatorBtn").hide(); 444 $("#DMPanelTop").show().animate({'margin-top':'0px'}); 445} 446 447/* ë¤ë¹ê²ì´í° ë©ë´ ë«ê¸° */ 448function DMPanelClose(){ 449 $("#DMPanelNavigator").animate({ 450 'margin-left' : '0px' 451 },function(){ 452 $(this).hide(); 453 }); 454 455 $("#DMPanelNavigatorBtn").show().css('margin-left','0px').animate({'margin-left':'-50px'},500); 456 457 $.cookie('DMPanelClosed',1,{path:'/'}); 458 459 $("#DMPanelTop").animate({'margin-top':'-38px'},function(){ 460 $(this).hide(); 461 }); 462} 463 464/* ë¤ë¹ê²ì´í° 컨í¸ë¡¤ë©ë´ ì´ê¸° */ 465function DMPanelNavigatorControlMenuOpen(DMPNListDepth2Item, template_path){ 466 var item = $(DMPNListDepth2Item); 467 var cm = $("#DMPanelNavigatorControlMenu"); 468 469 if($(DMPNListDepth2Item).attr('file_type')=='popup'){ 470 471 $("li",cm).each(function(){ 472 if( $(this).is("li[cmd='layout_edit']")){ 473 $(this).hide(); 474 }else{ 475 $(this).show(); 476 } 477 }); 478 479 }else{ 480 $("li",cm).show(); 481 } 482 483// if(typeof gl_operation_type != 'undefined' && gl_operation_type == 'light' && template_path != 'main/index.html'){ 484// $("li[cmd='popup_insert']",cm).hide(); 485// }else{ 486// $("li[cmd='popup_insert']",cm).show(); 487// } 488 489 if(cm.data('template_path')==template_path){ 490 cm.data('template_path',''); 491 cm.hide(); 492 $(DMPNListDepth2Item).removeClass("controlMenuOpened"); 493 }else{ 494 cm.data('template_path',template_path); 495 cm.show(); 496 497 /*cm.css({ 498 'top' : item.position().top + item.closest('.DMPNListDepth1Item').position().top + item.closest('.DMPNList').position().top + item.height() 499 });*//* gon */ 500 } 501 502 item.append( cm ); /* gon */ 503} 504 505function DM_window(title,width,height,url,options){ 506 $("#DMWindowTitle .DMWTTextLeft").empty(); 507 $("#DMWindowTitle .DMWTTextRight").empty(); 508 $("#DMWindowTitle .DMWTTextCenter .prefix").empty(); 509 $("#DMWindowTitle .DMWTTextCenter .title").html(title); 510 511 $("#DMWindow") 512 .draggable({ iframeFix: true, opacity: 0.7 }); 513 514 515 $("#DMWindowBody").css({ 516 'width' : width, 517 'height' : height 518 }); 519 520 if(url){ 521 $("#DMWindowBodyIframe").attr('src',url).css('opacity','0').one('load',function(){ 522 $("#DMWindowBodyIframe").css('opacity',1); 523 }); 524 } 525 526 if(options && options['alone']){ 527 //DMPanelClose(); 528 $("#DMWindow").data('alone',true); 529 530 $("#DMWindow").css({ 531 'left' : '50%', 532 'top' : '50%', 533 'margin-left' : $("#DMWindow").width()/2*-1, 534 'margin-top' : $("#DMWindow").height()/2*-1 535 }); 536 }else if(options && options['fullscreen']){ 537 //DMPanelClose(); 538 $("#DMWindow").data('alone',true); 539 540 $("#DMWindow").css({ 541 'left' : '0', 542 'top' : '0', 543 'margin-left' : 0, 544 'margin-top' : 0 545 }); 546 547 $("#DMWindowBody").css({ 548 'width' : $(window).width()-10, 549 'height' :$(window).height()-$("#DMWindowTitle").height()-10 550 }); 551 }else{ 552 DMPanelOpen(false); 553 $("#DMWindow").data('alone',false); 554 555 $("#DMWindow").css({ 556 //'left' : '100%', 557 //'top' : $("#DMPanelNavigator").css('top'), 558 //'margin-left' : parseInt($("#DMPanelNavigator").css('margin-left')) - $("#DMWindow").outerWidth() - 5, 559 //'margin-top' : 0 560 'left' : '50%', 561 'top' : '50%', 562 'margin-left' : $("#DMWindow").width()/2*-1, 563 'margin-top' : $("#DMWindow").height()/2*-1 564 565 }); 566 } 567 568 $(window).css('overflow','hidden'); 569 570 $("#DMWindow").show(); 571 $("#DMModalBackground").css('opacity','0.5').show(); 572} 573 574/* ëìì¸ì°½ : ìì¤ìëí° */ 575function DM_window_sourceeditor(tpl_path,searchKeyword, useEncode){ 576 DM_window_eyeeditor("data/skin/"+designWorkingSkin+"/"+tpl_path,searchKeyword, useEncode); 577 //DM_window("<span class='source_edited_mark' style='display:none'>*</span>ìì¤í¸ì§",950,600,"/admin/design/sourceeditor?tpl_path="+encodeURIComponent(tpl_path)+"&searchKeyword="+searchKeyword,{'fullscreen':true}); 578} 579 580/* ëìì¸ì°½ : ìì´ìëí° */ 581function DM_window_eyeeditor(template_path,searchKeyword, useEncode){ 582 var queryString = template_path ? "?template_path="+encodeURIComponent(template_path?template_path:'') : ""; 583 584 searchKeyword = typeof searchKeyword == 'undefined' ? '' : searchKeyword; 585 useEncode = typeof useEncode == 'undefined' ? false : useEncode; 586 queryString = queryString ? queryString+"&searchKeyword="+encodeURIComponent(searchKeyword)+"&useEncode="+useEncode : "?searchKeyword="+encodeURIComponent(searchKeyword)+"&useEncode="+useEncode; 587 588 if(!EYEEDITOR_WINDOW || (EYEEDITOR_WINDOW && (typeof EYEEDITOR_WINDOW.document == 'unknown' || typeof EYEEDITOR_WINDOW.document == 'undefined' || EYEEDITOR_WINDOW.top == null))){ 589 EYEEDITOR_WINDOW = window.open("/admin/design/eye_editor"+queryString,"eyceditorWindow","width=1010,height=650,scrollbar=no,resizable=yes"); 590 }else{ 591 //EYEEDITOR_WINDOW.document.focus();
592 EYEEDITOR_WINDOW.focus(); 593 EYEEDITOR_WINDOW.searchKeyword = searchKeyword; 594 EYEEDITOR_WINDOW.addTabItem(template_path); 595 } 596} 597 598/* ëìì¸ì°½ : ë ì´ììì¤ì */ 599function DM_window_layout(tpl_path){ 600 DM_window('íì´ì§ ë ì´ìì ì¤ì ',1000,600,'/admin/design/layout?mode=edit&tpl_path='+tpl_path); 601} 602 603/* ëìì¸ì°½ : ìíì´ì§ë§ë¤ê¸°&ë ì´ììì¤ì */ 604function DM_window_layout_create(tpl_path){ 605 DM_window('ì íì´ì§ ë§ë¤ê¸°',1000,600,'/admin/design/layout?mode=create&tpl_path='+tpl_path) 606} 607 608/* ëìì¸ì°½ : ì ì²´íì´ì§ */ 609function DM_window_allpages(tpl_path){ 610 DM_window('ì ì²´íì´ì§',1000,600,'/admin/design/all_pages?tpl_path='+tpl_path,{'alone':true}) 611} 612 613/* ëìì¸ì°½ : ì´ë¯¸ì§ë£ê¸° */ 614function DM_window_image_insert(designTplPath){ 615 var title = 'ì´ë¯¸ì§ ë£ê¸°'; 616 DM_window(title,1000,600,'/admin/design/image_insert?designTplPath='+encodeURIComponent(designTplPath)) 617} 618 619/* ëìì¸ì°½ : ì´ë¯¸ì§ë³ê²½ */ 620function DM_window_image_edit(designTplPath,designImgSrc,designImgSrcOri,designImageLabel,link,elementType,target,viewSrc){ 621 var title = 'ì´ë¯¸ì§ ë³ê²½'; 622 if(link.length>0) link = encodeURIComponent(encodeURIComponent(link)); // ëë² encode 623 DM_window(title,1000,600,'/admin/design/image_edit?designTplPath='+designTplPath+'&designImgSrc='+designImgSrc+'&designImgSrcOri='+designImgSrcOri+'&designImageLabel='+encodeURIComponent(designImageLabel)+'&link='+link+'&elementType='+elementType+'&target='+target+'&viewSrc='+viewSrc) 624} 625 626/* ëìì¸ì°½ : íëìë£ê¸° */ 627function DM_window_flash_insert(template_path){ 628 var title = 'íëì ë£ê¸°'; 629 DM_window(title,1000,600,'/admin/design/flash_insert?template_path='+encodeURIComponent(template_path)) 630} 631 632/* ëìì¸ì°½ : íëìë³ê²½ */ 633function DM_window_flash_edit(template_path,flashSeq,direct){ 634 var title = 'íëì ë³ê²½'; 635 DM_window(title,1000,600,'/admin/design/flash_edit?template_path='+encodeURIComponent(template_path)+'&direct='+(direct?1:0)+'&flash_seq='+flashSeq) 636} 637 638/* ëìì¸ì°½ : íëìë§ë¤ê¸° */ 639function DM_window_flash_create(template_path){ 640 var title = 'íëì ë§ë¤ê¸°'; 641 DM_window(title,1000,600,'/admin/design/flash_create?template_path='+encodeURIComponent(template_path)); 642} 643 644/* ëìì¸ì°½ : ì¬ë¼ì´ë ë°°ëë§ë¤ê¸° */ 645function DM_window_banner_create(template_path){ 646 var title = 'ì¬ë¼ì´ë ë°°ë ë§ë¤ê¸°'; 647 DM_window(title,1000,600,'/admin/design/banner_edit?template_path='+encodeURIComponent(template_path)) 648} 649 650/* ëìì¸ì°½ : ì¬ë¼ì´ë ë°°ëë£ê¸° */ 651function DM_window_banner_insert(template_path){ 652 var title = 'ì¬ë¼ì´ë ë°°ë ë£ê¸°'; 653 DM_window(title,1000,600,'/admin/design/banner_insert?template_path='+encodeURIComponent(template_path)) 654} 655 656/* ëìì¸ì°½ : ë¼ì´ë¸ ë°©ì¡ ë£ê¸° */ 657function DM_window_broadcast_insert(template_path){ 658 var title = 'ë¼ì´ë¸ ë°©ì¡ ë£ê¸°'; 659 DM_window(title,1000,600,'/admin/design/broadcast_insert?template_path='+encodeURIComponent(template_path)) 660} 661 662/* ëìì¸ì°½ : ì¸ì¤íê·¸ë¨ í¼ë ë£ê¸° */ 663function DM_window_instagramFeed_insert(template_path){ 664 var title = 'ì¸ì¤íê·¸ë¨ í¼ë ë£ê¸°'; 665 $.ajax({ 666 'url': '/admin/setting/get_instagram_use', 667 'dataType': 'json', 668 'success': function(res) { 669 // ì¸ì¤íê·¸ë¨ ì°ë ì¤ì ê°ì ë°ë¼ ì°½ í¬ê¸°ê° ë¬ë¼ì ¸ì¼ í¨ 670 if(res.use == 'Y'){ 671 DM_window(title,650,320,'/admin/design/instagramFeed_insert?template_path='+encodeURIComponent(template_path)) 672 }else { 673 DM_window(title,650,180,'/admin/design/instagramFeed_insert?template_path='+encodeURIComponent(template_path)) 674 } 675 } 676 }) 677} 678 679/* ëìì¸ì°½ : ì¬ë¼ì´ë ë°°ëë³ê²½ */ 680function DM_window_banner_edit(template_path,bannerSeq,direct){ 681 var title = 'ì¬ë¼ì´ë ë°°ë ë³ê²½'; 682 DM_window(title,1000,600,'/admin/design/banner_edit?template_path='+encodeURIComponent(template_path)+'&direct='+(direct?1:0)+'&banner_seq='+bannerSeq) 683} 684 685/* ëìì¸ì°½ : ëììë£ê¸° */ 686function DM_window_video_insert(template_path){ 687 var title = 'ëìì ë£ê¸°'; 688 DM_window(title,1000,600,'/admin/design/video_insert?template_path='+encodeURIComponent(template_path)) 689} 690
691/* ëìì¸ì°½ : ëììë³ê²½ */ 692function DM_window_video_edit(template_path, videoSeq, realwidth, realheight ){ 693 var title = 'ëìì ë³ê²½'; 694 DM_window(title,1000,600,'/admin/design/video_edit?template_path='+encodeURIComponent(template_path)+'&videoSeq='+videoSeq+'&realwidth='+realwidth+'&realheight='+realheight) 695} 696/* ëìì¸ì°½ : íì ëì°ê¸° */ 697function DM_window_popup_insert(template_path){ 698 var title = 'ë ë°°ë/íì ëì°ê¸°'; 699 DM_window(title,1000,600,'/admin/design/popup_insert?template_path='+encodeURIComponent(template_path)) 700} 701 702/* ëìì¸ì°½ : íì ìì &ìì± */ 703function DM_window_popup_edit(template_path,popup_seq,direct,banner_type){ 704 var title = 'ë ë°°ë/íì ë§ë¤ê¸°'; 705 if(banner_type){ 706 title = (banner_type=='band') ? 'ë ë°°ë ë§ë¤ê¸°' : 'íì ë§ë¤ê¸°'; 707 } 708 DM_window(title,1000,600,'/admin/design/popup_edit?template_path='+encodeURIComponent(template_path)+'&direct='+(direct?1:0)+'&popup_seq='+(popup_seq?popup_seq:'')+'&banner_type='+(banner_type?banner_type:'')); 709} 710 711 712/* ëìì¸ì°½ : ìíëì¤íë ì´ ëì°ê¸° */ 713function DM_window_display_insert(template_path, displaykind, displayplatform) { 714 var title = 'ìíëì¤íë ì´'; 715 var dispalymode = (displaykind)?displaykind:'design'; 716 var platform = (displayplatform)?displayplatform:'pc'; 717 DM_window(title,1000,600,'/admin/design/display_insert?displaykind='+dispalymode+'&platform='+platform+'&template_path='+encodeURIComponent(template_path)) 718} 719 720/* ëìì¸ì°½ : ìíëì¤íë ì´ ìì &ìì± */ 721function DM_window_display_edit(template_path,display_seq,direct,perpage, displaykind, displayplatform){ 722 var title = 'ìíëì¤íë ì´'; 723 var dispalymode = (displaykind)?displaykind:'design'; 724 var platform = (displayplatform)?displayplatform:'pc'; 725 DM_window(title,1000,600,'/admin/design/display_edit?template_path='+encodeURIComponent(template_path)+'&direct='+(direct?1:0)+'&displaykind='+dispalymode+'&platform='+platform+'&perpage='+(perpage?perpage:'')+'&display_seq='+(display_seq?display_seq:'')+'&kind='+displaykind); 726} 727 728/* ëìì¸ì°½ : ìíëì¤íë ì´ ëì°ê¸° */ 729function DM_window_broadcast_insert(template_path, displaykind, displayplatform) { 730 var title = 'ë¼ì´ë¸ë°©ì¡'; 731 var dispalymode = (displaykind)?displaykind:'design'; 732 var platform = (displayplatform)?displayplatform:'pc'; 733 DM_window(title,1000,600,'/admin/design/broadcast_insert?displaykind='+dispalymode+'&platform='+platform+'&template_path='+encodeURIComponent(template_path)) 734} 735 736/* ëìì¸ì°½ : ìíëì¤íë ì´ ìì &ìì± */ 737function DM_window_broadcast_edit(template_path,display_seq){ 738 var title = 'ë¼ì´ë¸ë°©ì¡'; 739 DM_window(title,1000,600,'/admin/design/broadcast_edit?template_path='+encodeURIComponent(template_path)+'&display_seq='+(display_seq?display_seq:'')); 740} 741 742/* ëìì¸ì°½ : ì¹´í ê³ ë¦¬ ë¤ë¹ê²ì´ì ëìì¸ */ 743function DM_window_category_navigation_design(template_path){ 744 var title = 'ì¹´í ê³ ë¦¬ ë¤ë¹ê²ì´ì ëìì¸'; 745 DM_window(title,1000,600,'/admin/design/category_navigation_design?template_path='+encodeURIComponent(template_path)); 746} 747 748/* ëìì¸ì°½ : ë¸ëë ë¤ë¹ê²ì´ì ëìì¸ */ 749function DM_window_brand_navigation_design(template_path){ 750 var title = 'ë¸ëë ë¤ë¹ê²ì´ì ëìì¸'; 751 DM_window(title,1000,600,'/admin/design/brand_navigation_design?template_path='+encodeURIComponent(template_path)); 752} 753 754/* ëìì¸ì°½ : ì¶ì²ìí ìì &ìì± */ 755function DM_window_recomm_goods_edit(template_path,designTplPath,designImgSrc,designImgSrcOri,designImageLabel,link,elementType,target,viewSrc){ 756 var title = 'ì¶ì²ìí'; 757 DM_window(title,1000,600,'/admin/design/recomm_goods_edit?template_path='+encodeURIComponent(template_path)+'&designTplPath='+designTplPath+'&designImgSrc='+designImgSrc+'&designImgSrcOri='+designImgSrcOri+'&designImageLabel='+encodeURIComponent(designImageLabel)+'&link='+encodeURIComponent(link)+'&elementType='+elementType+'&target='+target+'&viewSrc='+viewSrc); 758} 759 760/* ëìì¸ì°½ : ì§ì ë¤ë¹ê²ì´ì ëìì¸ */ 761function DM_window_location_navigation_design(template_path){ 762 var title = 'ì§ì ë¤ë¹ê²ì´ì ëìì¸'; 763 DM_window(title,1000,600,'/admin/design/location_navigation_design?template_path='+encodeURIComponent(template_path)); 764} 765 766/* ëìì¸ì°½ : ê²ìíë£ê¸° >> ì¬ì´ì¦ë³ê²½ */ 767function DM_window_lastest_insert(template_path){ 768 var title = 'ê²ìí ë£ê¸°'; 769 DM_window(title,1000,600,'/admin/design/lastest_insert?template_path='+encodeURIComponent(template_path)) 770} 771 772 773/* ëìì¸ì°½ : ê²ìíë£ê¸°ë³ê²½ */ 774function DM_window_lastest_edit(designTplPath,designLastestId){ 775 var title = 'ê²ìí ë³ê²½'; 776 DM_window(title,630,100,'/admin/design/lastest_edit?designTplPath='+designTplPath+'&designLastestId='+designLastestId) 777} 778 779/* ëìì¸ì°½ : pc Quick ëìì¸ */ 780function DM_window_pc_quick_design(template_path){ 781 DM_window('PCë²í¼ Quick ëìì¸',1000,600,'/admin/design/pc_quick_design?tpl_path='+template_path); 782} 783 784/* ëìì¸ì°½ : 모ë°ì¼ Quick ëìì¸ */ 785function DM_window_mobile_quick_design(template_path){ 786 DM_window('모ë°ì¼ Quick ëìì¸',1000,600,'/admin/design/mobile_quick_design?tpl_path='+template_path); 787} 788 789/* ëìì¸ì°½ : ë°ìí Quick ëìì¸ */ 790function DM_window_responsive_quick_design(template_path){ 791 DM_window('ë°ìí Quick ëìì¸',1000,600,'/admin/design/responsive_quick_design'); 792} 793 794/* ëìì¸ì°½ : PC ìë¨ë° */ 795function DM_window_topBar_design(template_path){ 796 DM_window('ìë¨ë°(_modules/category/category_topBar.html) ë³ê²½',1000,600,'/admin/design/topBar_design?template_path='+encodeURIComponent(template_path)); 797} 798 799/* ëìì¸ì°½ : 모ë°ì¼ ìë¨ë° */ 800function DM_window_mainTopBar_design(template_path){ 801 DM_window('ë©ì¸ ìë¨ë°(_modules/common/topbar.html) ë³ê²½',1000,600,'/admin/design/mainTopBar_design?template_path='+encodeURIComponent(template_path)); 802} 803 804/* ëìì¸ì°½ : í ì¤í¸ë³ê²½ ì¶ê° :: 2019-01-25 pjw */ 805function DM_window_text_edit(template_path, txt, txt_index, tag_name, link, target){ 806 var title = 'í ì¤í¸ ë³ê²½'; 807 if(link.length>0) link = Base64.encode(link); // ëë² encode 808 DM_window(title,1000,600,'/admin/design/text_edit?template_path='+template_path+'&txt='+encodeURIComponent(txt)+'&txt_index='+txt_index+'&tag_name=' + tag_name + '&link='+encodeURIComponent(link) + '&target='+target); 809} 810 811/* ëìì¸ì°½ : ë«ê¸° */ 812function DM_window_close(){ 813 if($("#DMWindow").data('alone')){ 814 $("#DMPanelNavigatorBtn").show(); 815 } 816 $("#DMWindow").hide();
817 $("#DMModalBackground").hide(); 818 zoomOut(); 819 820 $(window).css('overflow',''); 821} 822 823function DM_window_title_set(type, html){ 824 switch(type){ 825 case "left": 826 $("#DMWindow #DMWindowTitle .DMWTTextLeft").html(html); 827 break; 828 case "right": 829 break; 830 $("#DMWindow #DMWindowTitle .DMWTTextRight").html(html); 831 case "center": 832 $("#DMWindow #DMWindowTitle .DMWTTextCenter .prefix").html(html); 833 break; 834 case "title": 835 $("#DMWindow #DMWindowTitle .DMWTTextCenter .title").html(html); 836 break; 837 } 838} 839 840function DM_loadingStart(){ 841 /* 842 var DMIndicatorId = 'DMIndicator'; 843 if($("#"+DMIndicatorId).length){ 844 $("#"+DMIndicatorId).show(); 845 }else{ 846 var html = ""; 847 html += "<div id='"+DMIndicatorId+"' style='position:fixed;left:50%;top:50%;width:190px;height:162px;margin-left:-95px;margin-top:-81px;background:url(\"/app/javascript/plugin/images/preloader_bg.png\") no-repeat;text-align:center;'>"; 848 html += "<div style='padding-top:30px;'><img src='/app/javascript/plugin/images/preloader.gif' /></div>"; 849 html += "<div style='padding-top:17px;color:#fff;font-size:11px;letter-spacing:-1px;'>ë¡ë©ì¤ì ëë¤.</div>"; 850 html += "<div style='padding-top:3px;color:#fff;font-size:11px;letter-spacing:-1px;'>(ê´ë¦¬ììê²ë§ ë¡ë© íìê° ëíë¨)</div>"; 851 html += "</div>"; 852 $(html).appendTo($('body')); 853 } 854 */ 855} 856 857function DM_loadingStop(){ 858 /* 859 var DMIndicatorId = 'DMIndicator'; 860 $("#"+DMIndicatorId).hide(); 861 */ 862}
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.