diff options
-rwxr-xr-x | docs/CHANGELOG | 1 | ||||
-rw-r--r-- | lib/javascript-base.js | 9 | ||||
-rw-r--r-- | server/ajax.server.php | 4 | ||||
-rw-r--r-- | server/stream.ajax.php | 5 | ||||
-rw-r--r-- | templates/rightbar.inc.php | 13 | ||||
-rw-r--r-- | themes/classic/templates/default.css | 30 |
6 files changed, 53 insertions, 9 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 2a39065c..f11d4307 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,7 @@ -------------------------------------------------------------------------- v.3.4-Alpha3 + - Modified Play Method to use hidden iframe - Fixed album random and by min random - Added Delete to Playlist and Live Streams (Radio) - Massive improvements to CSS (Thx Spocky) diff --git a/lib/javascript-base.js b/lib/javascript-base.js index 2fdd62e3..1d3166f9 100644 --- a/lib/javascript-base.js +++ b/lib/javascript-base.js @@ -85,12 +85,9 @@ function update_txt(value,field) { document.getElementById(field).innerHTML=value; } -// SubmitToPage this function specificaly submits the form to the specified page -function SubmitToPage(form_id,action) { - - document.getElementById(form_id).action = action; - document.getElementById(form_id).submit(); - return true; +// Reload our util frame +function reload_util() { + document.getElementById('util_iframe').contentWindow.location.reload(true); } function popup_art(url) { diff --git a/server/ajax.server.php b/server/ajax.server.php index 26a7a75d..d6d1f421 100644 --- a/server/ajax.server.php +++ b/server/ajax.server.php @@ -57,6 +57,10 @@ switch ($_REQUEST['page']) { require_once Config::get('prefix') . '/server/localplay.ajax.php'; exit; break; + case 'stream': + require_once Config::get('prefix') . '/server/stream.ajax.php'; + exit; + break; default: // A taste of compatibility break; diff --git a/server/stream.ajax.php b/server/stream.ajax.php index 744e0a3d..be29a545 100644 --- a/server/stream.ajax.php +++ b/server/stream.ajax.php @@ -25,6 +25,11 @@ if (AJAX_INCLUDE != '1') { exit; } switch ($_REQUEST['action']) { + case 'basket': + // We need to set the basket up! + $_SESSION['iframe']['target'] = Config::get('web_path') . '/stream.php?action=basket'; + $results['rfc3514'] = '<script type="text/javascript">reload_util()</script>'; + break; default: $results['rfc3514'] = '0x1'; break; diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php index ae6dd2e6..d9e3fb02 100644 --- a/templates/rightbar.inc.php +++ b/templates/rightbar.inc.php @@ -21,9 +21,16 @@ ?> <ul id="rb_action"> - <li><a href="<?php echo Config::get('web_path'); ?>/stream.php?action=basket"><?php echo get_user_icon('all'); ?></a></li> <li> - <?php echo Ajax::button('?page=playlist&action=create','playlist_add',_('Save as Playlist'),'rb_create_playlist'); ?> + <?php echo Ajax::button('?page=stream&action=basket','all',_('Play'),'rightbar_play'); ?> + </li> + <li id="pl_add"> + <?php echo get_user_icon('playlist_add',_('Add to Playlist')); ?> + <ul id="pl_action_additems"> + <li> + <?php echo Ajax::text('?page=playlist&action=create',_('Add to New Playlist'),'rb_create_playlist'); ?> + </li> + </ul> </li> <?php if (Access::check_function('batch_download')) { ?> <li> @@ -86,7 +93,7 @@ if ($GLOBALS['user']->prefs['playlist_method'] != 'default' AND AJAX_INCLUDE == // Set the target $_SESSION['iframe']['target'] = Config::get('web_path') . '/stream.php?action=basket'; echo "<script type=\"text/javascript\">"; - echo "document.getElementById('util_iframe').contentWindow.location.reload(true);"; + echo "reload_util();"; echo "</script>"; } ?> diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css index 8f657374..fc043bc8 100644 --- a/themes/classic/templates/default.css +++ b/themes/classic/templates/default.css @@ -184,6 +184,34 @@ h3#content_title span { padding:4px;
}
#rightbar #rb_action li { display:inline; }
+
+#rightbar li#pl_add { position:relative; z-index:10;}
+#rightbar li#pl_add:hover { background:#99ccff; }
+/* Rightbar AddItems SubMenu */
+#rightbar li:hover #pl_action_additems { display:block; }
+#rightbar #pl_action_additems {
+ display:none;
+ position:absolute;
+ right:0px;
+ top:18px;
+ background:#fff;
+ border:2px solid #c0c0c0;
+ width:120px;
+ font-size:0.7em;
+ padding:0.3em;
+}
+* html #rightbar #pl_action_additems {right:100px;} /* IE6 fix */
+
+#rightbar #pl_action_additems a {
+ display:block;
+ padding:0.1em;
+ border-bottom:1px dotted #c0c0c0;
+ color:#5b5b5b;
+ text-decoration:none;
+ text-align:right;
+}
+
+
#rightbar li#rb_add { position:relative; z-index:10;}
#rightbar li#rb_add:hover { background:#99ccff; }
/* Rightbar AddItems SubMenu */
@@ -209,6 +237,8 @@ h3#content_title span { text-decoration:none;
text-align:right;
}
+
+#rightbar #pl_action_additems a:hover,
#rightbar #rb_action_additems a:hover,
#rightbar #rb_current_playlist a:hover { background:#99ccff; color:#fff; }
|