var _FUNC = { req : { downloadTimer : null }, setKeywordPlaceHolder : function(v,keywordId){ $("#"+keywordId).val(""); if(v=='mbtlnum'){ $("#"+keywordId).prop("placeholder",'010-0000-0000 형태로 검색해 주세요.'); }else if(v=='scMoblphonNo'){ $("#"+keywordId).prop("placeholder",'010-0000-0000 형태로 검색해 주세요.'); }else if(v=='telno'){ $("#"+keywordId).prop("placeholder",'010-0000-0000 형태로 검색해 주세요.'); }else if(v=='mblTelno'){ $("#"+keywordId).prop("placeholder",'010-0000-0000 형태로 검색해 주세요.'); }else{ $("#"+keywordId).prop("placeholder",'검색어를 입력하세요.'); } }, setDateTime : function(){ $("[data-role='datepicker']" ).datepicker({ showOn:"both", buttonText: '', dateFormat: 'yy-mm-dd', changeYear: true, changeMonth: true, showMonthAfterYear: true, yearRange: "2015:2025", prevText: '이전 달', nextText: '다음 달', monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], dayNames: ['일', '월', '화', '수', '목', '금', '토'], dayNamesShort: ['일', '월', '화', '수', '목', '금', '토'], dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'], yearSuffix: '년' }); }, setDateTimeBirth : function(){ $("[data-role='datepickerBirth']" ).datepicker({ showOn:"both", buttonText: '', dateFormat: 'yymmdd', changeYear: true, changeMonth: true, showMonthAfterYear: true, yearRange: "1930:2017", prevText: '이전 달', nextText: '다음 달', monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], dayNames: ['일', '월', '화', '수', '목', '금', '토'], dayNamesShort: ['일', '월', '화', '수', '목', '금', '토'], dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'], yearSuffix: '년' }); }, setDateTimeCrer : function(){ $("[data-role='datepicker']" ).datepicker({ showOn:"both", buttonText: '', dateFormat: 'yy-mm-dd', changeYear: true, changeMonth: true, showMonthAfterYear: true, yearRange: "1960:2025", prevText: '이전 달', nextText: '다음 달', monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], dayNames: ['일', '월', '화', '수', '목', '금', '토'], dayNamesShort: ['일', '월', '화', '수', '목', '금', '토'], dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'], yearSuffix: '년' }); }, setTimer : function(clsNm,selTime,mimT,maxT,intval){ if (typeof mimT === "undefined" || typeof mimT === "undefined") { mimT='0:00'; } if (typeof maxT === "undefined" || typeof maxT === "undefined") { maxT='11:59pm'; } if (typeof intval === "undefined" || typeof intval === "undefined") { intval=30; } $('.'+clsNm).timepicker({ timeFormat: 'HH:mm ', interval: intval, minTime: mimT, maxTime: maxT, defaultTime: selTime, startTime: '0:00', dynamic: false, dropdown: true, scrollbar: true }); }, loadingStart : function(){ //화면의 높이와 너비를 구합니다. var maskHeight = $(document).height(); var maskWidth = window.document.body.clientWidth; //화면에 출력할 마스크를 설정해줍니다. var mask = ""; var loadingImg = ''; loadingImg += "
"; loadingImg += " "; loadingImg += "
"; //화면에 레이어 추가 $('#content_body') .append(mask) .append(loadingImg) //마스크의 높이와 너비를 화면 것으로 만들어 전체 화면을 채웁니다. $('#_mask').css({ 'width' : maskWidth , 'height': maskHeight , 'opacity' : '0.3' }); //마스크 표시 $('#_mask').show(); //로딩중 이미지 표시 $('#_loadingImg').show(); }, loadingEnd : function(){ $('#_mask, #_loadingImg').empty(); $('#_mask, #_loadingImg').remove(); }, getCookie : function(name) { var parts = document.cookie.split(name + "="); if (parts.length == 2) return parts.pop().split(";").shift(); }, excelLoading : function(name) { _FUNC.loadingStart(); _FUNC.req.downloadTimer = setInterval(function() { console.log(name); var token = _FUNC.getCookie(name); console.log(token); if(token == "true") { _FUNC.excelLoadingEnd(); } }, 1000 ); }, excelLoadingEnd : function() { _FUNC.loadingEnd(); clearInterval(_FUNC.req.downloadTimer); }, openChatbot : function() { window.open('https://chat.keli.kr/chatbot.do', 'chatbot', 'top=100, left=400, width=400, height=600, status=no, menubar=no, toolbar=no, resizable=no'); }, loadingStartEgov : function(){ //화면의 높이와 너비를 구합니다. var maskHeight = $(document).height(); var maskWidth = window.document.body.clientWidth; //화면에 출력할 마스크를 설정해줍니다. var mask = ""; var loadingImg = ''; loadingImg += "
"; loadingImg += " "; loadingImg += "
"; //화면에 레이어 추가 $('body') .append(mask) .append(loadingImg) //마스크의 높이와 너비를 화면 것으로 만들어 전체 화면을 채웁니다. $('#_mask').css({ 'width' : maskWidth , 'height': maskHeight , 'opacity' : '0.3' }); //마스크 표시 $('#_mask').show(); //로딩중 이미지 표시 $('#_loadingImg').show(); } }