|
|
|
@ -36,6 +36,11 @@
|
|
|
|
|
$(".management-project-packages-form").submit();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#managements-project-packages-list').on('click', '.delete-btn', function(){
|
|
|
|
|
var id = $(this).data("id");
|
|
|
|
|
op_confirm_tip_1("是否确认删除?", "deleteProjectPackage(" + id + ");")
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var locale = {
|
|
|
|
|
clearText: '清除',
|
|
|
|
|
clearStatus: '清除已选日期',
|
|
|
|
@ -86,4 +91,25 @@
|
|
|
|
|
|
|
|
|
|
form.submit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function deleteProjectPackage(id){
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "DELETE",
|
|
|
|
|
url: "<%= managements_project_packages_path %>/" + id,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
$('.popupAll').remove();
|
|
|
|
|
|
|
|
|
|
if(data && data.status == 0){
|
|
|
|
|
$('#managements-project-packages-list .project-package-item.project-package-' + id).remove();
|
|
|
|
|
|
|
|
|
|
if($('#managements-project-packages-list .project-package-item').length == 0){
|
|
|
|
|
$.ajax({ dataType: 'script', url: "<%= raw managements_project_packages_path(params.except(:controller, :action)) %>" });
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
notice_box(data.message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
</script>
|