- moved styles into css
- no need for javascript for theme selection
This commit is contained in:
@@ -16,6 +16,9 @@ $Source$
|
|||||||
header.inc.php, libraries/auth/config.auth.lib.php, db_details_qbe.php
|
header.inc.php, libraries/auth/config.auth.lib.php, db_details_qbe.php
|
||||||
libraries/auth/cookie.auth.lib.php, server_collations.php
|
libraries/auth/cookie.auth.lib.php, server_collations.php
|
||||||
- moved styles into css
|
- moved styles into css
|
||||||
|
* themes.php, css/phpmyadmin.css.php:
|
||||||
|
- moved styles into css
|
||||||
|
- no need for javascript
|
||||||
|
|
||||||
2005-11-23 Michal Čihař <michal@cihar.com>
|
2005-11-23 Michal Čihař <michal@cihar.com>
|
||||||
* config.default.php, libraries/import/csv.php, libraries/import/ldi.php:
|
* config.default.php, libraries/import/csv.php, libraries/import/ldi.php:
|
||||||
|
@@ -631,6 +631,21 @@ img.lightbulb {
|
|||||||
#bodyquerywindow {
|
#bodyquerywindow {
|
||||||
background-color: <?php echo $cfg['LeftBgColor']; ?>;
|
background-color: <?php echo $cfg['LeftBgColor']; ?>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#bodythemes {
|
||||||
|
width: 500px;
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bodythemes img {
|
||||||
|
border: 0.1em solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bodythemes a:hover img {
|
||||||
|
border: 0.1em solid red;
|
||||||
|
}
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$_valid_css = array( 'left', 'right', 'print' );
|
$_valid_css = array( 'left', 'right', 'print' );
|
||||||
|
4
main.php
4
main.php
@@ -396,8 +396,8 @@ if ( isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding']
|
|||||||
if (isset($available_themes_choices) && $available_themes_choices > 1) {
|
if (isset($available_themes_choices) && $available_themes_choices > 1) {
|
||||||
$theme_selected = FALSE;
|
$theme_selected = FALSE;
|
||||||
$theme_preview_path= './themes.php';
|
$theme_preview_path= './themes.php';
|
||||||
$theme_preview_href = '<a href="' . $theme_preview_path . '" target="themes" onclick="'
|
$theme_preview_href = '<a href="' . $theme_preview_path . '" onclick="'
|
||||||
. "window.open('" . $theme_preview_path . "','themes','left=10,top=20,width=510,height=350,scrollbars=yes,status=yes,resizable=yes');"
|
. "window.open('" . $theme_preview_path . "','themes','left=10,top=20,width=510,height=350,scrollbars=yes,status=yes,resizable=yes'); return false;"
|
||||||
. '">';
|
. '">';
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
65
themes.php
65
themes.php
@@ -13,8 +13,8 @@ require_once('./libraries/header_http.inc.php');
|
|||||||
$page_title = 'phpMyAdmin - ' . $strTheme;
|
$page_title = 'phpMyAdmin - ' . $strTheme;
|
||||||
require('./libraries/header_meta_style.inc.php');
|
require('./libraries/header_meta_style.inc.php');
|
||||||
?>
|
?>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript" type="text/javascript">
|
||||||
<!--
|
// <![CDATA[
|
||||||
function takeThis(what){
|
function takeThis(what){
|
||||||
if (window.opener && window.opener.document.forms['setTheme'].elements['set_theme']) {
|
if (window.opener && window.opener.document.forms['setTheme'].elements['set_theme']) {
|
||||||
window.opener.document.forms['setTheme'].elements['set_theme'].value = what;
|
window.opener.document.forms['setTheme'].elements['set_theme'].value = what;
|
||||||
@@ -25,18 +25,12 @@ require('./libraries/header_meta_style.inc.php');
|
|||||||
self.close();
|
self.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-->
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body id="bodythemes">
|
||||||
<table border="0" align="center" cellpadding="3" cellspacing="1">
|
<h1>phpMyAdmin - <?php echo $strTheme; ?></h1>
|
||||||
<tr>
|
|
||||||
<th class="tblHeaders"><b>phpMyAdmin - <?php echo $strTheme; ?></b></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
<?php
|
||||||
foreach ($available_themes_choices AS $PMA_Theme) {
|
foreach ($available_themes_choices AS $PMA_Theme) {
|
||||||
$screen_directory = $path_to_themes . $PMA_Theme;
|
$screen_directory = $path_to_themes . $PMA_Theme;
|
||||||
@@ -55,47 +49,22 @@ foreach ($available_themes_choices AS $PMA_Theme) {
|
|||||||
if ($theme_version < PMA_THEME_VERSION)
|
if ($theme_version < PMA_THEME_VERSION)
|
||||||
continue; // too old version
|
continue; // too old version
|
||||||
|
|
||||||
|
if (is_dir($screen_directory) && @file_exists($screen_directory.'/screen.png')) {
|
||||||
|
// if screen exists then output
|
||||||
|
?>
|
||||||
|
<h2><?php echo htmlspecialchars( $theme_name ); ?></h2>
|
||||||
|
|
||||||
if (is_dir($screen_directory) && @file_exists($screen_directory.'/screen.png')) { // if screen exists then output
|
<p> <a href="index.php?set_theme=<?php echo $PMA_Theme; ?>&<?php echo PMA_generate_common_url(); ?>"
|
||||||
?>
|
target="_top"
|
||||||
<tr>
|
onclick="takeThis('<?php echo addslashes( $PMA_Theme ); ?>'); return false;">
|
||||||
<th align="left">
|
<img src="<?php echo $screen_directory; ?>/screen.png" border="1"
|
||||||
<?php
|
alt="<?php echo htmlspecialchars( $theme_name ); ?>"
|
||||||
echo '<b>' . htmlspecialchars($theme_name) . '</b>';
|
title="<?php echo htmlspecialchars( $theme_name ); ?>" /><br />
|
||||||
?>
|
[ <b><?php echo $strTakeIt; ?></b> ]</a>
|
||||||
</th>
|
</p>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" bgcolor="<?php echo $cfg['BgcolorOne']; ?>" class="navNorm">
|
|
||||||
<script language="JavaScript">
|
|
||||||
<!--
|
|
||||||
document.write('<a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
|
|
||||||
document.write('<img src="<?php echo $screen_directory; ?>/screen.png" border="1" ');
|
|
||||||
if (document.getElementById) {
|
|
||||||
document.write('style="border: 1px solid #000000;" ');
|
|
||||||
}
|
|
||||||
document.write('alt="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" ');
|
|
||||||
document.write('title="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" />');
|
|
||||||
document.write('</a><br />');
|
|
||||||
document.write('[ <b><a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
|
|
||||||
document.write('<?php echo addslashes($strTakeIt); ?>');
|
|
||||||
document.write('</a></b> ]');
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<noscript>
|
|
||||||
<?php
|
|
||||||
echo '<img src="' . $screen_directory . '/screen.png" border="1" alt="' . htmlspecialchars($theme_name) . ' - Theme" />';
|
|
||||||
?>
|
|
||||||
</noscript>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
<?php
|
||||||
} // end 'screen output'
|
} // end 'screen output'
|
||||||
} // end 'open themes'
|
} // end 'open themes'
|
||||||
?>
|
?>
|
||||||
</table>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user