summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-03 04:50:53 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-03 04:50:53 +0000
commitb1f2bacf4499a3768cf8b64f425110d0616d0154 (patch)
treecf1e0936996ca7a96ece65b990d98f72a3b428e1
parent881032d415ef207fda70ddbf93ed012259aaeb2a (diff)
downloadampache-b1f2bacf4499a3768cf8b64f425110d0616d0154.tar.gz
ampache-b1f2bacf4499a3768cf8b64f425110d0616d0154.tar.bz2
ampache-b1f2bacf4499a3768cf8b64f425110d0616d0154.zip
rest of the sidebars and some more tweaks to the ajax, initial browse stuff at least menu wise... now I need to design the whole new browse interface... that is for tomorrow!
-rw-r--r--server/ajax.server.php21
-rw-r--r--templates/sidebar.inc.php16
-rw-r--r--templates/sidebar_admin.inc.php8
-rw-r--r--templates/sidebar_browse.inc.php3
-rw-r--r--templates/sidebar_player.inc.php8
-rw-r--r--templates/sidebar_preferences.inc.php8
-rw-r--r--templates/sidebar_search.inc.php8
-rw-r--r--themes/classic/templates/default.css3
8 files changed, 69 insertions, 6 deletions
diff --git a/server/ajax.server.php b/server/ajax.server.php
index 3c241005..591e7037 100644
--- a/server/ajax.server.php
+++ b/server/ajax.server.php
@@ -193,11 +193,30 @@ switch ($action) {
$xml_doc = xml_from_array($results);
echo $xml_doc;
break;
+ case 'browse_type':
+ // Clean up the types
+ switch ($_REQUEST['type']) {
+ case 'song':
+ case 'album':
+ case 'artist':
+ case 'genre':
+ $type = $_REQUEST['type'];
+ break;
+ default:
+ $type = 'song';
+ break;
+ } // types
+
+
+
+
+ break;
case 'sidebar':
switch ($_REQUEST['button']) {
case 'home':
case 'browse':
- case 'browse':
+ case 'search':
+ case 'player':
case 'preferences':
$button = $_REQUEST['button'];
break;
diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php
index 03b1180e..2a490551 100644
--- a/templates/sidebar.inc.php
+++ b/templates/sidebar.inc.php
@@ -51,12 +51,20 @@ $ajax_url = Config::get('ajax_url');
<li <?php echo $sidebar_browse; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&amp;button=browse');" >
<?php echo get_user_icon('browse'); ?>
</li>
-<li <?php echo $sidebar_view; ?>><?php echo get_user_icon('view'); ?></li>
-<li <?php echo $sidebar_edit; ?>><?php echo get_user_icon('edit'); ?></li>
+<li <?php echo $sidebar_search; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&amp;button=search');" >
+ <?php echo get_user_icon('view'); ?>
+</li>
+<li <?php echo $sidebar_preferences; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&amp;button=preferences');" >
+ <?php echo get_user_icon('edit'); ?>
+</li>
<?php if ($GLOBALS['user']->has_access('100')) { ?>
-<li <?php echo $sidebar_admin; ?>><?php echo get_user_icon('admin'); ?></li>
+<li <?php echo $sidebar_admin; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&amp;button=admin');" >
+ <?php echo get_user_icon('admin'); ?>
+</li>
<?php } ?>
-<li <?php echo $sidebar_all; ?>><?php echo get_user_icon('all'); ?></li>
+<li <?php echo $sidebar_player; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&amp;button=player');" >
+ <?php echo get_user_icon('all'); ?>
+</li>
</ul>
<div id="sidebar-page">
<?php require_once Config::get('prefix') . '/templates/sidebar_' . $_SESSION['state']['sidebar_tab'] . '.inc.php'; ?>
diff --git a/templates/sidebar_admin.inc.php b/templates/sidebar_admin.inc.php
new file mode 100644
index 00000000..e5e2867b
--- /dev/null
+++ b/templates/sidebar_admin.inc.php
@@ -0,0 +1,8 @@
+<h4><?php echo _('Browse By'); ?></h4>
+<select name="type">
+ <option value="song"><?php echo _('Song Title'); ?></option>
+ <option value="album"><?php echo _('Albums'); ?></option>
+ <option value="artist"><?php echo _('Artist'); ?></option>
+ <option value="genre"><?php echo _('Genre'); ?></option>
+</select>
+<hr />
diff --git a/templates/sidebar_browse.inc.php b/templates/sidebar_browse.inc.php
index e5e2867b..1b6a02ee 100644
--- a/templates/sidebar_browse.inc.php
+++ b/templates/sidebar_browse.inc.php
@@ -1,5 +1,6 @@
<h4><?php echo _('Browse By'); ?></h4>
-<select name="type">
+<form id="browse_type" name="browse_type" action="#" method="post">
+<select name="type" onchange="ajaxPut('browse_type','<?php echo Config::get('ajax_url'); ?>?action=browse_type');return true;" >
<option value="song"><?php echo _('Song Title'); ?></option>
<option value="album"><?php echo _('Albums'); ?></option>
<option value="artist"><?php echo _('Artist'); ?></option>
diff --git a/templates/sidebar_player.inc.php b/templates/sidebar_player.inc.php
new file mode 100644
index 00000000..e5e2867b
--- /dev/null
+++ b/templates/sidebar_player.inc.php
@@ -0,0 +1,8 @@
+<h4><?php echo _('Browse By'); ?></h4>
+<select name="type">
+ <option value="song"><?php echo _('Song Title'); ?></option>
+ <option value="album"><?php echo _('Albums'); ?></option>
+ <option value="artist"><?php echo _('Artist'); ?></option>
+ <option value="genre"><?php echo _('Genre'); ?></option>
+</select>
+<hr />
diff --git a/templates/sidebar_preferences.inc.php b/templates/sidebar_preferences.inc.php
new file mode 100644
index 00000000..e5e2867b
--- /dev/null
+++ b/templates/sidebar_preferences.inc.php
@@ -0,0 +1,8 @@
+<h4><?php echo _('Browse By'); ?></h4>
+<select name="type">
+ <option value="song"><?php echo _('Song Title'); ?></option>
+ <option value="album"><?php echo _('Albums'); ?></option>
+ <option value="artist"><?php echo _('Artist'); ?></option>
+ <option value="genre"><?php echo _('Genre'); ?></option>
+</select>
+<hr />
diff --git a/templates/sidebar_search.inc.php b/templates/sidebar_search.inc.php
new file mode 100644
index 00000000..e5e2867b
--- /dev/null
+++ b/templates/sidebar_search.inc.php
@@ -0,0 +1,8 @@
+<h4><?php echo _('Browse By'); ?></h4>
+<select name="type">
+ <option value="song"><?php echo _('Song Title'); ?></option>
+ <option value="album"><?php echo _('Albums'); ?></option>
+ <option value="artist"><?php echo _('Artist'); ?></option>
+ <option value="genre"><?php echo _('Genre'); ?></option>
+</select>
+<hr />
diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css
index 9c0f98eb..5c1b8308 100644
--- a/themes/classic/templates/default.css
+++ b/themes/classic/templates/default.css
@@ -253,6 +253,9 @@ h3#content_title span {
background-color:#c0c0c0;
padding-left:5px;
}
+#sidebar-page select {
+ width: 120px;
+}
/* Menu Elements Display (icons, visibility...) */