선원세부현황 작업중.
parent
8d8cbdfe55
commit
739d573307
|
|
@ -5,7 +5,13 @@ $(document).on('click', '#addIllegalShipSailorBtn', function (){
|
|||
|
||||
$(document).on('click', '#addSailorTab', function (){
|
||||
const sailorTab = $("#sailorTab")
|
||||
const sailorCnt = sailorTab.children().length;
|
||||
let sailorCnt = 1;
|
||||
if(sailorTab.children().length>=2) {
|
||||
sailorCnt = sailorTab.children()[sailorTab.children().length - 2].innerText.replace('선원', '');
|
||||
if(!isNaN(Number(sailorCnt))){
|
||||
sailorCnt = Number(sailorCnt)+1;
|
||||
}
|
||||
}
|
||||
const newTabLiHtml = $("#sailorTabEmptyLi").children().clone();
|
||||
|
||||
const liButton = newTabLiHtml.children();
|
||||
|
|
@ -18,6 +24,12 @@ $(document).on('click', '#addSailorTab', function (){
|
|||
newTabContentHtml[0].id = "sailor"+sailorCnt+"TabPanel";
|
||||
$(newTabContentHtml).attr("aria-labelledby", "sailor"+sailorCnt+"Tab");
|
||||
|
||||
$(newTabContentHtml).find(".birthdate").datepicker({
|
||||
startView: 3,
|
||||
format: "yyyy-mm-dd",
|
||||
language: "ko",
|
||||
autoclose: true
|
||||
});
|
||||
sailorTab.append(newTabLiHtml);
|
||||
$("#sailorTabContent").append(newTabContentHtml);
|
||||
sailorTab.append($("#addSailorTab").parents("li"))
|
||||
|
|
@ -31,6 +43,10 @@ $(document).on('click', '.deleteTab', function (){
|
|||
targetContent.remove()
|
||||
})
|
||||
|
||||
$(document).on('click', '.saveEditInfoBtn', function (){
|
||||
|
||||
})
|
||||
|
||||
function getIssAddModal(){
|
||||
$.ajax({
|
||||
url: '/unlawfulFishing/issAddModal',
|
||||
|
|
@ -39,7 +55,8 @@ function getIssAddModal(){
|
|||
success: function(html){
|
||||
const contentDiv = $("#issAddModalContent");
|
||||
contentDiv.empty().append(html)
|
||||
$(".dateSelector").datepicker({
|
||||
$(".birthdate").datepicker({
|
||||
startView: 3,
|
||||
format: "yyyy-mm-dd",
|
||||
language: "ko",
|
||||
autoclose: true
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<div class="tab-content bg-white border border-top-0" id="sailorTabContent">
|
||||
<div class="tab-pane fade p-2 show active" id="sailor1TabPanel" role="tabpanel" aria-labelledby="sailor1Tab" tabindex="0">
|
||||
<div class="tab-pane sailorInfo fade p-2 show active" id="sailor1TabPanel" role="tabpanel" aria-labelledby="sailor1Tab" tabindex="0">
|
||||
<div class="row justify-content-end mb-1">
|
||||
<input type="button" class="btn btn-sm btn-danger col-1 mx-2 deleteTab" value="삭제">
|
||||
</div>
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-warning saveEditInfoBtn" data-status="DST001">임시저장</button>
|
||||
<!--<button type="button" class="btn btn-warning saveEditInfoBtn" data-status="DST001">임시저장</button>-->
|
||||
<button type="button" class="btn btn-primary saveEditInfoBtn" data-status="DST007">저장</button>
|
||||
</div>
|
||||
|
||||
|
|
@ -150,7 +150,7 @@
|
|||
</li>
|
||||
</div>
|
||||
<div class="d-none" id="sailorTabEmptyDiv">
|
||||
<div class="tab-pane fade p-2" role="tabpanel" tabindex="0">
|
||||
<div class="tab-pane sailorInfo fade p-2" role="tabpanel" tabindex="0">
|
||||
<div class="row justify-content-end mb-1">
|
||||
<input type="button" class="btn btn-sm btn-danger col-1 mx-2 deleteTab" value="삭제">
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue