Merge branch '2.2.x' of dev.sourcefabric.org:airtime into 2.2.x

This commit is contained in:
Rudi Grinberg 2012-10-12 11:07:37 -04:00
commit 5278037152
13 changed files with 58 additions and 35 deletions

View File

@ -436,7 +436,7 @@ class PlaylistController extends Zend_Controller_Action
try {
$obj = $this->getPlaylist($type);
$obj->setName($name);
$obj->setName(trim($name));
$obj->setDescription($description);
$this->view->description = $description;
$this->view->playlistName = $name;

View File

@ -243,7 +243,9 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$minutes = "0";
$durationToAdd = "PT".$hours."H";
}
if (empty($formData["add_show_rebroadcast_date_absolute_".$i])) break;
$abs_rebroadcast_start = $formData["add_show_rebroadcast_date_absolute_".$i]." ".
$formData["add_show_rebroadcast_time_absolute_".$i];
$rebroadcastShowStart = new DateTime($abs_rebroadcast_start);

View File

@ -229,10 +229,17 @@ SQL;
$formatter = new LengthFormatter($offset_cliplength);
$row['offset'] = $formatter->format();
//format the fades in format 00(.000000)
//format the fades in format 00(.0)
$fades = $this->getFadeInfo($row['position']);
$row['fadein'] = $fades[0];
$row['fadeout'] = $fades[1];
// format the cues in format 00:00:00(.0)
// we need to add the '.0' for cues and not fades
// because propel takes care of this for us
// (we use propel to fetch the fades)
$row['cuein'] = str_pad(substr($row['cuein'], 0, 10), 10, '.0');
$row['cueout'] = str_pad(substr($row['cueout'], 0, 10), 10, '.0');
//format original length
$formatter = new LengthFormatter($row['orig_length']);
@ -611,9 +618,10 @@ SQL;
#Propel returns values in form 00.000000 format which is for only seconds.
$fadeIn = $row->getDbFadein();
$fadeOut = $row->getDbFadeout();
//Propel returns values in form 00.000000 format which is for only seconds.
//We only want to display 1 decimal
$fadeIn = substr($row->getDbFadein(), 0, 4);
$fadeOut = substr($row->getDbFadeout(), 0, 4);
return array($fadeIn, $fadeOut);
}

View File

@ -244,6 +244,13 @@ SQL;
$fades = $this->getFadeInfo($row['position']);
$row['fadein'] = $fades[0];
$row['fadeout'] = $fades[1];
// format the cues in format 00:00:00(.0)
// we need to add the '.0' for cues and not fades
// because propel takes care of this for us
// (we use propel to fetch the fades)
$row['cuein'] = str_pad(substr($row['cuein'], 0, 10), 10, '.0');
$row['cueout'] = str_pad(substr($row['cueout'], 0, 10), 10, '.0');
//format original length
$formatter = new LengthFormatter($row['orig_length']);
@ -585,9 +592,10 @@ SQL;
if (!$row) {
return NULL;
}
#Propel returns values in form 00.000000 format which is for only seconds.
$fadeIn = $row->getDbFadein();
$fadeOut = $row->getDbFadeout();
//Propel returns values in form 00.000000 format which is for only seconds.
//We only want to display 1 decimal
$fadeIn = substr($row->getDbFadein(), 0, 4);
$fadeOut = substr($row->getDbFadeout(), 0, 4);
return array($fadeIn, $fadeOut);
}

View File

