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:
ninadsp
2010-08-26 20:20:51 +05:30
parent 43c18c50b8
commit f1e72d7664
2 changed files with 3 additions and 5 deletions

View File

@@ -17,7 +17,7 @@
*
*/
$(document).ready(function() {
//Drop Column
/**
* Attach Event Handler for 'Drop Column'
*
@@ -60,14 +60,13 @@ $(document).ready(function() {
}); // end $.PMA_confirm()
}) ; //end of Drop Column Anchor action
//Add Primary Key
/**
* Ajax Event handler for 'Add Primary Key'
*
* @uses $.PMA_confirm()
* @uses PMA_ajaxShowMessage()
*/
$(".add_primary_key_anchor").live('click', function(event) {
$(".action_primary a").live('click', function(event) {
event.preventDefault();
/**

View File

@@ -479,8 +479,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
<?php
if(isset($primary_enabled)) {
if($primary_enabled) { ?>
<a href="sql.php?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ($primary ? ' DROP PRIMARY KEY,' : '') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&amp;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']); ?>)')">
<a href="sql.php?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ($primary ? ' DROP PRIMARY KEY,' : '') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&amp;zero_rows=<?php echo urlencode(sprintf(__('A primary key has been added on %s'), htmlspecialchars($row['Field']))); ?>">
<?php echo $hidden_titles['Primary']; ?>
</a>
<?php