commit
This commit is contained in:
1325
kngil/js/faq/faq_common.js
Normal file
1325
kngil/js/faq/faq_common.js
Normal file
File diff suppressed because it is too large
Load Diff
256
kngil/js/faq/faq_popup.js
Normal file
256
kngil/js/faq/faq_popup.js
Normal file
@@ -0,0 +1,256 @@
|
||||
window.onload = function() {
|
||||
$.ajax({
|
||||
url: "some_api_endpoint",
|
||||
success: function(response) {
|
||||
},
|
||||
complete: function() {
|
||||
|
||||
// 팝업 닫기버튼
|
||||
$(document).ready(function() {
|
||||
$('.btn_close').click(function() {
|
||||
$('.popup_wrap').hide();
|
||||
$('body').css('overflow', ''); // 기본 스크롤 상태로 복귀
|
||||
lenis.start();
|
||||
console.log('lenis 재시작')
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.btn_map_close').click(function() {
|
||||
$('.popup_sitemap').hide();
|
||||
$('body').css('overflow', ''); // 기본 스크롤 상태로 복귀
|
||||
lenis.start();
|
||||
console.log('lenis 재시작')
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
// 이메일 직접입력
|
||||
$(document).ready(function() {
|
||||
$('#domain-list').change(function() {
|
||||
if ($(this).val() === 'type') {
|
||||
$('#custom-domain').show().focus();
|
||||
} else {
|
||||
$('#custom-domain').hide().val('');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 인증번호 타이머
|
||||
$(document).ready(function() {
|
||||
// 인증번호 버튼 클릭 시
|
||||
$('.cert_number').click(function() {
|
||||
$('.code').show();
|
||||
});
|
||||
|
||||
// 확인 버튼 클릭 시
|
||||
$('.check').click(function() {
|
||||
$(this).hide();
|
||||
$('.check.complete').show();
|
||||
clearInterval(interval); // 타이머 멈춤
|
||||
$('.timer').remove(); // 타이머 요소 삭제
|
||||
});
|
||||
|
||||
// 타이머 함수
|
||||
var interval;
|
||||
function startTimer(duration, display) {
|
||||
clearInterval(interval);
|
||||
var timer = duration, minutes, seconds;
|
||||
|
||||
function updateTimer() {
|
||||
minutes = parseInt(timer / 60, 10);
|
||||
seconds = parseInt(timer % 60, 10);
|
||||
|
||||
minutes = minutes < 10 ? "0" + minutes : minutes;
|
||||
seconds = seconds < 10 ? "0" + seconds : seconds;
|
||||
|
||||
display.text(minutes + ":" + seconds);
|
||||
|
||||
if (--timer < 0) {
|
||||
clearInterval(interval);
|
||||
display.text("00:00");
|
||||
}
|
||||
}
|
||||
|
||||
updateTimer();
|
||||
interval = setInterval(updateTimer, 1000);
|
||||
}
|
||||
|
||||
var threeMinutes = 60 * 3,
|
||||
display = $('.timer');
|
||||
|
||||
startTimer(threeMinutes, display);
|
||||
|
||||
$('.cert_number').click(function() {
|
||||
startTimer(threeMinutes, display);
|
||||
});
|
||||
});
|
||||
|
||||
// 아이디찾기
|
||||
$(document).ready(function(){
|
||||
$('.find_email').click(function(){
|
||||
$('.find_ph').removeClass('on').prop('checked', false);
|
||||
$(this).addClass('on').prop('checked', true);
|
||||
$('.ph').hide();
|
||||
$('.email').show();
|
||||
});
|
||||
|
||||
$('.find_ph').click(function(){
|
||||
$('.find_email').removeClass('on').prop('checked', false);
|
||||
$(this).addClass('on').prop('checked', true);
|
||||
$('.email').hide();
|
||||
$('.ph').show();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.btn_id').on('click', function() {
|
||||
$('.btn_id').addClass('on');
|
||||
$('.btn_pw').removeClass('on');
|
||||
$('.content.id').show();
|
||||
$('.content.pw').hide();
|
||||
});
|
||||
|
||||
$('.btn_pw').on('click', function() {
|
||||
$('.btn_pw').addClass('on');
|
||||
$('.btn_id').removeClass('on');
|
||||
$('.content.pw').show();
|
||||
$('.content.id').hide();
|
||||
});
|
||||
|
||||
$('#domain-list').on('change', function() {
|
||||
if ($(this).val() === 'type') {
|
||||
$('#custom-domain').show();
|
||||
} else {
|
||||
$('#custom-domain').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 전체약관동의
|
||||
// $(document).ready(function() {
|
||||
// function toggleJoinButton() {
|
||||
// // 모든 개별 체크박스가 체크되었는지 확인
|
||||
// var allChecked = $('.terms_wrap input[type="checkbox"]').length === $('.terms_wrap input[type="checkbox"]:checked').length;
|
||||
|
||||
// // '약관에 모두 동의합니다' 체크박스 상태에 따라 조정
|
||||
// $('.checkbox_wrap.all input[type="checkbox"]').prop('checked', allChecked);
|
||||
|
||||
// // 모든 체크박스가 체크되지 않은 경우 버튼에 'none' 클래스 추가하고 disabled 속성 추가
|
||||
// if (allChecked) {
|
||||
// $('.join_btn_wrap').removeClass('none');
|
||||
// $('.join_btn_wrap button').prop('disabled', false);
|
||||
// } else {
|
||||
// $('.join_btn_wrap').addClass('none');
|
||||
// $('.join_btn_wrap button').prop('disabled', true);
|
||||
// }
|
||||
// }
|
||||
|
||||
// // '약관에 모두 동의합니다' 체크박스의 변경 이벤트
|
||||
// $('.checkbox_wrap.all input[type="checkbox"]').on('change', function() {
|
||||
// var isChecked = $(this).is(':checked');
|
||||
// $('.terms_wrap input[type="checkbox"]').prop('checked', isChecked);
|
||||
// toggleJoinButton(); // 버튼 상태 업데이트
|
||||
// });
|
||||
|
||||
// // 각 terms_wrap의 개별 체크박스 변경 이벤트
|
||||
// $('.terms_wrap input[type="checkbox"]').on('change', function() {
|
||||
// toggleJoinButton(); // 버튼 상태 업데이트
|
||||
// });
|
||||
|
||||
// // 초기 상태 설정
|
||||
// toggleJoinButton();
|
||||
// });
|
||||
|
||||
// 전체약관동의 수정 250813
|
||||
(function ($) {
|
||||
if (window.__agreeBound) return; // 중복 바인딩 방지
|
||||
window.__agreeBound = true;
|
||||
|
||||
const $container = $('#pop_agreement');
|
||||
const $items = $container.find('.terms_wrap input[type="checkbox"]'); // agree11, agree21
|
||||
const $all = $container.find('.checkbox_wrap.all input[type="checkbox"]');
|
||||
const $btn = $container.find('#btn_agree');
|
||||
|
||||
function syncAll() {
|
||||
const allChecked = $items.length > 0 && $items.filter(':checked').length === $items.length;
|
||||
$all.prop('checked', allChecked);
|
||||
// 버튼은 disable 하지 않음 (스타일만 조정하고 싶다면 클래스만 토글)
|
||||
// $('.join_btn_wrap').toggleClass('none', !allChecked); <-- 필요 없으면 제거
|
||||
}
|
||||
|
||||
// 전체동의 → 개별
|
||||
$all.on('change', function () {
|
||||
const on = $(this).is(':checked');
|
||||
$items.prop('checked', on);
|
||||
syncAll();
|
||||
});
|
||||
|
||||
// 개별 → 전체동의 동기화
|
||||
$items.on('change', syncAll);
|
||||
|
||||
// 동의 버튼 클릭 시에만 검사
|
||||
$btn.off('click.agree').on('click.agree', function (e) {
|
||||
e.preventDefault();
|
||||
const allChecked = $items.filter(':checked').length === $items.length;
|
||||
if (!allChecked) {
|
||||
alert('약관에 모두 동의해주세요.');
|
||||
return false;
|
||||
}
|
||||
// 통과 시 다음 단계로 진행(필요 시 주석 해제)
|
||||
// $('#pop_agreement').hide();
|
||||
// $('#pop_register_form').show();
|
||||
// $('body').css('overflow','hidden');
|
||||
});
|
||||
|
||||
// 외부에서 팝업 열 때 상태 초기화가 필요하면 이 함수 호출
|
||||
window.resetAgreementUI = function () {
|
||||
$items.prop('checked', false);
|
||||
$all.prop('checked', false);
|
||||
syncAll();
|
||||
// 버튼은 항상 활성
|
||||
$('#btn_agree, #fregister button[type=submit]')
|
||||
.prop('disabled', false)
|
||||
.css('pointer-events', 'auto');
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
||||
// 가입완료
|
||||
$(document).ready(function() {
|
||||
$('.join.completion .join_btn_wrap button').click(function() {
|
||||
$('.pop_input_wrap form').children().not('.messages').hide();
|
||||
$('.messages').show();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.join.completion .join_btn_wrap button').click(function() {
|
||||
$('.pop_input_wrap form').children().not('.messages').hide();
|
||||
$('.messages').show();
|
||||
|
||||
// 세 번째 단계에 'on' 클래스 추가하고, 다른 단계에서 'on' 클래스 제거
|
||||
$('.join_progress .join_step').removeClass('on');
|
||||
$('.join_progress .join_step').eq(2).addClass('on');
|
||||
});
|
||||
});
|
||||
|
||||
// 개인정보 보호정책 스크립트
|
||||
$(document).ready(function() {
|
||||
$('.tab_privacy').on('click', function() {
|
||||
$(this).addClass('on');
|
||||
$('.tab_agreement').removeClass('on');
|
||||
$('.content.pri').addClass('show').removeClass('hide');
|
||||
$('.content.agr').removeClass('show').addClass('hide');
|
||||
});
|
||||
$('.tab_agreement').on('click', function() {
|
||||
$(this).addClass('on');
|
||||
$('.tab_privacy').removeClass('on');
|
||||
$('.content.agr').addClass('show').removeClass('hide');
|
||||
$('.content.pri').removeClass('show').addClass('hide');
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
5
kngil/js/faq/jquery-1.12.4.min.js
vendored
Normal file
5
kngil/js/faq/jquery-1.12.4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
kngil/js/faq/jquery-3.6.1.min.js
vendored
Normal file
2
kngil/js/faq/jquery-3.6.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
kngil/js/faq/jquery-migrate-1.4.1.min.js
vendored
Normal file
2
kngil/js/faq/jquery-migrate-1.4.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1374
kngil/js/faq/jquery.bxslider.js
Normal file
1374
kngil/js/faq/jquery.bxslider.js
Normal file
File diff suppressed because it is too large
Load Diff
109
kngil/js/faq/jquery.menu.js
Normal file
109
kngil/js/faq/jquery.menu.js
Normal file
@@ -0,0 +1,109 @@
|
||||
$(function(){
|
||||
var hide_menu = false;
|
||||
var mouse_event = false;
|
||||
var oldX = oldY = 0;
|
||||
|
||||
$(document).mousemove(function(e) {
|
||||
if(oldX == 0) {
|
||||
oldX = e.pageX;
|
||||
oldY = e.pageY;
|
||||
}
|
||||
|
||||
if(oldX != e.pageX || oldY != e.pageY) {
|
||||
mouse_event = true;
|
||||
}
|
||||
});
|
||||
|
||||
// 주메뉴
|
||||
var $gnb = $(".gnb_1dli > a");
|
||||
$gnb.mouseover(function() {
|
||||
if(mouse_event) {
|
||||
$("#hd").addClass("hd_zindex");
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||
menu_rearrange($(this).parent());
|
||||
hide_menu = false;
|
||||
}
|
||||
});
|
||||
|
||||
$gnb.mouseout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$(".gnb_2dli").mouseover(function() {
|
||||
hide_menu = false;
|
||||
});
|
||||
|
||||
$(".gnb_2dli").mouseout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$gnb.focusin(function() {
|
||||
$("#hd").addClass("hd_zindex");
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||
menu_rearrange($(this).parent());
|
||||
hide_menu = false;
|
||||
});
|
||||
|
||||
$gnb.focusout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$(".gnb_2da").focusin(function() {
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
var $gnb_li = $(this).closest(".gnb_1dli").addClass("gnb_1dli_over gnb_1dli_on");
|
||||
menu_rearrange($(this).closest(".gnb_1dli"));
|
||||
hide_menu = false;
|
||||
});
|
||||
|
||||
$(".gnb_2da").focusout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$('#gnb_1dul>li').bind('mouseleave',function(){
|
||||
submenu_hide();
|
||||
});
|
||||
|
||||
$(document).bind('click focusin',function(){
|
||||
if(hide_menu) {
|
||||
submenu_hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function submenu_hide() {
|
||||
$("#hd").removeClass("hd_zindex");
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
}
|
||||
|
||||
function menu_rearrange(el)
|
||||
{
|
||||
var width = $("#gnb_1dul").width();
|
||||
var left = w1 = w2 = 0;
|
||||
var idx = $(".gnb_1dli").index(el);
|
||||
var max_menu_count = 0;
|
||||
var $gnb_1dli;
|
||||
|
||||
for(i=0; i<=idx; i++) {
|
||||
$gnb_1dli = $(".gnb_1dli:eq("+i+")");
|
||||
w1 = $gnb_1dli.outerWidth();
|
||||
|
||||
if($gnb_1dli.find(".gnb_2dul").length)
|
||||
w2 = $gnb_1dli.find(".gnb_2dli > a").outerWidth(true);
|
||||
else
|
||||
w2 = w1;
|
||||
|
||||
if((left + w2) > width) {
|
||||
if(max_menu_count == 0)
|
||||
max_menu_count = i + 1;
|
||||
}
|
||||
|
||||
if(max_menu_count > 0 && (idx + 1) % max_menu_count == 0) {
|
||||
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
|
||||
left = 0;
|
||||
} else {
|
||||
left += w1;
|
||||
}
|
||||
}
|
||||
}
|
||||
5
kngil/js/faq/jquery.mousewheel.min.js
vendored
Normal file
5
kngil/js/faq/jquery.mousewheel.min.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* jQuery Mousewheel 3.1.13
|
||||
* Copyright OpenJS Foundation and other contributors
|
||||
*/
|
||||
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(a){var u,r,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in window.document||9<=window.document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],f=Array.prototype.slice;if(a.event.fixHooks)for(var n=e.length;n;)a.event.fixHooks[e[--n]]=a.event.mouseHooks;var d=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],i,!1);else this.onmousewheel=i;a.data(this,"mousewheel-line-height",d.getLineHeight(this)),a.data(this,"mousewheel-page-height",d.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=a(e),e=t["offsetParent"in a.fn?"offsetParent":"parent"]();return e.length||(e=a("body")),parseInt(e.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return a(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=f.call(arguments,1),o=0,l=0,s=0,h=0;if((e=a.event.fix(n)).type="mousewheel","detail"in n&&(s=-1*n.detail),"wheelDelta"in n&&(s=n.wheelDelta),"wheelDeltaY"in n&&(s=n.wheelDeltaY),"wheelDeltaX"in n&&(l=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(l=-1*s,s=0),o=0===s?l:s,"deltaY"in n&&(o=s=-1*n.deltaY),"deltaX"in n&&(l=n.deltaX,0===s&&(o=-1*l)),0!==s||0!==l)return 1===n.deltaMode?(o*=t=a.data(this,"mousewheel-line-height"),s*=t,l*=t):2===n.deltaMode&&(o*=t=a.data(this,"mousewheel-page-height"),s*=t,l*=t),h=Math.max(Math.abs(s),Math.abs(l)),(!r||h<r)&&c(n,r=h)&&(r/=40),c(n,h)&&(o/=40,l/=40,s/=40),o=Math[1<=o?"floor":"ceil"](o/r),l=Math[1<=l?"floor":"ceil"](l/r),s=Math[1<=s?"floor":"ceil"](s/r),d.settings.normalizeOffset&&this.getBoundingClientRect&&(h=this.getBoundingClientRect(),e.offsetX=e.clientX-h.left,e.offsetY=e.clientY-h.top),e.deltaX=l,e.deltaY=s,e.deltaFactor=r,e.deltaMode=0,i.unshift(e,o,l,s),u&&window.clearTimeout(u),u=window.setTimeout(w,200),(a.event.dispatch||a.event.handle).apply(this,i)}function w(){r=null}function c(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}a.fn.extend({mousewheel:function(e){return e?this.on("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.off("mousewheel",e)}})});
|
||||
7
kngil/js/faq/owl.carousel.min.js
vendored
Normal file
7
kngil/js/faq/owl.carousel.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
186
kngil/js/faq/owlcarousel/owl.carousel.css
Normal file
186
kngil/js/faq/owlcarousel/owl.carousel.css
Normal file
@@ -0,0 +1,186 @@
|
||||
/**
|
||||
* Owl Carousel v2.3.4
|
||||
* Copyright 2013-2018 David Deutsch
|
||||
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
||||
*/
|
||||
/*
|
||||
* Owl Carousel - Core
|
||||
*/
|
||||
.owl-carousel {
|
||||
display: none;
|
||||
width: 100%;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
/* position relative and z-index fix webkit rendering fonts issue */
|
||||
position: relative;
|
||||
z-index: 1; }
|
||||
.owl-carousel .owl-stage {
|
||||
position: relative;
|
||||
-ms-touch-action: pan-Y;
|
||||
touch-action: manipulation;
|
||||
-moz-backface-visibility: hidden;
|
||||
/* fix firefox animation glitch */ }
|
||||
.owl-carousel .owl-stage:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0; }
|
||||
.owl-carousel .owl-stage-outer {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
/* fix for flashing background */
|
||||
-webkit-transform: translate3d(0px, 0px, 0px); }
|
||||
.owl-carousel .owl-wrapper,
|
||||
.owl-carousel .owl-item {
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
-ms-backface-visibility: hidden;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0); }
|
||||
.owl-carousel .owl-item {
|
||||
position: relative;
|
||||
min-height: 1px;
|
||||
float: left;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-touch-callout: none; }
|
||||
.owl-carousel .owl-item img {
|
||||
display: block;
|
||||
width: 100%; }
|
||||
.owl-carousel .owl-nav.disabled,
|
||||
.owl-carousel .owl-dots.disabled {
|
||||
display: none; }
|
||||
.owl-carousel .owl-nav .owl-prev,
|
||||
.owl-carousel .owl-nav .owl-next,
|
||||
.owl-carousel .owl-dot {
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
.owl-carousel .owl-nav button.owl-prev,
|
||||
.owl-carousel .owl-nav button.owl-next,
|
||||
.owl-carousel button.owl-dot {
|
||||
background: none;
|
||||
color: inherit;
|
||||
border: none;
|
||||
padding: 0 !important;
|
||||
font: inherit; }
|
||||
.owl-carousel.owl-loaded {
|
||||
display: block; }
|
||||
.owl-carousel.owl-loading {
|
||||
opacity: 0;
|
||||
display: block; }
|
||||
.owl-carousel.owl-hidden {
|
||||
opacity: 0; }
|
||||
.owl-carousel.owl-refresh .owl-item {
|
||||
visibility: hidden; }
|
||||
.owl-carousel.owl-drag .owl-item {
|
||||
-ms-touch-action: pan-y;
|
||||
touch-action: pan-y;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
.owl-carousel.owl-grab {
|
||||
cursor: move;
|
||||
cursor: grab; }
|
||||
.owl-carousel.owl-rtl {
|
||||
direction: rtl; }
|
||||
.owl-carousel.owl-rtl .owl-item {
|
||||
float: right; }
|
||||
|
||||
/* No Js */
|
||||
.no-js .owl-carousel {
|
||||
display: block; }
|
||||
|
||||
/*
|
||||
* Owl Carousel - Animate Plugin
|
||||
*/
|
||||
.owl-carousel .animated {
|
||||
animation-duration: 1000ms;
|
||||
animation-fill-mode: both; }
|
||||
|
||||
.owl-carousel .owl-animated-in {
|
||||
z-index: 0; }
|
||||
|
||||
.owl-carousel .owl-animated-out {
|
||||
z-index: 1; }
|
||||
|
||||
.owl-carousel .fadeOut {
|
||||
animation-name: fadeOut; }
|
||||
|
||||
@keyframes fadeOut {
|
||||
0% {
|
||||
opacity: 1; }
|
||||
100% {
|
||||
opacity: 0; } }
|
||||
|
||||
/*
|
||||
* Owl Carousel - Auto Height Plugin
|
||||
*/
|
||||
.owl-height {
|
||||
transition: height 500ms ease-in-out; }
|
||||
|
||||
/*
|
||||
* Owl Carousel - Lazy Load Plugin
|
||||
*/
|
||||
.owl-carousel .owl-item {
|
||||
/**
|
||||
This is introduced due to a bug in IE11 where lazy loading combined with autoheight plugin causes a wrong
|
||||
calculation of the height of the owl-item that breaks page layouts
|
||||
*/ }
|
||||
.owl-carousel .owl-item .owl-lazy {
|
||||
opacity: 0;
|
||||
transition: opacity 400ms ease; }
|
||||
.owl-carousel .owl-item .owl-lazy[src^=""], .owl-carousel .owl-item .owl-lazy:not([src]) {
|
||||
max-height: 0; }
|
||||
.owl-carousel .owl-item img.owl-lazy {
|
||||
transform-style: preserve-3d; }
|
||||
|
||||
/*
|
||||
* Owl Carousel - Video Plugin
|
||||
*/
|
||||
.owl-carousel .owl-video-wrapper {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
background: #000; }
|
||||
|
||||
.owl-carousel .owl-video-play-icon {
|
||||
position: absolute;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -40px;
|
||||
margin-top: -40px;
|
||||
background: url("owl.video.play.png") no-repeat;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
-webkit-backface-visibility: hidden;
|
||||
transition: transform 100ms ease; }
|
||||
|
||||
.owl-carousel .owl-video-play-icon:hover {
|
||||
-ms-transform: scale(1.3, 1.3);
|
||||
transform: scale(1.3, 1.3); }
|
||||
|
||||
.owl-carousel .owl-video-playing .owl-video-tn,
|
||||
.owl-carousel .owl-video-playing .owl-video-play-icon {
|
||||
display: none; }
|
||||
|
||||
.owl-carousel .owl-video-tn {
|
||||
opacity: 0;
|
||||
height: 100%;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
transition: opacity 400ms ease; }
|
||||
|
||||
.owl-carousel .owl-video-frame {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
height: 100%;
|
||||
width: 100%; }
|
||||
3448
kngil/js/faq/owlcarousel/owl.carousel.js
Normal file
3448
kngil/js/faq/owlcarousel/owl.carousel.js
Normal file
File diff suppressed because it is too large
Load Diff
6
kngil/js/faq/owlcarousel/owl.carousel.min.css
vendored
Normal file
6
kngil/js/faq/owlcarousel/owl.carousel.min.css
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Owl Carousel v2.3.4
|
||||
* Copyright 2013-2018 David Deutsch
|
||||
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
||||
*/
|
||||
.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
|
||||
7
kngil/js/faq/owlcarousel/owl.carousel.min.js
vendored
Normal file
7
kngil/js/faq/owlcarousel/owl.carousel.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
kngil/js/faq/owlcarousel/owl.video.play.png
Normal file
BIN
kngil/js/faq/owlcarousel/owl.video.play.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
25
kngil/js/faq/placeholders.min.js
vendored
Normal file
25
kngil/js/faq/placeholders.min.js
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/* Placeholders.js v4.0.1 */
|
||||
/*!
|
||||
* The MIT License
|
||||
*
|
||||
* Copyright (c) 2012 James Allardice
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
!function(a){"use strict";function b(){}function c(){try{return document.activeElement}catch(a){}}function d(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return!0;return!1}function e(a,b,c){return a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):void 0}function f(a,b){var c;a.createTextRange?(c=a.createTextRange(),c.move("character",b),c.select()):a.selectionStart&&(a.focus(),a.setSelectionRange(b,b))}function g(a,b){try{return a.type=b,!0}catch(c){return!1}}function h(a,b){if(a&&a.getAttribute(B))b(a);else for(var c,d=a?a.getElementsByTagName("input"):N,e=a?a.getElementsByTagName("textarea"):O,f=d?d.length:0,g=e?e.length:0,h=f+g,i=0;h>i;i++)c=f>i?d[i]:e[i-f],b(c)}function i(a){h(a,k)}function j(a){h(a,l)}function k(a,b){var c=!!b&&a.value!==b,d=a.value===a.getAttribute(B);if((c||d)&&"true"===a.getAttribute(C)){a.removeAttribute(C),a.value=a.value.replace(a.getAttribute(B),""),a.className=a.className.replace(A,"");var e=a.getAttribute(I);parseInt(e,10)>=0&&(a.setAttribute("maxLength",e),a.removeAttribute(I));var f=a.getAttribute(D);return f&&(a.type=f),!0}return!1}function l(a){var b=a.getAttribute(B);if(""===a.value&&b){a.setAttribute(C,"true"),a.value=b,a.className+=" "+z;var c=a.getAttribute(I);c||(a.setAttribute(I,a.maxLength),a.removeAttribute("maxLength"));var d=a.getAttribute(D);return d?a.type="text":"password"===a.type&&g(a,"text")&&a.setAttribute(D,"password"),!0}return!1}function m(a){return function(){P&&a.value===a.getAttribute(B)&&"true"===a.getAttribute(C)?f(a,0):k(a)}}function n(a){return function(){l(a)}}function o(a){return function(){i(a)}}function p(a){return function(b){return v=a.value,"true"===a.getAttribute(C)&&v===a.getAttribute(B)&&d(x,b.keyCode)?(b.preventDefault&&b.preventDefault(),!1):void 0}}function q(a){return function(){k(a,v),""===a.value&&(a.blur(),f(a,0))}}function r(a){return function(){a===c()&&a.value===a.getAttribute(B)&&"true"===a.getAttribute(C)&&f(a,0)}}function s(a){var b=a.form;b&&"string"==typeof b&&(b=document.getElementById(b),b.getAttribute(E)||(e(b,"submit",o(b)),b.setAttribute(E,"true"))),e(a,"focus",m(a)),e(a,"blur",n(a)),P&&(e(a,"keydown",p(a)),e(a,"keyup",q(a)),e(a,"click",r(a))),a.setAttribute(F,"true"),a.setAttribute(B,T),(P||a!==c())&&l(a)}var t=document.createElement("input"),u=void 0!==t.placeholder;if(a.Placeholders={nativeSupport:u,disable:u?b:i,enable:u?b:j},!u){var v,w=["text","search","url","tel","email","password","number","textarea"],x=[27,33,34,35,36,37,38,39,40,8,46],y="#ccc",z="placeholdersjs",A=new RegExp("(?:^|\\s)"+z+"(?!\\S)"),B="data-placeholder-value",C="data-placeholder-active",D="data-placeholder-type",E="data-placeholder-submit",F="data-placeholder-bound",G="data-placeholder-focus",H="data-placeholder-live",I="data-placeholder-maxlength",J=100,K=document.getElementsByTagName("head")[0],L=document.documentElement,M=a.Placeholders,N=document.getElementsByTagName("input"),O=document.getElementsByTagName("textarea"),P="false"===L.getAttribute(G),Q="false"!==L.getAttribute(H),R=document.createElement("style");R.type="text/css";var S=document.createTextNode("."+z+" {color:"+y+";}");R.styleSheet?R.styleSheet.cssText=S.nodeValue:R.appendChild(S),K.insertBefore(R,K.firstChild);for(var T,U,V=0,W=N.length+O.length;W>V;V++)U=V<N.length?N[V]:O[V-N.length],T=U.attributes.placeholder,T&&(T=T.nodeValue,T&&d(w,U.type)&&s(U));var X=setInterval(function(){for(var a=0,b=N.length+O.length;b>a;a++)U=a<N.length?N[a]:O[a-N.length],T=U.attributes.placeholder,T?(T=T.nodeValue,T&&d(w,U.type)&&(U.getAttribute(F)||s(U),(T!==U.getAttribute(B)||"password"===U.type&&!U.getAttribute(D))&&("password"===U.type&&!U.getAttribute(D)&&g(U,"text")&&U.setAttribute(D,"password"),U.value===U.getAttribute(B)&&(U.value=T),U.setAttribute(B,T)))):U.getAttribute(C)&&(k(U),U.removeAttribute(B));Q||clearInterval(X)},J);e(a,"beforeunload",function(){M.disable()})}}(this);
|
||||
371
kngil/js/faq/wrest.js
Normal file
371
kngil/js/faq/wrest.js
Normal file
@@ -0,0 +1,371 @@
|
||||
var wrestMsg = "";
|
||||
var wrestFld = null;
|
||||
var wrestFldDefaultColor = "";
|
||||
//var wrestFldBackColor = "#ff3061";
|
||||
|
||||
// subject 속성값을 얻어 return, 없으면 tag의 name을 넘김
|
||||
function wrestItemname(fld)
|
||||
{
|
||||
//return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("alt") ? fld.getAttribute("alt") : fld.name );
|
||||
var id = fld.getAttribute("id");
|
||||
var labels = document.getElementsByTagName("label");
|
||||
var el = null;
|
||||
|
||||
for(i=0; i<labels.length; i++) {
|
||||
if(id == labels[i].htmlFor) {
|
||||
el = labels[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(el != null) {
|
||||
var text = el.innerHTML.replace(/[<].*[>].*[<]\/+.*[>]/gi, "");
|
||||
|
||||
if(text == '') {
|
||||
return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("placeholder") ? fld.getAttribute("placeholder") : fld.name );
|
||||
} else {
|
||||
return text;
|
||||
}
|
||||
} else {
|
||||
return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("placeholder") ? fld.getAttribute("placeholder") : fld.name );
|
||||
}
|
||||
}
|
||||
|
||||
// 양쪽 공백 없애기
|
||||
function wrestTrim(fld)
|
||||
{
|
||||
var pattern = /(^\s+)|(\s+$)/g; // \s 공백 문자
|
||||
return fld.value.replace(pattern, "");
|
||||
}
|
||||
|
||||
// 필수 입력 검사
|
||||
function wrestRequired(fld)
|
||||
{
|
||||
if (wrestTrim(fld) == "") {
|
||||
if (wrestFld == null) {
|
||||
// 셀렉트박스일 경우에도 필수 선택 검사합니다.
|
||||
wrestMsg = wrestItemname(fld) + " : 필수 "+(fld.type=="select-one"?"선택":"입력")+"입니다.\n";
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 김선용 2006.3 - 전화번호(휴대폰) 형식 검사 : 123-123(4)-5678
|
||||
function wrestTelNum(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var pattern = /^[0-9]{2,3}-[0-9]{3,4}-[0-9]{4}$/;
|
||||
if(!pattern.test(fld.value)){
|
||||
if(wrestFld == null){
|
||||
wrestMsg = wrestItemname(fld)+" : 전화번호 형식이 올바르지 않습니다.\n\n하이픈(-)을 포함하여 입력하세요.\n";
|
||||
wrestFld = fld;
|
||||
fld.select();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 이메일주소 형식 검사
|
||||
function wrestEmail(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
//var pattern = /(\S+)@(\S+)\.(\S+)/; 이메일주소에 한글 사용시
|
||||
var pattern = /([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/;
|
||||
if (!pattern.test(fld.value)) {
|
||||
if (wrestFld == null) {
|
||||
wrestMsg = wrestItemname(fld) + " : 이메일주소 형식이 아닙니다.\n";
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 한글인지 검사 (자음, 모음 조합된 한글만 가능)
|
||||
function wrestHangul(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
//var pattern = /([^가-힣\x20])/i;
|
||||
var pattern = /([^가-힣\x20])/;
|
||||
|
||||
if (pattern.test(fld.value)) {
|
||||
if (wrestFld == null) {
|
||||
wrestMsg = wrestItemname(fld) + ' : 한글이 아닙니다. (자음, 모음 조합된 한글만 가능)\n';
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 한글인지 검사2 (자음, 모음만 있는 한글도 가능)
|
||||
function wrestHangul2(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var pattern = /([^가-힣ㄱ-ㅎㅏ-ㅣ\x20])/i;
|
||||
//var pattern = /([^가-힣ㄱ-ㅎㅏ-ㅣ\x20])/;
|
||||
|
||||
if (pattern.test(fld.value)) {
|
||||
if (wrestFld == null) {
|
||||
wrestMsg = wrestItemname(fld) + ' : 한글이 아닙니다.\n';
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 한글,영문,숫자인지 검사3
|
||||
function wrestHangulAlNum(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var pattern = /([^가-힣\x20^a-z^A-Z^0-9])/i;
|
||||
|
||||
if (pattern.test(fld.value)) {
|
||||
if (wrestFld == null) {
|
||||
wrestMsg = wrestItemname(fld) + ' : 한글, 영문, 숫자가 아닙니다.\n';
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 한글,영문 인지 검사
|
||||
function wrestHangulAlpha(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var pattern = /([^가-힣\x20^a-z^A-Z])/i;
|
||||
|
||||
if (pattern.test(fld.value)) {
|
||||
if (wrestFld == null) {
|
||||
wrestMsg = wrestItemname(fld) + ' : 한글, 영문이 아닙니다.\n';
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 숫자인지검사
|
||||
// 배부른꿀꿀이님 추가 (http://dasir.com) 2003-06-24
|
||||
function wrestNumeric(fld)
|
||||
{
|
||||
if (fld.value.length > 0) {
|
||||
for (i = 0; i < fld.value.length; i++) {
|
||||
if (fld.value.charAt(i) < '0' || fld.value.charAt(i) > '9') {
|
||||
wrestMsg = wrestItemname(fld) + " : 숫자가 아닙니다.\n";
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 영문자 검사
|
||||
// 배부른꿀꿀이님 추가 (http://dasir.com) 2003-06-24
|
||||
function wrestAlpha(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var pattern = /(^[a-zA-Z]+$)/;
|
||||
|
||||
if (!pattern.test(fld.value)) {
|
||||
if (wrestFld == null) {
|
||||
wrestMsg = wrestItemname(fld) + " : 영문이 아닙니다.\n";
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 영문자와 숫자 검사
|
||||
// 배부른꿀꿀이님 추가 (http://dasir.com) 2003-07-07
|
||||
function wrestAlNum(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var pattern = /(^[a-zA-Z0-9]+$)/;
|
||||
|
||||
if (!pattern.test(fld.value)) {
|
||||
if (wrestFld == null) {
|
||||
wrestMsg = wrestItemname(fld) + " : 영문 또는 숫자가 아닙니다.\n";
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 영문자와 숫자 그리고 _ 검사
|
||||
function wrestAlNum_(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var pattern = /(^[a-zA-Z0-9\_]+$)/;
|
||||
|
||||
if (!pattern.test(fld.value)) {
|
||||
if (wrestFld == null) {
|
||||
wrestMsg = wrestItemname(fld) + " : 영문, 숫자, _ 가 아닙니다.\n";
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 최소 길이 검사
|
||||
function wrestMinLength(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var minlength = fld.getAttribute("minlength");
|
||||
|
||||
if (wrestFld == null) {
|
||||
if (fld.value.length < parseInt(minlength)) {
|
||||
wrestMsg = wrestItemname(fld) + " : 최소 "+minlength+"글자 이상 입력하세요.\n";
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 이미지 확장자
|
||||
function wrestImgExt(fld)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var pattern = /\.(gif|jpg|png)$/i; // jpeg 는 제외
|
||||
if(!pattern.test(fld.value)){
|
||||
if(wrestFld == null){
|
||||
wrestMsg = wrestItemname(fld)+" : 이미지 파일이 아닙니다.\n.gif .jpg .png 파일만 가능합니다.\n";
|
||||
wrestFld = fld;
|
||||
fld.select();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 확장자
|
||||
function wrestExtension(fld, css)
|
||||
{
|
||||
if (!wrestTrim(fld)) return;
|
||||
|
||||
var str = css.split("="); // ext=?? <-- str[1]
|
||||
var src = fld.value.split(".");
|
||||
var ext = src[src.length - 1];
|
||||
|
||||
if (wrestFld == null) {
|
||||
if (ext.toLowerCase() < str[1].toLowerCase()) {
|
||||
wrestMsg = wrestItemname(fld) + " : ."+str[1]+" 파일만 가능합니다.\n";
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 공백 검사후 공백을 "" 로 변환
|
||||
function wrestNospace(fld)
|
||||
{
|
||||
var pattern = /(\s)/g; // \s 공백 문자
|
||||
|
||||
if (pattern.test(fld.value)) {
|
||||
if (wrestFld == null) {
|
||||
wrestMsg = wrestItemname(fld) + " : 공백이 없어야 합니다.\n";
|
||||
wrestFld = fld;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// submit 할 때 속성을 검사한다.
|
||||
function wrestSubmit()
|
||||
{
|
||||
wrestMsg = "";
|
||||
wrestFld = null;
|
||||
|
||||
var attr = null;
|
||||
|
||||
// 해당폼에 대한 요소의 개수만큼 돌려라
|
||||
for (var i=0; i<this.elements.length; i++) {
|
||||
var el = this.elements[i];
|
||||
|
||||
// Input tag 의 type 이 text, file, password 일때만
|
||||
// 셀렉트 박스일때도 필수 선택 검사합니다. select-one
|
||||
if (el.type=="text" || el.type=="hidden" || el.type=="file" || el.type=="password" || el.type=="select-one" || el.type=="textarea") {
|
||||
if (el.getAttribute("required") != null) {
|
||||
wrestRequired(el);
|
||||
}
|
||||
|
||||
if (el.getAttribute("minlength") != null) {
|
||||
wrestMinLength(el);
|
||||
}
|
||||
|
||||
var array_css = el.className.split(" "); // class 를 공백으로 나눔
|
||||
|
||||
el.style.backgroundColor = wrestFldDefaultColor;
|
||||
|
||||
// 배열의 길이만큼 돌려라
|
||||
for (var k=0; k<array_css.length; k++) {
|
||||
var css = array_css[k];
|
||||
switch (css) {
|
||||
case "required" : wrestRequired(el); break;
|
||||
case "trim" : wrestTrim(el); break;
|
||||
case "email" : wrestEmail(el); break;
|
||||
case "hangul" : wrestHangul(el); break;
|
||||
case "hangul2" : wrestHangul2(el); break;
|
||||
case "hangulalpha" : wrestHangulAlpha(el); break;
|
||||
case "hangulalnum" : wrestHangulAlNum(el); break;
|
||||
case "nospace" : wrestNospace(el); break;
|
||||
case "numeric" : wrestNumeric(el); break;
|
||||
case "alpha" : wrestAlpha(el); break;
|
||||
case "alnum" : wrestAlNum(el); break;
|
||||
case "alnum_" : wrestAlNum_(el); break;
|
||||
case "telnum" : wrestTelNum(el); break; // 김선용 2006.3 - 전화번호 형식 검사
|
||||
case "imgext" : wrestImgExt(el); break;
|
||||
default :
|
||||
if (/^extension\=/.test(css)) {
|
||||
wrestExtension(el, css); break;
|
||||
}
|
||||
} // switch (css)
|
||||
} // for (k)
|
||||
} // if (el)
|
||||
} // for (i)
|
||||
|
||||
// 필드가 null 이 아니라면 오류메세지 출력후 포커스를 해당 오류 필드로 옮김
|
||||
// 오류 필드는 배경색상을 바꾼다.
|
||||
if (wrestFld != null) {
|
||||
// 경고메세지 출력
|
||||
alert(wrestMsg);
|
||||
|
||||
if (wrestFld.style.display != "none") {
|
||||
var id = wrestFld.getAttribute("id");
|
||||
|
||||
// 오류메세지를 위한 element 추가
|
||||
var msg_el = document.createElement("strong");
|
||||
msg_el.id = "msg_"+id;
|
||||
msg_el.className = "msg_sound_only";
|
||||
msg_el.innerHTML = wrestMsg;
|
||||
wrestFld.parentNode.insertBefore(msg_el, wrestFld);
|
||||
|
||||
var new_href = document.location.href.replace(/#msg.+$/, "")+"#msg_"+id;
|
||||
|
||||
document.location.href = new_href;
|
||||
|
||||
//wrestFld.style.backgroundColor = wrestFldBackColor;
|
||||
if (typeof(wrestFld.select) != "undefined")
|
||||
wrestFld.select();
|
||||
wrestFld.focus();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.oldsubmit && this.oldsubmit() == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// 초기에 onsubmit을 가로채도록 한다.
|
||||
function wrestInitialized()
|
||||
{
|
||||
for (var i = 0; i < document.forms.length; i++) {
|
||||
// onsubmit 이벤트가 있다면 저장해 놓는다.
|
||||
if (document.forms[i].onsubmit) {
|
||||
document.forms[i].oldsubmit = document.forms[i].onsubmit;
|
||||
}
|
||||
document.forms[i].onsubmit = wrestSubmit;
|
||||
}
|
||||
}
|
||||
|
||||
// 폼필드 자동검사
|
||||
$(document).ready(function(){
|
||||
// onload
|
||||
wrestInitialized();
|
||||
});
|
||||
Reference in New Issue
Block a user