PageSourceSearch

https://bris.go.kr/resources/js/portal/common/common.js

js bris.go.kr collected 2026-10-02 14:51:26 UTC 9,189 bytes, 295 lines download raw bytes

1( function() {
2	$(document).ready(function(){
3		$('.subbody').stop().animate({opacity:1}, 600);
4
5		//스크롤 감지
6		//이벤트 관련 전역변수 등록
7		$.fn.WndowEvent = new windowEvent();
8		var myWindowEvent = $.fn.WndowEvent;
9
10		function windowEvent() {
11			if(!(this instanceof windowEvent)){
12				return new windowEvent();
13			}
14
15			var scope = this;
16			var events = {},
17			scrollEvents = {},
18			resizeEvents = {},
19			windowWidth,
20			scrollTop;
21
22			//리사이즈 이벤트
23			$(window).resize(function() {
24				scope.resizeUpdate();
25			});
26			//스크롤 이벤트 장치
27			$(window).scroll(function() {
28				scope.scrollUpdate();
29			});
30
31			//스크롤 시 사용될 이벤트 추가
32			this.addEvent = function(prop){
33				for( var i in prop){
34					if( events[i] != undefined )throw new Error("same property already existence");
35				}
36				events = $.extend(events, prop);
37				conditionSetObj(prop);
38				classifyEvents();
39				};
40
41				//개별 이벤트 속성 업데이트
42				this.updateProperty = function(name, prop) {
43					updateProperty(name, prop);
44				}
45				//이벤트 강제로 실행
46				this.update = function(){
47					this.scrollUpdate();
48					this.resizeUpdate();
49				};
50
51				//스크롤 이벤트 함수 선언
52				this.scrollUpdate = function(){
53					conditionSetObj(events);
54					scrollTop = $(window).scrollTop();
55					doEvent(scrollTop, scrollEvents);
56				};
57				//리사이즈 이벤트 함수 선언
58				this.resizeUpdate = function(){
59					conditionSetObj(events);
60					windowWidth = window.innerWidth;
61					doEvent(windowWidth, resizeEvents);
62				}
63
64				//이벤트 작동하지 않음
65				this.activateEvent = function(name){
66					events[name]["activate"] = true;
67				}
68				//이벤트 작동
69				this.unActivateEvent = function(name){
70					events[name]["activate"] = false;
71				}
72				//1번 실행되는 이벤트를 실행 전으로 리셋
73				this.resetconditions = function(){
74					if( arguments.length > 0 )
75				{
76				for( var i=0; i<arguments.length; i++){
77					if(typeof arguments[i] == "object")conditionSetObj(arguments[i]);
78					if(typeof arguments[i] == "string")conditionSetString(arguments[i]);
79				}
80				}else{
81					conditionSetObj(events);
82				}
83			}
84
85			function classifyEvents(){
86				for (var i in events) {
87					if( events[i] != undefined){
88						if(events[i]["type"] == "scroll"){
89							scrollEvents[i] = events[i];
90						}else{
91							resizeEvents[i] = events[i];
92						}
93					}
94				}
95			};
96
97			function conditionSetObj(prop){
98				for( var i in prop){
99					if(prop[i]["singleEvent"] == true )prop[i]["isoccurred"] = false;
100				}
101			};
102			function conditionSetString(name){
103				if(events[name]["singleEvent"] == true )events[name]["isoccurred"] = false;
104			}
105
106			//속성 업데이트
107			function updateProperty(name, prop) {
108				$.extend( scrollEvents[name], prop );
109			}
110
111			function doEvent(pos, prop){
112				for( var i in prop ){
113					if(prop[i]["activate"] == false)continue;
114					if( pos >= prop[i]["start"] && pos < prop[i]["end"]){
115						if( prop[i]["singleEvent"] == true ){
116							if( prop[i]["isoccurred"] == false ){
117								if( prop[i]["callBack"] ){
118									prop[i]["callBack"](pos);
119									prop[i]["isoccurred"] = true;
120								}
121							}
122						}else{
123							if( prop[i]["callBack"] )prop[i]["callBack"](pos);
124						}
125					}else{
126						if( prop[i]["isoccurred"] == true)prop[i]["isoccurred"] = false;
127					}
128				}
129			};
130
131		};
132
133		//관련기관 바로가기 열기/닫기
134		var fsIndex = 0;
135		var fsHeight = 0;
136		$('#footer-fs > span').on('click',function(e){
137			e.preventDefault();
138			if($('#footer-fs').hasClass('open')) {
139				$('#footer-fs ul').stop().animate({height: 0}, 300, function(){
140					$('#footer-fs').removeClass('open');
141					$('#footer-fs').removeAttr('style');
142				});
143			} else if(!$('#footer-fs').hasClass('open')) {
144				$('#footer-fs').addClass('open');
145				fsIndex = $('#footer-fs ul li').length;
146				fsHeight = fsIndex * 41 + 2;
147				$('#footer-fs ul').stop().animate({height: fsHeight}, 300);
148			}
149		});
150
151		$('#footer-fs').on('mouseleave',function(e){
152			e.preventDefault();
153			if($('#footer-fs').hasClass('open')) {
154				$('#footer-fs ul').stop().animate({height: 0}, 300, function(){
155					$('#footer-fs').removeClass('open');
156					$('#footer-fs').removeAttr('style');
157				});
158			}
159		});
160	})
161}());
162
163//팝업설정
164function popDetail(url){
165	var winDetail = window.open(url,"winDetail","width=1500,height=1000,top=0,left=0,scrollbars=yes,toolbar=no,menubar=no,location=0");
166	winDetail.focus();
167}
168function popDetail2(url){
169	var urls = encodeURI(url);
170	var popWidth = 1500;
171	var popHeight = 900;
172	var winWidth = document.body.clientWidth;
173	var winHeight = document.body.clientHeight;
174	var winX = window.screenLeft;
175	var winY = window.screenTop;
176	var popX = winX + (winWidth - popWidth)/2;
177	var popY = winY + (winHeight - popHeight)/2 - (600/2);
178	var target = window.location.href.split('?')[0];
179	var winDetail = window.open(urls,target,"top="+popY+",left="+popX+",width="+popWidth+",height="+popHeight+", scrollbars=yes,toolbar=no,menubar=no,location=0");
180	winDetail.focus();
181}
182
183//달력
184$(function () {
185	$("input[id^='DateId_']").each(function() {
186		var _this = this.id;
187		$('#'+_this).datepicker({
188			inline: true,
189			dateFormat: 'yy-mm-dd',
190			monthNames:['년 1월','년 2월','년 3월','년 4월','년 5월','년 6월','년 7월','년 8월','년 9월','년 10월','년 11월','년 12월'],
191			monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
192			dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
193			changeMonth: true, //월변경가능
194			changeYear: true, //년변경가능
195			showMonthAfterYear: true, //년 뒤에 월표시
196			showOtherMonths: true,
197		});
198	});
199    $('img.ui-datepicker-trigger').css({ 'cursor': 'pointer', 'margin-left': '-3px', 'vertical-align': 'top' });
200});
201
202//달력표시
203$(function () {
204	$("div[id^='CalenderId_']").each(function() {
205		var _this = this.id;
206		$('#'+_this).datepicker({
207			inline: true,
208			dateFormat: 'yy-mm-dd',
209			monthNames:['년 1월','년 2월','년 3월','년 4월','년 5월','년 6월','년 7월','년 8월','년 9월','년 10월','년 11월','년 12월'],
210			monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
211			dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
212			changeMonth: true, //월변경가능
213			changeYear: true, //년변경가능
214			showMonthAfterYear: true, //년 뒤에 월표시
215			showOtherMonths: true,
216		});
217	});
218    $('img.ui-datepicker-trigger').css({ 'cursor': 'pointer', 'margin-left': '-3px', 'vertical-align': 'top' });
219});
220
221//tab menu
222$(function(){
223	$(".edu_process .panelWrap").hide();
224	$(".edu_process .panelWrap:first").show();
225	$(".process_tab ul li:first").addClass('on');
226	$(".edu_process .panelWrap:not("+$(".process_tab ul li a").attr("href")+")").hide();
227	$(".process_tab ul li a").bind('click' , function(){
228		$(".process_tab ul li a").parent('li').removeClass("on");
229		$(this).parent('li').addClass("on");
230		$(".edu_process .panelWrap").hide();
231		$($(this).attr("href")).show();
232		return false;
233	});
234});
235
236//subtab menu
237$(function(){
238	$(".subedu_process .subpanelWrap").hide();
239	$(".subedu_process .subpanelWrap:first").show();
240	$(".subprocess_tab ul li:first").addClass('on');
241	$(".subedu_process .subpanelWrap:not("+$(".subprocess_tab ul li a").attr("href")+")").hide();
242	$(".subprocess_tab ul li a").bind('click' , function(){
243		$(".subprocess_tab ul li a").parent('li').removeClass("on");
244		$(this).parent('li').addClass("on");
245		$(".subedu_process .subpanelWrap").hide();
246		$($(this).attr("href")).show();
247		return false;
248	});
249});
250
251//간략보기 컨트롤
252function showHide(id) {
253	$("#" + id).toggleClass("active");
254}
255
256//테이블 솔트 기능
257function searchOrderInit() {
258	if(queryParams.get("orderId")){
259		document.querySelectorAll('.btn-sort').forEach(e =>{
260			if(e.dataset.orderId === queryParams.get("orderId")){
261				if(queryParams.get("sortFlag") === 'false'){
262					e.firstChild.classList.add("active");
263				}else{
264					e.lastChild.classList.add("active");
265				}
266			}
267		})
268	}
269
270	$(".btn01,.btn02").on("click", function(){
271		fn_loading(true);
272		queryParams.delete("orderId");
273		queryParams.delete("sortFlag");
274
275		let sortFlag =false;
276		if(this.classList.contains("active")){
277			this.classList.remove("active");
278		}else{
279			document.querySelectorAll(".btn01").forEach(e=>e.classList.remove("active"))
280			document.querySelectorAll(".btn02").forEach(e=>e.classList.remove("active"))
281
282			this.classList.add("active");
283
284			if(this.classList.contains('btn02')) sortFlag = true;
285
286			const orderId = this.parentNode.dataset.orderId;
287			if(orderId){
288				queryParams.append("orderId", this.parentNode.dataset.orderId);
289				queryParams.append("sortFlag", sortFlag);
290
291			}
292		}
293		location.href = location.href.split('?')[0]+"?"+queryParams.toString();
294	});
295}

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.