merge master into develop - CscListRForm.jsp FAQ 아코디언 버그 수정

This commit is contained in:
jilee4unity
2026-05-28 23:34:06 +09:00
7250 changed files with 570509 additions and 25 deletions

View File

@@ -0,0 +1,249 @@
@charset "UTF-8";
/*event add 2024-05*/
.wd60 {width:60px !important;max-width:120px !important;}
.wd70 {width:70px !important;max-width:120px !important;}
.wd80 {width:80px !important;max-width:120px !important;}
.wd90 {width:90px !important;max-width:120px !important;}
.wd100 {width:100px !important;max-width:100px !important;}
.wd150 {width:150px !important;max-width:150px !important;}
.wd200 {width:200px !important;max-width:200px !important;}
.wd250 {width:250px !important;max-width:250px !important;}
.wd300 {width:300px !important;max-width:300px !important;}
.wd400 {width:400px !important;max-width:400px !important;}
.wd500 {width:500px !important;max-width:500px !important;}
.wd540 {width:540px !important;max-width:580px !important;}
.wd580 {width:580px !important;max-width:580px !important;}
.wd600 {width:600px !important;max-width:600px !important;}
.wd50p {width:50% !important;}
.wd100p {width:100% !important;}
.alignL {text-align:left !important;}
.alignR {text-align:right !important;}
.alignC {text-align:center !important;}
.center {margin:0 auto;}
.mt0 {margin-top:0 !important;}
.mb5 {margin-bottom:5px !important;}
.pdt0 {padding-top:0 !important;}
.bar_right {border-right:1px solid #ccc; margin:0 10px 0 0; padding-right:10px; line-height:1;}
.table td .td-inner.right {flex-direction: row-reverse;}
.table td .td-inner.nowrap {flex-wrap: nowrap;align-items: flex-start;}
.table td .ft-12{font-size: 12px;}
.table td .cl-{font-size: 12px;}
.side-nav {overflow-y: auto;}
.textarea_form {
width:100%;
border:1px solid #dee2e6;
padding: 15px;
font-size:14px;
}
.textarea_form textarea{width:100%; height:150px;}
/*출석체크_기간별내역*/
.count-wrapper {display: flex;}
.count_box {width:25%;text-align:center;border:1px solid #ccc;border-radius: 10px;margin: 10px 10px 30px;position: relative;}
.count_box:hover {border-color:#1c7ed6;}
.count_box a {display:block;padding:20px 10px;}
.count_box .cnt_top {font-size:16px;font-weight: 600;}
.count_box .cnt_bm {font-size:24px;font-weight: 600;color:#1864ab;margin-top:10px;}
.count_box .cnt_txt {font-size:14px;font-weight: 500;color: #696969;/* margin-top: 15px; */position: absolute;left: 0;bottom: -33px;width: 100%;text-align: center;}
.count_box.last {background: #f7f7f7;border-color:#3CAB50;}
.count_box.last .cnt_bm {color:#3CAB50;}
.count_box.last:hover {background: #fff;}
.count_box.st-01 {background: #edecf9;border-color: #865fdf;}
.count_box.st-01 .cnt_bm {color: #797c81;font-size: 18px;/* font-weight: 400; */}
.count_box.st-01 .cnt_bm .cc{color: #865fdf;font-size: 24px;font-weight: 600;margin-right: 5px;}
.count_box.st-01:hover {background: #fff;}
.ic_today{background: #228be6;color:#fff;border-radius: 5px;font-size: 0.8em;padding: 1px 9px 5px 9px;vertical-align: 2px;}
.count-wrapper.cw-01{display: flex;flex-wrap: wrap;}
.count-wrapper.cw-01 .count_box{width: 18.7%;}
.dropzone-wrapper .dropzone.w200 {min-width: 200px;}
.ck.ck-content:not(.ck-style-grid__button__preview) {min-height: 200px !important;}
/*사진작은사이즈*/
.dropzone-wrapper.sm {padding:0;}
.dropzone-wrapper.sm .dropzone {min-width: 100px; min-height: 100px;}
.dropzone-wrapper.sm .dropzone .dz-message {/*display: flex; gap: 20px; */margin: 0;}
.dropzone-wrapper.sm .dropzone .dz-message::before {
width:60px; height:60px;
}
th.left-line{border-left: solid 1px #dee2e6;}
td.left-line{border-left: solid 1px #f1f3f5;}
tr.hr td,
tr.hr th{border-top:1px solid #6e6e6e;}
.btn.outline.delete {
border-color:red
}
.btn.delete {
background-color: #ca0000;
color: #ffffff;
}
.btn.delete:hover {
background-color: #ca0000;
}
.btn.delete.outline {
border-color: #ca0000;
color: #ca0000;
background-color: #ffffff;
}
/*관심분야설정 차트*/
.content-chart {display: flex; width: 100%;justify-content: space-between;}
.content-chart .left_area{width: 52%;}
.content-chart .right_area{width: 44%;}
.chart-wrapper{min-width: 200px; min-height: 200px;}
.tf-bg tfoot th,
.tf-bg tfoot td{background: #f5fbff;font-weight: 600;color: #416ec3;}
.tf-bg tfoot th{/* background: #e8eef3; */color: #50514f;font-weight: 500;}
.select-box.xs .nice-select {min-width: 128px;height: 36px;line-height: 34px;border: 1px solid #dee2e6;border-radius: 4px;padding-left: 12px;max-width: 200px;}
.grp-wrap {
display:flex;
gap: 20px;
height:350px;
}
.grp-inbox {
width:100%;
height:100%;
background-color:#fafafa;
padding:20px;
}
.grp-tit {
font-size: 18px;
margin-bottom: 10px;
color: #262675;
font-weight: 500;
}
.btn.delete.outline {
border-color: #ce1818;
color: #ce1818;
background-color: #ffffff;
}
.bar_chart {
margin:40px 0;
}
.barWrap {
display: flex;
position: relative;
margin: 0 0 24px;
align-items: center;
gap: 20px;
}
.bar {
position: relative;
width: 80%;
height: 15px;
background-color: #f7f7f7;
border-radius: 25px;
border-radius: 25px;
}
.bar > span {
display: block;
width: 50%;
position: absolute;
top: 0;
left: 0;
height: 15px;
background: #4CAF50;
border-radius: 999px;
font-size: 0;
}
.bar.blue-8 span {background-color: #1971c2;}
.barWrap span.tit {
display: block;
width: 5%;
font-size:16px;
font-weight:600;
}
.barWrap span.per {
display: block;
width: 15%;
text-align: right;
font-size: 16px;
font-weight: 600
}
.barWrapSum {
margin:30px 0;
text-align:right;
font-size:18px;
font-weight:600;
background:#f7f7f7;
border-radius: 10px;
padding:30px;
}
.barWrapSum b {
font-size:24px;
}
.tb-top-date {
display: flex;
align-items: center;
gap:5px;
}
.btn.outline.green-8 {
border-color:#2f9e44 !important
}
/*테스트발송*/
.messege-check-listWrap {
width: 100%;
height: 300px;
overflow-y: auto;
margin: 10px 0;
background-color: #f7f7f7;
border: 1px solid #dedede;
}
.messege-check-list {
}
.messege-check-list li {
padding: 12px;
border-bottom: 1px dashed #eee;
}
.messege-check-list li:hover {
background-color: #fff;
}
/*탭*/
.tab_area {
display: flex;
border-bottom: 2px solid #ddd;
}
.tab_area a {
font-size: 20px;
padding: 10px 30px;
display: block;
color: #333;
text-decoration: none;
border-bottom: 2px solid transparent;
transition: border-color 0.3s, color 0.3s;
margin-bottom: -2px;
}
.tab_area a.active {
font-weight: 600;
color: #228be6;
border-bottom: 2px solid #228be6;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}

View File

@@ -0,0 +1,31 @@
@charset "UTF-8";
.preview-container {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.preview-item {
position: relative;
display: inline-block;
}
.preview-item img {
max-width: 150px;
max-height: 150px;
border: 1px solid #ccc;
padding: 5px;
border-radius: 5px;
}
.preview-item .delete-btn {
position: absolute;
top: -5px;
right: -5px;
background: red;
color: white;
border: none;
border-radius: 50%;
cursor: pointer;
width: 20px;
height: 20px;
font-size: 14px;
line-height: 16px;
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

View File

@@ -0,0 +1,74 @@
//Dropzone 파일업로드 - 다중선택 /*add 2024-05*/
if ($(".dropzone").length > 0) {
Dropzone.autoDiscover = false;
$(".dropzone").each(function(index) {
var dropzoneID = "my-dropzone" + (index + 1);
var myDropzone = new Dropzone("#" + dropzoneID, {
url: "/file-upload",
maxFilesize: 5,
maxFiles: 1, // 한 번에 하나의 파일만 업로드 가능
autoProcessQueue: false,
addRemoveLinks: true,
dictDefaultMessage: "클릭하거나 파일을 여기로 드래그하세요",
dictRemoveFile: "삭제",
dictCancelUpload: "취소",
dictCancelUploadConfirmation: "업로드를 취소하시겠습니까?",
dictInvalidFileType: "이 파일은 업로드할 수 없습니다.",
dictFileTooBig: "파일이 너무 큽니다. ({{filesize}}MB). 최대 파일 크기: {{maxFilesize}}MB.",
dictMaxFilesExceeded: "파일을 더 이상 추가할 수 없습니다.",
dictResponseError: "서버에서 응답을 받지 못했습니다.",
init: function() {
this.on("maxfilesexceeded", function(file) {
this.removeAllFiles();
this.addFile(file);
});
}
});
});
}
function fn_init_dropzone(dropzoneID) {
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone("#" + dropzoneID, {
url: "/file-upload",
maxFilesize: 5,
maxFiles: 1, // 한 번에 하나의 파일만 업로드 가능
autoProcessQueue: false,
addRemoveLinks: true,
dictDefaultMessage: "클릭하거나 파일을 여기로 드래그하세요",
dictRemoveFile: "삭제",
dictCancelUpload: "취소",
dictCancelUploadConfirmation: "업로드를 취소하시겠습니까?",
dictInvalidFileType: "이 파일은 업로드할 수 없습니다.",
dictFileTooBig: "파일이 너무 큽니다. ({{filesize}}MB). 최대 파일 크기: {{maxFilesize}}MB.",
dictMaxFilesExceeded: "파일을 더 이상 추가할 수 없습니다.",
dictResponseError: "서버에서 응답을 받지 못했습니다.",
init: function() {
this.on("maxfilesexceeded", function(file) {
this.removeAllFiles();
this.addFile(file);
});
}
});
}
//출석체크 라디오 선택에따른 DISPLAY 변경
$(document).ready(function() {
// 페이지 로드 시 초기 설정
if ($('#rb-1').is(':checked')) {
$('.td-inner.display').hide();
} else if ($('#rb-2').is(':checked')) {
$('.td-inner.display').show();
}
// 라디오 버튼 변경 시 이벤트 처리
$('input[type=radio][name=r-group02]').change(function() {
if (this.id === 'rb-1') {
$('.td-inner.display').hide();
} else if (this.id === 'rb-2') {
$('.td-inner.display').show();
}
});
});

View File

@@ -0,0 +1,399 @@
/**********************************************
자주쓰는 배송지 조회 페이징
***********************************************/
const fn_select_rpuseDlvylcList = function (pageIndex) {
let pageUnit = $("#rpuseSelect").val();
if (pageUnit === 'undefined') {
pageUnit = 10;
}
if (pageIndex === 'undefined') {
pageIndex = $("#rpusePageIndex").val();
}
$.ajax({
type: 'post',
url: '/crm/dlvylc/selectRpuseDlvylcListInqire',
data: {
mbrInnb: $("#leftMbrInnb").val(),
mbrDvCd: $("#leftMbrDvCd").val(),
pageIndex: pageIndex,
pageUnit: pageUnit
},
success: function (data) {
$('#rpuseDlvylcContent').html(data);
$('#resentDlvylcContent').empty();
$("#rpuseDlvylcBtn").addClass("current");
$("#rpuseDlvylcContent").addClass("current");
$("#rpuseSelect").niceSelect()
$(".mbtlnb").each(function () {
let mbtlnb = $(this).text().replace(/\s+/g, '');
mbtlnb = fn_format_mbtlnb(mbtlnb);
$(this).text(mbtlnb);
});
}
});
}
/**********************************************
최근 배송지 조회 페이징
***********************************************/
const fn_select_recentDlvylcList = function (pageIndex, ordering) {
if (ordering == undefined) {
ordering = 'recentRegist';
}
let pageUnit = $("#recentId").val();
if (pageUnit === 'undefined') {
pageUnit = 10;
}
if (pageIndex === 'undefined') {
pageIndex = $("#recentPageIndex").val();
}
const selectForm = $("#resentDlvylcForm").serialize();
$.ajax({
type: 'post',
url: '/crm/dlvylc/selectRecentDlvylcListInqire',
data: {
selectForm,
pageIndex: pageIndex,
ordering: ordering,
pageUnit: pageUnit,
mbrInnb: $("#leftMbrInnb").val(),
mbrDvCd: $("#leftMbrDvCd").val()
},
success: function (data) {
$('#resentDlvylcContent').html(data);
$('#rpuseDlvylcContent').empty();
$("#resentDlvylcBtn").addClass("current");
$("#resentDlvylcContent").addClass("current");
if ($(".select-box > select").length > 0) {
$(".select-box > select").niceSelect();
}
$(".recentMbtlnb").each(function () {
$(this).text(fn_format_mbtlnb($(this).text()));
});
}
});
}
/**********************************************
배송지 관리 팝업 (처음 호출 할 때)
***********************************************/
const fn_move_dlvylc_manage_pop = function (pageIndex, mbrInnb, mbrDvCd, callback) {
if (mbrInnb == undefined) {
mbrInnb = $("#dlvyLcMbr").val();
}
if (callback == undefined) {
callback = fn_set_dlvylc;
}
$.ajax({
type: 'post',
url: '/crm/dlvylc/selectRpuseDlvylcListInqire',
data: {
isPop: 'Y',
pageIndex: pageIndex,
mbrInnb: mbrInnb,
mbrDvCd: mbrDvCd,
callbackNm: callback
},
success: function (data) {
fn_close_modal('dlvylcManage');
$('#modalDiv').html(data);
$('#dlvylcManage').modal();
$(".mbtlnb").each(function () {
let mbtlnb = $(this).text().replace(/\s+/g, '');
mbtlnb = fn_format_mbtlnb(mbtlnb);
$(this).text(mbtlnb);
});
}
});
}
/**********************************************
배송지 등록 팝업 호출 ok
***********************************************/
const fn_move_dlvylc_regpage_pop = function (isPop, mbrInnb, mbrDvCd, dftDlvylcAt) {
$("#dlvylcUpdate").remove();
if (!mbrInnb) {
mbrInnb = $("#leftMbrInnb").val();
}
if (!mbrDvCd) {
mbrDvCd = $("#leftMbrDvCd").val();
}
$.ajax({
type: 'post',
url: '/crm/dlvylc/selectDlvylcRegistForm',
data: {
mbrInnb: mbrInnb,
mbrDvCd: mbrDvCd
},
success: function (data) {
$('#dlvylcUpdate').remove();
$('#dlvylcRegist').remove();
$('#modalDiv').html(data);
$('#isPop').val(isPop);
$('#dlvylcRegist').modal();
if (dftDlvylcAt == 'Y') {
$('#dftDlvylcAt').prop("checked", true);
}
fn_set_event('.telno', 'keyup', fn_fmt_telno);
}
});
}
/**********************************************
배송지 등록 ok
***********************************************/
const fn_insert_dlvylc = function (mbrInnb, mbrDvCd, msg, data) {
$("#dlvylcUpdate").remove();
let paramData = null;
const registForm = $("#dlvylcRegistForm").serialize();
if (data != null) {
paramData = data;
} else {
paramData = registForm;
}
if (confirm('자주쓰는 배송지를 등록하시겠습니까?')) {
$.ajax({
type: 'post',
url: '/crm/dlvylc/insertDlvylcRegist',
data: paramData,
success: function () {
alert(msg);
fn_close_modal('dlvylcRegist');
if ($("#isPop").val() == 'Y') {
fn_move_dlvylc_manage_pop(1, mbrInnb, mbrDvCd, 'fn_set_dlvylc');
} else {
fn_select_rpuseDlvylcList(1);
//최근 배송지 form, 버튼 활성화 삭제
$('#resentDlvylcForm').remove();
$("#resentDlvylcBtn").removeClass("active");
}
}
});
}
}
/**********************************************
최근 배송지 자주쓰는 배송지로 등록
***********************************************/
const fn_move_repuseDlvylc = function (msg,target) {
const trTarget = $(target).closest("tr");
const data = {
recpntNm: trTarget.find('input[name=recpntNm]').val(),
mbrInnb: trTarget.find('input[name=recentMbrInnb]').val(),
mbrDvCd: trTarget.find('input[name=recentMbrDvCd]').val(),
zip: trTarget.find('input[name=dlvylcZip]').val(),
adres: trTarget.find('input[name=adres]').val(),
dtlAdres: trTarget.find('input[name=dlvylcAdresDtl]').val(),
mbtlnb: trTarget.find('input[name=recpntMbtlnb]').val(),
adresDv: trTarget.find('input[name=dlvylcAdresDvCd]').val(),
dlvylcDcCn: trTarget.find('input[name=dlvylcDcCn]').val(),
recentDlvylcAt: trTarget.find('input[name=recentDlvylcAt]').val()
};
fn_insert_dlvylc( trTarget.find('input[name=recentMbrInnb]').val(),trTarget.find('input[name=recentMbrDvCd]').val(), msg, data);
}
/**********************************************
배송지 삭제 OK
***********************************************/
const fn_delete_dlvylc = function (msg, adbkInnb, isPop, mbrInnb, mbrDvCd) {
if (confirm('자주쓰는 배송지를 삭제하시겠습니까?')) {
$.ajax({
type: 'post',
url: '/crm/dlvylc/deleteDlvylcDel',
data: {
adbkInnb: adbkInnb
, mbrInnb: mbrInnb
, mbrDvCd: mbrDvCd
},
success: function (data) {
alert(msg);
if (isPop == 'Y') {
fn_move_dlvylc_manage_pop(1, mbrInnb, mbrDvCd, fn_set_dlvylc);
} else {
fn_select_rpuseDlvylcList(1);
}
}
});
}
}
/**********************************************
배송지 수정 팝업 이동 ok
***********************************************/
const fn_move_dlvylc_uptpage_pop = function (pageIndex, adbkInnb, isPop, mbrInnb, mbrDvCd) {
$("#dlvylcRegist").remove();
if (!mbrInnb) {
mbrInnb = $("#leftMbrInnb").val();
}
if (!mbrDvCd) {
mbrDvCd = $("#leftMbrDvCd").val();
}
$.ajax({
type: 'get',
url: '/crm/dlvylc/selectDlvylcUpdtPopupForm',
data: {
adbkInnb: adbkInnb,
pageIndex: pageIndex,
mbrInnb: mbrInnb,
mbrDvCd: mbrDvCd
},
success: function (data) {
$('#dlvylcRegist').remove();
$('#dlvylcUpdate').remove();
$('#modalDiv').html(data);
$('#isPop').val(isPop);
$('#dlvylcUpdate').modal();
fn_set_event('.telno', 'keyup', fn_fmt_telno);
$(".telno").val(fn_format_mbtlnb($(".telno").val()))
}
});
}
/**********************************************
배송지 수정 ok
***********************************************/
const fn_update_dlvylc = function (pageIndex, msg, mbrInnb, mbrDvCd) {
const updateForm = $("#dlvylcUpdtForm").serialize();
if (confirm('자주쓰는 배송지를 수정하시겠습니까?')) {
$.ajax({
type: 'post',
url: '/crm/dlvylc/updateDlvylcUpdt',
data: updateForm,
success: function (data) {
alert(msg);
fn_close_modal('dlvylcUpdate');
if ($("#isPop").val() == 'Y') {
fn_move_dlvylc_manage_pop(1, mbrInnb, mbrDvCd, 'fn_set_dlvylc');
} else {
fn_select_rpuseDlvylcList(1);
}
}
});
}
}
/**********************************************
팝업 배송지 등록 시 도로명, 지번 주소 구분 value값 넣기 ok
***********************************************/
const fn_select_dlvylc_postcode = function (data) {
$('#zip').val(data.postcode);
$('#adresDv').val(data.addressType);
if (data.addressType == '01') {
$('#adres').val(data.roadAddress + data.extraAddress);
} else {
$('#adres').val(data.jibunAddress + data.extraAddress);
}
}
/**********************************************
배송지 등록 시 도로명, 지번 주소 구분 value값 넣기 ok
***********************************************/
const fn_set_mngrOrdrDlvylc_postcode = function (data) {
$("#ordrRecpntNm").val(data.recpntNm);
$("#ordrDtlAdres").val(data.dtlAdres);
$("#ordrRecpntMbtlnb").val(data.mbtlnb);
$('#ordrDlvylcZip').val(data.postcode);
$('#ordrAdresDvCd').val(data.addressType);
if (data.addressType == '01') {
$('#ordrAdres').val(data.roadAddress + data.extraAddress);
} else {
$('#ordrAdres').val(data.jibunAddress + data.extraAddress);
}
console.log("data.recpntNm", data.recpntNm);
if (data.recpntNm == null) {
$("#newDlvyLc").prop("checked", true);
} else {
$("#defaultDlvyLc").prop("checked", true);
}
}
/**********************************************
배송지 관리 팝업에서 배송 정보 가져오기
***********************************************/
const fn_select_mngrOrdr_postcode = function (callback, index) {
let extraAddress = "";
callback({
postcode: $(".zip").eq(index).val(),
addressType: $(".adresDv").eq(index).val(),
roadAddress: $(".rnmAdres").eq(index).val(),
jibunAddress: $(".lnbAdres").eq(index).val(),
recpntNm: $(".recpntNmR").eq(index).val(),
dtlAdres: $(".dtlAdres").eq(index).val(),
dlvylcAreaCd: $(".dlvylcAreaCd").eq(index).val(),
prefcd: $(".prefcd").eq(index).val(),
cstmclerCd: $(".cstmclerCd").eq(index).val(),
mbtlnb: $(".dlvylcMbtlnb").eq(index).val(),
extraAddress: extraAddress
});
fn_close_modal("dlvylcManage");
}
/**********************************************
배송지 관리 팝업 언어 설정
***********************************************/
const fn_toggle_langHeader = function () {
var id = $('[name=dlvylcAreaCd]:checked').attr('id');
$('.langKr, .langJp').hide();
$('.' + id).show();
if (id == 'langJp') {
$('#zip').prop('readonly', false);
$('#cstmclerCd').prop('disabled', true);
$('#prefcode').prop('disabled', false);
} else {
$('#zip').prop('readonly', true);
$('#cstmclerCd').prop('disabled', false);
$('#prefcode').prop('disabled', true);
$('#postcodeAlert').hide();
}
}
/**********************************************
ibsnet api 호출
***********************************************/
const fn_select_postcodeJp = function () {
$('#postcodeAlert').hide();
$.ajax({
type: 'GET',
url: 'https://zipcloud.ibsnet.co.jp/api/search?zipcode=' + $('#zip').val()
+'&callback=' + 'fn_set_postcodeJp',
dataType: 'jsonp',
success: function(data) {
if(data.status == 200) {
let result = data.results[0];
let adres = result.address1;
let dtlAdres = [result.address2, result.address3].join(" ");
let prefcode = result.prefcode;
$("#adres").val(adres);
$("#dtlAdres").val(dtlAdres);
$("#prefcode").val(prefcode);
$("#adresDv").val("01");
} else {
$('#postcodeAlert').show();
}
},
error: function (xhr, status, error) {
console.error('API 호출 실패:', error);
}
});
}
/**********************************************
배송지 관리 팝업 언어별 form 초기화
***********************************************/
let dlvylcFormPreValues = {};
const fn_clear_dlvylcForm = function () {
const tableInputs = $("#dlvylcFormTable").find("input[name]");
if (Object.keys(dlvylcFormPreValues).length == 0) {
tableInputs.each(function () {
const input = $(this);
const name = input.attr("name");
dlvylcFormPreValues[name] = input.val();
input.val("");
});
} else {
tableInputs.each(function () {
const input = $(this);
const name = input.attr("name");
const currentValue = input.val();
input.val(dlvylcFormPreValues[name] ?? "");
dlvylcFormPreValues[name] = currentValue;
});
}
}

View File

@@ -0,0 +1,425 @@
/**********************************************
자주쓰는 배송지 조회 페이징
***********************************************/
const fn_select_rpuseDlvylcList = function (pageIndex) {
let pageUnit = $("#rpuseSelect").val();
if (pageUnit === 'undefined') {
pageUnit = 10;
}
if (pageIndex === 'undefined') {
pageIndex = $("#rpusePageIndex").val();
}
$.ajax({
type: 'post',
url: '/crm/dlvylc/selectRpuseDlvylcListInqire',
data: {
mbrInnb: $("#leftMbrInnb").val(),
mbrDvCd: $("#leftMbrDvCd").val(),
pageIndex: pageIndex,
pageUnit: pageUnit
},
success: function (data) {
$('#rpuseDlvylcContent').html(data);
$('#resentDlvylcContent').empty();
$("#rpuseDlvylcBtn").addClass("current");
$("#rpuseDlvylcContent").addClass("current");
$("#rpuseSelect").niceSelect()
$(".mbtlnb").each(function () {
let mbtlnb = $(this).text().replace(/\s+/g, '');
mbtlnb = fn_format_mbtlnb(mbtlnb);
$(this).text(mbtlnb);
});
}
});
}
/**********************************************
최근 배송지 조회 페이징
***********************************************/
const fn_select_recentDlvylcList = function (pageIndex, ordering) {
if (ordering == undefined) {
ordering = 'recentRegist';
}
let pageUnit = $("#recentId").val();
if (pageUnit === 'undefined') {
pageUnit = 10;
}
if (pageIndex === 'undefined') {
pageIndex = $("#recentPageIndex").val();
}
const selectForm = $("#resentDlvylcForm").serialize();
$.ajax({
type: 'post',
url: '/crm/dlvylc/selectRecentDlvylcListInqire',
data: {
selectForm,
pageIndex: pageIndex,
ordering: ordering,
pageUnit: pageUnit,
mbrInnb: $("#leftMbrInnb").val(),
mbrDvCd: $("#leftMbrDvCd").val()
},
success: function (data) {
$('#resentDlvylcContent').html(data);
$('#rpuseDlvylcContent').empty();
$("#resentDlvylcBtn").addClass("current");
$("#resentDlvylcContent").addClass("current");
if ($(".select-box > select").length > 0) {
$(".select-box > select").niceSelect();
}
$(".recentMbtlnb").each(function () {
$(this).text(fn_format_mbtlnb($(this).text()));
});
}
});
}
/**********************************************
리턴 formId 세팅
***********************************************/
let formIdSave;
const fn_set_formId = function (formId) {
if (formId !== ''){
formIdSave = formId;
} else {
formId = formIdSave;
}
return formId;
}
/**********************************************
배송지 관리 팝업 (처음 호출 할 때)
***********************************************/
const fn_move_dlvylc_manage_pop = function (pageIndex, mbrInnb, mbrDvCd, callback, formId = '') {
if (mbrInnb == undefined) {
mbrInnb = $("#dlvyLcMbr").val();
}
if (callback == undefined) {
callback = fn_set_dlvylc;
}
formId = fn_set_formId(formId);
$.ajax({
type: 'post',
url: '/crm/dlvylc/selectRpuseDlvylcListInqire',
data: {
isPop: 'Y',
pageIndex: pageIndex,
mbrInnb: mbrInnb,
mbrDvCd: mbrDvCd,
callbackNm: callback,
formId: formId
},
success: function (data) {
fn_close_modal('dlvylcManage');
$('#modalDiv').html(data);
$('#dlvylcManage').modal();
$(".mbtlnb").each(function () {
let mbtlnb = $(this).text().replace(/\s+/g, '');
mbtlnb = fn_format_mbtlnb(mbtlnb);
$(this).text(mbtlnb);
});
}
});
}
const fn_move_dlvylc_manage_pop_wrapper = function (pageIndex) {
const form = $('#mbrDlvylcList');
let mbrInnb = $(form).find('#dlvyLcMbr').val();
let mbrDvCd = $(form).find('#mbrDvCd').val();
let callback = 'fn_set_dlvylc';
let formId = $(form).find('#formId').val();
fn_move_dlvylc_manage_pop(pageIndex, mbrInnb, mbrDvCd, callback, formId);
}
/**********************************************
배송지 등록 팝업 호출 ok
***********************************************/
const fn_move_dlvylc_regpage_pop = function (isPop, mbrInnb, mbrDvCd, dftDlvylcAt) {
$("#dlvylcUpdate").remove();
if (!mbrInnb) {
mbrInnb = $("#leftMbrInnb").val();
}
if (!mbrDvCd) {
mbrDvCd = $("#leftMbrDvCd").val();
}
$.ajax({
type: 'post',
url: '/crm/dlvylc/selectDlvylcRegistForm',
data: {
mbrInnb: mbrInnb,
mbrDvCd: mbrDvCd
},
success: function (data) {
$('#dlvylcUpdate').remove();
$('#dlvylcRegist').remove();
$('#modalDiv').html(data);
$('#isPop').val(isPop);
$('#dlvylcRegist').modal();
if (dftDlvylcAt == 'Y') {
$('#dftDlvylcAt').prop("checked", true);
}
fn_set_event('.telno', 'keyup', fn_fmt_telno);
}
});
}
/**********************************************
배송지 등록 ok
***********************************************/
const fn_insert_dlvylc = function (mbrInnb, mbrDvCd, msg, data) {
$("#dlvylcUpdate").remove();
let paramData = null;
const registForm = $("#dlvylcRegistForm").serialize();
if (data != null) {
paramData = data;
} else {
paramData = registForm;
}
if (confirm('자주쓰는 배송지를 등록하시겠습니까?')) {
$.ajax({
type: 'post',
url: '/crm/dlvylc/insertDlvylcRegist',
data: paramData,
success: function () {
alert(msg);
fn_close_modal('dlvylcRegist');
if ($("#isPop").val() == 'Y') {
fn_move_dlvylc_manage_pop(1, mbrInnb, mbrDvCd, 'fn_set_dlvylc');
} else {
fn_select_rpuseDlvylcList(1);
//최근 배송지 form, 버튼 활성화 삭제
$('#resentDlvylcForm').remove();
$("#resentDlvylcBtn").removeClass("active");
}
}
});
}
}
/**********************************************
최근 배송지 자주쓰는 배송지로 등록
***********************************************/
const fn_move_repuseDlvylc = function (msg,target) {
const trTarget = $(target).closest("tr");
const data = {
recpntNm: trTarget.find('input[name=recpntNm]').val(),
mbrInnb: trTarget.find('input[name=recentMbrInnb]').val(),
mbrDvCd: trTarget.find('input[name=recentMbrDvCd]').val(),
zip: trTarget.find('input[name=dlvylcZip]').val(),
adres: trTarget.find('input[name=adres]').val(),
dtlAdres: trTarget.find('input[name=dlvylcAdresDtl]').val(),
mbtlnb: trTarget.find('input[name=recpntMbtlnb]').val(),
adresDv: trTarget.find('input[name=dlvylcAdresDvCd]').val(),
dlvylcDcCn: trTarget.find('input[name=dlvylcDcCn]').val(),
recentDlvylcAt: trTarget.find('input[name=recentDlvylcAt]').val()
};
fn_insert_dlvylc( trTarget.find('input[name=recentMbrInnb]').val(),trTarget.find('input[name=recentMbrDvCd]').val(), msg, data);
}
/**********************************************
배송지 삭제 OK
***********************************************/
const fn_delete_dlvylc = function (msg, adbkInnb, isPop, mbrInnb, mbrDvCd) {
if (confirm('자주쓰는 배송지를 삭제하시겠습니까?')) {
$.ajax({
type: 'post',
url: '/crm/dlvylc/deleteDlvylcDel',
data: {
adbkInnb: adbkInnb
, mbrInnb: mbrInnb
, mbrDvCd: mbrDvCd
},
success: function (data) {
alert(msg);
if (isPop == 'Y') {
fn_move_dlvylc_manage_pop(1, mbrInnb, mbrDvCd, fn_set_dlvylc);
} else {
fn_select_rpuseDlvylcList(1);
}
}
});
}
}
/**********************************************
배송지 수정 팝업 이동 ok
***********************************************/
const fn_move_dlvylc_uptpage_pop = function (pageIndex, adbkInnb, isPop, mbrInnb, mbrDvCd) {
$("#dlvylcRegist").remove();
if (!mbrInnb) {
mbrInnb = $("#leftMbrInnb").val();
}
if (!mbrDvCd) {
mbrDvCd = $("#leftMbrDvCd").val();
}
$.ajax({
type: 'get',
url: '/crm/dlvylc/selectDlvylcUpdtPopupForm',
data: {
adbkInnb: adbkInnb,
pageIndex: pageIndex,
mbrInnb: mbrInnb,
mbrDvCd: mbrDvCd
},
success: function (data) {
$('#dlvylcRegist').remove();
$('#dlvylcUpdate').remove();
$('#modalDiv').html(data);
$('#isPop').val(isPop);
$('#dlvylcUpdate').modal();
fn_set_event('.telno', 'keyup', fn_fmt_telno);
$(".telno").val(fn_format_mbtlnb($(".telno").val()))
}
});
}
/**********************************************
배송지 수정 ok
***********************************************/
const fn_update_dlvylc = function (pageIndex, msg, mbrInnb, mbrDvCd) {
const updateForm = $("#dlvylcUpdtForm").serialize();
if (confirm('자주쓰는 배송지를 수정하시겠습니까?')) {
$.ajax({
type: 'post',
url: '/crm/dlvylc/updateDlvylcUpdt',
data: updateForm,
success: function (data) {
alert(msg);
fn_close_modal('dlvylcUpdate');
if ($("#isPop").val() == 'Y') {
fn_move_dlvylc_manage_pop(1, mbrInnb, mbrDvCd, 'fn_set_dlvylc');
} else {
fn_select_rpuseDlvylcList(1);
}
}
});
}
}
/**********************************************
팝업 배송지 등록 시 도로명, 지번 주소 구분 value값 넣기 ok
***********************************************/
const fn_select_dlvylc_postcode = function (data) {
$('#zip').val(data.postcode);
$('#adresDv').val(data.addressType);
if (data.addressType == '01') {
$('#adres').val(data.roadAddress + data.extraAddress);
} else {
$('#adres').val(data.jibunAddress + data.extraAddress);
}
}
/**********************************************
배송지 등록 시 도로명, 지번 주소 구분 value값 넣기 ok
***********************************************/
const fn_set_mngrOrdrDlvylc_postcode = function (data) {
$("#ordrRecpntNm").val(data.recpntNm);
$("#ordrDtlAdres").val(data.dtlAdres);
$("#ordrRecpntMbtlnb").val(data.mbtlnb);
$('#ordrDlvylcZip').val(data.postcode);
$('#ordrAdresDvCd').val(data.addressType);
if (data.addressType == '01') {
$('#ordrAdres').val(data.roadAddress + data.extraAddress);
} else {
$('#ordrAdres').val(data.jibunAddress + data.extraAddress);
}
if (data.recpntNm == null) {
$("#newDlvyLc").prop("checked", true);
} else {
$("#defaultDlvyLc").prop("checked", true);
}
}
/**********************************************
배송지 관리 팝업에서 배송 정보 가져오기
***********************************************/
const fn_select_mngrOrdr_postcode = function (callback, index, formId = '') {
let extraAddress = "";
callback({
postcode: $(".zip").eq(index).val(),
addressType: $(".adresDv").eq(index).val(),
roadAddress: $(".rnmAdres").eq(index).val(),
jibunAddress: $(".lnbAdres").eq(index).val(),
recpntNm: $(".recpntNmR").eq(index).val(),
dtlAdres: $(".dtlAdres").eq(index).val(),
dlvylcAreaCd: $(".dlvylcAreaCd").eq(index).val(),
prefcd: $(".prefcd").eq(index).val(),
cstmclerCd: $(".cstmclerCd").eq(index).val(),
mbtlnb: $(".dlvylcMbtlnb").eq(index).val(),
extraAddress: extraAddress
}, formId);
fn_close_modal("dlvylcManage");
}
/**********************************************
배송지 관리 팝업 언어 설정
***********************************************/
const fn_toggle_langHeader = function () {
var id = $('[name=dlvylcAreaCd]:checked').attr('id');
$('.langKr, .langJp').hide();
$('.' + id).show();
if (id == 'langJp') {
$('#zip').prop('readonly', false);
$('#cstmclerCd').prop('disabled', true);
$('#prefcode').prop('disabled', false);
} else {
$('#zip').prop('readonly', true);
$('#cstmclerCd').prop('disabled', false);
$('#prefcode').prop('disabled', true);
$('#postcodeAlert').hide();
}
}
/**********************************************
ibsnet api 호출
***********************************************/
const fn_select_postcodeJp = function () {
$('#postcodeAlert').hide();
$.ajax({
type: 'GET',
url: 'https://zipcloud.ibsnet.co.jp/api/search?zipcode=' + $('#zip').val()
+'&callback=' + 'fn_set_postcodeJp',
dataType: 'jsonp',
success: function(data) {
if(data.status == 200) {
let result = data.results[0];
let adres = result.address1;
let dtlAdres = [result.address2, result.address3].join(" ");
let prefcode = result.prefcode;
$("#adres").val(adres);
$("#dtlAdres").val(dtlAdres);
$("#prefcode").val(prefcode);
$("#adresDv").val("01");
} else {
$('#postcodeAlert').show();
}
},
error: function (xhr, status, error) {
console.error('API 호출 실패:', error);
}
});
}
/**********************************************
배송지 관리 팝업 언어별 form 초기화
***********************************************/
let dlvylcFormPreValues = {};
const fn_clear_dlvylcForm = function () {
const tableInputs = $("#dlvylcFormTable").find("input[name]");
if (Object.keys(dlvylcFormPreValues).length == 0) {
tableInputs.each(function () {
const input = $(this);
const name = input.attr("name");
dlvylcFormPreValues[name] = input.val();
input.val("");
});
} else {
tableInputs.each(function () {
const input = $(this);
const name = input.attr("name");
const currentValue = input.val();
input.val(dlvylcFormPreValues[name] ?? "");
dlvylcFormPreValues[name] = currentValue;
});
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,925 @@
// 좌측 사이드 메뉴 접기/펴기
//
var sideBtn = $(".side-nav__fold");
var header = $(".header");
var content = $(".content");
var sideNav = $(".side-nav");
var pageTitle = $(".page-title");
sideBtn.click(function () {
$(this).toggleClass("closed");
header.toggleClass("closed");
content.toggleClass("closed");
sideNav.toggleClass("closed");
pageTitle.toggleClass("closed");
});
var media = window.matchMedia("(max-width: 1450px)");
function handleTabletChange(e) {
if (e.matches) {
$(".side-nav__fold").addClass("closed");
$(".header").addClass("closed");
$(".content").addClass("closed");
$(".side-nav").addClass("closed");
} else {
$(".side-nav__fold").removeClass("closed");
$(".header").removeClass("closed");
$(".content").removeClass("closed");
$(".side-nav").removeClass("closed");
}
}
media.addEventListener("change", handleTabletChange);
handleTabletChange(media);
// 좌측 사이드메뉴 내부 메뉴 접기/펴기
//
var depth2Btn = $(".depth2 > .has-sub");
var depth3 = $(".depth3");
depth2Btn.each(function () {
$(this).find(".depth3").hide();
if ($(this).hasClass("opened")) {
$(this).find(".depth3").show();
}
});
depth2Btn.click(function () {
// find depth2Btn but not this
var otherBtn = depth2Btn.not(this);
otherBtn.removeClass("opened");
otherBtn.find(".depth3").slideUp(300);
$(this).toggleClass("opened");
$(this).find(".depth3").slideToggle(300);
});
// 커스텀 셀렉트박스
//
if ($(".select-box > select").length > 0) {
$(".select-box > select").niceSelect();
}
// 데이트 피커
//
$(".datepicker").each(function () {
$(this).datepicker({
dateFormat: "yy-mm-dd",
prevText: "이전 달",
nextText: "다음 달",
changeMonth: "true",
changeYear: "true",
dayNames: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"],
dayNamesMin: ["일", "월", "화", "수", "목", "금", "토"],
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월",
],
showMonthAfterYear: true,
yearSuffix: "년",
firstDay: 0/*,
maxDate: 0, // 오늘로부터 1년 전까지의 날짜까지 선택 가능
beforeShowDay: function (date) {
// 오늘로부터 1년 전까지의 날짜를 비활성화
let currentDate = new Date();
currentDate.setDate(currentDate.getDate() - 366);
return [date.getTime() > currentDate.getTime() - 1, ""];
},*/
});
});
// 기간 선택 탭버튼
// 240123 Enter키 입력 시, 버그 수정
//
var dateRangeBtn = $(".dateRange-btn");
dateRangeBtn.click(function (e) {
if (e.detail === 0) {
return;
}
e.preventDefault();
var otherBtn = $(this).siblings();
otherBtn.removeClass("selected");
$(this).addClass("selected");
});
// 숫자 텍스트 인풋 클릭 시 기본값 0 없어짐
//
var numberInput = $(".input-text.number");
numberInput.click(function () {
if ($(this).val() == 0) {
$(this).val("");
}
});
numberInput.blur(function () {
if ($(this).val() == "") {
$(this).val(0);
}
});
// "상세검색" 버튼 클릭 시 "search-hide" 보이기/숨기기
//
var searchHide = $(".search-hide");
var searchBtn = $(".btn.search-detail");
searchBtn.click(function (e) {
e.preventDefault();
if (searchHide.css("display") == "none") {
searchHide.css("display", "");
} else {
searchHide.css("display", "none");
}
searchBtn.toggleClass("opened");
});
// "search-hide" 가 숨겨지있지 않을때 "상세검색" 버튼에 "opened" 클래스 추가
//
if (!searchHide.eq(0).attr("style")) {
searchBtn.addClass("opened");
}
// 스크롤 시 헤더, 사이드메뉴 고정
// 231204 탭메뉴 고정 추가
var headerHeight = 110;
var headerGap = headerHeight - 18;
$(window).scroll(function () {
var scrollTop = $(window).scrollTop();
var firstElement = $(".page-title").next();
if (firstElement.hasClass("content-tab__fixed")) {
firstElement = firstElement.next();
headerGap = headerHeight;
}
if (scrollTop > headerHeight) {
firstElement.css("margin-top", headerGap + "px");
$(".page-title").addClass("fixed");
$(".side-nav").addClass("fixed");
$(".content-tab__fixed").addClass("fixed");
} else {
firstElement.css("margin-top", "");
$(".page-title").removeClass("fixed");
$(".side-nav").removeClass("fixed");
$(".content-tab__fixed").removeClass("fixed");
}
});
// 체크시 테이블 행 배경색 변경
//
var trColorCheck = $(".tr-color-check > input");
trColorCheck.click(function () {
var tr = $(this).closest("tr");
if ($(this).prop("checked")) {
tr.addClass("checked");
} else {
tr.removeClass("checked");
}
});
// 쿠폰 할인금액/할인율 선택
//
var couponDiscountSelect = $(".coupon-discount-select");
var couponDiscountWon = $(".coupon-discount-won");
var couponDiscountPercent = $(".coupon-discount-percent");
$(document).ready(function () {
couponDiscountSelectChange();
});
couponDiscountSelect.change(function () {
couponDiscountSelectChange();
});
function couponDiscountSelectChange() {
if (couponDiscountSelect.val() == "won") {
couponDiscountWon.show();
couponDiscountPercent.hide();
} else {
couponDiscountWon.hide();
couponDiscountPercent.show();
}
}
// 탭 버튼
//
var contentTabBtn = $(".content-tab__btn");
var contentTabContent = $(".content-tab__content");
contentTabBtn.click(function (e) {
e.preventDefault();
var index = $(this).index();
contentTabBtn.removeClass("active");
contentTabContent.removeClass("active");
$(this).addClass("active");
contentTabContent.eq(index).addClass("active");
});
$(document).ready(function () {
// $(".content-tab__btn").eq(0).trigger("click");
});
// 툴팁(호버시 툴팁 노출)
var tooltipElem;
document.onmouseover = function (event) {
var evt = event || window.event;
var target = evt.target || evt.srcElement;
var tooltipHtml = target.getAttribute("data-tooltip");
if (!tooltipHtml) return;
tooltipElem = document.createElement("div");
tooltipElem.className = "tooltip";
tooltipElem.innerHTML = tooltipHtml;
document.body.appendChild(tooltipElem);
var coords = target.getBoundingClientRect();
var left = coords.left + (target.offsetWidth - tooltipElem.offsetWidth) / 2;
if (left <= 14) left = 14;
var top = coords.top - tooltipElem.offsetHeight - 5;
if (top < 0) {
top = coords.top + target.offsetHeight + 5;
}
tooltipElem.style.left = left + "px";
tooltipElem.style.top = top + "px";
};
document.onmouseout = function (event) {
if (tooltipElem) {
tooltipElem.parentNode.removeChild(tooltipElem);
tooltipElem = null;
}
};
//
var sumAreaContent = $(".sum-area__content");
var sumAreaBtn = $(".sum-area__title > button");
sumAreaBtn.click(function (e) {
e.preventDefault();
$(this).closest(".sum-area__item").find(sumAreaContent).toggleClass("opened");
$(this).toggleClass("opened");
});
// 위로가기 버튼
var scrollToTop = $(".scroll-to-top");
var handleScroll = function () {
var scrollTop = $(window).scrollTop();
if (scrollTop > 100) {
scrollToTop.addClass("show");
} else {
scrollToTop.removeClass("show");
}
};
var debounce = function (func, delay) {
var timer;
return function () {
var context = this,
args = arguments;
clearTimeout(timer);
timer = setTimeout(function () {
func.apply(context, args);
}, delay);
};
};
$(window).scroll(debounce(handleScroll, 50));
scrollToTop.click(function () {
$("html, body").animate({ scrollTop: 0 }, 400);
});
// 컨텐츠 접기/펴기
//
var foldBtn = $(".content-fold__btn");
var contentFold = $(".content-section.content-fold");
foldBtn.click(function (e) {
var innerContent = $(this).closest(contentFold).find(".content-fold__content");
e.preventDefault();
if (innerContent.css("display") == "none") {
innerContent.show();
} else {
innerContent.hide();
}
$(this).toggleClass("opened");
});
// 스크롤 탭 버튼(상품 등록 페이지)
//
var contentTabScrollBtn = $(".content-tab__scroll-btn");
var contentTabScrollContent = $(".content-scroll-detect");
$(document).ready(function () {
contentTabScrollBtn.eq(0).addClass("active");
});
contentTabScrollBtn.click(function (e) {
e.preventDefault();
var index = $(this).index();
contentTabScrollBtn.removeClass("active");
$(this).addClass("active");
$("html, body").animate(
{
scrollTop: contentTabScrollContent.eq(index).offset().top - 128,
},
0
);
});
function handleTabScroll() {
var scrollTop = $(window).scrollTop();
contentTabScrollContent.each(function () {
var index = contentTabScrollContent.index(this);
if (scrollTop >= $(this).offset().top - 260) {
contentTabScrollBtn.removeClass("active");
contentTabScrollBtn.eq(index).addClass("active");
}
if (scrollTop < 100) {
contentTabScrollBtn.removeClass("active");
contentTabScrollBtn.eq(0).addClass("active");
}
});
}
$(window).scroll(debounce(handleTabScroll, 20));
// 타임 피커
//
if ($(".bs-timepicker").length > 0) {
$(".bs-timepicker").timepicker();
}
// 셀렉트 선택 시 링크 이동
//
$(".select-link").on("change", function () {
var url = $(this).val();
if (url) {
window.open(url, "_blank");
$(".nice-select li").removeClass("selected");
$(".nice-select .current").text("주요 게시판");
}
return false;
});
//인풋 텍스트 글자수 제한
//
var wordLimitInput = $(".word-limit-input > input");
var wordLimitNumbers = $(".word-limit-input__data");
var wordLimitMax = $(".word-limit-input__data .max-words");
var wordLimitCurrent = $(".word-limit-input__data .current-words");
wordLimitMax.each(function () {
$(this).text($(this).closest(".word-limit-input").find("input").attr("maxlength"));
});
wordLimitCurrent.each(function () {
$(this).text($(this).closest(".word-limit-input").find("input").val().length);
});
wordLimitInput.keyup(function () {
var current = $(this).val().length;
$(this).closest(".word-limit-input").find(wordLimitCurrent).text(current);
});
// 테이블 열 순서 바꾸기
//
$(document).ready(function () {
if ($(".table.draggable").length > 0) {
$(".table.draggable").tableDnD({
onDragClass: "dragging",
});
}
});
// 인풋 텍스트 숫자만 입력, 3자리마다 콤마
//
$(".input-text.number").on("input", function () {
var input = $(this).val();
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
});
// 미니 인포 버튼
var miniInfoBtn = $(".mini-info-btn");
var miniInfoContent = $(".mini-info-content");
var miniInfoCloseBtn = $(".mini-info-content__close");
miniInfoContent.hide();
miniInfoBtn.click(function (e) {
e.preventDefault();
// data-info 속성값 가져오기
var info = $(this).attr("data-info");
// id가 info인 요소에 miniInfoBtn의 위치를 기준으로 miniInfoContent를 노출
$("#" + info).css({
top: $(this).offset().top,
left: $(this).offset().left,
});
if ($(this).offset().left > 1000) {
$("#" + info).css({
left: $(this).offset().left - $("#" + info).width() - 10,
});
}
$("#" + info).show();
});
miniInfoCloseBtn.click(function (e) {
e.preventDefault();
$(this).closest(".mini-info-content").hide();
});
// 상품 검색 - 상품선택
// var leftProductLists = $(".product-search-box > .table-wrapper.left tbody tr");
// leftProductLists.click(function () {
// leftProductLists.removeClass("checked");
// $(this).addClass("checked");
// });
// 체크박스 전체 선택
//
function checkAllCheckBoxes(checkAll, checkbox) {
if (checkAll.prop("checked")) {
checkbox.prop("checked", true);
checkIfColorCheck(checkbox);
} else {
checkbox.prop("checked", false);
checkIfColorCheck(checkbox);
}
}
function checkIfColorCheck(checkbox) {
checkbox.each(function () {
if (!$(this).closest(".b-checkbox").hasClass("tr-color-check")) return;
if ($(this).prop("checked")) {
$(this).closest("tr").addClass("checked");
} else {
$(this).closest("tr").removeClass("checked");
}
});
}
// 테이블 체크박스 전체 선택
var tableCheckAll = $(".table .check-all > input[type=checkbox]");
tableCheckAll.click(function () {
var colIndex = $(this).closest("th").index();
var checkbox = $(this)
.closest(".table")
.find("tbody tr td:nth-child(" + (colIndex + 1) + ") input[type=checkbox]");
checkAllCheckBoxes($(this), checkbox);
});
// multi-select 체크박스 전체 선택
var multiCheckAll = $(".multi-select .check-all > input[type=checkbox]");
multiCheckAll.click(function () {
var checkbox = $(this).closest(".multi-select").find("input[type=checkbox]");
checkAllCheckBoxes($(this), checkbox);
});
// 같은 컨테이너 안의 체크박스 전체 선택
var containerCheckAll = $(".b-checkbox-container .check-all > input[type=checkbox]");
containerCheckAll.click(function () {
var checkbox = $(this).closest(".b-checkbox-container").find("input[type=checkbox]");
checkAllCheckBoxes($(this), checkbox);
});
// Dropzone 파일업로드
if ($("#my-dropzone").length > 0) {
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone("#my-dropzone", {
url: "/file-upload",
maxFilesize: 20,
autoProcessQueue: false,
addRemoveLinks: true,
dictDefaultMessage: "클릭하거나 파일을 여기로 드래그하세요",
dictRemoveFile: "삭제",
dictCancelUpload: "취소",
dictCancelUploadConfirmation: "업로드를 취소하시겠습니까?",
dictInvalidFileType: "이 파일은 업로드할 수 없습니다.",
dictFileTooBig: "파일이 너무 큽니다. ({{filesize}}MB). 최대 파일 크기: {{maxFilesize}}MB.",
dictMaxFilesExceeded: "파일을 더 이상 추가할 수 없습니다.",
dictResponseError: "서버에서 응답을 받지 못했습니다.",
});
}
//주요 게시판 보기 설정
//
// 전체게시판 <-> 노출게시판 이동
var boardLeftSelect = $(".board-setting__left .board-setting__select");
var boardRightSelect = $(".board-setting__right .board-setting__select");
var boardToRightBtn = $(".board-setting__move-btn.right");
var boardToLeftBtn = $(".board-setting__move-btn.left");
boardToRightBtn.click(function (e) {
e.preventDefault();
moveSelectedOptions(boardLeftSelect, boardRightSelect);
});
boardToLeftBtn.click(function (e) {
e.preventDefault();
moveSelectedOptions(boardRightSelect, boardLeftSelect);
});
function moveSelectedOptions(from, to) {
from.find("option:selected").each(function () {
to.append($(this));
});
}
// 노출게시판 순서 변경
var boardUpBtn = $(".board-setting__controls .btn.up");
var boardDownBtn = $(".board-setting__controls .btn.down");
var boardTopBtn = $(".board-setting__controls .btn.top");
var boardBottomBtn = $(".board-setting__controls .btn.bottom");
boardUpBtn.click(function (e) {
e.preventDefault();
var selectElement = $(this)
.closest(".board-setting__controls")
.siblings(".board-setting__select");
if (selectElement.find("option:selected").index() == 0) return;
selectElement.find("option:selected").each(function () {
var current = $(this);
current.insertBefore(current.prev());
});
});
boardDownBtn.click(function (e) {
e.preventDefault();
var selectElement = $(this)
.closest(".board-setting__controls")
.siblings(".board-setting__select");
var selectedOptions = selectElement.find("option:selected");
$([...selectedOptions].reverse()).each(function () {
var currentOption = $(this);
var nextOption = currentOption.next("option:not(:selected)");
if (nextOption.length) {
nextOption.after(currentOption);
}
});
});
boardTopBtn.click(function (e) {
e.preventDefault();
var selectElement = $(this)
.closest(".board-setting__controls")
.siblings(".board-setting__select");
if (selectElement.find("option:selected").index() == 0) return;
var selectedOptions = [];
selectElement.find("option:selected").each(function () {
selectedOptions.push($(this));
});
selectedOptions.reverse().forEach(function (option) {
option.insertBefore(option.siblings().first());
});
});
boardBottomBtn.click(function (e) {
e.preventDefault();
var selectElement = $(this)
.closest(".board-setting__controls")
.siblings(".board-setting__select");
if (selectElement.find("option:selected").index() == selectElement.find("option").length - 1) {
return;
}
selectElement.find("option:selected").each(function () {
var current = $(this);
current.insertAfter(current.siblings().last());
});
});
//테이블 행 삭제
//
var table = $(".table");
var tableDeleteBtn = $("tbody tr .circle-btn.delete");
table.on("click", ".circle-btn.delete", function (e) {
e.preventDefault();
var tbody = $(this).closest("tbody");
var tr = $(this).closest("tr");
var th = $(this).closest("th");
var allHidden = true;
tr.siblings().each(function () {
if ($(this).css("display") !== "none") {
allHidden = false;
}
});
if (th.attr("rowspan") > 1) {
tr.next().remove();
th.attr("rowspan", th.attr("rowspan") - 1);
}
tr.remove();
if (tbody.children().length == 0 || allHidden) {
tbody.append(
"<tr class='row-no-data'><td colspan='100' class='text-center'>데이터가 없습니다.</td></tr>"
);
}
});
// 인풋 텍스트 숫자만 입력, 3자리마다 콤마
//
$(".input-text.time-number").on("input", function () {
var input = $(this).val();
$(this).val(input.replace(/[^0-9]/g, ""));
});
// 체크박스 선택 시, 테이블 행 숨기기/보이기
//
var checkHide = $(".check-hide");
checkHide.hide();
var checkHideTrigger = $(".check-hide-trigger > input[type=checkbox]");
checkHideTrigger.click(function () {
if ($(this).prop("checked")) {
var checkHideId = $(this).attr("data-checkhide");
addRowspan($(this), parseInt($(this).attr("data-rowspan")));
$("#" + checkHideId).show();
} else {
var checkHideId = $(this).attr("data-checkhide");
addRowspan($(this), parseInt($(this).attr("data-rowspan") - 1));
$("#" + checkHideId).hide();
}
});
function addRowspan(check, number) {
var rowspan = 1;
if (number > 1) {
rowspan = number;
}
check.closest("tr").find("th.add-rowspan").attr("rowspan", rowspan);
}
// 라디오 버튼 선택 시, 테이블 숨기기/보이기
//
var radioTab = $(".radio-tab-content");
var radioTabTrigger = $(".radio-tab-trigger > .custom-radio > input[type=radio]");
radioTab.children().hide();
radioTab.each(function () {
$(this).children().eq(0).show();
});
radioTabTrigger.click(function () {
if (!$(this).prop("checked")) {
return;
}
// data-radiotab 값과 id같아야함
var radioTabId = $(this).closest(".radio-tab-trigger").attr("data-radiotab");
var radioTab = $("#" + radioTabId);
radioTab.children().hide();
// var index = $(this).closest(".custom-radio").index();
var index = $(this)
.closest(".radio-tab-trigger")
.find(".custom-radio")
.index($(this).closest(".custom-radio"));
radioTab.children().eq(index).show();
});
// 주문조회 상품 상세 접기/펴기
//
var orderSectionDetail = $(".order-section__detail");
var orderSectionDetailTrigger = $(".order-section__detail-trigger");
orderSectionDetail.hide();
orderSectionDetailTrigger.click(function (e) {
e.preventDefault();
$(this).closest("tr").next(".order-section__detail").toggle();
if ($(this).hasClass("opened")) {
$(this).removeClass("opened");
} else {
$(this).addClass("opened");
}
});
// 호버시 박스 띄우기
//
var hoverBoxTrigger = $(".hover-box-trigger");
var hoverBoxContent = $(".hover-box-content");
hoverBoxContent.hide();
hoverBoxTrigger.hover(function () {
var index = $(this).attr("data-hoverbox");
var selectedHoverContent = $("#" + index);
if ($(this).closest(".modal").length > 0) {
selectedHoverContent.css({
zIndex: 200,
});
}
selectedHoverContent.show();
var left = $(this).offset().left;
var top = $(this).offset().top;
var width = $(this).width();
var height = $(this).height();
selectedHoverContent.css({
left: left + width + 10,
top: top + height / 2 - selectedHoverContent.height() / 2,
});
});
hoverBoxTrigger.mouseleave(function () {
hoverBoxContent.hide();
});
// 주문조회 상품 상세 모두 접기/펴기
//
var orderOpenAll = $(".order-open-all");
orderOpenAll.click(function (e) {
e.preventDefault();
if ($(this).hasClass("opened")) {
$(this).removeClass("opened");
$(this).closest("tr").nextUntil(".order-section__footer", ".order-section__detail").hide();
$(this)
.closest("tr")
.nextUntil(".order-section__footer")
.find(".order-section__detail-trigger")
.removeClass("opened");
$(this).text("모두열기");
} else {
$(this).addClass("opened");
$(this).closest("tr").nextUntil(".order-section__footer", ".order-section__detail").show();
$(this)
.closest("tr")
.nextUntil(".order-section__footer")
.find(".order-section__detail-trigger")
.addClass("opened");
$(this).text("모두닫기");
}
});
// 셀렉트 박스 선택 시, 컨텐츠 보이기/숨기기
// 240123 여러개인 경우도, 적용되게 수정
var selectShowTrigger = $(".select-show-trigger");
var selectShowContent = $(".select-show-content");
selectShowContent.hide();
selectShowTrigger.each(function () {
$(this).siblings(".select-show-content").eq(0).show();
});
selectShowTrigger.find("select").change(function () {
var value = $(this).val();
var currentContent = $(this).closest(".select-show-trigger").siblings(".select-show-content");
currentContent.each(function () {
if (value == $(this).attr("id")) {
$(this).show();
} else {
$(this).hide();
}
});
});
// 참여이벤트 셀렉트 선택
var eventTypeSelect = $("#event-type-select");
var eventTypeSelectContent = $(".event-type-select__content");
eventTypeSelectContent.hide();
eventTypeSelectContent.each(function () {
if ($(this).attr("data-eventtype") == eventTypeSelect.val()) {
$(this).show();
}
});
eventTypeSelect.change(function () {
var value = $(this).val();
eventTypeSelectContent.each(function () {
if (value == $(this).attr("data-eventtype")) {
$(this).show();
} else {
$(this).hide();
}
});
});
// 탭 ui
var tabBox = $(".tab-box");
var tabBoxBtn = $(".tab-box__btn");
var tabBoxContentItems = $(".tab-box__content > *");
tabBoxContentItems.hide();
tabBox.each(function () {
$(this).nextAll($(".tab-box__content")).eq(0).find(tabBoxContentItems).show();
});
tabBoxBtn.click(function (e) {
e.preventDefault();
var index = $(this).index();
$(this).closest(tabBox).find(tabBoxBtn).removeClass("current");
$(this).addClass("current");
$(this).closest(tabBox).nextAll($(".tab-box__content")).find(tabBoxContentItems).hide();
$(this)
.closest(tabBox)
.nextAll($(".tab-box__content"))
.eq(index)
.find(tabBoxContentItems)
.show();
});
// 쿠폰 정보 모달 (모달안에 모달)
$("#coupon-info-pop-trigger").click(function (e) {
$("#coupon-info-pop").modal({
closeExisting: false,
});
});
// 상품 검색
// 왼쪽 영역 클릭 시 오른쪽으로 추가, 오른쪽 영역 더블클릭시 삭제
var productSearchLeftTable = $(".product-search-box > .table-wrapper.left >.table");
var productSearchRightTable = $(".product-search-box > .table-wrapper.right >.table");
var productSearchLeftRow = $(".product-search-box > .table-wrapper.left >.table > tbody > tr");
var productSearchRightRow = $(".product-search-box > .table-wrapper.right >.table > tbody > tr");
productSearchLeftRow.click(function (e) {
var thisId = e.currentTarget.id;
if (productSearchRightTable.find("#" + thisId).length > 0) {
return;
}
$(this).removeClass("checked");
if (productSearchRightRow.length === 0) {
productSearchRightTable.find("tbody > tr").remove();
}
$(this).clone().appendTo(productSearchRightTable.find("tbody"));
productSearchLeftRow.removeClass("checked");
$(this).addClass("checked");
productSearchLeftRow = $(".product-search-box > .table-wrapper.left >.table > tbody > tr");
productSearchRightRow = $(".product-search-box > .table-wrapper.right >.table > tbody > tr");
productSearchRightTable.tableDnDUpdate();
});
productSearchRightTable.on("dblclick", "tr", function (e) {
e.preventDefault();
$(this).remove();
productSearchRightRow = $(".product-search-box > .table-wrapper.right >.table > tbody > tr");
productSearchRightTable.tableDnDUpdate();
if (productSearchRightRow.length === 0) {
productSearchRightTable
.find("tbody")
.append(
"<tr class='row-no-data'><td colspan='100' class='text-center'>선택된 상품이 없습니다.</td></tr>"
);
}
});
// 모달 안에 모달 열었을 때, 기존 모달 닫히지 않게 하기(전역 적용)
$.modal.defaults.closeExisting = false;
// 모달 바깥영역 클릭 시 닫히지 않게 하기(전역 적용)
$.modal.defaults.clickClose = false;
//해당 클래스를 가진 요소 3자리 마다 콤마
$(".comma").each(function () {
var text = $(this).text();
$(this).text(text.replace(/(\d)(?=(?:\d{3})+(?!\d))/g, "$1,"));
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.blocker{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;overflow:auto;z-index:1;padding:20px;box-sizing:border-box;background-color:#000;background-color:rgba(0,0,0,0.75);text-align:center}.blocker:before{content:"";display:inline-block;height:100%;vertical-align:middle;margin-right:-0.05em}.blocker.behind{background-color:transparent}.modal{display:none;vertical-align:middle;position:relative;z-index:2;max-width:500px;box-sizing:border-box;width:90%;background:#fff;padding:15px 30px;-webkit-border-radius:8px;-moz-border-radius:8px;-o-border-radius:8px;-ms-border-radius:8px;border-radius:8px;-webkit-box-shadow:0 0 10px #000;-moz-box-shadow:0 0 10px #000;-o-box-shadow:0 0 10px #000;-ms-box-shadow:0 0 10px #000;box-shadow:0 0 10px #000;text-align:left}.modal a.close-modal{position:absolute;top:-12.5px;right:-12.5px;display:block;width:30px;height:30px;text-indent:-9999px;background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==')}.modal-spinner{display:none;position:fixed;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);padding:12px 16px;border-radius:5px;background-color:#111;height:20px}.modal-spinner>div{border-radius:100px;background-color:#fff;height:20px;width:2px;margin:0 1px;display:inline-block;-webkit-animation:sk-stretchdelay 1.2s infinite ease-in-out;animation:sk-stretchdelay 1.2s infinite ease-in-out}.modal-spinner .rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.modal-spinner .rect3{-webkit-animation-delay:-1.0s;animation-delay:-1.0s}.modal-spinner .rect4{-webkit-animation-delay:-0.9s;animation-delay:-0.9s}@-webkit-keyframes sk-stretchdelay{0%,40%,100%{-webkit-transform:scaleY(0.5)}20%{-webkit-transform:scaleY(1.0)}}@keyframes sk-stretchdelay{0%,40%,100%{transform:scaleY(0.5);-webkit-transform:scaleY(0.5)}20%{transform:scaleY(1.0);-webkit-transform:scaleY(1.0)}}

View File

@@ -0,0 +1,211 @@
/*
A simple jQuery modal (http://github.com/kylefox/jquery-modal)
Version 0.9.2
*/
!(function (o) {
"object" == typeof module && "object" == typeof module.exports
? o(require("jquery"), window, document)
: o(jQuery, window, document);
})(function (o, t, i, e) {
var s = [],
l = function () {
return s.length ? s[s.length - 1] : null;
},
n = function () {
var o,
t = !1;
for (o = s.length - 1; o >= 0; o--)
s[o].$blocker &&
(s[o].$blocker.toggleClass("current", !t).toggleClass("behind", t), (t = !0));
};
(o.modal = function (t, i) {
var e, n;
if (
((this.$body = o("body")),
(this.options = o.extend({}, o.modal.defaults, i)),
(this.options.doFade = !isNaN(parseInt(this.options.fadeDuration, 10))),
(this.$blocker = null),
this.options.closeExisting)
)
for (; o.modal.isActive(); ) o.modal.close();
if ((s.push(this), t.is("a")))
if (((n = t.attr("href")), (this.anchor = t), /^#/.test(n))) {
if (((this.$elm = o(n)), 1 !== this.$elm.length)) return null;
this.$body.append(this.$elm), this.open();
} else
(this.$elm = o("<div>")),
this.$body.append(this.$elm),
(e = function (o, t) {
t.elm.remove();
}),
this.showSpinner(),
t.trigger(o.modal.AJAX_SEND),
o
.get(n)
.done(function (i) {
if (o.modal.isActive()) {
t.trigger(o.modal.AJAX_SUCCESS);
var s = l();
s.$elm.empty().append(i).on(o.modal.CLOSE, e),
s.hideSpinner(),
s.open(),
t.trigger(o.modal.AJAX_COMPLETE);
}
})
.fail(function () {
t.trigger(o.modal.AJAX_FAIL);
var i = l();
i.hideSpinner(), s.pop(), t.trigger(o.modal.AJAX_COMPLETE);
});
else (this.$elm = t), (this.anchor = t), this.$body.append(this.$elm), this.open();
}),
(o.modal.prototype = {
constructor: o.modal,
open: function () {
var t = this;
this.block(),
this.anchor.blur(),
this.options.doFade
? setTimeout(function () {
t.show();
}, this.options.fadeDuration * this.options.fadeDelay)
: this.show(),
o(i)
.off("keydown.modal")
.on("keydown.modal", function (o) {
var t = l();
27 === o.which && t.options.escapeClose && t.close();
}),
this.options.clickClose &&
this.$blocker.click(function (t) {
t.target === this && o.modal.close();
});
},
close: function () {
s.pop(),
this.unblock(),
this.hide(),
o.modal.isActive() || o(i).off("keydown.modal");
},
block: function () {
this.$elm.trigger(o.modal.BEFORE_BLOCK, [this._ctx()]),
this.$body.css("overflow", "hidden"),
(this.$blocker = o(
'<div class="' + this.options.blockerClass + ' blocker current"></div>'
).appendTo(this.$body)),
n(),
this.options.doFade &&
this.$blocker
.css("opacity", 0)
.animate({ opacity: 1 }, this.options.fadeDuration),
this.$elm.trigger(o.modal.BLOCK, [this._ctx()]);
},
unblock: function (t) {
!t && this.options.doFade
? this.$blocker.fadeOut(this.options.fadeDuration, this.unblock.bind(this, !0))
: (this.$blocker.children().appendTo(this.$body),
this.$blocker.remove(),
(this.$blocker = null),
n(),
o.modal.isActive() || this.$body.css("overflow", ""));
},
show: function () {
this.$elm.trigger(o.modal.BEFORE_OPEN, [this._ctx()]),
this.options.showClose &&
((this.closeButton = o(
'<a href="#close-modal" rel="modal:close" class="close-modal ' +
this.options.closeClass +
'">' +
this.options.closeText +
"</a>"
)),
this.$elm.append(this.closeButton)),
this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker),
this.options.doFade
? this.$elm
.css({ opacity: 0, display: "inline-block" })
.animate({ opacity: 1 }, this.options.fadeDuration)
: this.$elm.css("display", "inline-block"),
this.$elm.trigger(o.modal.OPEN, [this._ctx()]);
},
hide: function () {
this.$elm.trigger(o.modal.BEFORE_CLOSE, [this._ctx()]),
this.closeButton && this.closeButton.remove();
var t = this;
this.options.doFade
? this.$elm.fadeOut(this.options.fadeDuration, function () {
t.$elm.trigger(o.modal.AFTER_CLOSE, [t._ctx()]);
})
: this.$elm.hide(0, function () {
t.$elm.trigger(o.modal.AFTER_CLOSE, [t._ctx()]);
}),
this.$elm.trigger(o.modal.CLOSE, [this._ctx()]);
},
showSpinner: function () {
this.options.showSpinner &&
((this.spinner =
this.spinner ||
o('<div class="' + this.options.modalClass + '-spinner"></div>').append(
this.options.spinnerHtml
)),
this.$body.append(this.spinner),
this.spinner.show());
},
hideSpinner: function () {
this.spinner && this.spinner.remove();
},
_ctx: function () {
return {
elm: this.$elm,
$elm: this.$elm,
$blocker: this.$blocker,
options: this.options,
$anchor: this.anchor,
};
},
}),
(o.modal.close = function (t) {
if (o.modal.isActive()) {
t && t.preventDefault();
var i = l();
return i.close(), i.$elm;
}
}),
(o.modal.isActive = function () {
return s.length > 0;
}),
(o.modal.getCurrent = l),
(o.modal.defaults = {
closeExisting: !0,
escapeClose: !0,
clickClose: !0,
closeText: "닫기",
closeClass: "",
modalClass: "modal",
blockerClass: "jquery-modal",
spinnerHtml:
'<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',
showSpinner: !0,
showClose: !0,
fadeDuration: null,
fadeDelay: 1,
}),
(o.modal.BEFORE_BLOCK = "modal:before-block"),
(o.modal.BLOCK = "modal:block"),
(o.modal.BEFORE_OPEN = "modal:before-open"),
(o.modal.OPEN = "modal:open"),
(o.modal.BEFORE_CLOSE = "modal:before-close"),
(o.modal.CLOSE = "modal:close"),
(o.modal.AFTER_CLOSE = "modal:after-close"),
(o.modal.AJAX_SEND = "modal:ajax:send"),
(o.modal.AJAX_SUCCESS = "modal:ajax:success"),
(o.modal.AJAX_FAIL = "modal:ajax:fail"),
(o.modal.AJAX_COMPLETE = "modal:ajax:complete"),
(o.fn.modal = function (t) {
return 1 === this.length && new o.modal(this, t), this;
}),
o(i).on("click.modal", 'a[rel~="modal:close"]', o.modal.close),
o(i).on("click.modal", 'a[rel~="modal:open"]', function (t) {
t.preventDefault(), o(this).modal();
});
});

View File

@@ -0,0 +1,117 @@
/* jQuery Nice Select - v1.0
https://github.com/hernansartorio/jquery-nice-select
Made by Hernán Sartorio */
!(function (e) {
e.fn.niceSelect = function (t) {
function s(t) {
t.after(
e("<div></div>")
.addClass("nice-select")
.addClass(t.attr("class") || "")
.addClass(t.attr("disabled") ? "disabled" : "")
.attr("tabindex", t.attr("disabled") ? null : "0")
.html('<span class="current"></span><ul class="list"></ul>')
);
var s = t.next(),
n = t.find("option"),
i = t.find("option:selected");
s.find(".current").html(i.data("display") || i.text()),
n.each(function (t) {
var n = e(this),
i = n.data("display");
s.find("ul").append(
e("<li></li>")
.attr("data-value", n.val())
.attr("data-display", i || null)
.addClass(
"option" +
(n.is(":selected") ? " selected" : "") +
(n.is(":disabled") ? " disabled" : "")
)
.html(n.text())
);
});
}
if ("string" == typeof t)
return (
"update" == t
? this.each(function () {
var t = e(this),
n = e(this).next(".nice-select"),
i = n.hasClass("open");
n.length && (n.remove(), s(t), i && t.next().trigger("click"));
})
: "destroy" == t
? (this.each(function () {
var t = e(this),
s = e(this).next(".nice-select");
s.length && (s.remove(), t.css("display", ""));
}),
0 == e(".nice-select").length && e(document).off(".nice_select"))
: console.log('Method "' + t + '" does not exist.'),
this
);
this.hide(),
this.each(function () {
var t = e(this);
t.next().hasClass("nice-select") || s(t);
}),
e(document).off(".nice_select"),
e(document).on("click.nice_select", ".nice-select", function (t) {
var s = e(this);
e(".nice-select").not(s).removeClass("open"),
s.toggleClass("open"),
s.hasClass("open")
? (s.find(".option"),
s.find(".focus").removeClass("focus"),
s.find(".selected").addClass("focus"))
: s.focus();
}),
e(document).on("click.nice_select", function (t) {
0 === e(t.target).closest(".nice-select").length &&
e(".nice-select").removeClass("open").find(".option");
}),
e(document).on(
"click.nice_select",
".nice-select .option:not(.disabled)",
function (t) {
var s = e(this),
n = s.closest(".nice-select");
n.find(".selected").removeClass("selected"), s.addClass("selected");
var i = s.data("display") || s.text();
n.find(".current").text(i),
n.prev("select").val(s.data("value")).trigger("change");
}
),
e(document).on("keydown.nice_select", ".nice-select", function (t) {
var s = e(this),
n = e(s.find(".focus") || s.find(".list .option.selected"));
if (32 == t.keyCode || 13 == t.keyCode)
return s.hasClass("open") ? n.trigger("click") : s.trigger("click"), !1;
if (40 == t.keyCode) {
if (s.hasClass("open")) {
var i = n.nextAll(".option:not(.disabled)").first();
i.length > 0 &&
(s.find(".focus").removeClass("focus"), i.addClass("focus"));
} else s.trigger("click");
return !1;
}
if (38 == t.keyCode) {
if (s.hasClass("open")) {
var l = n.prevAll(".option:not(.disabled)").first();
l.length > 0 &&
(s.find(".focus").removeClass("focus"), l.addClass("focus"));
} else s.trigger("click");
return !1;
}
if (27 == t.keyCode) s.hasClass("open") && s.trigger("click");
else if (9 == t.keyCode && s.hasClass("open")) return !1;
});
var n = document.createElement("a").style;
return (
(n.cssText = "pointer-events:auto"),
"auto" !== n.pointerEvents && e("html").addClass("no-csspointerevents"),
this
);
};
})(jQuery);

Some files were not shown because too many files have changed in this diff Show More