Removed the inline call to confirmLink() and instead attached the jQuery call to it. jQuery call attached to the proper class
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//Drop Column
|
|
||||||
/**
|
/**
|
||||||
* Attach Event Handler for 'Drop Column'
|
* Attach Event Handler for 'Drop Column'
|
||||||
*
|
*
|
||||||
@@ -60,14 +60,13 @@ $(document).ready(function() {
|
|||||||
}); // end $.PMA_confirm()
|
}); // end $.PMA_confirm()
|
||||||
}) ; //end of Drop Column Anchor action
|
}) ; //end of Drop Column Anchor action
|
||||||
|
|
||||||
//Add Primary Key
|
|
||||||
/**
|
/**
|
||||||
* Ajax Event handler for 'Add Primary Key'
|
* Ajax Event handler for 'Add Primary Key'
|
||||||
*
|
*
|
||||||
* @uses $.PMA_confirm()
|
* @uses $.PMA_confirm()
|
||||||
* @uses PMA_ajaxShowMessage()
|
* @uses PMA_ajaxShowMessage()
|
||||||
*/
|
*/
|
||||||
$(".add_primary_key_anchor").live('click', function(event) {
|
$(".action_primary a").live('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -479,8 +479,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
|
|||||||
<?php
|
<?php
|
||||||
if(isset($primary_enabled)) {
|
if(isset($primary_enabled)) {
|
||||||
if($primary_enabled) { ?>
|
if($primary_enabled) { ?>
|
||||||
<a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ($primary ? ' DROP PRIMARY KEY,' : '') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('A primary key has been added on %s'), htmlspecialchars($row['Field']))); ?>"
|
<a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ($primary ? ' DROP PRIMARY KEY,' : '') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf(__('A primary key has been added on %s'), htmlspecialchars($row['Field']))); ?>">
|
||||||
onclick="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table) . ($primary ? ' DROP PRIMARY KEY,' : ''); ?> ADD PRIMARY KEY(<?php echo PMA_jsFormat($row['Field']); ?>)')">
|
|
||||||
<?php echo $hidden_titles['Primary']; ?>
|
<?php echo $hidden_titles['Primary']; ?>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
|
Reference in New Issue
Block a user