summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/catalog.php5
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/album.lib.php2
-rw-r--r--lib/class/album.class.php17
-rw-r--r--modules/infotools/AmazonSearchEngine.class.php2
-rw-r--r--templates/default.css121
-rw-r--r--templates/header.inc8
-rw-r--r--templates/sidebar.inc.php70
-rw-r--r--templates/subnavbar.inc.php10
-rw-r--r--themes/burgundy/templates/default.css102
-rw-r--r--themes/classic/templates/default.css123
-rw-r--r--themes/greyblock/templates/default.css143
12 files changed, 378 insertions, 227 deletions
diff --git a/admin/catalog.php b/admin/catalog.php
index 36aa4a15..d103ecae 100644
--- a/admin/catalog.php
+++ b/admin/catalog.php
@@ -253,13 +253,12 @@ switch ($_REQUEST['action']) {
break;
case 'gather_album_art':
flush();
-
$catalogs = $catalog->get_catalogs();
foreach ($catalogs as $data) {
- echo "<div class=\"confirmation-box\"><b>" . _("Starting Album Art Search") . ". . .</b><br /><br />\n";
+ echo "<div class=\"confirmation-box\"><b>" . _('Starting Album Art Search') . ". . .</b><br /><br />\n";
echo _('Searched') . ": <span id=\"count_art_" . $data->id . "\">" . _('None') . "</span><br />";
$data->get_album_art();
- echo "<b>" . _("Album Art Search Finished") . ". . .</b></div>\n";
+ echo "<b>" . _('Album Art Search Finished') . ". . .</b></div>\n";
}
$url = conf('web_path') . '/admin/index.php';
$title = _('Album Art Search Finished');
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 8c215a41..bb2719ee 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.3.3-Beta3
+ - Improved Sidebar CSS making it more compliant with different
+ browsers (Thx Spocky)
- Fixed some logic errors in the Transcoding logic and play logic
- Rewrote Album Art collection to correct some seriou logic flaws
- Added potential fix for FastCGI installations
diff --git a/lib/album.lib.php b/lib/album.lib.php
index 891c1b24..d01691b2 100644
--- a/lib/album.lib.php
+++ b/lib/album.lib.php
@@ -43,7 +43,7 @@ function get_image_from_source($data) {
// Check to see if it's a URL
if (isset($data['url'])) {
$snoopy = new Snoopy();
- $snoopy->fetch($results['url']);
+ $snoopy->fetch($data['url']);
return $snoopy->results;
}
diff --git a/lib/class/album.class.php b/lib/class/album.class.php
index 6ef08f7a..49a24b1b 100644
--- a/lib/class/album.class.php
+++ b/lib/class/album.class.php
@@ -226,7 +226,7 @@ class Album {
// Some of these take options!
switch ($method_name) {
case 'get_amazon_art':
- $data = $this->{$method_name}($options['keyword']);
+ $data = $this->{$method_name}($options['keyword'],$limit);
break;
case 'get_id3_art':
$data = $this->{$method_name}($limit);
@@ -371,7 +371,7 @@ class Album {
* This takes keywords and performs a search of the Amazon website
* for album art. It returns an array of found objects with mime/url keys
*/
- function get_amazon_art($keywords = '') {
+ function get_amazon_art($keywords = '',$limit='') {
$images = array();
$final_results = array();
@@ -440,12 +440,15 @@ class Album {
} // foreach
// Rudimentary image type detection, only JPG and GIF allowed.
- if (substr($result[$key], -4 == ".jpg")) {
+ if (substr($result[$key], -4 == '.jpg')) {
$mime = "image/jpg";
}
- elseif (substr($result[$key], -4 == ".gif")) {
+ elseif (substr($result[$key], -4 == '.gif')) {
$mime = "image/gif";
}
+ elseif (substr($result[$key], -4 == '.png')) {
+ $mime = "image/png";
+ }
else {
/* Just go to the next result */
continue;
@@ -456,6 +459,12 @@ class Album {
$images[] = $data;
+ if (!empty($limit)) {
+ if (count($images) >= $limit) {
+ return $images;
+ }
+ }
+
} // if we've got something
return $images;
diff --git a/modules/infotools/AmazonSearchEngine.class.php b/modules/infotools/AmazonSearchEngine.class.php
index 700d4e95..2dc25d7e 100644
--- a/modules/infotools/AmazonSearchEngine.class.php
+++ b/modules/infotools/AmazonSearchEngine.class.php
@@ -100,8 +100,6 @@ class AmazonSearch {
$snoopy->fetch($url);
$contents = $snoopy->results;
- debug_event('amazon-search-results','Retrieved ' . strlen($contents) . ' chars','5');
-
if (!xml_parse($this->_parser, $contents)) {
debug_event('amazon-search-results','Error:' . sprintf('XML error: %s at line %d',xml_error_string(xml_get_error_code($this->_parser)),xml_get_current_line_number($this->_parser)),'1');
}
diff --git a/templates/default.css b/templates/default.css
index d267cc0d..e084e2ca 100644
--- a/templates/default.css
+++ b/templates/default.css
@@ -165,9 +165,6 @@ textarea {
font-size: 11px;
cursor: pointer;
}
-/* These three lines make a menu vertical */
- #sidebar li { float: none; }
- #sidebar li ul { margin: -1.5em 0 0 9em; }
/* ////////////////////////////////////////////////////////////////*/
/* De aqui pa'bajo, ros esta creando una hoja de estilos unica para todo Ampache */
@@ -258,21 +255,25 @@ div#Header{
* Make padding apply to the li, not just an a. Moving padding: to li throws off the dropdown menu alignment.
*/
-div#sidebar{
+
+#sidebar{
clear:both;
position:absolute;
left:5px;
top:87px;
}
+#sidebar select {
+ width: 95%;
+}
+
#sidebar h3 {
- border:0px;
+ border:0;
width: 120px;
height: 28px;
- margin:0px;
- padding:0px;
- background: transparent url("../themes/classic/images/sidebar_top.jpg") no-repeat left;
-
+ margin:0;
+ padding:0;
+ background: transparent url(../themes/classic/images/sidebar_top.jpg) no-repeat left;
}
#sidebar h3 span {
@@ -280,59 +281,99 @@ div#sidebar{
}
#sidebar ul {
- margin: 0px;
list-style: none;
font-family:Arial, Helvetica, Sans-Serif;
- font-size:10px;
- padding: 0px;
- line-height: 1.0;
+ font-size: 10px;
+ margin: 0;
+ padding: 0;
+ line-height: 1em;
+}
+
+#sidebar ul.subnavside {
+ display: none;
+ position: absolute;
+ width: 9em;
+ top: -1px;
+ left: 11.5em;
+ font-size: 1em;
+ z-index: 1;
}
#sidebar li {
+ float: left;
+ clear: both;
+ display: inline; /* IE6 Patch */
+ position: relative;
+ width: 13em;
+ width: /**/11.5em; /* Only IE5.5 can't see this */
margin: 0;
- display: block;
border-bottom: 1px solid #8B8B8B;
border-left: 1px solid #8B8B8B;
border-right: 4px solid #B4B4B4;
border-top: 1px solid #8B8B8B;
- /* float: left; /* use for horizontal menu; comment out otherwise */
- padding: 5px 0px 5px 10px;
- width: 10.5em;
- background-color:#FFFFFF;
+ background:#fff;
}
#sidebar ul.subnavside li {
border-right: 1px solid #B4B4B4;
}
-#sidebar a, .navbutton {
- display: block; /*Not sure why this is neccesary, but it is for IE*/
+#sidebar a, #sidebar .navbutton {
+ display: block;
+ position: relative;
text-decoration: none;
+ padding: .5em 0 .5em 1em;
}
-#sidebar li:hover, #sidebar li.sfhover {
- color:#000000;
- background-color:#DDDDDD;
+#sidebar li:hover ul.subnavside, #sidebar li.sfhover ul.subnavside {
+ display:block;
}
-#sidebar li.hover:active {
- background-color:#CCCCCC;
- z-index:30;
-}
-
-#sidebar li ul {
- float: left;
- position: absolute;
- width: 9em;
- margin: -1.5em 0 0 10.5em; /* for vertical menu; comment out otherwise */
-/* margin: 0.5em 0 0 -1.1em; /* for horizontal menu; comment out otherwise */
- left: -999em; /* this -999em puts the submenu item way off to the left until it's called back by a hover (below) */
- z-index:30;
+#sidebar li:hover, #sidebar li.sfhover, #sidebar li.activetopmenu {
+ color:#000;
+ background-color:#ddd;
}
-#sidebar li:hover ul, #sidebar li.sfhover ul {
- left: auto; /* this calls the submenu back when the parent li is hovered. */
-}
+#sidebar li.hover:active {
+ background-color:#ccc;
+ z-index:30;
+}
+
+/* For horizontal menu */
+.horizontal_menu #content {margin:3em 0 0 2em;}
+.horizontal_menu #sidebar { width: auto; top: 85px;}
+.horizontal_menu #sidebar h3 { display: none; }
+.horizontal_menu #sidebar li { clear: none; border:1px solid #8b8b8b}
+.horizontal_menu #sidebar ul.subnavside { left: 0; top: 2em; }
+
+
+/* Menu Elements Display (icons, visibility...) */
+#sidebar_home a { }
+#sidebar_admin a { }
+#sidebar_prefs a { }
+#sidebar_browse a { }
+#sidebar_plists a { }
+#sidebar_stats a { }
+#sidebar_search a { }
+#sidebar #sidebar_subsearch { }
+#sidebar_random a { }
+#sidebar_form { }
+#sidebar_localplay a { }
+#sidebar_localplay_ctrl { }
+#sidebar_logout a { }
+
+#sidebar_admin_users a { }
+#sidebar_admin_mail_users a { }
+#sidebar_admin_catalog a { }
+#sidebar_admin_config a { }
+#sidebar_admin_access_list a { }
+
+#sidebar_browse_albums a { }
+#sidebar_browse_artists a { }
+#sidebar_browse_genre a { }
+#sidebar_browse_song_title a { }
+#sidebar_browse_lists a { }
+
/* Styles for Now Playing */
#nowplaying{
@@ -594,6 +635,7 @@ li.current-rating{
.np_row {
padding-top: 3px;
padding-bottom: 3px;
+ display: block;
}
.np_cell {
margin: 10px;
@@ -666,4 +708,3 @@ td.user_offline {
td.user_disabled {
background-color: gray;
}
-
diff --git a/templates/header.inc b/templates/header.inc
index cc184748..a2e53e05 100644
--- a/templates/header.inc
+++ b/templates/header.inc
@@ -46,7 +46,13 @@ if (conf('use_rss')) { ?>
<body>
<script src="<?php echo $web_path; ?>/lib/javascript-base.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/modules/kajax/ajax.js" language="javascript" type="text/javascript"></script>
-<div id="maincontainer">
+<div id="maincontainer" <?php
+ if ($GLOBALS['theme']['orientation'] == 'horizontal') {
+ echo " class=\"horizontal_menu\" ";
+ }else{
+ echo " class=\"vertical_menu\" ";
+ }?>>
+
<div id="topbar"><!-- This is the topbar row -->
<div id="topbarleft">
<a href="http://www.ampache.org">
diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php
index 553514b5..06962c10 100644
--- a/templates/sidebar.inc.php
+++ b/templates/sidebar.inc.php
@@ -22,20 +22,20 @@
/**
* This is kind of the wrong place to do this, but let's define the different submenu's that could possibly be
* displayed on this page, this calls the show_submenu($items); function which takes an array of items
- * that have ['title'] ['url'] and ['active'] url assumes no conf('web_path')
+ * that have ['title'] ['url'] ['active'] and ['cssclass'] url assumes no conf('web_path')
*/
-$admin_items[] = array('title'=>_('Users'),'url'=>'admin/users.php','active'=>$location['page']);
-$admin_items[] = array('title'=>_('Mail Users'),'url'=>'admin/mail.php','active'=>$location['page']);
-$admin_items[] = array('title'=>_('Catalog'),'url'=>'admin/index.php','active'=>$location['page']);
-$admin_items[] = array('title'=>_('Config'),'url'=>'admin/preferences.php','active'=>$location['page']);
-$admin_items[] = array('title'=>_('Access List'),'url'=>'admin/access.php','active'=>$location['page']);
+$admin_items[] = array('title'=>_('Users'),'url'=>'admin/users.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_users');
+$admin_items[] = array('title'=>_('Mail Users'),'url'=>'admin/mail.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_mail_users');
+$admin_items[] = array('title'=>_('Catalog'),'url'=>'admin/index.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_catalog');
+$admin_items[] = array('title'=>_('Config'),'url'=>'admin/preferences.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_config');
+$admin_items[] = array('title'=>_('Access List'),'url'=>'admin/access.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_access_list');
-$browse_items[] = array('title'=>_("Albums"),'url'=>'albums.php','active'=>$location['page']);
-$browse_items[] = array('title'=>_("Artists"),'url'=>'artists.php','active'=>$location['page']);
-$browse_items[] = array('title'=>_("Genre"),'url'=>'browse.php?action=genre','active'=>$location['page']);
-$browse_items[] = array('title'=>_('Song Title'),'url'=>'browse.php?action=song_title','active'=>$location['page']);
-$browse_items[] = array('title'=>_("Lists"),'url'=>'browse.php','active'=>$location['page']);
+$browse_items[] = array('title'=>_("Albums"),'url'=>'albums.php','active'=>$location['page'], 'cssclass'=>'sidebar_browse_albums');
+$browse_items[] = array('title'=>_("Artists"),'url'=>'artists.php','active'=>$location['page'], 'cssclass'=>'sidebar_browse_artists');
+$browse_items[] = array('title'=>_("Genre"),'url'=>'browse.php?action=genre','active'=>$location['page'], 'cssclass'=>'sidebar_browse_genre');
+$browse_items[] = array('title'=>_('Song Title'),'url'=>'browse.php?action=song_title','active'=>$location['page'], 'cssclass'=>'sidebar_browse_song_title');
+$browse_items[] = array('title'=>_("Lists"),'url'=>'browse.php','active'=>$location['page'], 'cssclass'=>'sidebar_browse_lists');
//$browse_items[] = array('title'=>'File','url'=>'files.php','active'=>''); <!--pb1dft: this can be cleaned up -->
$web_path = conf('web_path');
@@ -43,21 +43,21 @@ $web_path = conf('web_path');
?>
<h3>&nbsp;</h3>
<ul id="navlist">
- <li<?php
+ <li id="sidebar_home"<?php
if ($location['page'] == "index.php"){
- echo " id=\"activetopmenu\" ";
+ echo " class=\"activetopmenu\" ";
}?>>
<a href="<?php echo $web_path; ?>/index.php"><?php echo _('Home'); ?></a>
</li>
<?php if ($GLOBALS['user']->has_access(100)) { ?>
- <li<?php
+ <li id="sidebar_admin"<?php
if ($location['page'] == 'admin/index.php' ||
$location['page'] == 'admin/users.php' ||
$location['page'] == 'admin/mail.php' ||
$location['page'] == 'admin/catalog.php' ||
$location['page'] == 'admin/preferences.php' ||
$location['page'] == 'admin/access.php' ){
- echo " id=\"activetopmenu\" ";
+ echo " class=\"activetopmenu\" ";
}?>>
<a href="<?php echo $web_path; ?>/admin/index.php"><?php echo _('Admin'); ?></a>
<?php
@@ -74,17 +74,17 @@ $web_path = conf('web_path');
} // end if access
?>
- <li<?php
+ <li id="sidebar_prefs"<?php
if ($location['page'] == "preferences.php" ){
- echo " id=\"activetopmenu\" ";
+ echo " class=\"activetopmenu\" ";
}?>>
<a href="<?php echo $web_path; ?>/preferences.php"><?php echo _('Preferences'); ?></a>
</li>
- <li<?php
+ <li id="sidebar_browse"<?php
if ($location['page'] == "browse.php" ||
$location['page'] == "artists.php" ||
$location['page'] == "albums.php" ){
- echo " id=\"activetopmenu\" ";
+ echo " class=\"activetopmenu\" ";
}?>>
<a href="<?php echo $web_path; ?>/browse.php"><?php echo _('Browse'); ?></a>
<?php
@@ -99,26 +99,26 @@ $web_path = conf('web_path');
}
}
?>
- <li<?php
+ <li id="sidebar_plists"<?php
if ($location['page'] == "playlist.php"){
- echo " id=\"activetopmenu\" ";
+ echo " class=\"activetopmenu\" ";
}?>>
<a href="<?php echo $web_path; ?>/playlist.php"><?php echo _('Playlists'); ?></a>
</li>
- <li<?php
+ <li id="sidebar_stats"<?php
if ($location['page'] == "stats.php"){
- echo " id=\"activetopmenu\" ";
+ echo " class=\"activetopmenu\" ";
}?>>
<a href="<?php echo $web_path; ?>/stats.php"><?php echo _('Statistics'); ?></a>
</li>
- <li<?php
+ <li id="sidebar_search"<?php
if ($location['page'] == "search.php"){
- echo " id=\"activetopmenu\" ";
+ echo " class=\"activetopmenu\" ";
}?>>
<a href="<?php echo $web_path; ?>/search.php"><?php echo _('Search'); ?></a>
</li>
<?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?>
- <li>
+ <li id="sidebar_subsearch">
<form name="sub_search" method="post" action="<?php echo $web_path; ?>/search.php" enctype="multipart/form-data" style="Display:inline">
<input type="text" name="search_string" value="" size="5" />
<input class="smallbutton" type="submit" value="<?php echo _('Search'); ?>" />
@@ -128,16 +128,16 @@ $web_path = conf('web_path');
</form>
</li>
<?php } // end if ($GLOBALS['theme']['orientation'] != 'horizontal')?>
- <li<?php
+ <li id="sidebar_random"<?php
if ($location['page'] == "randomplay.php"){
- echo " id=\"activetopmenu\" ";
+ echo " class=\"activetopmenu\" ";
}?>>
<a href="<?php echo $web_path; ?>/randomplay.php"><?php echo _('Random'); ?></a>
</li>
<?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?>
<li id="sidebar_form">
<form name="sub_random" method="post" enctype="multipart/form-data" action="<?php echo $web_path; ?>/song.php?action=random&amp;method=stream" style="Display:inline">
- <select name="random" style="width:8.7em;">
+ <select name="random" >
<option value="1">1</option>
<option value="5" selected="selected">5</option>
<option value="10">10</option>
@@ -149,9 +149,9 @@ $web_path = conf('web_path');
<option value="1000">1000</option>
<option value="-1"><?php echo _('All'); ?></option>
</select>
- <?php show_genre_pulldown('genre','','','13','width:8.7em;'); ?>
+ <?php show_genre_pulldown('genre','','','13',''); ?>
<br />
- <select name="random_type" style="width:8.7em;">
+ <select name="random_type" >
<option value="Songs"><?php echo _('Songs'); ?></option>
<option value="length"><?php echo _('Minutes'); ?></option>
<option value="full_artist"><?php echo _('Artists'); ?></option>
@@ -159,18 +159,18 @@ $web_path = conf('web_path');
<option value="unplayed"><?php echo _('Less Played'); ?></option>
</select>
<br />
- <?php show_catalog_pulldown('catalog','width:8.7em;'); ?>
+ <?php show_catalog_pulldown('catalog',''); ?>
<br />
<input class="smallbutton" type="submit" value="<?php echo _('Enqueue'); ?>" />
</form>
</li>
<?php } // end if ($GLOBALS['theme']['orientation'] != 'horizontal') ?>
<?php if ($GLOBALS['user']->prefs['localplay_level'] > 0) { ?>
- <li>
+ <li id="sidebar_localplay">
<a href="<?php echo $web_path; ?>/localplay.php"><?php echo _('Localplay'); ?></a>
</li>
<?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?>
- <li>
+ <li id="sidebar_localplay_ctrl">
<?php require_once(conf('prefix') . '/templates/show_localplay_control.inc.php'); ?>
</li>
<?php } // if horizontal orientation ?>
@@ -188,6 +188,6 @@ $web_path = conf('web_path');
</li>
<?php } // if democratic play ?>
<?php if (conf('use_auth')) { ?>
- <li><a href="<?php echo $web_path; ?>/logout.php"><?php echo _('Logout'); ?></a></li>
+ <li id="sidebar_logout"><a href="<?php echo $web_path; ?>/logout.php"><?php echo _('Logout'); ?></a></li>
<?php } // end (conf('use_auth'))?>
</ul>
diff --git a/templates/subnavbar.inc.php b/templates/subnavbar.inc.php
index 552f17c2..d1ef38f1 100644
--- a/templates/subnavbar.inc.php
+++ b/templates/subnavbar.inc.php
@@ -22,7 +22,7 @@
/**
* This file expect an array of 'items' which have ['0']['url'] ['0']['title']
- * and a ['0']['active'] == true/false this is called from show_submenu($items);
+ * ['0']['active'] == true/false and ['0']['cssclass'] this is called from show_submenu($items);
*/
?>
@@ -30,8 +30,10 @@
<?php
foreach ($items as $item) {
if ($item['url'] == $item['active']) {
- $li_id = "id=\"activesubmenu\"";
- } ?>
- <li <?php echo $li_id; ?>><a href="<?php echo conf('web_path') . "/" . $item['url']; ?>"><?php echo $item['title']; ?></a></li>
+ $li_class = "class=\"activesubmenu\"";
+ }
+ $li_id = "id=\"" . $item['cssclass'] . "\"";
+ ?>
+ <li <?php echo $li_class; echo $li_id; ?>><a href="<?php echo conf('web_path') . "/" . $item['url']; ?>"><?php echo $item['title']; ?></a></li>
<?php unset($li_id); } // END foreach ($items as $item) ?>
</ul>
diff --git a/themes/burgundy/templates/default.css b/themes/burgundy/templates/default.css
index 28083590..d9b666c2 100644
--- a/themes/burgundy/templates/default.css
+++ b/themes/burgundy/templates/default.css
@@ -183,7 +183,7 @@ body{
postion:absolute;
float: left;
clear: both;
- margin-left:15px;
+ margin-left:135px;
/*float:left; use for horizontal menu; comment out otherwise */
/* background:#fff url("../themes/classic/images/bg_content.gif") repeat-y right top; */
}
@@ -236,30 +236,31 @@ div#Header{
margin-left:10px;
}
-
/* Sidebar */
/**
* Experimental for menus (Thx Sigger)
* TO DO: Fill in 1px border around menus & submenu items
* Make padding apply to the li, not just an a. Moving padding: to li throws off the dropdown menu alignment.
*/
-
-div#sidebar{
+
+#sidebar{
clear:both;
position:absolute;
left:5px;
- top:20px;
- background:url("../themes/classic/images/bg_navigation.gif") repeat-y left;
+ top:87px;
+}
+
+#sidebar select {
+ width: 95%;
}
#sidebar h3 {
- border:0px;
+ border:0;
width: 120px;
height: 28px;
- margin:0px;
- padding:0px;
- background: transparent url("../themes/classic/images/sidebar_top.jpg") no-repeat left;
-
+ margin:0;
+ padding:0;
+ background: transparent url(../images/sidebar_top.jpg) no-repeat left;
}
#sidebar h3 span {
@@ -267,62 +268,71 @@ div#sidebar{
}
#sidebar ul {
- margin: 0px;
list-style: none;
font-family:Arial, Helvetica, Sans-Serif;
- font-size:10px;
- padding: 0px;
- line-height: 1.0;
- background-color:#320000;
+ font-size: 10px;
+ margin: 0;
+ padding: 0;
+ line-height: 1em;
+}
+
+#sidebar ul.subnavside {
+ display: none;
+ position: absolute;
+ width: 9em;
+ top: -1px;
+ left: 11.5em;
+ font-size: 1em;
+ z-index: 1;
}
#sidebar li {
- margin: 0;
float: left;
- display: block;
+ clear: both;
+ display: inline; /* IE6 Patch */
+ position: relative;
+ width: 12em;
+ width: /**/10.5em; /* Only IE5.5 can't see this */
+ margin: 0;
+ padding: .5em 0 .5em 1em;
border-bottom: 1px solid #8B8B8B;
border-left: 1px solid #8B8B8B;
- border-right: 1px solid #8B8B8B;
+ border-right: 4px solid #B4B4B4;
border-top: 1px solid #8B8B8B;
- padding: 5px 0px 5px 10px;
- width: 10.5em;
- background-color:#320000;
+ background:#320000;
}
-#sidebar a, .navbutton {
- display: block; /*Not sure why this is neccesary, but it is for IE*/
- text-decoration: none;
+#sidebar ul.subnavside li {
+ border-right: 1px solid #B4B4B4;
}
-#sidebar li:hover, #sidebar li.sfhover {
- color: #000000;
- background-color: #8f0000;
+#sidebar a, #sidebar .navbutton {
+ display: block;
+ position: relative;
+ text-decoration: none;
}
-#sidebar li:active {
- background-color:#320000;
- z-index:30;
+#sidebar li:hover ul.subnavside, #sidebar li.sfhover ul.subnavside {
+ display:block;
}
-
-#sidebar li ul {
- float: left;
- position: absolute;
- width: 9em;
-/* margin: -1.5em 0 0 10.5em; /* for vertical menu; comment out otherwise */
- margin: 0.5em 0 0 -1.1em; /* for horizontal menu; comment out otherwise */
- left: -999em; /* this -999em puts the submenu item way off to the left until it's called back by a hover (below) */
- z-index:30;
+
+#sidebar li:hover, #sidebar li.sfhover, #sidebar li.activetopmenu {
+ color:#000;
+ background-color:#8f0000;
}
-#sidebar li:hover ul, #sidebar li.sfhover ul {
- left: auto; /* this calls the submenu back when the parent li is hovered. */
- background-color: #8f0000;
+#sidebar li.hover:active {
+ background-color:#8f0000;
+ z-index:30;
}
-#navlist ul li:hover {
- background-color: #8f0000;
+/* For horizontal menu */
+.horizontal_menu #content {margin:0em 0 0 2em;}
+.horizontal_menu #sidebar { width: auto; top: 50px;}
+.horizontal_menu #sidebar h3 { display: none; }
+.horizontal_menu #sidebar li { clear: none; border:1px solid #8b8b8b}
+.horizontal_menu #sidebar ul.subnavside { left: 0; top: 2em; }
-}
/* Styles for Now Playing */
diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css
index e9c2ff89..3ead2b0b 100644
--- a/themes/classic/templates/default.css
+++ b/themes/classic/templates/default.css
@@ -167,9 +167,6 @@ textarea {
font-size: 11px;
cursor: pointer;
}
-/* These three lines make a menu vertical */
- #sidebar li { float: none; }
- #sidebar li ul { margin: -1.5em 0 0 9em; }
/* ////////////////////////////////////////////////////////////////*/
/* De aqui pa'bajo, ros esta creando una hoja de estilos unica para todo Ampache */
@@ -260,21 +257,24 @@ div#Header{
* Make padding apply to the li, not just an a. Moving padding: to li throws off the dropdown menu alignment.
*/
-div#sidebar{
+#sidebar{
clear:both;
position:absolute;
left:5px;
top:87px;
}
+#sidebar select {
+ width: 95%;
+}
+
#sidebar h3 {
- border:0px;
+ border:0;
width: 120px;
height: 28px;
- margin:0px;
- padding:0px;
- background: transparent url("../images/sidebar_top.jpg") no-repeat left;
-
+ margin:0;
+ padding:0;
+ background: transparent url(../images/sidebar_top.jpg) no-repeat left;
}
#sidebar h3 span {
@@ -282,65 +282,99 @@ div#sidebar{
}
#sidebar ul {
- margin: 0px;
list-style: none;
font-family:Arial, Helvetica, Sans-Serif;
- font-size:10px;
- padding: 0px;
- line-height: 1.0;
+ font-size: 10px;
+ margin: 0;
+ padding: 0;
+ line-height: 1em;
+}
+
+#sidebar ul.subnavside {
+ display: none;
+ position: absolute;
+ width: 9em;
+ top: -1px;
+ left: 11.5em;
+ font-size: 1em;
+ z-index: 1;
}
#sidebar li {
+ float: left;
+ clear: both;
+ display: inline; /* IE6 Patch */
+ position: relative;
+ width: 13em;
+ width: /**/11.5em; /* Only IE5.5 can't see this */
margin: 0;
- display: block;
border-bottom: 1px solid #8B8B8B;
border-left: 1px solid #8B8B8B;
border-right: 4px solid #B4B4B4;
border-top: 1px solid #8B8B8B;
- /* float: left; /* use for horizontal menu; comment out otherwise */
- padding: 5px 0px 5px 10px;
- width: 10.5em;
- background-color:#FFFFFF;
+ background:#fff;
}
#sidebar ul.subnavside li {
border-right: 1px solid #B4B4B4;
}
-#sidebar a, .navbutton {
- display: block; /*Not sure why this is neccesary, but it is for IE*/
+#sidebar a, #sidebar .navbutton {
+ display: block;
+ position: relative;
text-decoration: none;
+ padding: .5em 0 .5em 1em;
}
-#sidebar li:hover, #sidebar li.sfhover {
- color:#000000;
- background-color:#DDDDDD;
+#sidebar li:hover ul.subnavside, #sidebar li.sfhover ul.subnavside {
+ display:block;
}
-#sidebar li.hover:active {
- background-color:#CCCCCC;
- z-index:30;
-}
-
-#sidebar li ul {
- float: left;
- position: absolute;
- width: 9em;
- margin: -1.5em 0 0 10.5em; /* for vertical menu; comment out otherwise */
-/* margin: 0.5em 0 0 -1.1em; /* for horizontal menu; comment out otherwise */
- left: -999em; /* this -999em puts the submenu item way off to the left until it's called back by a hover (below) */
- z-index:30;
+#sidebar li:hover, #sidebar li.sfhover, #sidebar li.activetopmenu {
+ color:#000;
+ background-color:#ddd;
}
-#sidebar li:hover ul, #sidebar li.sfhover ul {
- left: auto; /* this calls the submenu back when the parent li is hovered. */
-}
+#sidebar li.hover:active {
+ background-color:#ccc;
+ z-index:30;
+}
+
+/* For horizontal menu */
+.horizontal_menu #content {margin:3em 0 0 2em;}
+.horizontal_menu #sidebar { width: auto; top: 85px;}
+.horizontal_menu #sidebar h3 { display: none; }
+.horizontal_menu #sidebar li { clear: none; border:1px solid #8b8b8b}
+.horizontal_menu #sidebar ul.subnavside { left: 0; top: 2em; }
+
+
+/* Menu Elements Display (icons, visibility...) */
+#sidebar_home a { }
+#sidebar_admin a { }
+#sidebar_prefs a { }
+#sidebar_browse a { }
+#sidebar_plists a { }
+#sidebar_stats a { }
+#sidebar_search a { }
+#sidebar #sidebar_subsearch { }
+#sidebar_random a { }
+#sidebar_form { }
+#sidebar_localplay a { }
+#sidebar_localplay_ctrl { }
+#sidebar_logout a { }
+
+#sidebar_admin_users a { }
+#sidebar_admin_mail_users a { }
+#sidebar_admin_catalog a { }
+#sidebar_admin_config a { }
+#sidebar_admin_access_list a { }
+
+#sidebar_browse_albums a { }
+#sidebar_browse_artists a { }
+#sidebar_browse_genre a { }
+#sidebar_browse_song_title a { }
+#sidebar_browse_lists a { }
-#play_type_switch {
- font-size: 0.9em;
- position: relative;
- left: -2px;
-}
/* Styles for Now Playing */
#nowplaying{
@@ -519,6 +553,7 @@ margin-right:5em;
.np_row {
padding-top: 3px;
padding-bottom: 3px;
+ display: block;
}
.np_cell {
margin: 10px;
diff --git a/themes/greyblock/templates/default.css b/themes/greyblock/templates/default.css
index fbdf3399..14719793 100644
--- a/themes/greyblock/templates/default.css
+++ b/themes/greyblock/templates/default.css
@@ -185,20 +185,106 @@
font-size: 11px;
cursor: pointer;
}
- .sidebar
- {
- margin-left:0px;
- margin-top:0px;
- margin-right:0px;
- padding-right:0px;
- padding-top: 0px;
- padding-left: 0px;
- }
-/* These three lines make a menu vertical */
+
#content {
float: none;
background-color: #8B8B8B;
}
+
+
+/* Sidebar */
+/**
+ * Experimental for menus (Thx Sigger)
+ * TO DO: Fill in 1px border around menus & submenu items
+ * Make padding apply to the li, not just an a. Moving padding: to li throws off the dropdown menu alignment.
+ */
+
+#sidebar{
+ clear:both;
+ position:absolute;
+ left:5px;
+ top:87px;
+}
+
+#sidebar select {
+ width: 95%;
+}
+
+#sidebar h3 {
+ display:none;
+}
+
+#sidebar h3 span {
+ display:none
+}
+
+#sidebar ul {
+ list-style: none;
+ font-family:Arial, Helvetica, Sans-Serif;
+ font-size: 10px;
+ margin: 0;
+ padding: 0;
+ line-height: 1em;
+}
+
+#sidebar ul.subnavside {
+ display: block; /*none;*/
+ position: static; /*absolute;*/
+ width: 100%; /*9em;*/
+ top: 0; /*-1px;*/
+ left: 0; /*11.5em;*/
+ font-size: 1em;
+ z-index: 1;
+}
+
+#sidebar li {
+ float: left;
+ clear: both;
+ display: inline; /* IE6 Patch */
+ position: relative;
+ width: 12em;
+ width: /**/10.5em; /* Only IE5.5 can't see this */
+ margin: 0;
+ padding: .5em 0 .5em 1em;
+ border-bottom: 1px solid #607080;
+ border-left: none;
+ border-right: 1px solid #607080;
+ border-top: none;
+ background:#D4D4D4;
+}
+
+#sidebar ul.subnavside li {
+ border-right: 1px solid #B4B4B4;
+}
+
+#sidebar a, #sidebar .navbutton {
+ display: block;
+ position: relative;
+ text-decoration: none;
+}
+
+#sidebar li:hover ul.subnavside, #sidebar li.sfhover ul.subnavside {
+ display:block;
+}
+#sidebar ul.subnavside{
+ margin-left:0.5em;
+}
+#sidebar ul.subnavside li{
+ width: 11.5em;
+ width: /**/10em; /* Only IE5.5 can't see this */
+}
+
+#sidebar li:hover, #sidebar li.sfhover, #sidebar li.activetopmenu {
+ color:#000;
+ background-color:#7f7f7f;
+}
+
+#sidebar li.hover:active {
+ background-color:#ccc;
+ z-index:30;
+}
+
+
/**
* Div Definitions
* These define how the page is layed out, be careful with these as changes to them
@@ -206,11 +292,6 @@
*/
.text-action a,.text-action li { background: #D4D4D4; }
-#sidebar h3 { display: none; }
-
-#sidebar li:hover {
- background-color: #7f7f7f;
-}
.box-left-top { display: none; }
.box-left-bottom { display: none; }
@@ -222,40 +303,8 @@
.box-top { display: none; }
.box { background: #D4D4D4; margin: 10px; }
-#sidebar li {
- /* float: left; Uncomment for horizontal */
- margin: 0;
- border-right: 1px solid #607080;
- border-bottom: 1px solid #607080;
- display: block;
- background: #D4D4D4;
- padding: 5px 0px 5px 10px;
- width: 10.5em;
-}
-
-#sidebar li ul {
- left: auto;
- margin: 0;
- display: block;
- float: left;
- width: 10em;
- position: absolute;
-}
-
-#sidebar li:hover ul, #sidebar li.sfhover ul {
- left: auto;
-}
-#navlist ul li {
- background-color: #d6d6d6;
- margin-left:.5em;
- width: 10em;
- display: block;
-}
-
-#sidebar li:active { background-color: #FFFFFF; }
- #sidebar { background-color: #8b8b8b; }
#maincontainer
{
margin: 0px;