Conditional Ajax on table Structure
This commit is contained in:
@@ -24,6 +24,7 @@ $(document).ready(function() {
|
|||||||
*
|
*
|
||||||
* @uses $.PMA_confirm()
|
* @uses $.PMA_confirm()
|
||||||
* @uses PMA_ajaxShowMessage()
|
* @uses PMA_ajaxShowMessage()
|
||||||
|
* (see $GLOBALS['cfg']['AjaxEnable'])
|
||||||
*/
|
*/
|
||||||
$(".drop_column_anchor").live('click', function(event) {
|
$(".drop_column_anchor").live('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -66,6 +67,7 @@ $(document).ready(function() {
|
|||||||
*
|
*
|
||||||
* @uses $.PMA_confirm()
|
* @uses $.PMA_confirm()
|
||||||
* @uses PMA_ajaxShowMessage()
|
* @uses PMA_ajaxShowMessage()
|
||||||
|
* (see $GLOBALS['cfg']['AjaxEnable'])
|
||||||
*/
|
*/
|
||||||
$(".action_primary a").live('click', function(event) {
|
$(".action_primary a").live('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -107,6 +109,7 @@ $(document).ready(function() {
|
|||||||
*
|
*
|
||||||
* @uses $.PMA_confirm()
|
* @uses $.PMA_confirm()
|
||||||
* @uses PMA_ajaxShowMessage()
|
* @uses PMA_ajaxShowMessage()
|
||||||
|
* (see $GLOBALS['cfg']['AjaxEnable'])
|
||||||
*/
|
*/
|
||||||
$('.drop_primary_key_index_anchor').live('click', function(event) {
|
$('.drop_primary_key_index_anchor').live('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@@ -477,7 +477,11 @@ class PMA_Index
|
|||||||
}
|
}
|
||||||
|
|
||||||
$r .= '<td ' . $row_span . '>'
|
$r .= '<td ' . $row_span . '>'
|
||||||
. ' <a class="drop_primary_key_index_anchor" href="sql.php' . PMA_generate_common_url($this_params)
|
. ' <a ';
|
||||||
|
if ($GLOBALS['cfg']['AjaxEnable']) {
|
||||||
|
$r .= 'class="drop_primary_key_index_anchor" ';
|
||||||
|
}
|
||||||
|
$r .= ' href="sql.php' . PMA_generate_common_url($this_params)
|
||||||
. '" >'
|
. '" >'
|
||||||
. PMA_getIcon('b_drop.png', __('Drop')) . '</a>'
|
. PMA_getIcon('b_drop.png', __('Drop')) . '</a>'
|
||||||
. '</td>' . "\n";
|
. '</td>' . "\n";
|
||||||
|
@@ -394,7 +394,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
|
|||||||
<?php echo $titles['Change']; ?></a>
|
<?php echo $titles['Change']; ?></a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center" class="drop">
|
<td align="center" class="drop">
|
||||||
<a class="drop_column_anchor" href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP ' . PMA_backquote($row['Field'])); ?>&dropped_column=<?php echo urlencode($row['Field']); ?>&message_to_show=<?php echo urlencode(sprintf(__('Column %s has been dropped'), htmlspecialchars($row['Field']))); ?>" >
|
<a <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="drop_column_anchor"' : ''); ?> href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP ' . PMA_backquote($row['Field'])); ?>&dropped_column=<?php echo urlencode($row['Field']); ?>&message_to_show=<?php echo urlencode(sprintf(__('Column %s has been dropped'), htmlspecialchars($row['Field']))); ?>" >
|
||||||
<?php echo $titles['Drop']; ?></a>
|
<?php echo $titles['Drop']; ?></a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center" class="primary">
|
<td align="center" class="primary">
|
||||||
@@ -476,7 +476,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
|
|||||||
<?php echo $hidden_titles['BrowseDistinctValues']; ?>
|
<?php echo $hidden_titles['BrowseDistinctValues']; ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="action_primary">
|
<div <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="action_primary"' : ''); ?>>
|
||||||
<?php
|
<?php
|
||||||
if(isset($primary_enabled)) {
|
if(isset($primary_enabled)) {
|
||||||
if($primary_enabled) { ?>
|
if($primary_enabled) { ?>
|
||||||
|
Reference in New Issue
Block a user