$(document).ready(function(){ //$("body").after("
"); /*$(document).on('submit', '#frmSearch', function(event){ var frm = $(this); var action = $(frm).attr("action"); var method = $(frm).attr("method"); $.pjax({ url : action, type: method, data: frm.serialize(), container : '#pjax-container', fragment : '#pjax-container' }); return false; // }).on('pjax:success', function(event, data, status, xhr, options) { }); $(document).on('click', '.button a', function(event){ var href = $(this).attr("href"); $.pjax({ url : href, type: 'get', container : '#pjax-container', fragment : '#pjax-container' }); return false; }); $(document).on('click', '.pageNavigation a', function(event){ var href = $(this).attr("href"); var url = href.substring(0, href.indexOf("?")); var datas = href.substring(href.indexOf("?")+1); $.pjax({ url : url, type: 'post', data: datas, container : '#pjax-container', fragment : '#pjax-container' }); return false; });*/ $(window).resize(function(){ var lmContainerH = $("#lmContainer").height(); $("#lmControl").css("height",lmContainerH); }).resize() var windowHeight = 0; windowHeight = $(window).height(); $("#loadingBar").css("height",windowHeight); $("#layOutEdit").click(function(){ var url = $(this).attr("href"); window.open(url,"layOutPop","width=1024, height=768, location=no, toolbar=no, menubar=no, scrollbars=yes, resizable=yes"); return false; }); $("#menuContentEdit").click(function(){ var url = $(this).attr("href"); window.open(url,"editPop","width=1024, height=768, location=no, toolbar=no, menubar=no, scrollbars=yes, resizable=yes"); return false; }); $(".functionEdit").click(function(){ var url = $(this).attr("href"); window.open(url,"functionPop","width=1024, height=768, location=no, toolbar=no, menubar=no, scrollbars=yes, resizable=yes"); return false; }); $('input:checkbox[id="allcheck"]').change(function () { if($(this).is(":checked")){ $('input:checkbox[name="idxs"]').prop("checked", true); }else{ $('input:checkbox[name="idxs"]').prop("checked", false); } }); $('input:checkbox[id="allcheckc"]').change(function () { if($(this).is(":checked")){ $('input:checkbox[name="idxsc"]').prop("checked", true); }else{ $('input:checkbox[name="idxsc"]').prop("checked", false); } }); $('.trEffect').hover( function(){ if($(this).css("background-color") != "rgb(192, 224, 239)" && $(this).css("background-color").toUpperCase() != "#C0E0EF"){ $(this).attr("style", "background-color: #D1FFCA"); } }, function(){ if($(this).css("background-color") == "rgb(209, 255, 202)" || $(this).css("background-color").toUpperCase() == "#D1FFCA"){ $(this).attr("style", "background-color: #F7F7F7"); } } ); $(".engNumOnly").css('imeMode', 'disabled').keyup(function(event){ if (!(event.keyCode >=37 && event.keyCode<=40)) { var inputVal = $(this).val(); $(this).val(inputVal.replace(/[^a-z0-9]/gi,'')); } }); $(".numOnly").css('imeMode', 'disabled').keyup(function(event){ if (!(event.keyCode >=37 && event.keyCode<=40)) { var inputVal = $(this).val(); $(this).val(inputVal.replace(/[^0-9]/gi,'')); } }); $(".engOnly").css('imeMode', 'disabled').keyup(function(event){ if (!(event.keyCode >=37 && event.keyCode<=40)) { var inputVal = $(this).val(); $(this).val(inputVal.replace(/[^a-z]/gi,'')); } }); $(".korOnly").keyup(function(event){ if (!(event.keyCode >=37 && event.keyCode<=40)) { var inputVal = $(this).val(); $(this).val(inputVal.replace(/[a-z0-9]/gi,'')); } }); $(".numComma").blur(function(){ $(this).val($.number($(this).val())); }); /* $('.numOnly').css('imeMode', 'disabled').keypress(function(event) { if(event.which && (event.which > 47 && event.which < 58 || event.which == 8)) { }else{ event.preventDefault(); } }).keyup(function(){ if($(this).val() != null && $(this).val() != '' ) { $(this).val($(this).val().replace(/[^0-9]/g, '')); } }); */ $('.specialKeyNot').keypress(function(event) { if ((event.keyCode > 32 && event.keyCode < 48) || (event.keyCode > 57 && event.keyCode < 65) || (event.keyCode > 90 && event.keyCode < 97)){ event.preventDefault(); } }); $("#from").datepicker({ dateFormat : "yy-mm-dd", defaultDate: "+1w", changeYear: true, changeMonth: true, numberOfMonths: 3, onClose: function(selectedDate) { $("#to").datepicker("option", "minDate", selectedDate); } }); $("#to").datepicker({ dateFormat : "yy-mm-dd", defaultDate: "+1w", changeYear: true, changeMonth: true, numberOfMonths: 3, onClose: function(selectedDate) { $("#from").datepicker("option", "maxDate", selectedDate); } }); $("#bbsDataRegDate").datepicker({ dateFormat : "yy-mm-dd", defaultDate: "+1w", changeYear: true, changeMonth: true, numberOfMonths: 3 }); var controlClick = false; $("#lmControl").on('click', function(){ if(!controlClick){ controlClick = true; $("#lmControl > img").attr("src", "/img/common/left_on.gif"); $("#lmContainer").hide(); $(".menu_on").addClass("menu_off"); $(".menu_off").removeClass("menu_on"); $(".iconmWrap").css("margin-left", "49px"); //1204 x 768 사이즈 if($(".widthClose").length > 0){ if($(".listTable").width() < 740){ $(".listTable > colgroup > col").each(function(index, item) { if($(item).attr("data-seed") != undefined && $(item).attr("data-seed") != "undefined"){ var widths = $(item).attr("data-seed").split(":"); $(item).width(widths[1]+"%"); false; } }); $(".widthClose").hide(); }else{ $(".listTable > colgroup > col").each(function(index, item) { if($(item).attr("data-seed") != undefined && $(item).attr("data-seed") != "undefined"){ var widths = $(item).attr("data-seed").split(":"); $(item).width(widths[0]+"%"); false; } }); $(".widthClose").show(); } } }else{ controlClick = false; $("#lmControl > img").attr("src", "/img/common/left_off.gif"); $("#lmContainer").fadeIn(); $(".menu_off").addClass("menu_on"); $(".menu_on").removeClass("menu_off"); $(".iconmWrap").css("margin-left", "222px"); //1204 x 768 사이즈 if($(".widthClose").length > 0){ if($(".listTable").width() < 740){ $(".listTable > colgroup > col").each(function(index, item) { if($(item).attr("data-seed") != undefined && $(item).attr("data-seed") != "undefined"){ var widths = $(item).attr("data-seed").split(":"); $(item).width(widths[1]+"%"); false; } }); $(".widthClose").hide(); }else{ $(".listTable > colgroup > col").each(function(index, item) { if($(item).attr("data-seed") != undefined && $(item).attr("data-seed") != "undefined"){ var widths = $(item).attr("data-seed").split(":"); $(item).width(widths[0]+"%"); false; } }); $(".widthClose").show(); } } } }); //1204 x 768 사이즈 if($(".widthClose").length > 0){ if($(".listTable").width() < 740){ $(".listTable > colgroup > col").each(function(index, item) { if($(item).attr("data-seed") != undefined && $(item).attr("data-seed") != "undefined"){ var widths = $(item).attr("data-seed").split(":"); $(item).width(widths[1]+"%"); false; } }); $(".widthClose").hide(); } } }); /**************************************/ /* validation Check /* /* param: /* ob : 해당 객체 셀렉조건 /* msg : 커스텀콜백 사용안할시 얼럿 메시지 /* customOptions : max(최대), min(최소), password(비번스타일), consecutively(연속문자체크), consecutivelyNum(연속문자수), number(숫자형) /* customCallback : 첫번째 파라미터로 에러처리 /* 0 : 길이 체크 에러 /* 1 : 특수문자 체크 에러 (password시) /* 2 : 숫자 체크 에러 (password시) /* 3 : 연속된 문자 체크에러 (consecutivelyNum시) /* 4 : 숫자형일때 체크에러 (number 시) /* /**************************************/ function validation(ob, msg, customOptions, customCallback){ var options = { max : 16, // 최대 글자수 min : 9, // 최소 글자수 password : true, // 비밀번호 패턴 특수문자, 숫자 포함하기 consecutively : true, // 연속된 문자 방지하기 consecutivelyNum : 3 // 연속된 문자 제한수 }; $.extend(options, customOptions); var callback = function(i,e){ if( typeof customCallback == "function" ){ customCallback.prototype = {id:ob}; new customCallback(i); }else{ alert(msg); $(ob).focus(); } }; var value = $(ob).val(); //최소, 최대값 체크하기. (빈값체크) if( value.length < options.min || value.length > options.max ){ callback(0,"Error 최소 최대값 체크" + options.min + " < " + value.length + " < "+ options.max); return false; } //패스워드 스타일 체크 특수문자, 숫자 필수 if(options.password){ var special_pattern = /[`~!@+_#$%^&*|\\\'\";:\/?]/gi; if( special_pattern.test(value) == false ){ callback(1,"Error 특수문자가 없을 때 " +value); return false; } special_pattern = /[0-9]/gi; if( special_pattern.test(value) == false ){ callback(2,"Error 숫자가 없을 때 "+value); return false; } } //연속된 문자 체크 if(options.consecutively){ var t = ""; var c = 0; for(var i=0; i