diff --git a/js/functions.js b/js/functions.js index 9bc7b6f7e..e204041ed 100755 --- a/js/functions.js +++ b/js/functions.js @@ -1962,6 +1962,30 @@ $(document).ready(function() { }) //end Drop Event + //Drop Procedure + $('.drop_procedure_anchor').live('click', function(event) { + event.preventDefault(); + + var curr_proc_row = $(this).parents('tr'); + var question = $(curr_proc_row).children('.drop_procedure_sql').val(); + + $(this).PMA_confirm(question, $(this).attr('href'), function(url) { + + PMA_ajaxShowMessage(PMA_messages['strDroppingProcedure']); + + $.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) { + if(data.success == true) { + PMA_ajaxShowMessage(data.message); + $(curr_event_row).hide("medium").remove(); + } + else { + PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error); + } + }) + }) + }) + //end Drop Procedure + }, 'top.frame_content'); //end $(document).ready() for db_structure.php /** diff --git a/js/messages.php b/js/messages.php index 7f0ea8810..23ae1444d 100755 --- a/js/messages.php +++ b/js/messages.php @@ -30,6 +30,7 @@ $js_messages['strNoDropDatabases'] = __('"DROP DATABASE" statements are disabled $js_messages['strDoYouReally'] = __('Do you really want to '); $js_messages['strDropDatabaseStrongWarning'] = __('You are about to DESTROY a complete database!'); $js_messages['strDroppingEvent'] = __('Dropping Event'); +$js_messages['strDroppingProcedure'] = __('Dropping Procedure'); /* For blobstreaming */ $js_messages['strBLOBRepositoryDisableStrongWarning'] = __('You are about to DISABLE a BLOB Repository!'); diff --git a/libraries/db_routines.inc.php b/libraries/db_routines.inc.php index 5235ab518..1ec501313 100755 --- a/libraries/db_routines.inc.php +++ b/libraries/db_routines.inc.php @@ -76,13 +76,15 @@ if ($routines) {