1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 19:41:55 +02:00

play method now uses hidden iframe, setup second hover menu to rightbar

This commit is contained in:
Karl 'vollmerk' Vollmer 2007-09-27 04:10:25 +00:00
parent 851c035d4e
commit f9a3cf50e3
6 changed files with 53 additions and 9 deletions

View file

@ -4,6 +4,7 @@
-------------------------------------------------------------------------- --------------------------------------------------------------------------
v.3.4-Alpha3 v.3.4-Alpha3
- Modified Play Method to use hidden iframe
- Fixed album random and by min random - Fixed album random and by min random
- Added Delete to Playlist and Live Streams (Radio) - Added Delete to Playlist and Live Streams (Radio)
- Massive improvements to CSS (Thx Spocky) - Massive improvements to CSS (Thx Spocky)

View file

@ -85,12 +85,9 @@ function update_txt(value,field) {
document.getElementById(field).innerHTML=value; document.getElementById(field).innerHTML=value;
} }
// SubmitToPage this function specificaly submits the form to the specified page // Reload our util frame
function SubmitToPage(form_id,action) { function reload_util() {
document.getElementById('util_iframe').contentWindow.location.reload(true);
document.getElementById(form_id).action = action;
document.getElementById(form_id).submit();
return true;
} }
function popup_art(url) { function popup_art(url) {

View file

@ -57,6 +57,10 @@ switch ($_REQUEST['page']) {
require_once Config::get('prefix') . '/server/localplay.ajax.php'; require_once Config::get('prefix') . '/server/localplay.ajax.php';
exit; exit;
break; break;
case 'stream':
require_once Config::get('prefix') . '/server/stream.ajax.php';
exit;
break;
default: default:
// A taste of compatibility // A taste of compatibility
break; break;

View file

@ -25,6 +25,11 @@
if (AJAX_INCLUDE != '1') { exit; } if (AJAX_INCLUDE != '1') { exit; }
switch ($_REQUEST['action']) { 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: default:
$results['rfc3514'] = '0x1'; $results['rfc3514'] = '0x1';
break; break;

View file

@ -21,9 +21,16 @@
?> ?>
<ul id="rb_action"> <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> <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> </li>
<?php if (Access::check_function('batch_download')) { ?> <?php if (Access::check_function('batch_download')) { ?>
<li> <li>
@ -86,7 +93,7 @@ if ($GLOBALS['user']->prefs['playlist_method'] != 'default' AND AJAX_INCLUDE ==
// Set the target // Set the target
$_SESSION['iframe']['target'] = Config::get('web_path') . '/stream.php?action=basket'; $_SESSION['iframe']['target'] = Config::get('web_path') . '/stream.php?action=basket';
echo "<script type=\"text/javascript\">"; echo "<script type=\"text/javascript\">";
echo "document.getElementById('util_iframe').contentWindow.location.reload(true);"; echo "reload_util();";
echo "</script>"; echo "</script>";
} }
?> ?>

View file

@ -184,6 +184,34 @@ h3#content_title span {
padding:4px; padding:4px;
} }
#rightbar #rb_action li { display:inline; } #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 { position:relative; z-index:10;}
#rightbar li#rb_add:hover { background:#99ccff; } #rightbar li#rb_add:hover { background:#99ccff; }
/* Rightbar AddItems SubMenu */ /* Rightbar AddItems SubMenu */
@ -209,6 +237,8 @@ h3#content_title span {
text-decoration:none; text-decoration:none;
text-align:right; text-align:right;
} }
#rightbar #pl_action_additems a:hover,
#rightbar #rb_action_additems a:hover, #rightbar #rb_action_additems a:hover,
#rightbar #rb_current_playlist a:hover { background:#99ccff; color:#fff; } #rightbar #rb_current_playlist a:hover { background:#99ccff; color:#fff; }