FAISP/src/main/resources/static/js/counterIntelligence/ciWork.js

46 lines
1012 B
JavaScript
Raw Normal View History

2022-12-29 09:16:45 +00:00
$(document).on('click', '#addCiWorkBtn', function (){
getCiWorkEditModal(null);
})
$(document).on('click', '#arrestType1', function (){
getArrestType2Option(this.value);
})
function getCiWorkEditModal(ciwKey){
$.ajax({
url: '/counterIntelligence/ciWorkEditModal',
data: {ciwKey: ciwKey},
type: 'GET',
dataType:"html",
success: function(html){
$("#ciWorkEditModalContent").empty().append(html)
$(".dateSelector").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
});
setUploadDiv();
setEditor('editor', '400');
$("#ciWorkEditModal").modal('show');
},
error:function(){
}
});
}
function getArrestType2Option(categoryCd){
$.ajax({
url: '/selectBoxOptions',
data: {categoryCd: categoryCd},
type: 'GET',
dataType:"html",
success: function(html){
const arrestType2 = $("#arrestType2");
arrestType2.empty().append(html);
},
error:function(){
}
});
}