diff --git a/src/main/resources/static/js/faStatistics/unlawfulFishing/illegalShipSailor.js b/src/main/resources/static/js/faStatistics/unlawfulFishing/illegalShipSailor.js index f679f207..32196a72 100644 --- a/src/main/resources/static/js/faStatistics/unlawfulFishing/illegalShipSailor.js +++ b/src/main/resources/static/js/faStatistics/unlawfulFishing/illegalShipSailor.js @@ -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 diff --git a/src/main/resources/templates/faStatistics/unlawfulFishing/illegalShipSailor/issAddModal.html b/src/main/resources/templates/faStatistics/unlawfulFishing/illegalShipSailor/issAddModal.html index 9ea79981..b1f79be4 100644 --- a/src/main/resources/templates/faStatistics/unlawfulFishing/illegalShipSailor/issAddModal.html +++ b/src/main/resources/templates/faStatistics/unlawfulFishing/illegalShipSailor/issAddModal.html @@ -26,7 +26,7 @@