move user preferences to top level server menu

This commit is contained in:
Crack
2010-07-07 01:27:05 +02:00
parent a9f39a92e7
commit 54c322544c
4 changed files with 56 additions and 25 deletions

View File

@@ -158,7 +158,9 @@ $strConfigForm_Edit_desc = __('Customize edit mode');
$strConfigForm_Export = __('Export');
$strConfigForm_Export_defaults = __('Export defaults');
$strConfigForm_Export_defaults_desc = __('Customize default export options');
$strConfigForm_Features = __('Features');
$strConfigForm_General = __('General settings');
$strConfigForm_General_desc = __('Set some commonly used options');
$strConfigForm_Import = __('Import');
$strConfigForm_Import_defaults = __('Import defaults');
$strConfigForm_Import_defaults_desc = __('Customize default common import options');
@@ -213,6 +215,8 @@ $strConfigForm_Startup = __('Startup');
$strConfigForm_Startup_desc = __('Customize startup page');
$strConfigForm_Tabs = __('Tabs');
$strConfigForm_Tabs_desc = __('Choose how you want tabs to work');
$strConfigForm_Text_fields = __('Text fields');
$strConfigForm_Text_fields_desc = __('Customize text input fields');
$strConfigForm_Texy = __('Texy! text');
$strConfigForm_Texy_desc = __('Customize default options');
$strConfigGZipDump_desc = __('Enable [a@http://en.wikipedia.org/wiki/Gzip]gzip[/a] compression for import and export operations');

View File

@@ -91,6 +91,10 @@ $tabs['synchronize']['icon'] = 's_sync.png';
$tabs['synchronize']['link'] = 'server_synchronize.php';
$tabs['synchronize']['text'] = __('Synchronize');
$tabs['settings']['icon'] = 'b_tblops.png';
$tabs['settings']['link'] = 'user_preferences.php';
$tabs['settings']['text'] = __('Settings');
echo PMA_generate_html_tabs($tabs, array());
unset($tabs);

View File

@@ -582,55 +582,62 @@ form.login label {
/* specific elements */
/* topmenu */
ul#topmenu, ul.tabs {
ul#topmenu, ul#topmenu2, ul.tabs {
font-weight: bold;
list-style-type: none;
margin: 0;
padding: 0;
}
ul#topmenu li {
ul#topmenu li, ul#topmenu2 li {
float: <?php echo $left; ?>;
margin: 0;
padding: 0;
vertical-align: middle;
}
#topmenu img {
#topmenu img, #topmenu2 img {
vertical-align: middle;
margin-<?php echo $right; ?>: 0.1em;
}
/* default tab styles */
.tab, .tabcaution, .tabactive {
ul#topmenu .tab, ul#topmenu .tabcaution, ul#topmenu .tabactive {
display: block;
margin: 0.2em 0.2em 0 0.2em;
padding: 0.2em 0.2em 0 0.2em;
white-space: nowrap;
}
ul#topmenu2 .tab, ul#topmenu2 .tabactive {
display: block;
margin: 0.1em;
padding: 0.2em;
white-space: nowrap;
}
/* disabled tabs */
span.tab {
ul#topmenu span.tab {
color: #666666;
}
/* disabled drop/empty tabs */
span.tabcaution {
ul#topmenu span.tabcaution {
color: #ff6666;
}
/* enabled drop/empty tabs */
a.tabcaution {
ul#topmenu a.tabcaution {
color: #FF0000;
}
a.tabcaution:hover {
ul#topmenu a.tabcaution:hover {
color: #FFFFFF;
background-color: #FF0000;
}
<?php if ($GLOBALS['cfg']['LightTabs']) { ?>
/* active tab */
a.tabactive {
ul#topmenu a.tabactive, ul#topmenu2 a.tabactive {
color: black;
}
<?php } else { ?>
@@ -639,12 +646,18 @@ a.tabactive {
padding: 0.1em 0.3em 0.1em 0.3em;
}
ul#topmenu2 {
margin: 0.25em 0.5em 0;
height: 2em;
clear: both;
}
ul#topmenu li {
border-bottom: 1pt solid black;
}
/* default tab styles */
.tab, .tabcaution, .tabactive {
ul#topmenu .tab, ul#topmenu .tabcaution, ul#topmenu .tabactive {
background-color: <?php echo $GLOBALS['cfg']['BgOne']; ?>;
border: 1pt solid <?php echo $GLOBALS['cfg']['BgTwo']; ?>;
border-bottom: 0;
@@ -653,29 +666,37 @@ ul#topmenu li {
}
/* enabled hover/active tabs */
a.tab:hover,
a.tabcaution:hover,
.tabactive,
.tabactive:hover {
ul#topmenu a.tab:hover,
ul#topmenu a.tabcaution:hover,
ul#topmenu .tabactive,
ul#topmenu .tabactive:hover {
margin: 0;
padding: 0.2em 0.4em 0.2em 0.4em;
text-decoration: none;
}
a.tab:hover,
.tabactive {
ul#topmenu a.tab:hover,
ul#topmenu .tabactive {
background-color: <?php echo $GLOBALS['cfg']['MainBackground']; ?>;
}
ul#topmenu2 a.tab:hover,
ul#topmenu2 a.tabactive {
background-color: <?php echo $GLOBALS['cfg']['BgOne']; ?>;
-moz-border-radius: 0.3em;
border-radius: 0.3em;
text-decoration: none;
}
/* to be able to cancel the bottom border, use <li class="active"> */
ul#topmenu li.active {
border-bottom: 1pt solid <?php echo $GLOBALS['cfg']['MainBackground']; ?>;
}
/* disabled drop/empty tabs */
span.tab,
ul#topmenu span.tab,
a.warning,
span.tabcaution {
ul#topmenu span.tabcaution {
cursor: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>error.ico), default;
}
<?php } ?>

View File

@@ -22,8 +22,10 @@ $GLOBALS['js_include'][] = 'config.js';
require_once './libraries/header.inc.php';
// build tabs
$tabs = array();
// show server tabs
require './libraries/server_links.inc.php';
// build user preferences menu
$form_param = filter_input(INPUT_GET, 'form');
if (!isset($forms[$form_param])) {
$forms_keys = array_keys($forms);
@@ -36,16 +38,16 @@ $tabs_icons = array(
'Main_frame' => 'b_props.png',
'Import' => 'b_import.png',
'Export' => 'b_export.png');
echo '<ul id="topmenu2">';
foreach (array_keys($forms) as $formset) {
$tabs[] = array(
$tab = array(
'link' => 'user_preferences.php',
'text' => PMA_lang('Form_' . $formset),
'icon' => $tabs_icons[$formset],
'active' => $formset == $form_param,
'url_params' => array('form' => $formset));
'active' => $formset == $form_param);
echo PMA_generate_html_tab($tab, array('form' => $formset));
}
echo PMA_generate_html_tabs($tabs, array());
echo '</ul>';
// show "configuration saved" message and reload navigation frame if needed
if (!empty($_GET['saved'])) {