Removed inline call to confirmLink() for 'Delete Tracking action'.
This commit is contained in:
@@ -11,7 +11,12 @@
|
||||
require_once './libraries/common.inc.php';
|
||||
require_once './libraries/Table.class.php';
|
||||
|
||||
//Get some js files needed for Ajax
|
||||
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
|
||||
|
||||
if($GLOBALS['is_ajax_request'] != true) {
|
||||
require './libraries/db_common.inc.php';
|
||||
}
|
||||
$url_query .= '&goto=tbl_tracking.php&back=db_tracking.php';
|
||||
|
||||
// Get the database structure
|
||||
@@ -25,6 +30,11 @@ require_once './libraries/relation.lib.php';
|
||||
// (here, do not use $_REQUEST['db] as it can be crafted)
|
||||
if (isset($_REQUEST['delete_tracking']) && isset($_REQUEST['table'])) {
|
||||
PMA_Tracker::deleteTracking($GLOBALS['db'], $_REQUEST['table']);
|
||||
|
||||
if($GLOBALS['is_ajax_request'] == true) {
|
||||
$message = PMA_Message::success();
|
||||
PMA_ajaxResponse($message, true);
|
||||
}
|
||||
}
|
||||
|
||||
// Get tracked data about the database
|
||||
@@ -117,7 +127,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) {
|
||||
<td><?php echo $version_data['date_created'];?></td>
|
||||
<td><?php echo $version_data['date_updated'];?></td>
|
||||
<td><?php echo $version_status;?></td>
|
||||
<td><a href="<?php echo $delete_link;?>" onclick="return confirmLink(this, '<?php echo PMA_jsFormat(__('Delete tracking data for this table'), false); ?>')"><?php echo $drop_image_or_text; ?></a></td>
|
||||
<td><a class="drop_tracking_anchor" href="<?php echo $delete_link;?>" ><?php echo $drop_image_or_text; ?></a></td>
|
||||
<td> <a href="<?php echo $tmp_link; ?>"><?php echo __('Versions');?></a>
|
||||
| <a href="<?php echo $tmp_link; ?>&report=true&version=<?php echo $version_data['version'];?>"><?php echo __('Tracking report');?></a>
|
||||
| <a href="<?php echo $tmp_link; ?>&snapshot=true&version=<?php echo $version_data['version'];?>"><?php echo __('Structure snapshot');?></a></td>
|
||||
|
@@ -1986,6 +1986,30 @@ $(document).ready(function() {
|
||||
})
|
||||
//end Drop Procedure
|
||||
|
||||
//Drop Tracking
|
||||
$('.drop_tracking_anchor').live('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var curr_tracking_row = $(this).parents('tr');
|
||||
var question = PMA_messages['strDeleteTrackingData'];
|
||||
|
||||
$(this).PMA_confirm(question, $(this).attr('href'), function(url) {
|
||||
|
||||
PMA_ajaxShowMessage(PMA_messages['strDeletingTrackingData']);
|
||||
|
||||
$.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) {
|
||||
if(data.success == true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
$(curr_tracking_row).hide("medium").remove();
|
||||
}
|
||||
else {
|
||||
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error);
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
//end Drop Tracking
|
||||
|
||||
}, 'top.frame_content'); //end $(document).ready() for db_structure.php
|
||||
|
||||
/**
|
||||
|
@@ -31,6 +31,8 @@ $js_messages['strDoYouReally'] = __('Do you really want to ');
|
||||
$js_messages['strDropDatabaseStrongWarning'] = __('You are about to DESTROY a complete database!');
|
||||
$js_messages['strDroppingEvent'] = __('Dropping Event');
|
||||
$js_messages['strDroppingProcedure'] = __('Dropping Procedure');
|
||||
$js_messages['strDeleteTrackingData'] = __('Delete tracking data for this table');
|
||||
$js_messages['strDeletingTrackingData'] = __('Deleting tracking data');
|
||||
|
||||
/* For blobstreaming */
|
||||
$js_messages['strBLOBRepositoryDisableStrongWarning'] = __('You are about to DISABLE a BLOB Repository!');
|
||||
|
@@ -272,5 +272,7 @@ unset($each_table, $tbl_group_sql, $db_info_result);
|
||||
/**
|
||||
* Displays top menu links
|
||||
*/
|
||||
if($GLOBALS['is_ajax_request'] != true) {
|
||||
require './libraries/db_links.inc.php';
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user