From 5f0c8ca155e2bb50f3dfe7cf3780908ba67f61b2 Mon Sep 17 00:00:00 2001 From: Mohamed Ashraf Date: Thu, 21 Mar 2013 14:32:13 +0200 Subject: [PATCH] Added success and failure callbacks to the method that submits the index form --- js/functions.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/functions.js b/js/functions.js index 1c33569de9..bb619724f1 100644 --- a/js/functions.js +++ b/js/functions.js @@ -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 = $("
").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()