Removed inline coding for Drop Trigger in libraries/tbl_triggers.lib.php
This commit is contained in:
@@ -1930,3 +1930,35 @@ $(document).ready(function() {
|
||||
})
|
||||
})
|
||||
}); //end $(document).ready() for libraries/tbl_links.inc.php
|
||||
|
||||
/**
|
||||
* jQuery coding for Drop Trigger. Used on tbl_structure.php
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
|
||||
$(".drop_trigger_anchor").live('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var curr_row = $(this).parents('tr');
|
||||
var question = 'DROP TRIGGER IF EXISTS `' + $(curr_row).children('td:first').text() + '`';
|
||||
|
||||
$(this).PMA_confirm(question, $(this).attr('href'), function(url) {
|
||||
|
||||
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
|
||||
$.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) {
|
||||
if(data.success == true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
$("#topmenucontainer")
|
||||
.next('div')
|
||||
.remove()
|
||||
.end()
|
||||
.after(data.sql_query);
|
||||
$(curr_row).hide("medium").remove();
|
||||
}
|
||||
else {
|
||||
PMA_ajaxShowMessage(data.error);
|
||||
}
|
||||
}) // end $.get
|
||||
})
|
||||
})
|
||||
}); //end $(document).ready() for Drop Trigger
|
@@ -42,7 +42,7 @@ if ($triggers) {
|
||||
($ct%2 == 0) ? 'even' : 'odd',
|
||||
$trigger['name'],
|
||||
PMA_linkOrButton('tbl_sql.php?' . $url_query . '&sql_query=' . urlencode($drop_and_create) . '&show_query=1&delimiter=' . urlencode($delimiter), $titles['Change']),
|
||||
'<a href="sql.php?' . $url_query . '&sql_query=' . urlencode($trigger['drop']) . '" onclick="return confirmLink(this, \'' . PMA_jsFormat($trigger['drop'], false) . '\')">' . $titles['Drop'] . '</a>',
|
||||
'<a class="drop_trigger_anchor" href="sql.php?' . $url_query . '&sql_query=' . urlencode($trigger['drop']) . '" >' . $titles['Drop'] . '</a>',
|
||||
$trigger['action_timing'],
|
||||
$trigger['event_manipulation']);
|
||||
$ct++;
|
||||
|
Reference in New Issue
Block a user