PageSourceSearch

https://cdn.ccreview.co.kr/script/common.js

js ccreview.co.kr collected 2026-10-02 19:09:49 UTC 30,082 bytes, 872 lines download raw bytes

1/* 
22018.07.10 JS 통합작업
3
4#########################################################
5* 합쳐지는 파일
6#########################################################
71. /script/bannerpop.js			9개
82. /script/resizePhoto.js		5개
93. /script/floating.banner.js	2개
104. /script/mosaic.js			6개
115. /script/newsAutoCall.js		2개
126. /script/common.js			8개
137. /script/app.js				49개
14
15=> /script/common.js 로 통합
16##########################################################
17*/
18
19/* ****************************************** */
20/* /script/bannerpop.js						  */
21/* ****************************************** */
22
23
24/******************************************************************************************************************
25/* ****************************************** */
26/* /script/resizePhoto.js					  */
27/* ****************************************** */
28
29function resizePhoto() {	
30
31	var $_container = $('#article-view-content-div');
32	var articleViewDivWidth = $_container.width();
33	
34	$_container.find('img').each(function(e){
35		if($(this).closest('figure').length) {
36			var ViewimageObj = new Image();
37			var $_thisImgObj = $(this);
38			ViewimageObj.src = $(this).attr("src");
39			ViewimageObj.onload = function() {
40				imageWidth = this.width;
41				if(articleViewDivWidth <= imageWidth) {
42					$_thisImgObj.closest('figure').addClass('bigsize');
43				}
44			};
45
46		}
47	});	
48
49	$_container.on('click', 'figure.bigsize', function(e){
50		$('<form action="/news/userArticlePhoto.html" method="POST"><input type="hidden" name="src" value="'+$(this).find("img").attr('src')+'"></form>').appendTo('body').submit();
51	})
52	.on('click', 'figure.bigsize figcaption', function(e){
53		e.preventDefault();
54		e.stopPropagation();
55	});
56}
57
58/* ****************************************** */
59/* /script/floating.banner.js                 */
60/* ****************************************** */
61$(function() {
62	$(window).scroll(function() {
63		
64		if(!($('#floating_banner_left').length || $('#floating_banner_right').length)) return false;
65		
66		var floatBannerLeft = $('#floating_banner_left'),
67			floatBannerRight = $('#floating_banner_right'),
68			
69			HeadHeight = $('#user-header').height(),
70			footerBoxTop = $('#user-footer').offset().top,
71			footerBoxHeight = $('#user-footer').height(),
72
73			scrollTop = $(window).scrollTop(),
74
75			flBnLHeight = floatBannerLeft.height(),
76			flBnRHeight = floatBannerRight.height(),
77
78			ahtHeight = $('.aht-wrapper').height(),
79
80			flBnLscrollLimit = footerBoxTop - flBnLHeight - HeadHeight - floatBannerLeft.data('down-margin'),
81			flBnLscrollLimitChk = flBnLscrollLimit + footerBoxHeight + floatBannerLeft.data('down-margin'),
82			flBnRscrollLimit = footerBoxTop - flBnRHeight - HeadHeight - floatBannerRight.data('down-margin'),
83			flBnRscrollLimitChk = flBnRscrollLimit + footerBoxHeight + floatBannerRight.data('down-margin'),
84
85			flBnLscrollTop = scrollTop - HeadHeight + ahtHeight + floatBannerLeft.data('top-margin'),
86			flBnRscrollTop = scrollTop - HeadHeight + ahtHeight + floatBannerRight.data('top-margin');
87
88		if(floatBannerLeft.data('scroll') == 'y'){
89			if(floatBannerLeft.data('duration') > 0) floatBannerLeft.stop();
90			if(scrollTop < HeadHeight) floatBannerLeft.animate({top: '0px'}, floatBannerLeft.data('duration'), 'linear');
91			else if(scrollTop >= flBnLscrollLimitChk) floatBannerLeft.animate({top:flBnLscrollLimit + 'px'}, floatBannerLeft.data('duration'), 'linear');
92			else if(scrollTop >= HeadHeight) floatBannerLeft.animate({top:flBnLscrollTop + 'px'}, floatBannerLeft.data('duration'), 'linear');
93		}
94
95		if(floatBannerRight.data('scroll') == 'y'){
96			if(floatBannerRight.data('duration') > 0) floatBannerRight.stop();
97			if(scrollTop < HeadHeight) floatBannerRight.animate({top: '0px'}, floatBannerRight.data('duration'), 'linear');
98			else if(scrollTop >= flBnRscrollLimitChk) floatBannerRight.animate({top:flBnRscrollLimit + 'px'}, floatBannerRight.data('duration'), 'linear');
99			else if(scrollTop >= HeadHeight) floatBannerRight.animate({top:flBnRscrollTop + 'px'}, floatBannerRight.data('duration'), 'linear');
100		}
101	});
102});
103
104/* ****************************************** */
105/* /script/mosaic.js					  	*/
106/* ****************************************** */
107
108function mosaic_autobox(data) {
109	var $_container		= $(data[0].container);
110	var autoplay		= data[0].autoplay;
111	var autotime		= data[0].autotime;
112	var temp_autoplay	= autoplay;
113	var totalcount		= $_container.find('ul.auto-nav > li').length;
114	var point			= 0;
115	
116	$_container.on('mouseenter', '.auto-cursor', function(e){
117		mosaic_cmd('current', $(this).index());
118	});
119
120	$_container.on('mouseenter', function(e){
121		if(autoplay) temp_autoplay = false;
122	}).on('mouseleave', function(e){
123		if(autoplay) temp_autoplay = true;
124	});
125
126	if(autoplay) {
127		var rolling = window.setInterval(function () {
128			if(temp_autoplay) mosaic_cmd('next', 0);
129		}, autotime);
130	}
131
132	function mosaic_cmd(mode, current_point) {
133		
134		if(mode == "prev") {
135			point -= 1;
136			if(point < 0) point = totalcount - 1;
137		}else if(mode == "next") {
138			point += 1;
139			if(point >= totalcount) point = 0;
140		}else if(mode == "current") {
141			point = current_point;
142		}
143
144		$_container.find('ul.auto-container > li').eq(point).show().siblings().hide();
145		$_container.find('ul.auto-nav > li').eq(point).addClass('active').siblings().removeClass('active');
146
147		if(point < 2){
148			$_container.find('ul.auto-container').css({"left":"33.333333%","top":"33.333333%"});
149		} else if(point < 4 && point >= 2) {
150			$_container.find('ul.auto-container').css({"left":"0px","top":"33.333333%"});
151		} else if(point < 6 && point >= 4) {
152			$_container.find('ul.auto-container').css({"left":"0px","top":"0px"});
153		} else if(point >= 6) {
154			$_container.find('ul.auto-container').css({"left":"33.333333%","top":"0px"});
155		}
156
157		return false;
158	}
159}
160
161/* ****************************************** */
162/* /script/newsAutoCall.js					  */
163/* ****************************************** */
164
165function fn_articleAutoCall(mode, cycle) {
166
167	var cycle=parseInt(cycle)||0;
168	if(isNaN(cycle)||cycle<=0) return false;
169
170	var autoCallMode	= mode;
171	var autoCallCycle	= 1000*60*cycle;
172	var _autoCallWatch  = setInterval(action, autoCallCycle);
173
174	// DESK중복수정이면 초기 1회 바로실행.
175	if(autoCallMode == "desk") action();
176
177	function action() {
178		if(autoCallMode == "save") {
179			if($('.auto-save', '#admin-content').length > 0 && $('input:hidden[name="autoSave"]', '#newsWriteForm').val() != "") $('.auto-save', '#admin-content').show();  
180			TxRx("/news/articleAutoSave.ajax.php");
181		}
182		else if(autoCallMode == "desk")		TxRx("/news/articleAutoDesk.ajax.php");
183		else								stop();
184	}
185
186	function TxRx(url) {
187
188		$.ajax({
189			type: "post",
190			dataType: "json",
191			url:url,
192			data:$('#newsWriteForm').serialize(),
193			success: function(data) {
194				console.log(data[1]);
195			},
196			error: function(error, request) {
197				console.log("자동콜에러 - code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
198				stop();
199			}
200		}).always(function() {
201			if($('.auto-save', '#admin-content').length > 0) $('.auto-save', '#admin-content').fadeOut(1500);
202		});
203	}
204
205	function stop() {
206		clearInterval(_autoCallWatch);
207		console.log(autoCallMode + '스톱');
208	}
209}
210
211/* ****************************************** */
212/* 기존	common.js							  */
213/* ****************************************** */
214
215/*---------------------------------------------------------------------------------------------
216                                      JAVASCRIPT CODE
217  ---------------------------------------------------------------------------------------------
218	function name						| description				| use process
219  ---------------------------------------------------------------------------------------------
220	setCookie(쿠키명, 값, 유효기간(일))	| 							| 쿠키생성
221	getCookie(쿠키명)					| 							| 쿠키가져오기
222  ---------------------------------------------------------------------------------------------*/
223
224// 쿠키 생성
225function setCookie(cName, cValue, cDay, cDomain){
226	Util.setCookie(cName, cValue, cDay, cDomain);
227}
228
229// 쿠키 가져오기
230function getCookie(cName) {
231	Util.getCookie(cName);
232}
233
234// 쿠키 지움
235function delCookie(cName) {
236    var today = new Date();
237    today.setTime(today.getTime() - 1);
238    var value = getCookie(cName);
239    if(value != "") {
240        var host=(typeof SITE_DOMAIN!='undefined')?SITE_DOMAIN:window.location.host
241            ,domain='.'+host.replace(/^http(s)?:\/\//i,'').replace(/^(www|cms|slv|cdn|m)\./i,'')
242            ,cookies = cName + "=" + value + "; path=/; expires=" + today.toGMTString() + '; ' + "domain=" + domain + ';';
243        document.cookie = cookies;
244    }
245}
246
247
248/*---------------------------------------------------------------------------------------------
249                                      JAVASCRIPT CODE
250  ---------------------------------------------------------------------------------------------
251	function name						| description				| use process
252  ---------------------------------------------------------------------------------------------
253	checkMsgLength()					| 입력된 문자열 길이 검사			| 기사 댓글
254	calculateMsgLength()				| 문자열 길이 반환				| 기사 댓글
255	assertMsgLength()					| 문자열 길이만큼 잘라 변환		| 기사 댓글
256  ---------------------------------------------------------------------------------------------*/
257
258// 문자열길이 검사
259function checkMsgLength(frm, id, lenStr) {
260	var length = calculateMsgLength(document.getElementById(frm).value);
261	document.getElementById(id).innerHTML = length;
262	if (length > lenStr) {
263		alert("최대 "+lenStr+" 바이트까지 남기실 수 있습니다.\r\n초과된 " + (length - lenStr) + "바이트는 자동으로 삭제됩니다.");
264		document.getElementById(frm).value = assertMsgLength(document.getElementById(frm).value, lenStr, id);
265	}
266}
267
268//문자열길이 반환
269function calculateMsgLength(message) {
270	var nbytes = 0;
271
272	for (i=0; i<message.length; i++) {
273		var ch = message.charAt(i);
274
275		if (escape(ch).length > 4) {
276			nbytes += 2;
277		} else if (ch != "\r") {
278			nbytes++;
279		}
280	}
281
282	return nbytes;
283}
284
285//문자열 길이만큼 잘라 변환
286function assertMsgLength(message, maximum, id) {
287	var inc = 0;
288	var nbytes = 0;
289	var msg = "";
290	var msglen = message.length;
291
292	for (i=0; i<msglen; i++) {
293		var ch = message.charAt(i);
294
295		if (escape(ch).length > 4) {
296			inc = 2;
297		} else if (ch != "\r") {
298			inc = 1;
299		}
300
301		if ((nbytes + inc) > maximum) {
302			break;
303		}
304
305		nbytes += inc;
306		msg += ch;
307	}
308
309	document.getElementById(id).innerHTML = nbytes;
310	return msg;
311}
312
313
314// 관리자에서 기사본문 복사하여 블로그에 퍼 나를시 링크가 관리자 링크로 되어 이를 보완
315function avReplaceImgUrlOnCopy(){
316	var $aView=document.querySelector('#article-view')
317		,chgUrl=CDN_DOMAIN||SITE_DOMAIN;
318
319	if(!$aView || !chgUrl) return ;
320	$aView.addEventListener("copy", function(e){
321		Array.prototype.slice.call(e.currentTarget.querySelectorAll("img,a[href^='/news/download.php']")).map(function($o, i){
322			if($o.tagName.toLowerCase() == 'a'){		// download link
323				var href=$o.getAttribute("href");
324				$o.href=SITE_DOMAIN+href;	
325			}else{										// image
326				var src=$o.getAttribute("src");
327				if(!/data:image\/(jpeg|png|gif);base64,/i.test(src) && !/^http(s)?:\/\//i.test(src)) $o.src=chgUrl+src;	
328			}
329		});
330	});
331}
332
333/*---------------------------------------------------------------------------------------------
334                                      JAVASCRIPT CODE
335  ---------------------------------------------------------------------------------------------
336	function name						| description				| use process
337  ---------------------------------------------------------------------------------------------
338	articleHeader()						| 기사뷰 헤더 네비			| 기사뷰 헤더 네비
339  ---------------------------------------------------------------------------------------------*/
340
341var articleHeader = {
342
343	// 헤더 네비게이션 생성
344	setScroll:function(){		
345		jQuery(window).scroll(function() {
346			if (jQuery(this).scrollTop() > 300) {
347				jQuery('#sticky-header').addClass('scroll');
348			} else {
349				jQuery('#sticky-header').removeClass('scroll');
350			}
351		});			
352	},
353	
354
355	// 기사이동
356	move:function(mod, order_type, order_value, section_code, sub_section_code, serial_code){
357		jQuery.get( "ajaxGetForwardIdxno.php", { mod: mod, order_type:order_type, order_value: order_value, section_code: section_code, sub_section_code: sub_section_code, serial_code: serial_code }, function( f_idxno ) {
358			
359			if(f_idxno){
360				location.href = '/news/articleView.html?idxno='+f_idxno;
361			}else{
362				alert('기사가 존재하지 않습니다');
363			}
364			
365		});
366	}
367	
368}
369
370
371/*---------------------------------------------------------------------------------------------
372                                      JAVASCRIPT CODE
373  ---------------------------------------------------------------------------------------------
374	function name						| description				| use process
375  ---------------------------------------------------------------------------------------------
376  	bbsPrint(idxno)						| 게시물 인쇄창 오픈				| 게시물 인쇄창 오픈
377	articlePrint(idxno)					| 인쇄창 오픈					| 인쇄창 오픈
378	articleMail(idxno)					| 메일보내기창 오픈				| 메일보내기창 오픈
379	articleErr(idxno)					| 오류신고창 오픈				| 오류신고창 오픈
380	articleSingo(idxno)					| 댓글신고창 오픈				| 댓글신고창 오픈
381	fn_guid()							| (랜덤)고유아이디 생성			| (랜덤)고유아이디 생성 
382  ---------------------------------------------------------------------------------------------*/
383
384//인쇄창 오픈
385function bbsPrint( idxno, ps ) {
386    var ps_str = "";
387    if(ps != "") ps_str = "&ps="+ps;
388    window.open('/bbs/bbsPrint.html?idxno='+idxno+ps_str, 'bbsPrint', 'width=660,height=500,scrollbars=yes');
389}
390
391// 인쇄창 오픈
392function articlePrint( idxno ) {
393	window.open('/news/articlePrint.html?idxno='+idxno, 'articlePrint', 'width=660,height=500,scrollbars=yes');
394}
395
396// 메일보내기창 오픈
397function articleMail( idxno ) {
398	window.open('/news/articleMail.html?idxno='+idxno, 'articleMail', 'width=660,height=500,scrollbars=yes');
399}
400
401// 오류신고창 오픈
402function articleErr( idxno ) {
403	window.open('/news/articleErr.html?idxno='+idxno, 'articleErr', 'width=660,height=500,scrollbars=yes');
404}
405
406// 댓글신고창 오픈
407function articleSingo( idxno ) {
408	window.open('/news/articleSingo.html?idxno='+idxno, 'articleSingo', 'width=660,height=500,scrollbars=yes');
409}
410
411//고유값생성 (기사등록 관련기사 띄울때 사용)
412function fn_guid() {
413    function s4() {
414        return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
415    }
416    return s4() + s4() + s4() + s4() + s4() + s4() + s4() + s4();
417}
418
419/*****************************************************************************
420*게시판 카테고리 설정
421*****************************************************************************/
422var bbsCfg={
423
424	 // 카테고리 셋팅
425     setCategory:function() {	
426
427		 // 추가
428        $('#admin-content').on('click', '#btn_category_add, .btn_category_delete, .btn_category_modify', function(e){
429
430			var _this = this
431			,$this = $(_this)
432			,isAddButton = $this.is("#btn_category_add")
433			,isDltButton = $this.is(".btn_category_delete")
434			,isModalButton = $this.is(".btn_category_modify")
435			,$categoryName = $('#category_name').val()
436			,categoryArr = $categoryName.split(',');
437
438			if(isAddButton){ // 추가
439				categoryArr =categoryArr.filter(Boolean);
440				for (var i in categoryArr) {
441					var category = categoryArr[i];
442	
443					// 필수 항목 체크
444					if(!category || category == "") {
445						alert("카테고리명을 정확하게 입력해주세요.");
446						return false;
447					}
448
449					// 중복체크
450					if($('#category-div').find("input[class='category'][value='"+category+"']").length>0) {
451						alert(category+' 카테고리는 존재합니다.');
452						$('#category_name').val('');
453						return false;
454					}
455					
456					var _time = (Math.random()*new Date().getTime()).toFixed(0);
457				    var html='';
458					   html += "<div class='btn btn-sm btn-tb add-category-entity'> ";
459					   html += "	<input type='hidden' name='category["+_time+"]' class='category' value='"+category+"'>";
460					   html += "	<span class='btn_category_modify' data-cate-idxno='"+_time+"'>"+category+"</span><span class='btn_category_delete' data-cate-idxno='"+_time+"' aria-label='삭제'><i class='ndcon-cancel'></i></span>";
461					   html += "</div>";
462					$('#add-category').append(html); 
463				}
464
465				//초기화
466				$('#category_name').val('');
467
468			} else if(isModalButton) { // 수정 모달 
469
470				var $this = $(this)
471					,$form = $('#form_bbs_category')
472					,$item = $this.closest(".add-category-entity")
473					,$span = $this.closest(".btn_category_modify")
474					,cate_idxno = $span.data("cate-idxno")
475					,category = $item.find("input:hidden[name='category["+cate_idxno+"]']").val();
476
477				$form.find('input:hidden[name="cate_idxno"]').val(cate_idxno);
478				$form.find('input:text[name="category"]').val(category);
479
480				$('#form_bbs_category').foundation('open');
481				
482				// 수정 
483				$form.on('click', '.chk', function(e){
484					if($item) { 
485						var cate_idxno= $form.find('input:hidden[name="cate_idxno"]').val()
486						   ,category = $form.find('input[name="category"]').val();
487
488						if($form.find('[name="category"]').val() == ""){
489							alert('카테고리 명을 정확하게 입력해주세요');
490							$form.find('[name="category"]').focus();
491							return false;
492						}
493							
494						$item.find("input:hidden[name='category["+cate_idxno+"]']").val(category);
495						$item.find(".btn_category_modify[data-cate-idxno='"+cate_idxno+"']").html(category).attr("data-category",category);
496					}
497
498					$('#form_bbs_category').foundation('close');
499				});
500
501			} else if(isDltButton) {  //삭제		
502				var cate_idxno = $(this).closest(".btn_category_delete").data("cate-idxno");
503				if(!window.confirm("삭제하시겠습니까?")) return false;
504				$.post(	"/bbs/axBbsCategory.php"
505						,{mode:"categoryChk",cate_idxno:cate_idxno}
506						,function(data, rst){
507							if(data.result === "success"){
508								$this.closest(".add-category-entity").fadeOut("fast",function(){$(this).remove();});	
509							}else alert(decodeURIComponent(data.msg));
510
511				},"json");	
512				return false;		
513			}
514		});
515	 }
516
517	 //정렬
518	,evtSortableCategory:function(){
519		var $box = $("#add-category"),
520			table_name = $box.attr("data-table");
521			
522		$box.sortable({
523			placeholder: "ui-state-highlight"
524			,forcePlaceholderSize:true
525			,update:function(event, ui){
526			// 저장안함
527			}
528		});
529	}
530
531 	//카테고리 이동
532 	,categoryMove:function(checkBoxIdxno){
533
534        // 전체선택
535		$("#all-dummy").click(function(e){
536			$('input:checkbox[name="bbs_idxno[]"]', '#bbs_table').each(function(i){
537				this.checked = $('input:checkbox[name="all_dummy"]', '#bbs_table').is(':checked');
538			});
539		});
540
541		// 추가
542		$('.bbs-skin').on('click', '.categoryModalBtn', function(e){
543			var data=$(checkBoxIdxno).filter(function(i){ return this.checked?true:false; }).map(function(a,b){ return b.value; }).get();
544			if(data.length<=0){
545				alert("카테고리 이동 할 게시물을 선택해주세요.");
546				return false;
547			}
548			//console.log(data);
549			$('#categoryMoveForm').foundation('open');
550			
551			$('#categoryMoveForm').on('click', '.category_move_btn', function(e){
552				var to_category = $('#categoryMoveForm').find('#toCategory option:selected').val(),
553					table_name =  $('#categoryMoveForm').find('input:hidden[name="table_name"]').val();
554
555				if(!window.confirm("카테고리 이동 할 게시물로 변경하시겠습니까?")) return false;
556				$.post("/bbs/axBbsCategory.php"
557						,{mode:"bbsCategoryMove","bbs_idxno[]":data,"to_category":to_category,"table_name":table_name}
558						,function(data,rst){
559							console.log(data);
560							if(data.result!="success"){
561								alert(data.msg||"문제가 생겼습니다. 잠시후 다시 시도 하여 주세요.");
562								return false;
563							}
564							//alert("카테고리 이동이 완료되었습니다.");
565							location.reload(true);
566						},"json");
567
568				return false;
569			});
570		});
571    }
572}
573
574/*****************************************************************************
575* 다중섹션설정
576*****************************************************************************/
577var multiSection ={
578
579	// 섹션로드
580	sectionLoad:function() {
581		
582		$('#admin-content').on('change', '.add-section-select', function(e){
583			var tp = $(this).data('type');
584			var code = $(this).val();
585			var $_obj = $('#add_section');
586
587			if(tp == 1) multiSection.changeSectionCode(tp, code);
588			else if(tp == 2) {
589				if($(this).val() == "") {
590					multiSection.changeSectionCode(1, $_obj.val());
591				}
592				else multiSection.changeSectionCode(tp, code);
593			}
594		});
595
596		//삭제
597		$('#section-div').on('click', '.delete-button', function(e){
598			var tp = $(this).data('type');
599			$(this).closest('.'+tp+'-section-entity').remove();
600		});
601	}
602
603	//섹션 코드 호출
604	,changeSectionCode:function(tp,code) {
605
606		var $_subsection = $('#add_subsection');
607		var $_serial = $('#add_serial');
608	
609		$.ajax({
610			type: "post",
611			dataType: "json",
612			url: "/news/changeSectionCode.ajax.php",
613			data:{tp:tp, code:code},
614			success: function(data) {
615				if(data[0] == "Y"){
616					if(tp == 1){
617						$_subsection.html(data[1]);
618						$_serial.html(data[2]);
619					}else if(tp == 2){
620						$_serial.html(data[2]);
621					}
622				}
623			},
624			error: function(error, request) {
625				alert('error!!!');
626				console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
627			}
628		});
629	
630		return false;
631	}
632
633	// 자동박스 섹션추가&제외
634	,addSectionCode:function() {
635
636		// 섹션 단락 노출 여부 
637		if($('.add-section-entity').length > 0) $('#section-div').show();
638		else  $('#section-div').hide();
639
640		$('#admin-content').on('click', '#sectionBtn', function(e){
641
642			// 추가 or 제외
643			var tp = $(this).data('type');
644
645			//1차섹션
646			var sectioncode = $('#add_section option:selected').val();
647			var sectionname = $('#add_section option:selected').text();
648			//2차섹션
649			var subsectioncode = $('#add_subsection option:selected').val();
650			var subsectionname = $('#add_subsection option:selected').text();
651			//3차섹션
652			var serialcode = $('#add_serial option:selected').val();
653			var serialname = $('#add_serial option:selected').text();
654
655			//1차섹션을 선택 안했을시...
656			if(!sectioncode || sectioncode == "") {
657				alert("추가할 섹션을 선택해주세요.");
658				return false;
659			}
660
661			//  중복코드 체크
662			var addSecCode = sectioncode;
663			if(subsectioncode) addSecCode += '>'+subsectioncode;
664			if(serialcode) addSecCode += '>'+serialcode;
665			
666			var duplicateChk = false;    
667
668			// 동일한 섹션 구성이 추가&제외 동시 추가 제어
669			$('.input_setion_data').each(function(){
670				if( $(this).val() == addSecCode) {
671					alert('이미 중복 된 코드가 존재합니다.');
672					eixt;
673					duplicateChk = true;
674					return false;
675				}
676			});
677			
678			if(tp == 'add') {
679				//전체가 선택 된 경우 단일 선택 제어
680				$('.add_section_data').each(function(){
681					if($(this).val() == "ALL"){
682						alert('전체를 선택하실 경우 단일 섹션 선택은 하실 수 없습니다.');
683						duplicateChk = true;
684						return false;
685					}
686				});
687
688				// 단일 섹션 선택시 전체 선택 제어
689				if($('.add-section-entity').length > 0) {
690					if(addSecCode == "ALL"){
691						alert('단일 섹션이 이미 선택되어 있습니다. 전체는 선택하실 수 없습니다.');
692						duplicateChk = true;
693						return false;
694					}
695				}
696
697			} else if(tp == "exc") { 
698
699				if(addSecCode == "ALL"){
700					alert('제외 섹션으로는 전체를 선택하실 수 없습니다.');
701					duplicateChk = true;
702					return false;
703				} else {
704
705					if($('.add-section-entity').length > 0) {
706						$('.add_section_data').each(function(){
707							if($(this).val().indexOf(addSecCode) != -1) { //포함할 경우 
708								alert('추가 섹션에 포함 된 1차 섹션으로 제외할 수 없습니다. ');
709								duplicateChk = true;
710								return false;
711							}
712							if($(this).val() != "ALL"){
713								if(addSecCode.indexOf(">") == -1) {
714									alert('제외 섹션으로 처리할 수 없습니다.');
715									duplicateChk = true;
716									return false;
717								}
718							}
719						});
720					}
721				}
722
723				if($('.add-section-entity').length == 0) {
724					alert('추가 섹션을 먼저 선택해주세요.');
725					duplicateChk = true;
726					return false;
727				}
728			}
729			
730			if(duplicateChk) return false;
731
732			// 추가 될 경우 노출 
733			$('#section-div').show();
734
735			var title = sectionname;
736			if(subsectioncode || subsectioncode != "") title += "&gt;"+subsectionname;
737			if(serialcode || serialcode != "") title += "&gt;"+serialname;
738
739			var html='';
740			html += "<div class='dsframe-section-content "+tp+"-section-entity'>"; 
741			html += "	<input type='hidden' name='"+tp+"_section_data[]' class='"+tp+"_section_data input_setion_data' value='"+addSecCode+"'>";
742		//	html += "	<input type='hidden' class='"+tp+"-chk-sec' value='"+addSecCode+"'>";
743			html += "	<button type='button' class='btn btn-tb delete-button' data-type='"+tp+"' title='"+sectionname+" 삭제'>";
744			html += title;
745			html += "	<i class='ndcon-cancel' aria-label='삭제'></i></button>";
746			html += "</div>";
747							
748			$('#'+tp+'-section').append(html);  
749
750			//.attr("data-code",category)
751			
752		});
753	}
754
755	//전송
756	,multiSectionSumbit:function(form)
757	{
758	
759	   if(!form.description.value)
760	   {
761		   alert("리스트명을 입력해주세요.");
762		   description.focus();
763		   return false;
764	   }
765
766	   if($('.add-section-entity').length == 0) {
767			alert("연결 섹션을 선택해주세요.");
768			return false;
769	   }
770
771		if(confirm("선택한 섹션을 하나의 리스트로 구성합니다. \n정말로 실행하시겠습니까?")) return true;
772		else return false;
773
774	}
775	
776}
777
778/* ****************************************** */
779/* /script/app.js	(파운데이션 실행파일			  */
780/* ****************************************** */
781
782$(function(){ 
783	$(document).foundation();    
784});
785
786/*****************************************************************************
787*기사 카운트 
788*****************************************************************************/
789var _statistics={
790	articleCookieCount:function(article_idxno){
791		if(!article_idxno) return false;
792		
793		var cookieRestore = false
794			,articleIdxno = article_idxno
795			,articleUniqView = _statistics.getCookie('___AUV')
796			,dateTime = new Date();
797
798		var regexp = new RegExp("_"+articleIdxno+"\.(\\d{10})x","i");
799		var dataArr = articleUniqView.match(regexp); 
800
801		if(dataArr !== null){
802			var limitTime =  dateTime.setHours(dateTime.getHours() - 1);
803			limitTime =  Math.floor(limitTime / 1000);
804			if (limitTime > dataArr[1]){
805				articleUniqView = articleUniqView.replace(dataArr[0], '');
806				cookieRestore = true;
807			}
808		} else cookieRestore = true;
809
810		if(cookieRestore === true) {  
811			var newData = '_'+articleIdxno+'.'+ Math.floor(new Date().getTime() / 1000) +'x';
812			$.ajax({
813				url:'/news/makeArticleUniqSave.ajax.php',
814				type:'POST',
815				dataType:'json',
816				cahse: false,
817				data: {article_idxno:articleIdxno},
818				success:function(rst,data){
819					if(rst.result == "success"){
820						var tmpTotalSize = 8 + articleUniqView.length + newData.length; 
821						if (tmpTotalSize >= 2048) articleUniqView = articleUniqView.substr(0, (articleUniqView.length - newData.length));
822						articleUniqView = newData + articleUniqView;
823
824						var domain = '.'+ countDomain.replace(/^http(s)?:\/\//i,'').replace(/^(www|m)\./i,'');
825						_statistics.setCookie("___AUV", articleUniqView.trim(), 30, domain);
826					}
827				},
828				error: function(error, request) {
829					console.log("error:"+error+"\n"+"request:"+request);
830				}
831			});
832		}
833	}
834	,getCookie:function(name)
835	{	
836		name+="=";
837		var ca = document.cookie.split(';');
838		for(var i=0; i<ca.length; i++) {
839			var c = ca[i];
840			while (c.charAt(0)==' ') c = c.substring(1);
841			if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
842		}
843		return "";
844	}
845	,setCookie:function(name, value, days, domain)
846	{
847		var expires = "";
848		if(days){
849			var date = new Date();
850			date.setTime(date.getTime()+(days*24*60*60*1000));
851			expires = "; expires="+date.toGMTString();
852		}
853		if(!domain) domain = countDomain.replace(/^http(s)?:\/\//i,'').replace(/^(www|m)\./i,'');
854		document.cookie = name+"="+value+expires+"; path=/; " + (domain?"domain="+domain+";":"");
855	}
856} 
857
858/*****************************************************************************
859* 기사본문 복사하기 출처 표시
860*****************************************************************************/
861var _articleSelect={
862	copy:function(text){
863		if(!text) return;
864		$('#article-view-content-div').on('copy', function(e){
865			var selectContent = window.getSelection().toString()
866				,copyFooter = "\n\n출처 : "+text+"\n"
867				,copyText = selectContent + copyFooter;
868			Util.copyToClipboard(copyText, _articleSelect.empty, _articleSelect.empty);
869		});
870	}
871	,empty:function(){}
872};	

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.