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

This commit is contained in:
Martin Konecny 2012-05-18 18:00:02 -04:00
commit c336ac4575
25 changed files with 226 additions and 92 deletions

View file

@ -48,15 +48,14 @@ class PlayoutHistoryController extends Zend_Controller_Action
$offset = date("Z") * -1;
$this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds");
$this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker.js','text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/playouthistory/historytable.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'/js/datatables/plugin/TableTools/css/TableTools.css?'.$CC_CONFIG['airtime_version']);
//$this->view->headLink()->appendStylesheet($baseUrl.'/js/datatables/plugin/TableTools/css/TableTools_JUI.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.ui.timepicker.css');
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'/css/playouthistory.css?'.$CC_CONFIG['airtime_version']);
}
public function playoutHistoryFeedAction()

View file

@ -186,7 +186,7 @@ class ShowbuilderController extends Zend_Controller_Action
$item = CcScheduleQuery::create()->findPK($id);
$instance = $item->getCcShowInstances();
$menu["preview"] = array("name"=> "Preview","icon" => "overview");
$menu["preview"] = array("name"=> "Preview", "icon" => "play");
//select the cursor
$menu["selCurs"] = array("name"=> "Select Cursor","icon" => "select-cursor");
$menu["delCurs"] = array("name"=> "Remove Cursor","icon" => "select-cursor");

View file

@ -28,6 +28,8 @@ class UserController extends Zend_Controller_Action
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/user/user.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'/css/users.css?'.$CC_CONFIG['airtime_version']);
$form = new Application_Form_AddUser();
$this->view->successMessage = "";

View file

@ -2,11 +2,16 @@
class Application_Form_GeneralPreferences extends Zend_Form_SubForm
{
private $isSaas;
public function init()
{
$isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
$this->isSaas = $isSaas;
Logging::log($this->isSaas==true?"true":"false");
$this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml'))
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml', "isSaas" => $isSaas))
));
$defaultFade = Application_Model_Preference::GetDefaultFade();
@ -80,7 +85,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
$systemEmail->class = 'input_text';
$systemEmail->setRequired(false)
->setValue(Application_Model_Preference::GetSystemEmail())
->setLabel('Airtime System Email')
->setLabel('Reset Password \'From\' Email')
->setFilters(array('StringTrim'))
->setValidators(array(
'NotEmpty',

View file

@ -125,17 +125,20 @@ class Application_Model_Schedule {
if ( $i - 1 >= 0){
$results['previous'] = array("name"=>$rows[$i-1]["artist_name"]." - ".$rows[$i-1]["track_title"],
"starts"=>$rows[$i-1]["starts"],
"ends"=>$rows[$i-1]["ends"]);
"ends"=>$rows[$i-1]["ends"],
"type"=>'track');
}
$results['current'] = array("name"=>$rows[$i]["artist_name"]." - ".$rows[$i]["track_title"],
"starts"=>$rows[$i]["starts"],
"ends"=> (($rows[$i]["ends"] > $rows[$i]["show_ends"]) ? $rows[$i]["show_ends"]: $rows[$i]["ends"]),
"media_item_played"=>$rows[$i]["media_item_played"],
"record"=>0);
"record"=>0,
"type"=>'track');
if ( isset($rows[$i+1])){
$results['next'] = array("name"=>$rows[$i+1]["artist_name"]." - ".$rows[$i+1]["track_title"],
"starts"=>$rows[$i+1]["starts"],
"ends"=>$rows[$i+1]["ends"]);
"ends"=>$rows[$i+1]["ends"],
"type"=>'track');
}
break;
}
@ -145,7 +148,8 @@ class Application_Model_Schedule {
if (strtotime($rows[$i]['starts']) > $timeNowAsMillis) {
$results['next'] = array("name"=>$rows[$i]["artist_name"]." - ".$rows[$i]["track_title"],
"starts"=>$rows[$i]["starts"],
"ends"=>$rows[$i]["ends"]);
"ends"=>$rows[$i]["ends"],
"type"=>'track');
break;
}
}

View file

