summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-03-04 00:04:29 +0200
committerAlon Levy <alon@pobox.com>2015-03-04 00:04:29 +0200
commitc7e98ed7a5ffb6a8e555a9e2e78eec5ed3c12ef7 (patch)
tree408240a80bacc7432137badce98b53d172a03112 /src
parentbcf12942bb7ad875ff46cc58992f726466318268 (diff)
client/view/selection: add confirm dialog to delete button
Diffstat (limited to 'src')
-rw-r--r--src/client/view/selection.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/view/selection.js b/src/client/view/selection.js
index cc752058..cd16ef51 100644
--- a/src/client/view/selection.js
+++ b/src/client/view/selection.js
@@ -229,7 +229,11 @@ var setup_merge_button = function(main_graph)
main_graph.nodes__merge(root_nodes_ids());
},
delete_root_selection = function() {
- main_graph.nodes__delete(root_nodes_ids());
+ var ids = root_nodes_ids();
+
+ if (confirm('you are deleting ' + ids.length + ' nodes, are you sure?')) {
+ main_graph.nodes__delete(ids);
+ }
},
link_fan_root_selection = function() {
main_graph.nodes__link_fan(root_nodes_ids());