Fixed the issue with the content frame not refreshing after the 'Reload
Database? Y/N' dialog. When copying the database, the database is now switched with JS. Create Table action still a work in progress
This commit is contained in:
@@ -18,22 +18,49 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
//Create Table
|
//Create Table
|
||||||
|
$("#create_table_form_minimal").live('submit', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
/* @todo Validate this form! */
|
||||||
|
|
||||||
|
PMA_ajaxShowMessage();
|
||||||
|
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
||||||
|
|
||||||
|
$.get($(this).attr('action'), $(this).serialize(), function(data) {
|
||||||
|
$('<div id="create_table_dialog"></div>')
|
||||||
|
.append(data)
|
||||||
|
.dialog({
|
||||||
|
title: PMA_messages['strCreateTable'],
|
||||||
|
width: 900,
|
||||||
|
buttons : {
|
||||||
|
"Create Table" : function() {
|
||||||
|
//handle form here
|
||||||
|
},
|
||||||
|
"Cancel" : function() {$(this).dialog('close');}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
//Rename Database
|
//Rename Database
|
||||||
$("#rename_db_form").live('submit', function(event) {
|
$("#rename_db_form").live('submit', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var question = 'CREATE DATABASE ... and then DROP DATABASE ' + window.parent.db;
|
var question = 'CREATE DATABASE ... and then DROP DATABASE ' + window.parent.db;
|
||||||
|
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
||||||
|
|
||||||
$(this).PMA_confirm(question, $(this).attr('action'), function(url) {
|
$(this).PMA_confirm(question, $(this).attr('action'), function(url) {
|
||||||
PMA_ajaxShowMessage(PMA_messages['strRenamingDatabases']);
|
PMA_ajaxShowMessage(PMA_messages['strRenamingDatabases']);
|
||||||
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
|
||||||
|
|
||||||
$.get(url, $("#rename_db_form").serialize() + '&is_js_confirmed=1', function(data) {
|
$.get(url, $("#rename_db_form").serialize() + '&is_js_confirmed=1', function(data) {
|
||||||
if(data.success == true) {
|
if(data.success == true) {
|
||||||
|
|
||||||
PMA_ajaxShowMessage(data.message);
|
PMA_ajaxShowMessage(data.message);
|
||||||
|
window.parent.db = data.newname;
|
||||||
|
|
||||||
$("<span>" + PMA_messages['strReloadDatabase'] + "?</span>").dialog({
|
$("<span>" + PMA_messages['strReloadDatabase'] + "?</span>").dialog({
|
||||||
buttons: {"Yes": function() {
|
buttons: {"Yes": function() {
|
||||||
refreshMain("main.php");
|
window.parent.refreshMain();
|
||||||
},
|
},
|
||||||
"No" : function() {
|
"No" : function() {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
@@ -59,7 +86,8 @@ $(document).ready(function() {
|
|||||||
if(data.success == true) {
|
if(data.success == true) {
|
||||||
PMA_ajaxShowMessage(data.message);
|
PMA_ajaxShowMessage(data.message);
|
||||||
if( $("#checkbox_switch").is(":checked")) {
|
if( $("#checkbox_switch").is(":checked")) {
|
||||||
refreshMain("main.php");
|
window.parent.db = data.newname;
|
||||||
|
window.parent.refreshMain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user