diff --git a/db_operations.php b/db_operations.php index 46591bc31..e49ddcb0d 100644 --- a/db_operations.php +++ b/db_operations.php @@ -349,14 +349,17 @@ if ($db == 'information_schema') { } if (!$is_information_schema) { - - require './libraries/display_create_table.lib.php'; - + ?> +
+ +
+ +
@@ -371,6 +374,7 @@ if (!$is_information_schema) {
+
+
method="post" action="db_operations.php" onsubmit="return emptyFormElements(this, 'newname')"> " />
+
+
+
+
method="post" action="db_operations.php" onsubmit="return emptyFormElements(this, 'newname')"> " />
- +
' . "\n" . '' . "\n" - . '
' . "\n"; + . '' . "\n"; if ($num_tables > 0 && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) { @@ -581,12 +590,12 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?> /* * Export Relational Schema View */ - echo '
'; + echo '
'; if ($cfg['PropertiesIconic']) { echo ''; } - echo __('Edit or export relational schema') . '
'; + echo __('Edit or export relational schema') . '
'; } // end if /** diff --git a/js/db_operations.js b/js/db_operations.js index 5169b553c..b0536942c 100644 --- a/js/db_operations.js +++ b/js/db_operations.js @@ -34,10 +34,7 @@ $(document).ready(function() { var question = 'CREATE DATABASE ' + $('#new_db_name').val() + ' / DROP DATABASE ' + window.parent.db; - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } - + PMA_prepareForAjaxRequest($form); /** * @var button_options Object containing options for jQueryUI dialog buttons */ @@ -95,9 +92,7 @@ $(document).ready(function() { var $form = $(this); - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } + PMA_prepareForAjaxRequest($form); $.get($form.attr('action'), $form.serialize(), function(data) { // use messages that stay on screen @@ -135,9 +130,7 @@ $(document).ready(function() { var $form = $(this); - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } + PMA_prepareForAjaxRequest($form); PMA_ajaxShowMessage(PMA_messages['strChangingCharset']); diff --git a/js/db_search.js b/js/db_search.js index 73bea25fb..79c444e85 100644 --- a/js/db_search.js +++ b/js/db_search.js @@ -142,10 +142,7 @@ $(document).ready(function() { // jQuery object to reuse $form = $(this); - // add this hidden field just once - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } + PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize() + "&submit_search=" + $("#buttonGo").val(), function(response) { if (typeof response == 'string') { diff --git a/js/functions.js b/js/functions.js index 1016b2f81..6894e15a4 100644 --- a/js/functions.js +++ b/js/functions.js @@ -20,6 +20,18 @@ var only_once_elements = new Array(); */ var ajax_message_init = false; +/** + * Add a hidden field to the form to indicate that this will be an + * Ajax request (only if this hidden field does not exist) + * + * @param object the form + */ +function PMA_prepareForAjaxRequest($form) { + if (! $form.find('input:hidden').is('#ajax_request_hidden')) { + $form.append(''); + } +} + /** * Generate a new password and copy it to the password input areas * @@ -1403,9 +1415,7 @@ $(document).ready(function() { button_options_error[PMA_messages['strOK']] = function() {$(this).dialog('close').remove();} var $msgbox = PMA_ajaxShowMessage(); - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } + PMA_prepareForAjaxRequest($form); $.get($form.attr('action'), $form.serialize(), function(data) { //in the case of an error, show the error message returned. @@ -1467,9 +1477,7 @@ $(document).ready(function() { // OK, form passed validation step if ($form.hasClass('ajax')) { PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } + PMA_prepareForAjaxRequest($form); //User wants to submit the form $.post($form.attr('action'), $form.serialize() + "&do_save_data=" + $(this).val(), function(data) { if(data.success == true) { @@ -1561,9 +1569,7 @@ $(document).ready(function() { var $form = $("#create_table_form"); var $msgbox = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } + PMA_prepareForAjaxRequest($form); //User wants to add more fields to the table $.post($form.attr('action'), $form.serialize() + "&submit_num_fields=" + $(this).val(), function(data) { @@ -1670,10 +1676,7 @@ $(document).ready(function() { $form = $(this); PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); - - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } + PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize(), function(data) { if(data.success == true) { diff --git a/js/sql.js b/js/sql.js index 8a97eec3a..77717a727 100644 --- a/js/sql.js +++ b/js/sql.js @@ -254,9 +254,7 @@ $(document).ready(function() { $form = $(this); var $msgbox = PMA_ajaxShowMessage(); - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } + PMA_prepareForAjaxRequest($form); $.post($(this).attr('action'), $(this).serialize() , function(data) { if(data.success == true) { diff --git a/js/tbl_change.js b/js/tbl_change.js index e5b800fa0..2d33884a9 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -283,9 +283,7 @@ $(document).ready(function() { event.preventDefault(); PMA_ajaxShowMessage(); - if (! $form.find('input:hidden').is('#ajax_request_hidden')) { - $form.append(''); - } + PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize(), function(data) { if (typeof data.success != 'undefined') { diff --git a/js/tbl_select.js b/js/tbl_select.js index 88acefff5..8115245cb 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -60,10 +60,7 @@ $(document).ready(function() { $("#sqlqueryresults").empty(); var msgbox = PMA_ajaxShowMessage(PMA_messages['strSearching']); - // add this hidden field just once - if (! $search_form.find('input:hidden').is('#ajax_request_hidden')) { - $search_form.append(''); - } + PMA_prepareForAjaxRequest($search_form); $.post($search_form.attr('action'), $search_form.serialize(), function(response) { if (typeof response == 'string') { diff --git a/tbl_operations.php b/tbl_operations.php index 3c8b5dd45..04f1165fd 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -253,7 +253,7 @@ unset($local_query); */ ?> -
+
@@ -279,7 +279,7 @@ unset($columns);
-
+
@@ -339,7 +339,7 @@ if (strstr($show_comment, '; InnoDB free') === false) { ?> -
+
@@ -518,7 +518,7 @@ if (isset($possible_row_formats[$tbl_type])) {
-
+
@@ -581,7 +581,7 @@ if (isset($possible_row_formats[$tbl_type])) {
-
+
@@ -668,7 +668,7 @@ $this_url_params = array_merge($url_params,
-
+
@@ -699,7 +699,7 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) { 'reload' => '1', 'purge' => '1', 'message_to_show' => sprintf(($tbl_is_view ? __('View %s has been dropped') : __('Table %s has been dropped')), htmlspecialchars($table)), - // table name is needed to avoid running + // table name is needed to avoid running // PMA_relationsCleanupDatabase() on the whole db later 'table' => $GLOBALS['table'], )); @@ -722,7 +722,7 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) { // show the Partition maintenance section only if we detect a partition if (! is_null($partition_names[0])) { ?> -
+
@@ -777,7 +777,7 @@ if ($cfgRelation['relwork'] && ! $is_innodb) { if ($foreign) { ?> -
+
    diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 9f944e84c..27d931bb6 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1251,29 +1251,14 @@ li#li_user_preferences { float: ; } -#div_table_order { +.operations_half_width { min-width: 48%; float: ; } -#div_table_rename { - min-width: 48%; - float: ; -} - -#div_table_copy, -#div_partition_maintenance, -#div_referential_integrity, -#div_table_removal, -#div_table_maintenance { - min-width: 48%; - float: ; -} - -#div_table_options { +.operations_full_width { + width: 100%; clear: both; - min-width: 48%; - float: ; } #qbe_div_table_list { diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 2107354a0..4d18832f6 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -599,11 +599,11 @@ div.footnotes { padding: 0.3em; - + -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; - + -moz-box-shadow: 0 1px 1px #fff inset; -webkit-box-shadow: 0 1px 1px #fff inset; box-shadow: 0 1px 1px #fff inset; @@ -1546,29 +1546,14 @@ li#li_user_preferences { float: ; } -#div_table_order { +.operations_half_width { min-width: 48%; float: ; } -#div_table_rename { - min-width: 48%; - float: ; -} - -#div_table_copy, -#div_partition_maintenance, -#div_referential_integrity, -#div_table_removal, -#div_table_maintenance { - min-width: 48%; - float: ; -} - -#div_table_options { +.operations_full_width { + width: 100%; clear: both; - min-width: 48%; - float: ; } #qbe_div_table_list { diff --git a/view_operations.php b/view_operations.php index 2149e15eb..55d1c7445 100644 --- a/view_operations.php +++ b/view_operations.php @@ -79,7 +79,7 @@ $url_params['back'] = 'view_operations.php'; */ ?> -
    +