@ -1764,6 +1764,7 @@ class Application_Model_Show {
for( $i = 0; $i < $numberOfRows; ++$i ){
//Find the show that is within the current time.
$rows[$i]['type'] = 'show';
if ((strtotime($rows[$i]['starts']) <= $timeNowAsMillis) && (strtotime($rows[$i]['ends']) >= $timeNowAsMillis)){
if ( $i - 1 >= 0){
$results['previousShow'][0] = array(
@ -1774,7 +1775,8 @@ class Application_Model_Show {
"start_timestamp"=>$rows[$i-1]['start_timestamp'],
"end_timestamp"=>$rows[$i-1]['end_timestamp'],
"starts"=>$rows[$i-1]['starts'],
"ends"=>$rows[$i-1]['ends']);
"ends"=>$rows[$i-1]['ends'],
"type"=>$rows[$i-1]['type']);
}
$results['currentShow'][0] = $rows[$i];
@ -1788,7 +1790,8 @@ class Application_Model_Show {
"start_timestamp"=>$rows[$i+1]['start_timestamp'],
"end_timestamp"=>$rows[$i+1]['end_timestamp'],
"starts"=>$rows[$i+1]['starts'],
"ends"=>$rows[$i+1]['ends']);
"ends"=>$rows[$i+1]['ends'],
"type"=>$rows[$i+1]['type']);
}
break;
@ -1807,7 +1810,8 @@ class Application_Model_Show {
"start_timestamp"=>$rows[$i]['start_timestamp'],
"end_timestamp"=>$rows[$i]['end_timestamp'],
"starts"=>$rows[$i]['starts'],
"ends"=>$rows[$i]['ends']);
"ends"=>$rows[$i]['ends'],
"type"=>$rows[$i]['type']);
break;
}
}
@ -1821,8 +1825,10 @@ class Application_Model_Show {
"start_timestamp"=>$rows[$previousShowIndex]['start_timestamp'],
"end_timestamp"=>$rows[$previousShowIndex]['end_timestamp'],
"starts"=>$rows[$previousShowIndex]['starts'],
"ends"=>$rows[$previousShowIndex]['ends']);
"ends"=>$rows[$previousShowIndex]['ends'],
"type"=>$rows[$previousShowIndex]['type']);
}
return $results;
}

View file

