Skip to content

Commit

Permalink
[#89] Add confirmation for delete setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ishiDACo committed Sep 28, 2020
1 parent 3b42b97 commit a1ee34a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions dist/js/vulsrepo.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,16 @@ const setEvents = function() {
});

$("#delete_pivot_conf").click(function() {
db.removePivotConf($("#drop_topmenu_hiddenValue").attr('value'));
db.remove("vulsrepo_pivot_conf");
$("#drop_topmenu_visibleValue").html("Select setting");
$("#drop_topnemu_hiddenValue").val("");
filterDisp.off("#label_pivot_conf");
fadeAlert("#alert_pivot_conf");
initPivotTable();
let ret = confirm("Are you sure to delete?");
if (ret === true) {
db.removePivotConf($("#drop_topmenu_hiddenValue").attr('value'));
db.remove("vulsrepo_pivot_conf");
$("#drop_topmenu_visibleValue").html("Select setting");
$("#drop_topnemu_hiddenValue").val("");
filterDisp.off("#label_pivot_conf");
fadeAlert("#alert_pivot_conf");
initPivotTable();
}
});

$("#clear_pivot_conf").click(function() {
Expand Down

0 comments on commit a1ee34a

Please sign in to comment.