Merge branch 'QA_4_7'

This commit is contained in:
Michal Čihař 2017-02-06 13:26:24 +01:00
commit 3cfe34985d
6 changed files with 15 additions and 5 deletions

View File

@ -57,6 +57,7 @@ phpMyAdmin - ChangeLog
- issue #12945 Fixed hint rendering on adding new user
- issue #12941 Fixed sorting of tables in relation view
- issue #12936 Fixed tables pagination in navigation panel
- issue #12904 Do not collapse add form for central columns if there are none
4.6.6 (2017-01-23)
- issue #12759 Fix Notice regarding 'Undefined index: old_usergroup'

View File

@ -100,7 +100,7 @@ if (PMA_isValid($_REQUEST['pos'], 'integer')) {
} else {
$pos = 0;
}
$addNewColumn = PMA_getHTMLforAddNewColumn($db);
$addNewColumn = PMA_getHTMLforAddNewColumn($db, $total_rows);
$response->addHTML($addNewColumn);
if ($total_rows <= 0) {
$response->addHTML(

View File

@ -1252,16 +1252,18 @@ function PMA_handleColumnExtra(&$columns_list)
/**
* build html for adding a new user defined column to central list
*
* @param string $db current database
* @param string $db current database
* @param integer $total_rows number of rows in central columns
*
* @return string html of the form to let user add a new user defined column to the
* list
*/
function PMA_getHTMLforAddNewColumn($db)
function PMA_getHTMLforAddNewColumn($db, $total_rows)
{
$addNewColumn = '<div id="add_col_div" class="topmargin"><a href="#">'
. '<span>+</span> ' . __('Add new column') . '</a>'
. '<form id="add_new" style="min-width:100%;display:none" '
. '<form id="add_new" class="new_central_col '
. ($total_rows != 0 ? 'hide"' : '"')
. 'method="post" action="db_central_columns.php">'
. URL::getHiddenInputs(
$db

View File

@ -532,7 +532,7 @@ class PMA_Central_Columns_Test extends PHPUnit_Framework_TestCase
*/
public function testPMAGetHTMLforAddNewColumn()
{
$result = PMA_getHTMLforAddNewColumn('phpmyadmin');
$result = PMA_getHTMLforAddNewColumn('phpmyadmin', 0);
$this->assertContains(
'<form',
$result

View File

@ -495,6 +495,9 @@ fieldset.confirmation legend {
}
/* end messageboxes */
.new_central_col{
width: 100%;
}
.tblcomment {
font-size: 70%;

View File

@ -786,6 +786,10 @@ fieldset.confirmation legend {
/* end messageboxes */
.new_central_col{
width: 100%;
}
.tblcomment {
font-size: 70%;
font-weight: normal;