db_central_columns: new column collapsing issue
Signed-off-by: Piyush Agrawal <poush12@gmail.com>
This commit is contained in:
parent
9b534e55ca
commit
b575f7ef1b
@ -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(
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -495,6 +495,9 @@ fieldset.confirmation legend {
|
||||
}
|
||||
/* end messageboxes */
|
||||
|
||||
.new_central_col{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tblcomment {
|
||||
font-size: 70%;
|
||||
|
||||
@ -786,6 +786,10 @@ fieldset.confirmation legend {
|
||||
|
||||
/* end messageboxes */
|
||||
|
||||
.new_central_col{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tblcomment {
|
||||
font-size: 70%;
|
||||
font-weight: normal;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user