@ -3,9 +3,9 @@
<dl class="zend_form">
<dd id="SupportFeedback-element" style="width:90%;">
<div class="info-text">
Help Airtime improve by letting us know how you are using it. This info
will be collected regularly in order to enhance your user experience.<br /><br />
Click "Yes, help Airtime" and we'll make sure the features you use are
Help Airtime improve by letting Sourcefabric know how you are using it. This information
will be collected regularly in order to enhance your user experience.<br />
Click the "Send support feedback" box and we'll make sure the features you use are
constantly improving.
</div>
<label class="optional" for="SupportFeedback">
@ -21,9 +21,9 @@
<?php endif; ?>
</dd>
<dd id="publicize-element" style="width:90%;">
<div class="info-text">Click the box below to advertise your station on
<a id="link_to_whos_using" href="http://sourcefabric.org/en/airtime/whosusing" onclick="window.open(this.href); return false">Sourcefabric.org</a>.
In order to promote your station, "Send support feedback" must be enabled. This data will be collected in addition to the support feedback.</div>
<div class="info-text">Click the box below to promote your station on
<a id="link_to_whos_using" href="http://www.sourcefabric.org/en/airtime/whosusing/" onclick="window.open(this.href); return false">Sourcefabric.org</a>.
</div>
<label class="optional" for="Publicise">
<?php echo $this->element->getElement('Publicise') ?>
<strong><?php echo $this->element->getElement('Publicise')->getLabel() ?></strong>
@ -37,7 +37,7 @@
<?php endif; ?>
</dd>
</dl>
<div class="info-text" style="clear: both;padding: 4px 0 4px 15px;"><p> Note: In order to promote your station, "Send support feedback" must be enabled</p></div>
<div class="info-text" style="clear: both;padding: 4px 0 4px 15px;">(In order to promote your station, "Send support feedback" must be enabled).<br /><br /></div>
<?php }?>
<dl id="public-info" style="display:<?php echo !$this->isSaas?"none":"block"?>;">
<dt id="stationName-label" class="block-display">
@ -179,7 +179,7 @@
</ul>
<?php endif; ?>
<?php }else{?>
<a id="link_to_terms_and_condition" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;">Terms and Conditions</a>
<a id="link_to_terms_and_condition" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;">Sourcefabric Privacy Policy</a>
<?php }?>
</div>
<?php } ?>

View File

