Code refers to older functionality
This commit is contained in:
@@ -1828,83 +1828,6 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
}, 'top.frame_content'); //end $(document).ready for 'Create Table'
|
}, 'top.frame_content'); //end $(document).ready for 'Create Table'
|
||||||
|
|
||||||
/**
|
|
||||||
* Attach event handlers for Empty Table and Drop Table. Used wherever libraries/
|
|
||||||
* tbl_links.inc.php is used.
|
|
||||||
*/
|
|
||||||
$(document).ready(function() {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attach Ajax event handlers for Empty Table
|
|
||||||
*
|
|
||||||
* @uses PMA_ajaxShowMessage()
|
|
||||||
* @uses $.PMA_confirm()
|
|
||||||
*/
|
|
||||||
$("#empty_table_anchor").live('click', function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var question String containing the question to be asked for confirmation
|
|
||||||
*/
|
|
||||||
var question = 'TRUNCATE TABLE ' + window.parent.table;
|
|
||||||
|
|
||||||
$(this).PMA_confirm(question, $(this).attr('href'), function(url) {
|
|
||||||
|
|
||||||
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
|
|
||||||
$.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) {
|
|
||||||
if(data.success == true) {
|
|
||||||
PMA_ajaxShowMessage(data.message);
|
|
||||||
$("#topmenucontainer")
|
|
||||||
.next('div')
|
|
||||||
.remove()
|
|
||||||
.end()
|
|
||||||
.after(data.sql_query);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PMA_ajaxShowMessage(data.error);
|
|
||||||
}
|
|
||||||
}) // end $.get
|
|
||||||
}) // end $.PMA_confirm()
|
|
||||||
}) // end Empty Table
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attach Ajax event handler for Drop Table
|
|
||||||
*
|
|
||||||
* @uses PMA_ajaxShowMessage()
|
|
||||||
* @uses $.PMA_confirm()
|
|
||||||
* @uses window.parent.refreshNavigation()
|
|
||||||
*/
|
|
||||||
$("#drop_table_anchor").live('click', function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var question String containing the question to be asked for confirmation
|
|
||||||
*/
|
|
||||||
var question = 'DROP TABLE/VIEW ' + window.parent.table;
|
|
||||||
$(this).PMA_confirm(question, $(this).attr('href'), function(url) {
|
|
||||||
|
|
||||||
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
|
|
||||||
$.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) {
|
|
||||||
if(data.success == true) {
|
|
||||||
PMA_ajaxShowMessage(data.message);
|
|
||||||
$("#topmenucontainer")
|
|
||||||
.next('div')
|
|
||||||
.remove()
|
|
||||||
.end()
|
|
||||||
.after(data.sql_query);
|
|
||||||
window.parent.table = '';
|
|
||||||
if (window.parent && window.parent.frame_navigation) {
|
|
||||||
window.parent.frame_navigation.location.reload();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PMA_ajaxShowMessage(data.error);
|
|
||||||
}
|
|
||||||
}) // end $.get
|
|
||||||
}) // end $.PMA_confirm()
|
|
||||||
}) // end $().live()
|
|
||||||
}, 'top.frame_content'); //end $(document).ready() for libraries/tbl_links.inc.php
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attach Ajax event handlers for Drop Trigger. Used on tbl_structure.php
|
* Attach Ajax event handlers for Drop Trigger. Used on tbl_structure.php
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user