Removed inline call to confirmLink() for 'Drop Procedure'

This commit is contained in:
ninadsp
2010-07-11 02:32:10 +05:30
parent 70a8735c07
commit d5ed68aa71
3 changed files with 29 additions and 2 deletions

View File

@@ -1962,6 +1962,30 @@ $(document).ready(function() {
}) })
//end Drop Event //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 }, 'top.frame_content'); //end $(document).ready() for db_structure.php
/** /**

View File

@@ -30,6 +30,7 @@ $js_messages['strNoDropDatabases'] = __('"DROP DATABASE" statements are disabled
$js_messages['strDoYouReally'] = __('Do you really want to '); $js_messages['strDoYouReally'] = __('Do you really want to ');
$js_messages['strDropDatabaseStrongWarning'] = __('You are about to DESTROY a complete database!'); $js_messages['strDropDatabaseStrongWarning'] = __('You are about to DESTROY a complete database!');
$js_messages['strDroppingEvent'] = __('Dropping Event'); $js_messages['strDroppingEvent'] = __('Dropping Event');
$js_messages['strDroppingProcedure'] = __('Dropping Procedure');
/* For blobstreaming */ /* For blobstreaming */
$js_messages['strBLOBRepositoryDisableStrongWarning'] = __('You are about to DISABLE a BLOB Repository!'); $js_messages['strBLOBRepositoryDisableStrongWarning'] = __('You are about to DISABLE a BLOB Repository!');

View File

@@ -76,13 +76,15 @@ if ($routines) {
<td>%s</td> <td>%s</td>
<td>%s</td> <td>%s</td>
<td>%s</td> <td>%s</td>
<input type="hidden" class="drop_procedure_sql" value="%s" />
</tr>', </tr>',
($ct%2 == 0) ? 'even' : 'odd', ($ct%2 == 0) ? 'even' : 'odd',
$routine['ROUTINE_NAME'], $routine['ROUTINE_NAME'],
! empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($definition) . '&amp;show_query=1&amp;delimiter=' . urlencode($delimiter), $titles['Structure']) : '&nbsp;', ! empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($definition) . '&amp;show_query=1&amp;delimiter=' . urlencode($delimiter), $titles['Structure']) : '&nbsp;',
'<a href="sql.php?' . $url_query . '&amp;sql_query=' . urlencode($sqlDropProc) . '" onclick="return confirmLink(this, \'' . PMA_jsFormat($sqlDropProc, false) . '\')">' . $titles['Drop'] . '</a>', '<a class="drop_procedure_anchor" href="sql.php?' . $url_query . '&amp;sql_query=' . urlencode($sqlDropProc) . '" >' . $titles['Drop'] . '</a>',
$routine['ROUTINE_TYPE'], $routine['ROUTINE_TYPE'],
$routine['DTD_IDENTIFIER']); $routine['DTD_IDENTIFIER'],
$sqlDropProc);
$ct++; $ct++;
} }
echo '</table>'; echo '</table>';