Add confirmation before deletion.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
Hugues Peccatte 2014-02-24 19:56:38 +01:00
parent 4093df7b32
commit 1fa4cdf800
2 changed files with 6 additions and 0 deletions

View File

@ -50,6 +50,11 @@ AJAX.registerOnload('db_qbe.js', function () {
* Ajax event handlers for 'Delete search'
*/
$("#deleteSearch").live('click', function (event) {
var question = $.sprintf(PMA_messages.strConfirmDeleteQBESearch, $("#searchId option:selected").text());
if (!confirm(question)) {
return false;
}
$('#action').val('delete');
});
});

View File

@ -42,6 +42,7 @@ $js_messages['strDeletingTrackingData'] = __('Deleting tracking data');
$js_messages['strDroppingPrimaryKeyIndex'] = __('Dropping Primary Key/Index');
$js_messages['strOperationTakesLongTime'] = __('This operation could take a long time. Proceed anyway?');
$js_messages['strDropUserGroupWarning'] = __('Do you really want to delete user group "%s"?');
$js_messages['strConfirmDeleteQBESearch'] = __('Do you really want to delete the search "%s"?');
/* For indexes */
$js_messages['strFormEmpty'] = __('Missing value in the form!');