Skip to content

Commit

Permalink
NotesBrowser: confirm deletion dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
etdsoft committed May 24, 2012
1 parent 4bc1f9c commit e848dd0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions app/assets/javascripts/dx/dradis.notes.NotesBrowserPanel.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -220,8 +220,19 @@ dradis.notes.Grid=Ext.extend(Ext.grid.EditorGridPanel, {
itemclick: function(item){ itemclick: function(item){
var s1 = item.parentMenu.grid.getStore(); var s1 = item.parentMenu.grid.getStore();
var s2 = item.parentMenu.grid.store; 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
});
} }
} }
}) })
Expand Down

0 comments on commit e848dd0

Please sign in to comment.