@ -574,7 +574,7 @@ class Application_Model_ShowInstance {
{
$time = $this->_showInstance->getDbTimeFilled();
if ($time != "00:00:00" && $time != null && strcmp($time, '')!=0) {
if ($time != "00:00:00" && !empty($time)) {
$time_arr = explode(".", $time);
if (count($time_arr) > 1) {
$time_arr[1] = "." . $time_arr[1];

View file

@ -3,5 +3,7 @@
<?php echo $this->element->getElement('his_time_start') ?>
<?php echo $this->element->getElement('his_date_end') ?>
<?php echo $this->element->getElement('his_time_end') ?>
<input type="button" id="his_submit" class="ui-button ui-state-default" value="GO"></input>
<div id="his_submit" class="ui-button ui-state-default" title="Filter History">
<span class="ui-icon ui-icon-search"></span>
</div>
</div>

View file

@ -94,6 +94,7 @@
</dd>
<!-- Enable System Email option -->
<?php if( !$this->isSaas ){?>
<dt id="enableSystemEmail-label" class="block-display">
<label class="required" for="timezone"><?php echo $this->element->getElement('enableSystemEmail')->getLabel() ?>:
</label>
@ -124,5 +125,6 @@
</ul>
<?php endif; ?>
</dd>
<?php } ?>
</dl>
</fieldset>

View file

@ -3,7 +3,9 @@
<?php echo $this->element->getElement('sb_time_start') ?>
<?php echo $this->element->getElement('sb_date_end') ?>
<?php echo $this->element->getElement('sb_time_end') ?>
<input type="button" id="sb_submit" class="ui-button ui-state-default" value="GO"></input>
<div id="sb_submit" class="ui-button ui-state-default" title="Find Shows">
<span class="ui-icon ui-icon-search"></span>
</div>
</div>
<div class="sb-advanced-options">
<fieldset class="padded display_field push-down-8 closed">

View file

@ -155,7 +155,7 @@
<label for="outputStreamURL">Stream URL: </label>
</dt>
<dd id="outputStreamURL-element">
<span id="stream_url"></span>
<span id="stream_url" class="static_text"></span>
</dd>
</dl>
</fieldset>

View file

@ -17,7 +17,7 @@
<div><span>Isrc Number:</span><span><?php echo ($this->md["MDATA_KEY_ISRC"]);?></span></div>
<div><span>Website:</span><span><?php echo ($this->md["MDATA_KEY_URL"]);?></span></div>
<div><span>Language:</span><span><?php echo ($this->md["MDATA_KEY_LANGUAGE"]);?></span></div>
<div><span>File Path:</span><span><?php echo ($this->md["MDATA_KEY_FILEPATH"]);?></span></div>
<div><span>File&nbsp;Path:</span><span><?php echo ($this->md["MDATA_KEY_FILEPATH"]);?></span></div>
<?php endif; ?>

View file

@ -17,7 +17,7 @@
<?php echo $this->repeats; ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>Live Stream</h3>
<div id="live-stream-override" class="collapsible-content" style="overflow: auto">
<div id="live-stream-override" class="collapsible-content">
<?php echo $this->live; ?>
</div>
<?php if(!$this->isSaas()){?>

View file

@ -53,14 +53,6 @@
padding-top:16px;
}
.lib-content table th.ui-state-default {
background: -moz-linear-gradient(top, #b2b2b2 0, #a2a2a2 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #b2b2b2), color-stop(100%, #a2a2a2));
background: linear-gradient(top, #b2b2b2 0, #a2a2a2 100%);
border: 1px solid #8F8F8F;
color: #363636;
}
.paginationControl {
font-size: 12px;
background-color: #9a9a9a;

View file

@ -0,0 +1,29 @@
@CHARSET "UTF-8";
.dataTables_filter input {
width: 30%;
}
#history_content input.input_text.hasDatepicker {
width: 95px;
}
#history_content input.input_text.hasTimepicker {
width: 60px;
}
div.his-timerange {
position: relative;
margin-bottom: 5px;
}
div.his-timerange div {
position: absolute;
bottom: 0px;
padding: 3px;
margin-left: 5px;
}
table.dataTable tbody tr {
cursor: auto;
}

View file

@ -95,6 +95,17 @@
width:60px;
}
div.sb-timerange {
position: relative;
}
div.sb-timerange div {
position: absolute;
bottom: 0px;
padding: 3px;
margin-left: 5px;
}
.sb-starts,
.sb-ends {
text-align: center;
@ -174,6 +185,17 @@ table.datatable tr.cursor-selected-row td, table.datatable tr.cursor-selected-ro
padding: 8px 8px 8px 16px;
}
table.dataTable tr.sb-past,
table.dataTable tr.sb-header,
table.dataTable tr.sb-footer,
table.dataTable tr.sb-not-allowed {
cursor: auto;
}
table.dataTable td.sb-image {
cursor: pointer;
}
table.datatable tr.sb-header.odd td, table.datatable tr.sb-header.even td,
table.datatable tr.sb-header.odd:hover td, table.datatable tr.sb-header.even:hover td{
background: -moz-linear-gradient(top, #a4a4a4 0, #bcbcbc 100%);
@ -191,14 +213,6 @@ table.datatable tr.sb-header.odd:hover td, table.datatable tr.sb-header.even:hov
float: left;
}
.sb-content table th.ui-state-default {
background: -moz-linear-gradient(top, #b2b2b2 0, #a2a2a2 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #b2b2b2), color-stop(100%, #a2a2a2));
background: linear-gradient(top, #b2b2b2 0, #a2a2a2 100%);
border: 1px solid #8F8F8F;
color: #363636;
}
.sb-content input.ui-button {
padding: 3px 1em;
}

View file

@ -134,7 +134,7 @@ select {
.info-tooltip:hover span {
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1);
position: absolute; left: 25px; top: -18px; z-index: 99;
margin-left: 0; width: 250px;
margin-left: 0; width: 200px;
}
/* Info Tooltip Ends */
@ -654,14 +654,19 @@ dl.inline-list dd {
padding: 2px 2px 2px 0;
vertical-align: top;
}
#library_display thead th, #library_display tbody td {
table.dataTable tbody tr,
table.dataTable span.DataTables_sort_icon {
cursor: pointer;
}
#library_display thead th.library_checkbox,
#library_display thead th.library_id,
#library_display thead th.library_title {
cursor: default;
table.dataTable th.ui-state-default {
background: -moz-linear-gradient(top, #b2b2b2 0, #a2a2a2 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #b2b2b2), color-stop(100%, #a2a2a2));
background: linear-gradient(top, #b2b2b2 0, #a2a2a2 100%);
border: 1px solid #8F8F8F;
color: #363636;
}
.ColVis.TableTools .ui-button {
height: 21px;
}
@ -2608,7 +2613,7 @@ dd .stream-status {
margin: 3px 0 0 10px;
}
.close-round:hover {
background-position:0 -18px;
background-position:0 -36px;
}
.close-round:active {
background-position:0 -36px;

View file

@ -0,0 +1,9 @@
@charset "utf-8";
.dataTables_filter input {
margin-left: 0;
}
.dataTables_processing {
top: 20px;
}

View file

@ -47,9 +47,11 @@ function secondsTimer(){
function newSongStart(){
nextSongPrepare = true;
if (nextSong.type == 'track') {
currentSong = nextSong;
nextSong = null;
}
}
function nextShowStart(){
nextShowPrepare = true;
@ -74,12 +76,14 @@ function updateProgressBarValue(){
var scheduled_play_line_to_switch = scheduled_play_div.parent().find(".line-to-switch");
if (currentSong !== null){
var songElpasedTime = 0;
songPercentDone = (estimatedSchedulePosixTime - currentSong.songStartPosixTime)/currentSong.songLengthMs*100;
songElapsedTime = estimatedSchedulePosixTime - currentSong.songStartPosixTime;
if (songPercentDone < 0 || songPercentDone > 100){
songPercentDone = 0;
currentSong = null;
} else {
if (currentSong.media_item_played == true && currentShow.length > 0) {
if ((currentSong.media_item_played == true && currentShow.length > 0) || songElapsedTime < 5000) {
scheduled_play_line_to_switch.attr("class", "line-to-switch on");
scheduled_play_div.addClass("ready");
scheduled_play_source = true;
@ -320,8 +324,8 @@ function controlOnAirLight(){
if ((scheduled_play_on_air && scheduled_play_source) || live_dj_on_air || master_dj_on_air) {
$('#on-air-info').attr("class", "on-air-info on");
onAirOffIterations = 0;
} else if (onAirOffIterations < 15) {
//if less than 3 seconds have gone by (< 15 executions of this function)
} else if (onAirOffIterations < 20) {
//if less than 4 seconds have gone by (< 20 executions of this function)
//then keep the ON-AIR light on. Only after at least 3 seconds have gone by,
//should we be allowed to turn it off. This is to stop the light from temporarily turning
//off between tracks: CC-3725

View file

@ -217,6 +217,25 @@ var AIRTIME = (function(AIRTIME) {
libraryInit = function() {
$libContent = $("#library_content");
/*
* Icon hover states in the toolbar.
*/
$libContent.on("mouseenter", ".fg-toolbar ul li", function(ev) {
$el = $(this);
if (!$el.hasClass("ui-state-disabled")) {
$el.addClass("ui-state-hover");
}
});
$libContent.on("mouseleave", ".fg-toolbar ul li", function(ev) {
$el = $(this);
if (!$el.hasClass("ui-state-disabled")) {
$el.removeClass("ui-state-hover");
}
});
$libTable = $libContent.find("table");
var tableHeight = $libContent.height() - 130;

View file

@ -62,7 +62,7 @@ var AIRTIME = (function(AIRTIME) {
"bJQueryUI": true,
"bAutoWidth": true,
"sDom": 'lfr<"H"T><"dataTables_scrolling"t><"F"ip>',
"sDom": 'lf<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>',
"oTableTools": {
"sSwfPath": "/js/datatables/plugin/TableTools/swf/copy_cvs_xls_pdf.swf"
@ -93,6 +93,16 @@ $(document).ready(function(){
dateEndId = "#his_date_end",
timeEndId = "#his_time_end";
/*
* Icon hover states for search.
*/
history_content.on("mouseenter", ".his-timerange .ui-button", function(ev) {
$(this).addClass("ui-state-hover");
});
history_content.on("mouseleave", ".his-timerange .ui-button", function(ev) {
$(this).removeClass("ui-state-hover");
});
history_content
.height(widgetHeight)
.width(screenWidth);

View file

@ -257,6 +257,24 @@ var AIRTIME = (function(AIRTIME){
$lib = $("#library_content"),
$sbTable = $sbContent.find('table');
/*
* Icon hover states in the toolbar.
*/
$sbContent.on("mouseenter", ".fg-toolbar ul li", function(ev) {
$el = $(this);
if (!$el.hasClass("ui-state-disabled")) {
$el.addClass("ui-state-hover");
}
});
$sbContent.on("mouseleave", ".fg-toolbar ul li", function(ev) {
$el = $(this);
if (!$el.hasClass("ui-state-disabled")) {
$el.removeClass("ui-state-hover");
}
});
oSchedTable = $sbTable.dataTable( {
"aoColumns": [
/* checkbox */ {"mDataProp": "allowed", "sTitle": "", "sWidth": "15px", "sClass": "sb-checkbox"},

View file

@ -87,6 +87,16 @@ AIRTIME = (function(AIRTIME) {
$builder = $("#show_builder");
$fs = $builder.find('fieldset');
/*
* Icon hover states for search.
*/
$builder.on("mouseenter", ".sb-timerange .ui-button", function(ev) {
$(this).addClass("ui-state-hover");
});
$builder.on("mouseleave", ".sb-timerange .ui-button", function(ev) {
$(this).removeClass("ui-state-hover");
});
$builder.find(dateStartId).datepicker(oBaseDatePickerSettings);
$builder.find(timeStartId).timepicker(oBaseTimePickerSettings);
$builder.find(dateEndId).datepicker(oBaseDatePickerSettings);

View file

@ -87,7 +87,9 @@ $(document).ready(function() {
"bLengthChange": false,
"oLanguage": {
"sSearch": ""
}
},
"sDom": '<"H"lf<"dt-process-rel"r>>t<"F"ip>',
});
//$('#user_details').hide();

View file

@ -190,7 +190,7 @@ div.jp-audio div.jp-type-single a.jp-unmute {
div.jp-volume-block {
position: absolute;
top: 35px;
top: 33px;
left: 350px;
width: 120px;
}