PageSourceSearch

https://dhsuhyup.com/app/javascript/js/design.js?v=86c7eed94707dab7fe91

js dhsuhyup.com collected 2026-10-06 14:01:00 UTC 34,743 bytes, 862 lines download raw bytes

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.