Permalink
Browse files

NotesBrowser: confirm deletion dialog

  • Loading branch information...
1 parent 4bc1f9c commit e848dd05f3ad53512f44ba5644413125b40d1bbf @etdsoft etdsoft committed May 24, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 app/assets/javascripts/dx/dradis.notes.NotesBrowserPanel.js
@@ -220,8 +220,19 @@ dradis.notes.Grid=Ext.extend(Ext.grid.EditorGridPanel, {
itemclick: function(item){
var s1 = item.parentMenu.grid.getStore();
var s2 = item.parentMenu.grid.store;
- item.parentMenu.grid.getStore().remove( item.parentMenu.record );
- item.parentMenu.grid.fireEvent('modified');
+
+ Ext.Msg.show({
+ title: 'Confirm deletion',
+ msg: 'You have chosen to delete these notes, there is no going back. Continue?',
+ buttons: Ext.Msg.OKCANCEL,
+ fn: function(button){
+ if (button == 'ok') {
+ item.parentMenu.grid.getStore().remove( item.parentMenu.record );
+ item.parentMenu.grid.fireEvent('modified');
+ }
+ },
+ icon: Ext.MessageBox.QUESTION
+ });
}
}
})

0 comments on commit e848dd0

Please sign in to comment.