Conditional Ajax for DROP TRIGGER
This commit is contained in:
@@ -1830,6 +1830,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Attach Ajax event handlers for Drop Trigger. Used on tbl_structure.php
|
* Attach Ajax event handlers for Drop Trigger. Used on tbl_structure.php
|
||||||
|
* @see $cfg['AjaxEnable']
|
||||||
*/
|
*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
@@ -28,6 +28,12 @@ if ($triggers) {
|
|||||||
__('Event'));
|
__('Event'));
|
||||||
$ct=0;
|
$ct=0;
|
||||||
$delimiter = '//';
|
$delimiter = '//';
|
||||||
|
if ($GLOBALS['cfg']['AjaxEnable']) {
|
||||||
|
$conditional_class = 'class="drop_trigger_anchor"';
|
||||||
|
} else {
|
||||||
|
$conditional_class = '';
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($triggers as $trigger) {
|
foreach ($triggers as $trigger) {
|
||||||
$drop_and_create = $trigger['drop'] . $delimiter . "\n" . $trigger['create'] . "\n";
|
$drop_and_create = $trigger['drop'] . $delimiter . "\n" . $trigger['create'] . "\n";
|
||||||
|
|
||||||
@@ -41,7 +47,7 @@ if ($triggers) {
|
|||||||
($ct%2 == 0) ? 'even' : 'odd',
|
($ct%2 == 0) ? 'even' : 'odd',
|
||||||
$trigger['name'],
|
$trigger['name'],
|
||||||
PMA_linkOrButton('tbl_sql.php?' . $url_query . '&sql_query=' . urlencode($drop_and_create) . '&show_query=1&delimiter=' . urlencode($delimiter), $titles['Change']),
|
PMA_linkOrButton('tbl_sql.php?' . $url_query . '&sql_query=' . urlencode($drop_and_create) . '&show_query=1&delimiter=' . urlencode($delimiter), $titles['Change']),
|
||||||
'<a class="drop_trigger_anchor" href="sql.php?' . $url_query . '&sql_query=' . urlencode($trigger['drop']) . '" >' . $titles['Drop'] . '</a>',
|
'<a ' . $conditional_class . ' href="sql.php?' . $url_query . '&sql_query=' . urlencode($trigger['drop']) . '" >' . $titles['Drop'] . '</a>',
|
||||||
$trigger['action_timing'],
|
$trigger['action_timing'],
|
||||||
$trigger['event_manipulation']);
|
$trigger['event_manipulation']);
|
||||||
$ct++;
|
$ct++;
|
||||||
|
Reference in New Issue
Block a user