Merge branch 'integration'
Conflicts: js/tbl_operations.js
This commit is contained in:
commit
d8ae01cdcf
@ -1269,7 +1269,7 @@ function PMA_ajaxShowMessage(message, timeout) {
|
||||
.hide();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return $("#loading");
|
||||
}
|
||||
|
||||
@ -1442,7 +1442,7 @@ $(document).ready(function() {
|
||||
open: PMA_verifyTypeOfAllColumns,
|
||||
buttons : button_options
|
||||
}); // end dialog options
|
||||
}
|
||||
}
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
}) // end $.get()
|
||||
|
||||
@ -1583,7 +1583,7 @@ $(document).ready(function() {
|
||||
$("#create_table_div").html(data);
|
||||
}
|
||||
PMA_verifyTypeOfAllColumns();
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
}) //end $.post()
|
||||
|
||||
}) // end create table form (add fields)
|
||||
@ -1733,7 +1733,7 @@ $(document).ready(function() {
|
||||
.dialog({
|
||||
title: PMA_messages['strChangePassword'],
|
||||
width: 600,
|
||||
close: function(ev,ui) {$(this).remove();},
|
||||
close: function(ev,ui) {$(this).remove();},
|
||||
buttons : button_options,
|
||||
beforeClose: function(ev,ui){ $('#change_password_anchor.dialog_active').removeClass('dialog_active').addClass('ajax')}
|
||||
})
|
||||
@ -1772,7 +1772,7 @@ $(document).ready(function() {
|
||||
$("#change_password_dialog").hide().remove();
|
||||
$("#edit_user_dialog").dialog("close").remove();
|
||||
$('#change_password_anchor.dialog_active').removeClass('dialog_active').addClass('ajax');
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
}
|
||||
else {
|
||||
PMA_ajaxShowMessage(data.error);
|
||||
@ -2278,3 +2278,64 @@ $(document).ready(function() {
|
||||
|
||||
}) // end of $(document).ready()
|
||||
|
||||
/**
|
||||
* Attach Ajax event handlers for Drop Table.
|
||||
*
|
||||
* @uses $.PMA_confirm()
|
||||
* @uses PMA_ajaxShowMessage()
|
||||
* @uses window.parent.refreshNavigation()
|
||||
* @uses window.parent.refreshMain()
|
||||
* @see $cfg['AjaxEnable']
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$("#drop_tbl_anchor").live('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
//context is top.frame_content, so we need to use window.parent.db to access the db var
|
||||
/**
|
||||
* @var question String containing the question to be asked for confirmation
|
||||
*/
|
||||
var question = PMA_messages['strDropTableStrongWarning'] + '\n' + PMA_messages['strDoYouReally'] + ' :\n' + 'DROP 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) {
|
||||
//Database deleted successfully, refresh both the frames
|
||||
window.parent.refreshNavigation();
|
||||
window.parent.refreshMain();
|
||||
}) // end $.get()
|
||||
}); // end $.PMA_confirm()
|
||||
}); //end of Drop Table Ajax action
|
||||
}) // end of $(document).ready() for Drop Table
|
||||
|
||||
/**
|
||||
* Attach Ajax event handlers for Truncate Table.
|
||||
*
|
||||
* @uses $.PMA_confirm()
|
||||
* @uses PMA_ajaxShowMessage()
|
||||
* @uses window.parent.refreshNavigation()
|
||||
* @uses window.parent.refreshMain()
|
||||
* @see $cfg['AjaxEnable']
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$("#truncate_tbl_anchor").live('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
//context is top.frame_content, so we need to use window.parent.db to access the db var
|
||||
/**
|
||||
* @var question String containing the question to be asked for confirmation
|
||||
*/
|
||||
var question = PMA_messages['strTruncateTableStrongWarning'] + '\n' + PMA_messages['strDoYouReally'] + ' :\n' + '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) {
|
||||
//Database deleted successfully, refresh both the frames
|
||||
window.parent.refreshNavigation();
|
||||
window.parent.refreshMain();
|
||||
}) // end $.get()
|
||||
}); // end $.PMA_confirm()
|
||||
}); //end of Drop Table Ajax action
|
||||
}) // end of $(document).ready() for Drop Table
|
||||
|
||||
@ -29,6 +29,8 @@ $js_messages['strNoDropDatabases'] = __('"DROP DATABASE" statements are disabled
|
||||
/* For confirmations */
|
||||
$js_messages['strDoYouReally'] = __('Do you really want to ');
|
||||
$js_messages['strDropDatabaseStrongWarning'] = __('You are about to DESTROY a complete database!');
|
||||
$js_messages['strDropTableStrongWarning'] = __('You are about to DESTROY a complete table!');
|
||||
$js_messages['strTruncateTableStrongWarning'] = __('You are about to TRUNCATE a complete table!');
|
||||
$js_messages['strDroppingEvent'] = __('Dropping Event');
|
||||
$js_messages['strDroppingProcedure'] = __('Dropping Procedure');
|
||||
$js_messages['strDeleteTrackingData'] = __('Delete tracking data for this table');
|
||||
|
||||
@ -30,6 +30,11 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
require_once './libraries/mysql_charsets.lib.php';
|
||||
require_once './libraries/StorageEngine.class.php';
|
||||
|
||||
// add a javascript file for jQuery functions to handle Ajax actions
|
||||
// also add jQueryUI
|
||||
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
|
||||
$GLOBALS['js_include'][] = 'tbl_operations.js';
|
||||
|
||||
/**
|
||||
* Class for partition management
|
||||
*/
|
||||
@ -684,7 +689,7 @@ if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_
|
||||
'message_to_show' => sprintf(__('Table %s has been emptied'), htmlspecialchars($table)),
|
||||
));
|
||||
?>
|
||||
<li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" onclick="return confirmLink(this, '<?php echo PMA_jsFormat($this_sql_query); ?>')">
|
||||
<li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'id="truncate_tbl_anchor"' : ''); ?>>
|
||||
<?php echo __('Empty the table (TRUNCATE)'); ?></a>
|
||||
<?php echo PMA_showMySQLDocu('SQL-Syntax', 'TRUNCATE_TABLE'); ?>
|
||||
</li>
|
||||
@ -704,7 +709,7 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
|
||||
'table' => $GLOBALS['table'],
|
||||
));
|
||||
?>
|
||||
<li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" onclick="return confirmLink(this, '<?php echo PMA_jsFormat($this_sql_query); ?>')">
|
||||
<li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'id="drop_tbl_anchor"' : ''); ?>>
|
||||
<?php echo __('Delete the table (DROP)'); ?></a>
|
||||
<?php echo PMA_showMySQLDocu('SQL-Syntax', 'DROP_TABLE'); ?>
|
||||
</li>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user