Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
James 2012-04-18 14:03:47 -04:00
commit d3d6b10528
3 changed files with 22 additions and 3 deletions

View File

@ -333,6 +333,7 @@ class ScheduleController extends Zend_Controller_Action
public function getCurrentPlaylistAction() public function getCurrentPlaylistAction()
{ {
$range = Application_Model_Schedule::GetPlayOrderRange(); $range = Application_Model_Schedule::GetPlayOrderRange();
$show = Application_Model_Show::GetCurrentShow();
/* Convert all UTC times to localtime before sending back to user. */ /* Convert all UTC times to localtime before sending back to user. */
if (isset($range["previous"])){ if (isset($range["previous"])){
@ -371,6 +372,7 @@ class ScheduleController extends Zend_Controller_Action
$this->view->switch_status = $switch_status; $this->view->switch_status = $switch_status;
$this->view->entries = $range; $this->view->entries = $range;
$this->view->show_name = $show[0]["name"];
} }
public function removeGroupAction() public function removeGroupAction()

View File

@ -38,7 +38,7 @@
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd> <dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
<dd class="edit-error"></dd> <dd class="edit-error"></dd>
<dt>Fade out (s):</dt> <dt>Fade out (s):</dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00/span></dd> <dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
<dd class="edit-error"></dd> <dd class="edit-error"></dd>
</dl> </dl>
</div> </div>
@ -52,4 +52,4 @@
<?php else : ?> <?php else : ?>
<div>No open playlist</div> <div>No open playlist</div>
<?php endif; ?> <?php endif; ?>

View File

@ -8,6 +8,8 @@ var nextSong = null;
var currentShow = new Array(); var currentShow = new Array();
var nextShow = new Array(); var nextShow = new Array();
var showName = null;
var currentElem; var currentElem;
var serverUpdateInterval = 5000; var serverUpdateInterval = 5000;
@ -148,7 +150,21 @@ function updatePlaybar(){
else else
$('#current').text(currentSong.name+","); $('#current').text(currentSong.name+",");
}else{ }else{
$('#current').html("Current: <span style='color:red; font-weight:bold'>Nothing Scheduled</span>"); if (master_dj_on_air) {
if (showName) {
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+showName+" - Master Stream</span>");
} else {
$('#current').html("Current: <span style='color:red; font-weight:bold'>Master Stream</span>");
}
} else if (live_dj_on_air) {
if (showName) {
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+showName+" - Live Stream</span>");
} else {
$('#current').html("Current: <span style='color:red; font-weight:bold'>Live Stream</span>");
}
} else {
$('#current').html("Current: <span style='color:red; font-weight:bold'>Nothing Scheduled</span>");
}
} }
if (nextSong !== null){ if (nextSong !== null){
@ -346,6 +362,7 @@ function getScheduleFromServer(){
parseItems(data.entries); parseItems(data.entries);
parseSourceStatus(data.source_status); parseSourceStatus(data.source_status);
parseSwitchStatus(data.switch_status); parseSwitchStatus(data.switch_status);
showName = data.show_name;
}, error:function(jqXHR, textStatus, errorThrown){}}); }, error:function(jqXHR, textStatus, errorThrown){}});
setTimeout(getScheduleFromServer, serverUpdateInterval); setTimeout(getScheduleFromServer, serverUpdateInterval);
} }