From d5ed68aa71760193420ea33eaa3309a114571ab2 Mon Sep 17 00:00:00 2001 From: ninadsp Date: Sun, 11 Jul 2010 02:32:10 +0530 Subject: [PATCH] Removed inline call to confirmLink() for 'Drop Procedure' --- js/functions.js | 24 ++++++++++++++++++++++++ js/messages.php | 1 + libraries/db_routines.inc.php | 6 ++++-- 3 files changed, 29 insertions(+), 2 deletions(-) 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) { %s %s %s + ', ($ct%2 == 0) ? 'even' : 'odd', $routine['ROUTINE_NAME'], ! empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&sql_query=' . urlencode($definition) . '&show_query=1&delimiter=' . urlencode($delimiter), $titles['Structure']) : ' ', - '' . $titles['Drop'] . '', + '' . $titles['Drop'] . '', $routine['ROUTINE_TYPE'], - $routine['DTD_IDENTIFIER']); + $routine['DTD_IDENTIFIER'], + $sqlDropProc); $ct++; } echo '';