Removed inline call to confirmLink() for 'Drop Primary Key/Index'
This commit is contained in:
@@ -2010,6 +2010,30 @@ $(document).ready(function() {
|
|||||||
})
|
})
|
||||||
//end Drop Tracking
|
//end Drop Tracking
|
||||||
|
|
||||||
|
//Drop Primary Key/Index
|
||||||
|
$('.drop_primary_key_index_anchor').live('click', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var curr_row = $(this).parents('tr');
|
||||||
|
var question = $(curr_row).children('.drop_primary_key_index_msg').val();
|
||||||
|
|
||||||
|
$(this).PMA_confirm(question, $(this).attr('href'), function(url) {
|
||||||
|
|
||||||
|
PMA_ajaxShowMessage(PMA_messages['strDroppingPrimaryKeyIndex']);
|
||||||
|
|
||||||
|
$.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) {
|
||||||
|
if(data.success == true) {
|
||||||
|
PMA_ajaxShowMessage(data.message);
|
||||||
|
$(curr_row).hide("medium").remove();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
//end Drop Primary Key/Index
|
||||||
|
|
||||||
}, 'top.frame_content'); //end $(document).ready() for db_structure.php
|
}, 'top.frame_content'); //end $(document).ready() for db_structure.php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -33,6 +33,7 @@ $js_messages['strDroppingEvent'] = __('Dropping Event');
|
|||||||
$js_messages['strDroppingProcedure'] = __('Dropping Procedure');
|
$js_messages['strDroppingProcedure'] = __('Dropping Procedure');
|
||||||
$js_messages['strDeleteTrackingData'] = __('Delete tracking data for this table');
|
$js_messages['strDeleteTrackingData'] = __('Delete tracking data for this table');
|
||||||
$js_messages['strDeletingTrackingData'] = __('Deleting tracking data');
|
$js_messages['strDeletingTrackingData'] = __('Deleting tracking data');
|
||||||
|
$js_messages['strDroppingPrimaryKeyIndex'] = __('Dropping Primary Key/Index');
|
||||||
|
|
||||||
/* For blobstreaming */
|
/* For blobstreaming */
|
||||||
$js_messages['strBLOBRepositoryDisableStrongWarning'] = __('You are about to DISABLE a BLOB Repository!');
|
$js_messages['strBLOBRepositoryDisableStrongWarning'] = __('You are about to DISABLE a BLOB Repository!');
|
||||||
|
@@ -478,10 +478,12 @@ class PMA_Index
|
|||||||
}
|
}
|
||||||
|
|
||||||
$r .= '<td ' . $row_span . '>'
|
$r .= '<td ' . $row_span . '>'
|
||||||
. ' <a href="sql.php' . PMA_generate_common_url($this_params)
|
. ' <a class="drop_primary_key_index_anchor" href="sql.php' . PMA_generate_common_url($this_params)
|
||||||
. '" onclick="return confirmLink(this, \'' . $js_msg . '\')">'
|
. '" >'
|
||||||
. PMA_getIcon('b_drop.png', __('Drop')) . '</a>'
|
. PMA_getIcon('b_drop.png', __('Drop')) . '</a>'
|
||||||
. '</td>' . "\n";
|
. '</td>' . "\n";
|
||||||
|
|
||||||
|
$r .= '<input type="hidden" class="drop_primary_key_index_msg" value="' . $js_msg . '" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
$r .= '<th ' . $row_span . '>' . htmlspecialchars($index->getName()) . '</th>';
|
$r .= '<th ' . $row_span . '>' . htmlspecialchars($index->getName()) . '</th>';
|
||||||
|
Reference in New Issue
Block a user