diff --git a/ChangeLog b/ChangeLog index eafbc4d2dd..21eeedf081 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog - bug #3890 [import] Web server upload directory import fails - bug #3891 [import] Server upload folder import file name missing in success message + rfe #1421 [auth] Add retry button on connection failure with config auth ++ rfe #1422 [interface] Provide feedback if no columns selected for multi-submit 4.0.0.0 (not yet released) + Patch #3481047 for rfe #3480477 Insert as new row enhancement diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 8197b7b7ff..2f090cfb8b 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -79,26 +79,6 @@ AJAX.registerOnload('tbl_structure.js', function() { } }); // end change table button "do_save_data" - /** - * Attach Event Handler for 'Change Column' - */ - $("a.change_column_anchor.ajax").live('click', function(event) { - event.preventDefault(); - var $msg = PMA_ajaxShowMessage(); - $('#page_content').hide(); - $.get($(this).attr('href'), {'ajax_request': true}, function(data) { - PMA_ajaxRemoveMessage($msg); - if (data.success) { - $('
') - .html(data.message) - .insertBefore('#page_content'); - PMA_verifyColumnsProperties(); - } else { - PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error, false); - } - }); - }); - /** * Attach Event Handler for 'Change multiple columns' */ @@ -111,12 +91,16 @@ AJAX.registerOnload('tbl_structure.js', function() { $.post($form.prop("action"), params, function (data) { PMA_ajaxRemoveMessage($msg); if (data.success) { - $('
') - .html(data.message) - .insertBefore('#page_content'); - PMA_verifyColumnsProperties(); + $('#page_content') + .empty() + .append( + $('
') + .html(data.message) + ) + .show(); } else { - PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error, false); + $('#page_content').show(); + PMA_ajaxShowMessage(data.error); } }); }); diff --git a/libraries/structure.lib.php b/libraries/structure.lib.php index 854afc578a..c41177249b 100644 --- a/libraries/structure.lib.php +++ b/libraries/structure.lib.php @@ -1311,7 +1311,7 @@ function PMA_getHtmlForDropColumn($tbl_is_view, $db_is_information_schema, if (! $tbl_is_view && ! $db_is_information_schema) { $html_output .= '' - . '' diff --git a/tbl_structure.php b/tbl_structure.php index 174337879c..60b4b93b23 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -87,37 +87,42 @@ if (isset($_REQUEST['submit_mult_change_x'])) { $_REQUEST['selected_fld'] = $_REQUEST['selected']; } } +if (! empty($submit_mult)) { + if (isset($_REQUEST['selected_fld'])) { + $err_url = 'tbl_structure.php?' . PMA_generate_common_url($db, $table); + if ($submit_mult == 'browse') { + // browsing the table displaying only selected fields/columns + $GLOBALS['active_page'] = 'sql.php'; + $sql_query = ''; + foreach ($_REQUEST['selected_fld'] as $idx => $sval) { + if ($sql_query == '') { + $sql_query .= 'SELECT ' . PMA_Util::backquote($sval); + } else { + $sql_query .= ', ' . PMA_Util::backquote($sval); + } + } + $sql_query .= ' FROM ' . PMA_Util::backquote($db) + . '.' . PMA_Util::backquote($table); + include 'sql.php'; + exit; + } else { + // handle multiple field commands + // handle confirmation of deleting multiple fields/columns + $action = 'tbl_structure.php'; + include 'libraries/mult_submits.inc.php'; + /** + * if $submit_mult == 'change', execution will have stopped + * at this point + */ -if (! empty($submit_mult) && isset($_REQUEST['selected_fld'])) { - $err_url = 'tbl_structure.php?' . PMA_generate_common_url($db, $table); - if ($submit_mult == 'browse') { - // browsing the table displaying only selected fields/columns - $GLOBALS['active_page'] = 'sql.php'; - $sql_query = ''; - foreach ($_REQUEST['selected_fld'] as $idx => $sval) { - if ($sql_query == '') { - $sql_query .= 'SELECT ' . PMA_Util::backquote($sval); - } else { - $sql_query .= ', ' . PMA_Util::backquote($sval); + if (empty($message)) { + $message = PMA_Message::success(); } } - $sql_query .= ' FROM ' . PMA_Util::backquote($db) - . '.' . PMA_Util::backquote($table); - include 'sql.php'; - exit; } else { - // handle multiple field commands - // handle confirmation of deleting multiple fields/columns - $action = 'tbl_structure.php'; - include 'libraries/mult_submits.inc.php'; - /** - * if $submit_mult == 'change', execution will have stopped - * at this point - */ - - if (empty($message)) { - $message = PMA_Message::success(); - } + $response = PMA_Response::getInstance(); + $response->isSuccess(false); + $response->addJSON('message', __('No column selected.')); } }