New main page design

This commit is contained in:
lorilee
2010-07-23 20:31:52 -07:00
parent db9527b4c6
commit 98ef84ebc3
6 changed files with 41 additions and 95 deletions

View File

@@ -6,7 +6,7 @@
$(document).ready(function() { $(document).ready(function() {
$('#li_custom_color').show(); $('#li_custom_color').show();
// Choosing another id does not work! // Choosing another id does not work!
$('#colorSelector').ColorPicker({ $("input[type='submit'][name='custom_color_choose']").ColorPicker({
color: '#0000ff', color: '#0000ff',
onShow: function (colpkr) { onShow: function (colpkr) {
$(colpkr).fadeIn(500); $(colpkr).fadeIn(500);

View File

@@ -35,13 +35,13 @@ function PMA_select_server($not_only_options, $ommit_fieldset)
if (! $ommit_fieldset) { if (! $ommit_fieldset) {
echo '<fieldset>'; echo '<fieldset>';
} }
echo '<label for="select_server">' . __('Server') . ':</label> '; echo '<label for="select_server">' . __('Current Server') . ':</label> ';
echo '<select name="server" id="select_server"' echo '<select name="server" id="select_server"'
. ' onchange="if (this.value != \'\') this.form.submit();">'; . ' onchange="if (this.value != \'\') this.form.submit();">';
echo '<option value="">(' . __('Servers') . ') ...</option>' . "\n"; echo '<option value="">(' . __('Servers') . ') ...</option>' . "\n";
} elseif ($list) { } elseif ($list) {
echo __('Server') . ':<br />'; echo __('Current Server') . ':<br />';
echo '<ul id="list_server">'; echo '<ul id="list_server">';
} }
@@ -55,7 +55,6 @@ function PMA_select_server($not_only_options, $ommit_fieldset)
} else { } else {
$selected = 0; $selected = 0;
} }
if (!empty($server['verbose'])) { if (!empty($server['verbose'])) {
$label = $server['verbose']; $label = $server['verbose'];
} else { } else {
@@ -78,7 +77,7 @@ function PMA_select_server($not_only_options, $ommit_fieldset)
if ($list) { if ($list) {
echo '<li>'; echo '<li>';
if ($selected && !$ommit_fieldset) { if ($selected) {
echo '<strong>' . htmlspecialchars($label) . '</strong>'; echo '<strong>' . htmlspecialchars($label) . '</strong>';
} else { } else {

View File

@@ -60,11 +60,10 @@ if ($server > 0) {
echo '<div id="maincontainer">' . "\n"; echo '<div id="maincontainer">' . "\n";
echo '<div id="main_pane_left">'; echo '<div id="main_pane_left">';
if ($server > 0 if ($server > 0
|| (! $cfg['LeftDisplayServers'] && count($cfg['Servers']) > 1)) { || (! $cfg['LeftDisplayServers'] && count($cfg['Servers']) > 1)) {
echo '<div class="group">'; echo '<div class="group">';
echo '<h2>' . __('Actions') . '</h2>'; echo '<h2>' . __('General Settings') . '</h2>';
echo '<ul>'; echo '<ul>';
/** /**
@@ -90,52 +89,27 @@ if ($server > 0
PMA_printListItem(__('Change password'), 'li_change_password', PMA_printListItem(__('Change password'), 'li_change_password',
'./user_password.php?' . $common_url_query); './user_password.php?' . $common_url_query);
} }
$http_logout = ($cfg['Server']['auth_type'] == 'http')
? '<a href="./Documentation.html#login_bug" target="documentation">'
. ($cfg['ReplaceHelpImg'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_info.png" width="11" height="11" alt="Info" />' : '(*)') . '</a>'
: '';
PMA_printListItem('<strong>' . __('Log out') . '</strong> ' . $http_logout,
'li_log_out',
'./index.php?' . $common_url_query . '&amp;old_usr=' . urlencode($PHP_AUTH_USER), null, '_parent');
} // end if } // end if
} // end of if ($server > 0)
echo '</ul>';
echo '</div>';
}
if ($server > 0) {
echo '<div class="group">';
echo '<h2>MySQL ' . $short_server_info . '</h2>';
echo '<ul>' . "\n";
if ($cfg['ShowCreateDb']) {
echo '<li id="li_create_database">';
require './libraries/display_create_database.lib.php';
echo '</li>' . "\n";
}
echo ' <li id="li_select_mysql_collation">'; echo ' <li id="li_select_mysql_collation">';
echo ' <form method="post" action="index.php" target="_parent">' . "\n" echo ' <form method="post" action="index.php" target="_parent">' . "\n"
. PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection') . PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection')
. ' <label for="select_collation_connection">' . "\n" . ' <label for="select_collation_connection">' . "\n"
. ' ' . __('MySQL connection collation') . ': ' . "\n" . ' ' . __('MySQL connection collation') . "\n"
// put the doc link in the form so that it appears on the same line
. PMA_showMySQLDocu('MySQL_Database_Administration', 'Charset-connection') . ': ' . "\n"
. ' </label>' . "\n" . ' </label>' . "\n"
. PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, true, 4, true) . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, true, 4, true)
. ' <noscript><input type="submit" value="' . __('Go') . '" /></noscript>' . "\n" . ' <noscript><input type="submit" value="' . __('Go') . '" /></noscript>' . "\n"
// put the doc link in the form so that it appears on the same line
. PMA_showMySQLDocu('MySQL_Database_Administration', 'Charset-connection') . "\n"
. ' </form>' . "\n" . ' </form>' . "\n"
. ' </li>' . "\n"; . ' </li>' . "\n";
} // end of if ($server > 0)
echo ' </ul>'; echo '</ul>';
echo ' </div>'; echo '</div>';
} }
echo '<div class="group">'; echo '<div class="group">';
echo '<h2>' . __('Interface') . '</h2>'; echo '<h2>' . __('Appearance Settings') . '</h2>';
echo ' <ul>'; echo ' <ul>';
// Displays language selection combo // Displays language selection combo
@@ -155,14 +129,13 @@ if ($GLOBALS['cfg']['ThemeManager']) {
// see js/main_custom_color.js // see js/main_custom_color.js
echo '<li id="li_custom_color" class="hide">'; echo '<li id="li_custom_color" class="hide">';
echo PMA_escapeJsString(__('Custom color')) . ': '; echo PMA_escapeJsString(__('Background color')) . ': ';
echo '<input type="submit" name="custom_color_choose" value="' . __('Choose...') . '"';
echo '<form name="colorform" id="colorform" method="post" action="index.php" target="_parent">'; echo '<form name="colorform" id="colorform" method="post" action="index.php" target="_parent">';
echo PMA_generate_common_hidden_inputs(); echo PMA_generate_common_hidden_inputs();
echo '<input type="hidden" id="custom_color" name="custom_color" value="" />'; echo '<input type="hidden" id="custom_color" name="custom_color" value="" />';
echo '<input type="submit" name="custom_color_reset" value="' . __('Reset') . '" />'; echo '<input type="submit" name="custom_color_reset" value="' . __('Reset') . '" />';
echo '</form>'; echo '</form>';
echo '<div id="colorSelector">';
echo '</div>';
echo '</li>'; echo '</li>';
} }
echo '<li id="li_select_fontsize">'; echo '<li id="li_select_fontsize">';

View File

@@ -1020,7 +1020,7 @@ div#queryboxcontainer div#bookmarkoptions {
} }
#maincontainer ul { #maincontainer ul {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>item_<?php echo $GLOBALS['text_dir']; ?>.png); list-style-type: disc;
vertical-align: middle; vertical-align: middle;
} }
@@ -1040,8 +1040,7 @@ li#li_select_lang {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_lang.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_lang.png);
} }
li#li_select_mysql_collation, li#li_select_mysql_collation {
li#li_select_mysql_charset {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_asci.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_asci.png);
} }
@@ -1049,11 +1048,6 @@ li#li_select_theme{
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_theme.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_theme.png);
} }
li#li_server_info,
li#li_server_version{
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_host.png);
}
li#li_user_info{ li#li_user_info{
/* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png); */ /* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png); */
} }
@@ -1102,19 +1096,10 @@ li#li_log_out {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_loggoff.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_loggoff.png);
} }
li#li_pma_docs,
li#li_pma_wiki {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_docs.png);
}
li#li_phpinfo { li#li_phpinfo {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>php_sym.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>php_sym.png);
} }
li#li_pma_homepage {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_home.png);
}
li#li_mysql_privilegs{ li#li_mysql_privilegs{
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png);
} }
@@ -1245,7 +1230,7 @@ code.sql {
} }
.group h2 { .group h2 {
background-color: <?php echo $GLOBALS['cfg']['ThBackground']; ?>; background: <?php echo $GLOBALS['cfg']['ThBackground']; ?>;
padding: 0.1em 0.3em; padding: 0.1em 0.3em;
margin-top: 0; margin-top: 0;
} }
@@ -1256,9 +1241,11 @@ code.sql {
} }
#li_select_server { #li_select_server {
padding-bottom: 0.3em; list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_host.png);
border-bottom: 0.3em solid <?php echo $GLOBALS['cfg']['ThBackground']; ?>; }
margin-bottom: 0.3em;
#list_server {
list-style-image: none;
} }
/** /**

View File

@@ -76,7 +76,7 @@ $GLOBALS['cfg']['FontFamilyFixed'] = 'monospace';
// border // border
$GLOBALS['cfg']['Border'] = 0; $GLOBALS['cfg']['Border'] = 0;
// table header and footer color // table header and footer color
$GLOBALS['cfg']['ThBackground'] = '#ff9900 url(' . $_SESSION['PMA_Theme']->getImgPath() . 'tbl_th.png) repeat-x top'; $GLOBALS['cfg']['ThBackground'] = '#ff9900 url("' . $_SESSION['PMA_Theme']->getImgPath() . 'tbl_th.png") repeat-x top';
// table header and footer background // table header and footer background
$GLOBALS['cfg']['ThColor'] = '#000000'; $GLOBALS['cfg']['ThColor'] = '#000000';
// table data row background // table data row background

View File

@@ -969,12 +969,12 @@ div#queryboxcontainer div#bookmarkoptions {
} }
#maincontainer ul { #maincontainer ul {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>item_<?php echo $GLOBALS['text_dir']; ?>.png); list-style-type: disc;
vertical-align: middle; vertical-align: middle;
} }
#maincontainer li { #maincontainer li {
margin-bottom: 0.3em; margin: 0.2em 0em;
} }
/* END main page */ /* END main page */
@@ -989,8 +989,7 @@ li#li_select_lang {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_lang.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_lang.png);
} }
li#li_select_mysql_collation, li#li_select_mysql_collation {
li#li_select_mysql_charset {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_asci.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_asci.png);
} }
@@ -998,11 +997,6 @@ li#li_select_theme{
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_theme.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_theme.png);
} }
li#li_server_info,
li#li_server_version{
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_host.png);
}
li#li_user_info{ li#li_user_info{
/* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png); */ /* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png); */
} }
@@ -1051,19 +1045,10 @@ li#li_log_out {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_loggoff.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_loggoff.png);
} }
li#li_pma_docs,
li#li_pma_wiki {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_docs.png);
}
li#li_phpinfo { li#li_phpinfo {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>php_sym.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>php_sym.png);
} }
li#li_pma_homepage {
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_home.png);
}
li#li_mysql_privilegs{ li#li_mysql_privilegs{
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png); list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png);
} }
@@ -1197,7 +1182,7 @@ code.sql {
} }
.group h2 { .group h2 {
background-color: <?php echo $GLOBALS['cfg']['ThBackground']; ?>; background: <?php echo $GLOBALS['cfg']['ThBackground']; ?>;
padding: 0.1em 0.3em; padding: 0.1em 0.3em;
margin-top: 0; margin-top: 0;
} }
@@ -1208,9 +1193,11 @@ code.sql {
} }
#li_select_server { #li_select_server {
padding-bottom: 0.3em; list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_host.png);
border-bottom: 0.3em solid <?php echo $GLOBALS['cfg']['ThBackground']; ?>; }
margin-bottom: 0.3em;
#list_server {
list-style-image: none;
} }
/** /**