Added success and failure callbacks to the method that submits the index form
This commit is contained in:
parent
83a78269b4
commit
5f0c8ca155
@ -2776,7 +2776,7 @@ AJAX.registerOnload('functions.js', function() {
|
||||
});
|
||||
});
|
||||
|
||||
function indexEditorDialog(url, title)
|
||||
function indexEditorDialog(url, title, callback_success, callback_failure)
|
||||
{
|
||||
/*Remove the hidden dialogs if there are*/
|
||||
if ($('#edit_index_dialog').length != 0) {
|
||||
@ -2820,6 +2820,9 @@ function indexEditorDialog(url, title)
|
||||
$("#edit_index_dialog").dialog("close");
|
||||
}
|
||||
$('div.no_indexes_defined').hide();
|
||||
if(callback_success) {
|
||||
callback_success();
|
||||
}
|
||||
PMA_reloadNavigation();
|
||||
} else {
|
||||
var $temp_div = $("<div id='temp_div'><div>").append(data.error);
|
||||
@ -2828,6 +2831,9 @@ function indexEditorDialog(url, title)
|
||||
} else {
|
||||
var $error = $temp_div;
|
||||
}
|
||||
if(callback_failure) {
|
||||
callback_failure();
|
||||
}
|
||||
PMA_ajaxShowMessage($error, false);
|
||||
}
|
||||
}); // end $.post()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user