@ -57,10 +57,10 @@ if (isset($this->obj)) {
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
<span class="ui-icon ui-icon-closethick sp-closethick-center"></span>
<dl id="spl_editor-main" class="inline-list">
<dt>Fade in (s):</dt>
<dt>Fade in: <span class='spl_cue_hint'>(ss.t)</span></dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
<dd class="edit-error"></dd>
<dt>Fade out (s):</dt>
<dt>Fade out: <span class='spl_cue_hint'>(ss.t)</span></dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
<dd class="edit-error"></dd>
</dl>

View File

@ -1,10 +1,10 @@
<dl id="spl_cue_editor" class="inline-list">
<dt>Cue In:</dt>
<dt>Cue In: <span class='spl_cue_hint'>(hh:mm:ss.t)</span></dt>
<dd id="spl_cue_in_<?php echo $this->id; ?>" class="spl_cue_in">
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueIn; ?></span>
</dd>
<dd class="edit-error"></dd>
<dt>Cue Out:</dt>
<dt>Cue Out: <span class='spl_cue_hint'>(hh:mm:ss.t)</span></dt>
<dd id="spl_cue_out_<?php echo $this->id; ?>" class="spl_cue_out">
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueOut; ?></span>
</dd>

View File

@ -1,13 +1,13 @@
<dl id="spl_editor" class="inline-list">
<?php if ($this->item1Type == 0) {?>
<dt>Fade out (s):</dt>
<dt>Fade out: <span class='spl_cue_hint'>(ss.t)</span></dt>
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out">
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
</dd>
<dd class="edit-error"></dd>
<?php }
if ($this->item2Type == 0) {?>
<dt>Fade in (s):</dt>
<dt>Fade in: <span class='spl_cue_hint'>(ss.t)</span></dt>
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in">
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
</dd>

View File

@ -65,10 +65,10 @@ if (isset($this->obj)) {
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
<span class="ui-icon ui-icon-closethick"></span>
<dl id="spl_editor-main" class="inline-list">
<dt>Fade in (s):</dt>
<dt>Fade in: <span class='spl_cue_hint'>(ss.t)</span></dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
<dd class="edit-error"></dd>
<dt>Fade out (s):</dt>
<dt>Fade out: <span class='spl_cue_hint'>(ss.t)</span></dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
<dd class="edit-error"></dd>
</dl>

View File

@ -2688,7 +2688,7 @@ fieldset .btn-toolbar {
box-sizing: border-box;
}
.form-horizontal .controls input[type="text"]:only-child {
width:90%;
width:85%;
}

View File

@ -116,6 +116,11 @@
color: #D5D5D5;
}
.spl_cue_hint {
font-size: 10px;
font-weight: normal;
}
.ui-state-active .spl_artist,.ui-state-active .spl_offset {
color: #606060 !important;
}

View File

@ -18,13 +18,13 @@ var AIRTIME = (function(AIRTIME){
function isTimeValid(time) {
//var regExpr = new RegExp("^\\d{2}[:]\\d{2}[:]\\d{2}([.]\\d{1,6})?$");
var regExpr = new RegExp("^\\d{2}[:]([0-5]){1}([0-9]){1}[:]([0-5]){1}([0-9]){1}([.]\\d{1,6})?$");
var regExpr = new RegExp("^\\d{2}[:]([0-5]){1}([0-9]){1}[:]([0-5]){1}([0-9]){1}([.]\\d{1})?$");
return regExpr.test(time);
}
function isFadeValid(fade) {
var regExpr = new RegExp("^\\d{1}(\\d{1})?([.]\\d{1,6})?$");
var regExpr = new RegExp("^\\d{1}(\\d{1})?([.]\\d{1})?$");
return regExpr.test(fade);
}
@ -74,7 +74,7 @@ var AIRTIME = (function(AIRTIME){
type = $('#obj_type').val();
if (!isTimeValid(cueIn)){
showError(span, "please put in a time '00:00:00 (.000000)'");
showError(span, "please put in a time '00:00:00 (.0)'");
return;
}
$.post(url,
@ -111,7 +111,7 @@ var AIRTIME = (function(AIRTIME){
type = $('#obj_type').val();
if (!isTimeValid(cueOut)){
showError(span, "please put in a time '00:00:00 (.000000)'");
showError(span, "please put in a time '00:00:00 (.0)'");
return;
}
@ -150,7 +150,7 @@ var AIRTIME = (function(AIRTIME){
type = $('#obj_type').val();
if (!isFadeValid(fadeIn)){
showError(span, "please put in a time in seconds '00 (.000000)'");
showError(span, "please put in a time in seconds '00 (.0)'");
return;
}
@ -188,7 +188,7 @@ var AIRTIME = (function(AIRTIME){
type = $('#obj_type').val();
if (!isFadeValid(fadeOut)){
showError(span, "please put in a time in seconds '00 (.000000)'");
showError(span, "please put in a time in seconds '00 (.0)'");
return;
}
@ -545,7 +545,7 @@ var AIRTIME = (function(AIRTIME){
type = $('#obj_type').val();
if (!isFadeValid(fadeIn)){
showError(span, "please put in a time in seconds '00 (.000000)'");
showError(span, "please put in a time in seconds '00 (.0)'");
return;
}
@ -569,7 +569,7 @@ var AIRTIME = (function(AIRTIME){
type = $('#obj_type').val();
if (!isFadeValid(fadeOut)){
showError(span, "please put in a time in seconds '00 (.000000)'");
showError(span, "please put in a time in seconds '00 (.0)'");
return;
}

View File

@ -313,7 +313,7 @@ $(document).ready(function() {
$("#auto_switch_help").qtip({
content: {
text: "Check this box to automatically switch on Master/Show source upon source disconnection."
text: "Check this box to automatically switch on Master/Show source upon source connection."
},
hide: {
delay: 500,