Add basic support for deletion speedbump for row data

This commit is contained in:
Lance Edgar 2017-05-04 16:35:21 -05:00
parent 72ae1191a0
commit 9107a26b63
3 changed files with 15 additions and 2 deletions

View file

@ -185,6 +185,13 @@
this.element.on('mouseleave', '.actions div.more', function() {
$(this).hide();
});
// Add speed bump for "Delete Row" action, if grid is so configured.
if (this.grid.data('delete-speedbump')) {
this.element.on('click', 'tbody td.actions a.delete', function() {
return confirm("Are you sure you wish to delete this object?");
});
}
},
// Refreshes the visible data within the grid, according to the given settings.