PageSourceSearch

https://vandsmosigner.com/app/public/js/common.js?v=1791241676

js vandsmosigner.com collected 2026-10-05 23:08:28 UTC 21,595 bytes, 732 lines download raw bytes

1/*
2 * 공통 응답코드, 로케일 메시지, 환경설정 옵션 데이터를 저장하는 객체
3 */
4var _RESP_CODE = {};
5var _MESSAGES = {};
6var _CFG = {};
7
8/*
9 * app object definition
10 */
11var app = {};
12
13app.loginSession = {};
14app.onAppInit = function () {};
15app.onPageInit = function () {};
16
17/*
18 * 공통데이터를 모두 로딩 (개별적으로 로딩하려면 아래 함수 사용)
19 */
20app.loadCommonData = function() {
21	var ajaxReq = new AjaxRequest();
22	ajaxReq.setUrl("/commonApi/commonData");
23	ajaxReq.setType("get");
24	ajaxReq.setSuccess(function(data, status){
25		_RESP_CODE = data.extra.responseCode;
26		_MESSAGES = data.extra.messages;
27		_CFG = data.extra.configurations;
28	});
29	ajaxReq.setError(function(request, status, err){
30		notify("Failed to load common data.");
31	});
32	return ajaxReq.request();
33};
34
35/*
36 * 공통 응답코드 데이터를 로딩
37 */
38app.loadResponseCode = function() {
39	var ajaxReq = new AjaxRequest();
40	ajaxReq.setUrl("/commonApi/commonData/responseCode");
41	ajaxReq.setType("get");
42	ajaxReq.setSuccess(function(data, status){
43		_RESP_CODE = data.extra.responseCode;
44	});
45	ajaxReq.setError(function(request, status, err){
46		notify("Failed to load response code.");
47	});
48	return ajaxReq.request();
49};
50
51/*
52 * 로케일 메시지 데이터를 로딩
53 */
54app.loadMessages = function () {
55	var ajaxReq = new AjaxRequest();
56	ajaxReq.setUrl("/commonApi/commonData/messages");
57	ajaxReq.setType("get");
58	ajaxReq.setSuccess(function(data, status){
59		_MESSAGES = data.extra.messages;
60	});
61	ajaxReq.setError(function(request, status, err){
62		notify("Failed to load message data.");
63	});
64	return ajaxReq.request();
65};
66
67/*
68 * 메시지 데이터를 불러와서 객체에 저장하는 함수
69 */
70app.loadConfigurations = function () {
71	var ajaxReq = new AjaxRequest();
72	ajaxReq.setUrl("/commonApi/commonData/configurations");
73	ajaxReq.setType("get");
74	ajaxReq.setSuccess(function(data, status){
75		_CFG = data.extra.configurations;
76	});
77	ajaxReq.setError(function(request, status, err){
78		notify("Failed to load configurations data.");
79	});
80	return ajaxReq.request();
81};
82
83/*
84 * 로그인세션정보를 로딩
85 */
86app.loadLoginSession = function() {
87	var ajaxReq = new AjaxRequest();
88	ajaxReq.setUrl("/commonApi/users/loginSession");
89	ajaxReq.setType("get");
90	ajaxReq.setHeaders({
91		loginToken : $.cookie("loginToken")
92	});
93	ajaxReq.setSuccess(function(data, status){
94		app.loginSession.userId = data.extra.user_id;
95		app.loginSession.name = data.extra.name;
96		app.loginSession.loginId = data.extra.login_id;
97		app.loginSession.remoteIp = data.extra.remote_ip;
98		app.loginSession.createdAt = data.extra.created_at;
99	});
100	ajaxReq.setError(function(request, status, err){
101		notify("Failed to load common data.");
102	});
103	return ajaxReq.request();
104};
105
106/*
107 * 로그인 처리
108 */
109app.loginProcess = function(loginId, passwd, options, successCallback, failCallback) {
110	if (typeof(options.autoLogin) == "undefined") options.autoLogin = false;
111
112	var ajaxReq = new AjaxRequest();
113	ajaxReq.setUrl("/commonApi/users/login");
114	ajaxReq.setType("post");
115	ajaxReq.setDataType("json");
116	ajaxReq.setData({
117		loginId : loginId,
118		passwd : passwd,
119		autoLogin : (options.autoLogin == true) ? "Y" : "N"
120	});
121	ajaxReq.setSuccess(function(data, status){
122		if (data.returnCode == _RESP_CODE.OK.code) {
123			var loginToken = data.extra.loginToken;
124
125			// loginToken을 쿠키에 저장
126			if (options.autoLogin == true)
127				$.cookie("loginToken", loginToken, { expires: (_CFG.autoLoginTokenExpirePeriod / 86400), path: '/' });
128			else
129				$.cookie("loginToken", loginToken, { path: '/' });
130
131			// success callback
132			if (typeof(successCallback) === "function") successCallback(data);
133		} else {
134			// fail callback
135			if (typeof(failCallback) === "function") failCallback(data);
136		}
137	});
138	ajaxReq.setError(function(request, status, err){
139		notify(_MESSAGES.COMM["알수없는오류가발생하였습니다"]);
140
141		// callback
142		if (typeof(failCallback) === "function") failCallback(data);
143	});
144	ajaxReq.request();
145};
146
147/*
148 * 소셜로그인 처리
149 */
150app.socialLoginProcess = function(userId, successCallback, failCallback) {
151	var ajaxReq = new AjaxRequest();
152	ajaxReq.setUrl("/commonApi/users/socialLogin");
153	ajaxReq.setType("post");
154	ajaxReq.setDataType("json");
155	ajaxReq.setData({
156		userId : userId
157	});
158	ajaxReq.setSuccess(function(data, status){
159		if (data.returnCode == _RESP_CODE.OK.code) {
160			var loginToken = data.extra.loginToken;
161
162			// loginToken을 쿠키에 저장
163			$.cookie("loginToken", loginToken, { expires: 1, path: '/' });
164
165			// success callback
166			if (typeof(successCallback) === "function") successCallback(data);
167		} else {
168			// fail callback
169			if (typeof(failCallback) === "function") failCallback(data);
170		}
171	});
172	ajaxReq.setError(function(request, status, err){
173		notify(_MESSAGES.COMM["알수없는오류가발생하였습니다"]);
174
175		// callback
176		if (typeof(failCallback) === "function") failCallback(data);
177	});
178	ajaxReq.request();
179};
180
181/*
182 * 로그아웃 처리
183 */
184app.logoutProcess = function(callback) {
185	var ajaxReq = new AjaxRequest();
186	ajaxReq.setUrl("/commonApi/users/logout");
187	ajaxReq.setType("get");
188	ajaxReq.setDataType("json");
189	ajaxReq.setHeaders({
190		loginToken : $.cookie("loginToken")
191	});
192	ajaxReq.setSuccess(function(data, status){
193		if (data.returnCode == _RESP_CODE.OK.code) {
194			// 로그인토큰 정보 삭제
195			$.removeCookie("loginToken", { path: '/' });
196
197			// success callback
198			if (typeof(callback) === "function") callback(data);
199		} else {
200			notify(data.returnMsg);
201		}
202	});
203	ajaxReq.setError(function(request, status, err){
204		notify(_MESSAGES.COMM["알수없는오류가발생하였습니다"]);
205	});
206	ajaxReq.request();
207};
208
209/*
210 * 휴대폰 인증번호 발급
211 */
212app.createCertificatedNumber = function(mphone, callback) {
213	var ajaxReq = new AjaxRequest();
214	ajaxReq.setUrl("/commonApi/users/certificatedNumber");
215	ajaxReq.setType("post");
216	ajaxReq.setDataType("json");
217	ajaxReq.setData({
218		mphone : mphone
219	});
220	ajaxReq.setSuccess(function(data, status){
221		if (data.returnCode == _RESP_CODE.OK.code) {
222			// success callback
223			if (typeof(callback) === "function")
224				callback(data.extra.mphone, data.extra.hashKey);
225		} else {
226			notify(data.returnMsg);
227		}
228	});
229	ajaxReq.setError(function(request, status, err){
230		notify(_MESSAGES.COMM["알수없는오류가발생하였습니다"]);
231	});
232	ajaxReq.request();
233};
234
235/*
236 * 메시지 데이터에서 치환해야 할 문자열을 치환한다.
237 * message : 메시지 원본 텍스트
238 * tags[] : 치환할 태그
239 * replacements[] : 치환할 값
240 */
241app.replaceMessageText = function(messageText, tags, replacements) {
242	var returnMessageText = messageText;
243
244	for(var i=0; i<tags.length; i++)
245	{
246		returnMessageText = returnMessageText.replace(tags[i], replacements[i]);
247	}
248
249	return returnMessageText;
250};
251
252/*
253 * 템플릿 html에서 치환해야 할 문자열을 치환한다.
254 * template : 메시지 원본 텍스트
255 * tags[] : 치환할 태그
256 * replacements[] : 치환할 값
257 */
258app.replaceTemplate = function(templateId, tags, replacements) {
259	var returnTemplate = $("#"+templateId).html();
260
261	for(var i=0; i<tags.length; i++)
262	{
263		returnTemplate = replaceAll(returnTemplate, tags[i], replacements[i]);
264	}
265
266	return returnTemplate;
267};
268
269/*
270 * html소스에서 치환해야 할 문자열을 치환한다.
271 * html : 메시지 원본 텍스트
272 * tags[] : 치환할 태그
273 * replacements[] : 치환할 값
274 */
275app.replaceHtml = function(html, tags, replacements) {
276	var returnHtml = html;
277
278	for(var i=0; i<tags.length; i++)
279	{
280		returnHtml = replaceAll(returnHtml, tags[i], replacements[i]);
281	}
282
283	return returnHtml;
284};
285
286/*
287 * 응답코드로 응답데이터를 리턴한다.
288 */
289app.responseByCode = function(code) {
290	var response = false;
291
292	$.each(_RESP_CODE, function(index, item) {
293		if (item.code === code) response = item;
294	});
295
296	return response;
297};
298
299/*
300 * 파일업로드 컴포넌트 초기화 함수
301 * options
302 * - maxFiles : 최대
303 */
304app.initFileUploadComponent = function(selector, session, options, callback) {
305	// 초기화할 DOM이 없으면 에러
306	if ($(selector).length == 0)
307	{
308		console.error("파일업로더 초기화 오류 : 초기화할 개체를 찾을 수 없습니다 ["+selector+"]");
309		return;
310	}
311
312	// optional 정보 기본값
313	if (typeof(options) === "undefined") {
314		var options = {};
315	}
316
317	if (typeof(options.maxFiles) === "undefined") options.maxFiles = _CFG.uploadFiles.countMax;
318	if (typeof(options.maxFilesize) === "undefined") options.maxFilesize = _CFG.uploadFiles.uploadSizeLimit / 1024 / 1024;
319
320	if (typeof(groupId) === "undefined") groupId = "";
321	if (typeof(options) === "undefined") options = {};
322	if (typeof(session) === "undefined") {
323		console.error("파일업로더 초기화 오류 : form session값이 누락되었습니다.");
324		return;
325	}
326
327	// default settings
328	var dropzoneDefaultOptions = {
329		url: '/commonApi/files/uploadDropzone',
330		autoProcessQueue: true,
331		//parallelUploads: 2,
332		maxFiles: options.maxFiles,
333		maxFilesize: options.maxFilesize,
334		//acceptedFiles: '*/*',
335		addRemoveLinks: true,
336		uploadMultiple : false,   // request 한 번에 파일 여러개씩 업로드 할지 여부
337		success : function (file, response) {
338			var response = jQuery.parseJSON(response);
339			var result = response.extra.result;
340
341			if (result.code == _RESP_CODE.OK.code) {
342				file.previewElement.appendChild(Dropzone.createElement("<input type='hidden' name='id' value='" + result.id + "'/>"));
343			} else {
344				file.previewElement.remove();
345
346				var r = responseByCode(result.code);
347				notify(r.message);
348			}
349		},
350		error : function(file, errorMessage) {
351			notify(errorMessage);
352			setTimeout(function(){
353				file.previewElement.remove();
354			}, 500);
355		},
356		params : function () {
357			return {
358				session : session,
359				useThumbnail : (_CFG.uploadFiles.useThumbnail == true) ? "Y" : "N",
360				thumbnailWidth : _CFG.uploadFiles.thumbnailSize[0],
361				thumbnailHeight : _CFG.uploadFiles.thumbnailSize[1],
362				useImageResize : (_CFG.uploadFiles.useImageResize == true) ? "Y" : "N",
363				maxImageResizeLength : _CFG.uploadFiles.maxImageResizeLength
364			}
365		},
366		removedfile : function(file) {
367
368			// 업로드 에러인 파일이면 그냥 삭제함
369			if (file.status === "error")
370			{
371				file.previewElement.remove();
372			}
373			else
374			{
375				// 정상적인 파일이면 서버에 삭제요청
376				var id = file.previewElement.querySelector("input[name=id]").value;
377
378				var ajaxReq = new AjaxRequest();
379				ajaxReq.setUrl("/commonApi/files/deleteDropzone");
380				ajaxReq.setType("post");
381				ajaxReq.setDataType("json");
382				ajaxReq.setData({
383					id : id,
384					session : session
385				});
386				ajaxReq.setSuccess(function(data, status){
387					if (data.returnCode == _RESP_CODE.OK.code) {
388						file.previewElement.remove();
389						notify("삭제되었습니다.");
390					} else {
391						notify(data.returnMsg);
392					}
393				});
394				ajaxReq.setError(function(request, status, err){
395					notify(_MESSAGES.COMM["알수없는오류가발생하였습니다"]);
396				});
397				ajaxReq.request();
398			}
399		}
400	};
401
402	// 업로드 컴포넌트 초기화
403	var dropzoneInstance = new Dropzone(selector, dropzoneDefaultOptions);
404
405	// 콜백 함수 호출
406	if (typeof(callback) === "function") callback();
407
408	return dropzoneInstance;
409};
410
411	/*
412 * 웹에디터 초기화 함수
413 * selector : string
414 */
415app.initEditor = function(editorName, selector, formSession, options) {
416
417	// 옵션
418	if (typeof(options) == "undefined") options = {};
419	if (typeof(options.toolbarType) == "undefined") options.toolbarType = "full";
420	if (typeof(options.height) == "undefined") options.height = 400;
421	if (typeof(options.maxHeight) == "undefined") options.maxHeight = 400;
422
423	// 툴바 타입 정의
424	var toolbarDef = {};
425	if (options.toolbarType == "full")
426	{
427		toolbarDef = {
428			toolbarButtons : ['bold', 'fontFamily', 'fontSize', 'italic', 'underline', 'textColor', 'strikeThrough', 'emoticons', '|', 'alignLeft', 'alignCenter', 'alignRight', 'outdent', 'indent', 'insertHR', 'insertLink', 'customImageUpload', 'insertVideo', 'insertTable', 'undo', 'redo', 'selectAll', 'html'],
429			toolbarButtonsMD : ['bold', 'fontFamily', 'fontSize', 'italic', 'underline', 'textColor', 'strikeThrough', 'emoticons', '|', 'align',  'outdent', 'indent', 'insertHR', 'insertLink', 'customImageUpload', 'insertVideo', 'insertTable', 'undo', 'redo', 'selectAll', 'html'],
430			toolbarButtonsSM : ['bold', 'fontFamily', 'fontSize', 'italic', 'underline', 'textColor', 'strikeThrough', 'emoticons', '|', 'align',  'outdent', 'indent', 'insertHR', 'insertLink', 'customImageUpload', 'insertVideo', 'insertTable', 'undo', 'redo', 'selectAll', 'html'],
431			toolbarButtonsXS : ['bold', 'fontFamily', 'fontSize', 'italic', 'underline', 'textColor', 'strikeThrough', 'emoticons', 'align',  'outdent', 'indent', 'insertLink', 'customImageUpload', 'insertVideo', 'insertTable']
432		}
433	}
434	if (options.toolbarType == "small")
435	{
436		toolbarDef = {
437			toolbarButtons : ['bold', 'fontFamily', 'fontSize', 'italic', 'underline', 'textColor', 'strikeThrough', 'emoticons', 'align',  'outdent', 'indent', 'insertLink', 'customImageUpload', 'insertVideo', 'insertTable'],
438			toolbarButtonsMD : ['bold', 'fontFamily', 'fontSize', 'italic', 'underline', 'textColor', 'strikeThrough', 'emoticons', 'align',  'outdent', 'indent', 'insertLink', 'customImageUpload', 'insertVideo', 'insertTable'],
439			toolbarButtonsSM : ['bold', 'fontFamily', 'fontSize', 'italic', 'underline', 'textColor', 'strikeThrough', 'emoticons', 'align',  'outdent', 'indent', 'insertLink', 'customImageUpload', 'insertVideo', 'insertTable'],
440			toolbarButtonsXS : ['bold', 'fontFamily', 'fontSize', 'italic', 'underline', 'textColor', 'strikeThrough', 'emoticons', 'align',  'outdent', 'indent', 'insertLink', 'customImageUpload', 'insertVideo', 'insertTable'],
441		}
442	}
443
444	// 커스텀 이미지 업로드 버튼 추가
445	FroalaEditor.DefineIcon('customImageUpload', { NAME: 'customImageUpload'});
446	FroalaEditor.RegisterCommand('customImageUpload', {
447		// Button title.
448		title: '이미지 삽입',
449
450		icon: "<i class='xi-image-o' style='font-size:20px;'></i>",
451
452		// Save the button action into undo stack.
453		undo: true,
454
455		// Focus inside the editor before the callback.
456		focus: true,
457
458		// Show the button on mobile or not.
459		showOnMobile: true,
460
461		// Refresh the buttons state after the callback.
462		refreshAfterCallback: true,
463
464		// 버튼클릭시 호출 콜백함수 정의
465		callback: function () {
466			window.open("/commonApi/files/customEditorImageUploader?editorName="+editorName+"&formSession="+formSession, "editorImageUploader", "width=800, height=400, scrolbars=Y");
467		},
468
469		// Called when the button state might have changed.
470		refresh: function ($btn) {
471			// The current context is the editor instance.
472			console.log (this.selection.element());
473		}
474	});
475
476	var editor = new FroalaEditor(selector, {
477		key : _CFG.froalaLicenseKey,
478		attribution: false,
479		language : 'ko',
480		imageDefaultDisplay : 'inline',
481		height : options.height,
482		heightMax : options.maxHeight,
483		imageAddNewLine : true,
484		imageSplitHTML : true,
485		imageAllowedTypes : ['jpeg', 'jpg', 'png', 'gif'],
486		imageDefaultWidth : 0,
487		fontFamily : {
488			"맑은 고딕": '맑은 고딕',
489			"굴림": '굴림'
490		},
491		toolbarSticky: false,
492		quickInsertEnabled: false,
493		imagePasteProcess: true,
494		pasteAllowLocalImages: true,
495		pastePlain: false,
496		imageEditButtons : ['imageAlign', 'imageRemove', 'imageLink', 'imageSize'], // imageReplace
497		toolbarButtons : toolbarDef.toolbarButtons,
498		toolbarButtonsMD : toolbarDef.toolbarButtonsMD,
499		toolbarButtonsSM : toolbarDef.toolbarButtonsSD,
500		toolbarButtonsXS : toolbarDef.toolbarButtonsXD,
501
502		/*
503		 * image upload options
504		 */
505		// Set the image upload parameter.
506		imageUploadParam: 'file',
507
508		// Set the image upload URL.
509		imageUploadURL: '/commonApi/files/uploadEditorImage',
510
511		// Additional upload params.
512		imageUploadParams: {},
513
514		// Set request type.
515		imageUploadMethod: 'POST',
516
517		// Set max image size to 5MB.
518		imageMaxSize: 5 * 1024 * 1024,
519
520		// Allow to upload PNG and JPG.
521		imageAllowedTypes: ['jpeg', 'jpg', 'png'],
522
523		/*
524		 * video upload options
525		 */
526		videoUploadParam: 'file',
527		videoUploadURL: '/commonApi/files/uploadEditorImage',
528		videoUploadMethod: 'POST',
529		videoMaxSize: 1024 * 1024 * 50,
530		videoAllowedTypes: ['mp4'],
531
532		events: {
533			'image.beforeUpload': function (images) {
534
535			},
536			'image.uploaded': function (response) {
537
538			},
539			'image.inserted': function ($img, response) {
540				$img.css("width", "auto");
541				$img.css("max-width", "100%");
542			},
543			'image.replaced': function ($img, response) {
544
545			},
546			'image.error': function (error, response) {
547				notify("이미지 업로드 오류입니다.");
548			},
549			'video.inserted': function ($video) {
550				$video.find("video").css("width", "100%");
551				$video.find("video").css("max-width", "870px");
552			}
553		}
554	});
555
556	return editor;
557};
558
559/*
560 * 커스텀 이미지 업로드로 에디터에 이미지를 삽입했을때 콜백 함수
561 */
562app.onInsertEditorImage = function(editorName, imageUrls) {
563	/*
564	 * 이미지를 개별적으로 하나씩 삽입하면 삽입순서가 안 맞으므로 image.insert 메소드를 사용하지 않고
565	 * html을 직접 만들어 여러개의 이미지를 한 번에 삽입한다.
566	 */
567	var html = [];
568	$.each(imageUrls, function(index, imageUrl){
569		html.push("<p style='text-align:center;'><img src='"+imageUrl+"' class='fr-fic fr-dii'></p>");
570	});
571
572	editors[editorName].html.insert(html.join(""), true);
573}
574
575/*
576 * 첨부파일 목록을 읽어서 화면에 출력
577 */
578app.loadFileList = function (selector, groupId) {
579	var ajaxReq = new AjaxRequest();
580	ajaxReq.setUrl("/commonApi/files/groupList");
581	ajaxReq.setType("get");
582	ajaxReq.setData({
583		groupId : groupId
584	});
585	ajaxReq.setSuccess(function(data, status){
586		if (data.returnCode == _RESP_CODE.OK.code) {
587			var template = "";
588
589			if (data.extra.files.length > 0) {
590				$.each(data.extra.files, function(index, item) {
591					// 원본 이미지 경로
592					var originalImageSrc = "";
593					if (item.imageSrc !== "") originalImageSrc = item.imageSrc;
594
595					// 썸네일 이미지 경로
596					var src = "";
597					if (item.thumbnailSrc !== "") src = item.thumbnailSrc;
598					else if (item.imageSrc !== "") src = item.imageSrc;
599
600					// 사용여부 체크
601					var checked = "";
602					if (item.usable === "Y") checked = "checked";
603
604					// 태그 치환
605					template += app.replaceTemplate("uploadListCellTemplate", [
606						"{#id}", "{#seq}", "{#src}", "{#filename}", "{#filesize}", "{#primary}", "{#checked}"
607					], [
608						item.id, item.seq, src, item.filename_origin, item.filesize, item.is_primary, checked
609					]);
610				});
611
612				// 파일목록 삽입
613				selector.html(template);
614			} else {
615				// 파일없음 메시지 삽입
616				template = "<p class='noFilesComment'>"+_MESSAGES.COMM["업로드된파일이없습니다"]+"</p>";
617				selector.html(template);
618			}
619		} else {
620			notify(data.returnMsg);
621		}
622	});
623	ajaxReq.setError(function(request, status, err){
624		notify(_MESSAGES.COMM["알수없는오류가발생하였습니다"]);
625	});
626	ajaxReq.request();
627};
628
629/*
630 * 객체의 순서를 변경할 때
631 */
632app.changeDOMSeqAjax = function (listObj, requestUrl, callback) {
633	var uidArray = [];
634
635	listObj.find(".seqControlCell").each(function () {
636		var uid = $(this).attr("data-seq-uid");
637		uidArray.push(uid);
638	});
639
640	var ajaxReq = new AjaxRequest();
641	ajaxReq.setUrl(requestUrl);
642	ajaxReq.setType("get");
643	ajaxReq.setData({
644		seqTokens : uidArray.join(",")
645	});
646	ajaxReq.setSuccess(function(data, status){
647		if (typeof(callback) == "function")
648			callback(data);
649	});
650	ajaxReq.setError(function(request, status, err){
651		notify("순서를 변경할 수 없습니다. 잠시후에 다시 시도해주세요.");
652	});
653	ajaxReq.request();
654}
655
656/*
657 * 팝업창 닫기
658 */
659app.closePopup = function(popupId, noToday) {
660	$("#popup_"+popupId).remove();
661
662	// 팝업이 여러개 노출되어 있을 경우 모든 팝업이 닫히면 오버레이 div도 삭제한다.
663	if ($(".mainLayerPopup").length == 0)
664	{
665		$("#popupContainerOverlay").remove();
666	}
667
668	// 오늘 더 이상 보지 않기를 클릭했을 경우에는 쿠키를 저장한다.
669	if (noToday == true)
670	{
671		var ajaxReq = new AjaxRequest();
672		ajaxReq.setUrl("/web/popup/noToday");
673		ajaxReq.setType("post");
674		ajaxReq.setData({
675			id : popupId
676		});
677		ajaxReq.setSuccess(function(data, status){
678		});
679		ajaxReq.request();
680	}
681}
682
683/*
684 * 페이지 로더
685 * dimmerOpacity : dimmer 불투명도 (default : 0.6)
686 */
687app.showPageLoader = function(dimmerOpacity) {
688	var paramDimmerOpacity = (dimmerOpacity == undefined) ? 0.6 : dimmerOpacity;
689
690	var html = "<div class='pageLoader' style='background-color:rgba(0,0,0,"+paramDimmerOpacity+")'>" +
691		"<div><i class='xi-spinner-3 xi-spin'></i></div>" +
692		"</div>";
693
694	$("body").remove(".pageLoader");
695	$("body").append(html);
696
697}
698
699app.hidePageLoader = function() {
700	$("body .pageLoader").remove();
701}
702
703/*
704 * dropzone은 dropzone 클래스를 가진 DOM객체를 자동으로 찾아서 초기화 하므로 이를 disabled시킨다.
705 */
706Dropzone.autoDiscover = false;
707
708/*
709 * 페이지 초기화
710 */
711$(document).ready(function () {
712	/*
713	 * 공통 데이터 로딩.
714	 * 로딩이 끝나면 onPageInit함수 호출
715	 */
716	var promise1 = app.loadCommonData();
717	var promise2 = app.loadLoginSession();
718
719	$.when(promise1, promise2).done(function(){
720		if (typeof(app) != "undefined")
721		{
722			if (typeof(app.onAppInit) === "function") app.onAppInit();
723
724			if (typeof(app.onPageInit) === "function") app.onPageInit();
725		}
726		else
727		{
728			console.error("app object is not defined.");
729		}
730	});
731});
732

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.