PageSourceSearch

https://zerolounge.co.kr/admin/js/dashboard.js?1756688811

js zerolounge.co.kr collected 2026-10-05 07:03:03 UTC 13,545 bytes, 467 lines download raw bytes

1var DASHBOARD = (function(){
2
3	var notice_list_page = 1;
4	var notice_list_page_more = true;
5	var activity_list_page = 1;
6	var activity_list_page_more = true;
7	var activity_list_cnt = 1;
8	/*var re = /(?:(?=(?:http|https):)([a-zA-Z][-+.a-zA-Z\d]*):(?:((?:[-_.!~*'()a-zA-Z\d;?:@&=+$,]|%[a-fA-F\d]{2})(?:[-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*)|(?:(?:\/\/(?:(?:(?:((?:[-_.!~*'()a-zA-Z\d;:&=+$,]|%[a-fA-F\d]{2})*)@)?(?:((?:(?:(?:[a-zA-Z\d](?:[-a-zA-Z\d]*[a-zA-Z\d])?)\.)*(?:[a-zA-Z](?:[-a-zA-Z\d]*[a-zA-Z\d])?)\.?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:(?:[a-fA-F\d]{1,4}:)*[a-fA-F\d]{1,4})?::(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)\]))(?::(\d*))?))?|((?:[-_.!~*'()a-zA-Z\d$,;:@&=+]|%[a-fA-F\d]{2})+))|(?!\/\/))(\/(?:[-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*(?:\/(?:[-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*)*)?)(?:\?((?:[-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?)(?:\#((?:[-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?)/img;*/
9
10	var getNoticeList = function(list_body_obj){
11		if(notice_list_page_more){
12			$.ajax({
13				type : 'POST',
14				data : {page : notice_list_page},
15				url : ('/admin/ajax/support/get_notice_list.cm'),
16				dataType : 'json',
17				async : true,
18				cache : false,
19				success : function(obj){
20					list_body_obj.append(obj.html);
21					notice_list_page = obj.page;
22					notice_list_page_more = obj.more == "Y";
23
24					$('#notice_list').imagesLoaded()
25						.always(function(ins){
26							$('#notice_list').masonry({
27								// options
28								itemSelector : '.ma-item'
29							});
30						});
31
32				}
33			});
34		}
35	};
36
37	var getActivityList = function(list_body_obj){
38		if(activity_list_page_more){
39			$.ajax({
40				type : 'POST',
41				data : {page : activity_list_page, cnt : activity_list_cnt},
42				url : ('/admin/ajax/stat/get_activity_list.cm'),
43				dataType : 'json',
44				async : true,
45				cache : false,
46				success : function(obj){
47					list_body_obj.append(obj.html);
48					activity_list_page = obj.page;
49					activity_list_page_more = obj.more == "Y";
50					activity_list_cnt = obj.cnt;
51
52					/**
53					 * 데이터 없는 경우 처리
54					 */
55					if ( obj.html === "" && obj.cnt === 0 ) {
56						$('.section-body').html(`
57							<div class="feedback-nodata">
58								<div>
59									<div class="bar-wrap">
60										<div></div>
61										<div></div>
62										<div></div>
63										<div></div>
64									</div>
65				
66									<div class="circle-wrap">
67										<div></div>
68										<div></div>
69										<div></div>
70									</div>
71				
72									<div class="card-wrap">
73										<div>
74											<div>
75												<img src="/admin/img/stat/feedback_user_1.svg" alt="">
76												<div>
77													<p>[댓글] 너무 기다리고 있던 상품이에요! 😍</p>
78													<span>고객의 소리 1시간 전</span>
79												</div>
80											</div>
81											<svg xmlns="http://www.w3.org/2000/svg" width="6" height="12" viewBox="0 0 6 12" fill="none"><path d="M0.707107 6.70711C0.316583 6.31658 0.316583 5.68342 0.707107 5.29289L6 0L6 12L0.707107 6.70711Z" fill="white"/></svg>
82										</div>
83										<div>
84											<div>
85												<img src="/admin/img/stat/feedback_user_2.svg" alt="">
86												<div>
87													<p>[작성] 김아임님이 입력폼 참여를 완료 했어요</p>
88													<span>이벤트 2시간전</span>
89												</div>
90											</div>
91											<svg xmlns="http://www.w3.org/2000/svg" width="6" height="12" viewBox="0 0 6 12" fill="none"><path d="M0.707107 6.70711C0.316583 6.31658 0.316583 5.68342 0.707107 5.29289L6 0L6 12L0.707107 6.70711Z" fill="white"/></svg>
92										</div>
93										<div>
94											<div>
95												<img src="/admin/img/stat/feedback_user_3.svg" alt="">
96												<div>
97													<p>[댓글] 빠른 배송 최고에요</p>
98													<span>고객의 소리 3시간 전</span>
99												</div>
100											</div>
101											<svg xmlns="http://www.w3.org/2000/svg" width="6" height="12" viewBox="0 0 6 12" fill="none"><path d="M0.707107 6.70711C0.316583 6.31658 0.316583 5.68342 0.707107 5.29289L6 0L6 12L0.707107 6.70711Z" fill="white"/></svg>
102										</div>
103									</div>
104								</div>
105				
106								<p>아직 컨텐츠 반응이 없어요</p>
107								<span>고객분들의 소리가 시작되면<br/>타임라인으로 확인할 수 있게 알려드릴게요!</span>
108							</div>
109						`)
110					}
111				}
112			});
113		}
114	};
115
116	var dashboard_init = function(){
117		$('#dashboard_list').imagesLoaded().always(function(ins) {
118			$('#dashboard_list').masonry({ itemSelector: '.ma-item' });
119		});
120
121		var autolinker = new Autolinker({	//자동으로 url 링크로 전환
122			urls: {
123				schemeMatches: true,
124				wwwMatches: true,
125				tldMatches: true
126			},
127			email: false,
128			stripPrefix: false,
129			newWindow: true,
130
131			truncate: {
132				length: 0,
133				location: 'end'
134			},
135			className: ''
136		});
137
138		$('._memo_body').each(function (i, elem) {
139			$(elem).html(autolinker.link($(elem).html()));
140		});
141		autosize(document.querySelectorAll('textarea'));
142		// var owl = $('#DashboardBanner');
143		//
144		// owl.owlCarousel({
145		// 	'items': 1,
146		// 	'nav' : true,
147		// 	'loop' : true,
148		// 	'dots' : true
149		// });
150	};
151
152	var updateIsDashboardFirstEnter = function(){
153		$.ajax({
154			type : 'POST',
155			url : ('/admin/ajax/dashboard/update_is_dashboard_first_enter.cm'),
156			dataType : 'json',
157			async : false,
158			cache : false,
159			success : function(result){
160				if(result.msg === "SUCCESS"){
161					// location.reload();
162				}else{
163					alert(result.msg);
164				}
165			}
166		});
167	};
168
169	var giveAdminPermission = function(){
170		var confirm_msg = getLocalizeString("설명_담당리셀러에게관리권한을부여하시겠습니까", "", "담당 리셀러에게 관리권한을 부여하시겠습니까? 관리권한을 부여\n하게 되면, 사이트의 디자인과 각종 설정을 제어할 수 있는 모든 권한이 부\n여됩니다.");
171		if(confirm_msg !== undefined){
172			if(confirm(confirm_msg)){
173				$.ajax({
174					type: 'POST',
175					data: '',
176					url: ('/admin/ajax/config/find_designer/give_admin_permission.cm'),
177					dataType: 'json',
178					async: false,
179					cache: false,
180					success: function (res) {
181						if(res.msg === 'SUCCESS'){
182							$('._custom_popover._dashboard_reseller_popover_before').hide();
183							$('._custom_popover._dashboard_reseller_popover_before').popover('hide');
184
185							$('._custom_popover._dashboard_reseller_popover_after').show();
186							$('._custom_popover._dashboard_reseller_popover_after').popover('show');
187						}else
188							alert(res.msg);
189					}
190				});
191			}
192		}
193	};
194
195	var showUpdateMemoForm = function(memo_idx){
196		$('#old_memo_'+memo_idx).hide();
197		$('#update_memo_wrap_'+memo_idx).show();
198		var height = $('#update_memo_wrap_'+memo_idx).find("#update_memo").prop('scrollHeight');
199		$('#update_memo_wrap_'+memo_idx).find("#update_memo").css('height', height+5);
200	};
201
202	var hideUpdateMemoForm = function(memo_idx){
203		$('#old_memo_'+memo_idx).show();
204		$('#update_memo_wrap_'+memo_idx).hide();
205		$('#update_memo_wrap_'+memo_idx).find('#update_memo').val($('#old_memo_'+memo_idx).text());
206	};
207
208	var updateHtml = function(callback) {
209		$.ajax({
210			type: 'GET',
211			url : `/admin/ajax/dashboard/get_memo_list_html.cm?site_code=${SITE_CODE}`,
212			dataType : 'html',
213			success : function(html){
214				$('.update_memo_list').html(html);
215
216				callback?.();
217			}
218		})
219	}
220
221	var releaseTopMemo = function(memo_idx){
222		$.ajax({
223			type : 'POST',
224			data : {memo_idx :memo_idx},
225			url : ('/admin/ajax/dashboard/release_top_memo.cm'),
226			dataType : 'json',
227			async : false,
228			cache : false,
229			success : function(result){
230				if(result.msg === "SUCCESS"){
231					updateHtml();
232				}else{
233					alert(result.msg);
234				}
235			}
236		});
237	};
238	var moveTopMemo = function(memo_idx){
239		$.ajax({
240			type : 'POST',
241			data : {memo_idx :memo_idx},
242			url : ('/admin/ajax/dashboard/move_top_memo.cm'),
243			dataType : 'json',
244			async : false,
245			cache : false,
246			success : function(result){
247				if(result.msg === "SUCCESS"){
248					updateHtml();
249				}else{
250					alert(result.msg);
251				}
252			}
253		});
254	};
255
256	var deleteMemo = function(memo_idx){
257		if(confirm(getLocalizeString("설명_정말로삭제하시겠습니까", "", "정말로 삭제하시겠습니까?"))){
258			$.ajax({
259				type : 'POST',
260				data : {memo_idx :memo_idx},
261				url : ('/admin/ajax/dashboard/delete_managers_memo.cm'),
262				dataType : 'json',
263				async : false,
264				cache : false,
265				success : function(result){
266					if(result.msg === "SUCCESS"){
267						updateHtml();
268					}else{
269						alert(result.msg);
270					}
271				}
272			});
273		}else
274			return false;
275	};
276
277	var addMemo = function($obj){
278		var data = $obj.serializeObject();
279		if($obj.find('#memo').val() === ''){
280			alert(getLocalizeString("설명_내용을입력해주세요", "", "내용을 입력해주세요."));
281			return;
282		}
283		$.ajax({
284			type : 'POST',
285			data : data,
286			url : ('/admin/ajax/dashboard/add_managers_memo.cm'),
287			dataType : 'json',
288			async : false,
289			cache : false,
290			success : function(result){
291				if(result.msg === "SUCCESS"){
292					updateHtml(function () {
293						if ( !data.memo_idx ) {
294							$('#memo').val('');
295
296							$.ajax({
297								type: 'GET',
298								url: `/admin/ajax/dashboard/get_new_memo_hash.cm`,
299								dataType: 'json',
300								success: function (data) {
301									$('input[name="write_token_key"]').val(data.write_token_key)
302									$('input[name="write_token"]').val(data.write_token)
303
304								}
305							})
306						}
307
308						mixpanel.track('save_bo_dashboard_memo',{'site_code':SITE_CODE});
309					})
310				}else{
311					alert(result.msg);
312				}
313			}
314		});
315	};
316
317	var openSiteManagementDialog = function(btn){
318		if($.cocoaStickerModal.isOpen()){
319			$.cocoaStickerModal.close();
320		}
321		if(document.querySelector('#use-shopping-tooltip')){
322			document.querySelector('#use-shopping-tooltip').remove();
323		}
324
325		const isSidebarMini = $('body').hasClass('sidebar-mini');
326
327		$.ajax({
328			type: 'POST',
329			url: ('/admin/ajax/dialog/site_management.cm'),
330			dataType: 'html',
331			async: false,
332			cache: false,
333			success: function (html) {
334				$.cocoaStickerModal.open({
335					forceLeft: isSidebarMini,
336					target: btn,
337					html: html,
338					width: '240px',
339					top: -28,
340					left: isSidebarMini ? 48 : 32,
341				});
342
343				$('.cocoa-sticker-modal .modal-content').css('margin-left', '6px');
344			}
345		});
346	};
347
348	/**
349	 * 쇼핑, 예약 메뉴를 애니메이션 처리로 숨김/노출 처리함
350	 * @param name
351	 * @param is_show
352	 */
353	var toggleHiddenMenu = function(name, is_show){
354		var $target = $('#main-menu').find('li[data-title=' + name + ']');
355		if($target.length > 0){
356			if(is_show){
357				$target.addClass('animated');
358				setTimeout(function(){
359					$target.removeClass('animated-hidden');
360					setTimeout(function(){
361						$target.removeClass('animated');
362					}, 200);
363				}, 10);
364			}else{
365				if($target.hasClass('expanded')){
366					// 메뉴 확장되었을 때 닫고 애니메이션 실행
367					$target.find('> ul').stop().slideUp(170, function (){
368						$target.removeClass('expanded').addClass('animated');
369						setTimeout(function(){
370							$target.addClass('animated-hidden');
371						}, 10);
372					});
373				}else{
374					$target.addClass('animated');
375					setTimeout(function(){
376						$target.addClass('animated-hidden');
377					}, 10);
378				}
379
380			}
381		}
382	};
383
384	const openNudgeOnda = function() {
385		if($.cocoaStickerModal.isOpen('nudgeOnda')){
386			return;
387		}
388		if(window.innerWidth < 993) return; // 모바일에서는 실행하지 않음
389		if(LOCAL_STORAGE.getLocalStorage('onda_onboarding') === 'Y') return;
390
391		// stickerModal 중첩되지 않도록 기존에 열려있던 stickerModal 닫기
392		if($.cocoaStickerModal.isOpen()){
393			$.cocoaStickerModal.close();
394		}
395
396		const isSidebarMini = $('body').hasClass('sidebar-mini');
397		const btn = $('#menubar li[data-title="booking"]');
398
399		if(btn.length === 0) return;
400
401		$.ajax({
402			type: 'POST',
403			url: ('/admin/ajax/dialog/nudge_onda.cm'),
404			dataType: 'html',
405			async: false,
406			cache: false,
407			success: function (html) {
408				$.cocoaStickerModal.open({
409					id: 'nudgeOnda',
410					forceLeft: isSidebarMini,
411					target: btn,
412					html: html,
413					width: '256px',
414					top: -118,
415					left: isSidebarMini ? 68 : 230,
416				}, () => {
417					mixpanel.track('view_bo_gnb_booking_onda', {'site_code': SITE_CODE}
417);
418				});
419			}
420		});
421	};
422
423	return {
424		'dashboard_init' : function(){
425			dashboard_init();
426		},
427		'updateIsDashboardFirstEnter' : function(){
428			updateIsDashboardFirstEnter();
429		},
430		'giveAdminPermission' : function(){
431			giveAdminPermission();
432		},
433		'getNoticeList' : function(list_body_obj){
434			getNoticeList(list_body_obj);
435		},
436		'getActivityList' : function(list_body_obj){
437			getActivityList(list_body_obj);
438		},
439		'moveTopMemo' : function(memo_idx){
440			moveTopMemo(memo_idx);
441		},
442		'releaseTopMemo' : function(memo_idx){
443			releaseTopMemo(memo_idx);
444		},
445		'showUpdateMemoForm' : function(memo_idx){
446			showUpdateMemoForm(memo_idx);
447		},
448		'hideUpdateMemoForm' : function(memo_idx){
449			hideUpdateMemoForm(memo_idx);
450		},
451		'deleteMemo' : function(memo_idx){
452			deleteMemo(memo_idx);
453		},
454		'addMemo' : function($obj){
455			addMemo($obj);
456		},
457		'openSiteManagementDialog' : function(btn){
458			openSiteManagementDialog(btn);
459		},
460		'toggleHiddenMenu': function(name, is_show){
461			toggleHiddenMenu(name, is_show);
462		},
463		'openNudgeOnda': function(){
464			openNudgeOnda();
465		},
466	};
467})();

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.