RFE #1435922 [gui] navigation frame shows listing of databases when none selected
This commit is contained in:
@@ -49,6 +49,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
thanks to Christian Schmidt
|
||||
+ [doc] requirement of mcrypt on 64-bit, thanks to Isaac Bennetch
|
||||
+ [lang] danish update, thanks to Finn Sorensen
|
||||
+ RFE #1435922 [gui] navigation frame shows listing of databases when none selected
|
||||
|
||||
2.10.1.0 (not released yet)
|
||||
=====================
|
||||
|
@@ -1247,9 +1247,10 @@ ALTER TABLE `pma_column_comments`
|
||||
<dt id="cfg_DisplayServersList">$cfg['DisplayServersList'] boolean</dt>
|
||||
<dd>Defines whether to display this server choice as links instead of in a drop-down.
|
||||
Defaults to FALSE (drop-down).</dd>
|
||||
<dt id="cfg_DisplayDatabasesList">$cfg['DisplayDatabasesList'] boolean</dt>
|
||||
<dt id="cfg_DisplayDatabasesList">$cfg['DisplayDatabasesList'] boolean or text</dt>
|
||||
<dd>Defines whether to display database choice in light navigation frame as links
|
||||
instead of in a drop-down. Defaults to FALSE (drop-down).</dd>
|
||||
instead of in a drop-down. Defaults to 'auto' - on main page list is
|
||||
shown, when database is selected, only drop down is displayed.</dd>
|
||||
<dt id="cfg_ShowStats">$cfg['ShowStats'] boolean</dt>
|
||||
<dd>Defines whether or not to display space usage and statistics about databases
|
||||
and tables.<br />
|
||||
|
@@ -567,7 +567,7 @@ $cfg['DisplayServersList'] = false;
|
||||
*
|
||||
* @global boolean $cfg['DisplayDatabasesList']
|
||||
*/
|
||||
$cfg['DisplayDatabasesList'] = false;
|
||||
$cfg['DisplayDatabasesList'] = 'auto';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
|
@@ -159,7 +159,15 @@ if (! $GLOBALS['server']) {
|
||||
echo '<p>' . $GLOBALS['strNoDatabases'] . '</p>';
|
||||
PMA_exitNavigationFrame();
|
||||
} elseif ($GLOBALS['cfg']['LeftFrameLight'] && $GLOBALS['PMA_List_Database']->count() > 1) {
|
||||
if (!$cfg['DisplayDatabasesList']) {
|
||||
$list = $cfg['DisplayDatabasesList'];
|
||||
if ($list === 'auto') {
|
||||
if (empty($GLOBALS['db'])) {
|
||||
$list = true;
|
||||
} else {
|
||||
$list = false;
|
||||
}
|
||||
}
|
||||
if (!$list) {
|
||||
// more than one database available and LeftFrameLight is true
|
||||
// display db selectbox
|
||||
//
|
||||
|
@@ -1042,7 +1042,7 @@ function show_left_form($defaults = array()) {
|
||||
array('Show logo', 'LeftDisplayLogo', 'Whether to show logo in left frame', TRUE),
|
||||
array('Display servers selection', 'LeftDisplayServers', 'Whether to show server selection in left frame', FALSE),
|
||||
array('Display servers as list', 'DisplayServersList', 'Whether to show server listing as list instead of drop down', FALSE),
|
||||
array('Display databases as list', 'DisplayDatabasesList', 'Whether to show database listing in navigation as list instead of drop down', FALSE),
|
||||
array('Display databases as list', 'DisplayDatabasesList', 'Whether to show database listing in navigation as list instead of drop down', array('auto', 'yes', 'no')),
|
||||
array('Enable pointer highlighting', 'LeftPointerEnable', 'Whether you want to highlight server under mouse', TRUE),
|
||||
),
|
||||
'Configure navigation frame',
|
||||
@@ -1662,8 +1662,15 @@ switch ($action) {
|
||||
|
||||
case 'lay_navigation_real':
|
||||
if (isset($_POST['submit_save'])) {
|
||||
$vals = grab_values('LeftFrameLight:bool;LeftFrameDBTree:bool;LeftFrameDBSeparator;LeftFrameTableSeparator;LeftFrameTableLevel:int;LeftDisplayLogo:bool;LeftDisplayServers:bool;DisplayServersList:bool;DisplayDatabasesList:bool;LeftPointerEnable:bool');
|
||||
$vals = grab_values('LeftFrameLight:bool;LeftFrameDBTree:bool;LeftFrameDBSeparator;LeftFrameTableSeparator;LeftFrameTableLevel:int;LeftDisplayLogo:bool;LeftDisplayServers:bool;DisplayServersList:bool;DisplayDatabasesList;LeftPointerEnable:bool');
|
||||
$err = FALSE;
|
||||
if (isset($vals['DisplayDatabasesList'])) {
|
||||
if ($vals['DisplayDatabasesList'] == 'yes') {
|
||||
$vals['DisplayDatabasesList'] = true;
|
||||
} elseif ($vals['DisplayDatabasesList'] == 'no') {
|
||||
$vals['DisplayDatabasesList'] = false;
|
||||
}
|
||||
}
|
||||
if (isset($vals['LeftFrameTableLevel']) && $vals['LeftFrameTableLevel'] < 1) {
|
||||
message('error', 'Invalid value for maximum table nesting level!');
|
||||
$err = TRUE;
|
||||
|
Reference in New Issue
Block a user