From a3e0bc02239f029a30822906a3b15a601213405c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 2 Feb 2011 12:42:46 -0500 Subject: [PATCH] Conditional Ajax for create db --- js/functions.js | 4 +++- libraries/display_create_database.lib.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/functions.js b/js/functions.js index 24dc0a3c0..731d7d81d 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1900,6 +1900,7 @@ $(document).ready(function() { * @uses PMA_ajaxShowMessage() * @uses window.parent.refreshNavigation() * @uses window.parent.refreshMain() + * @see $cfg['AjaxEnable'] */ $(document).ready(function() { $("#drop_db_anchor").live('click', function(event) { @@ -1928,10 +1929,11 @@ $(document).ready(function() { * display_create_database.lib.php is used, ie main.php and server_databases.php * * @uses PMA_ajaxShowMessage() + * @see $cfg['AjaxEnable'] */ $(document).ready(function() { - $('#create_database_form').live('submit', function(event) { + $('#create_database_form.ajax').live('submit', function(event) { event.preventDefault(); $form = $(this); diff --git a/libraries/display_create_database.lib.php b/libraries/display_create_database.lib.php index 17ebfae96..07db1f799 100644 --- a/libraries/display_create_database.lib.php +++ b/libraries/display_create_database.lib.php @@ -17,7 +17,7 @@ require_once './libraries/check_user_privileges.lib.php'; if ($is_create_db_priv) { // The user is allowed to create a db ?> -
+ > ' . __('Create new database') . ' ' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?>