Merge branch 'master' of dev.sourcefabric.org:airtime
This commit is contained in:
commit
6cf4310c24
|
@ -120,7 +120,9 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$formdata = $form->getValues();
|
||||
|
||||
$pl = $this->getPlaylist();
|
||||
$pl->setName($formdata["title"]);
|
||||
|
||||
if($formdata["title"])
|
||||
$pl->setName($formdata["title"]);
|
||||
|
||||
if(isset($formdata["description"])) {
|
||||
$pl->setPLMetaData(UI_MDATA_KEY_DESCRIPTION, $formdata["description"]);
|
||||
|
|
|
@ -24,22 +24,18 @@ class PreferenceController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
$form = new Application_Form_Preferences();
|
||||
if (!$form->isValid($request->getPost())) {
|
||||
if ($form->isValid($request->getPost())) {
|
||||
|
||||
} else {
|
||||
$values = $form->getValues();
|
||||
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
|
||||
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
|
||||
Application_Model_Preference::SetDefaultFade($values["stationDefaultFade"]);
|
||||
|
||||
$this->view->statusMsg = "Preferences Updated.";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->view->form = $form;
|
||||
return $this->render('index'); //render the phtml file
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
|
|||
$this->addElement('text', 'add_show_end_date', array(
|
||||
'label' => 'Date End:',
|
||||
'class' => 'input_text',
|
||||
'value' => date("Y-m-d"),
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
|
|
|
@ -10,6 +10,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
'label' => 'Date Start:',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'value' => date("Y-m-d"),
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
|
|
|
@ -8,7 +8,7 @@ class Application_Form_PlaylistMetadata extends Zend_Form
|
|||
// Add username element
|
||||
$this->addElement('text', 'title', array(
|
||||
'label' => 'Title:',
|
||||
'required' => true,
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
|
|
|
@ -16,6 +16,16 @@ class Application_Form_Preferences extends Zend_Form
|
|||
'validators' => array('NotEmpty'),
|
||||
'value' => Application_Model_Preference::GetValue("station_name")
|
||||
));
|
||||
|
||||
// Add login element
|
||||
$this->addElement('text', 'stationDefaultFade', array(
|
||||
'class' => 'input_text',
|
||||
'label' => 'Default Fade:',
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(array('regex', false, array('/^[0-2][0-3]:[0-5][0-9]:[0-5][0-9](\.\d{1,6})?$/', 'messages' => 'enter a time 00:00:00{.000000}'))),
|
||||
'value' => Application_Model_Preference::GetValue("default_fade")
|
||||
));
|
||||
|
||||
$this->addElement('submit', 'submit', array(
|
||||
'class' => 'ui-button ui-state-default',
|
||||
|
@ -24,4 +34,4 @@ class Application_Form_Preferences extends Zend_Form
|
|||
));
|
||||
}
|
||||
}
|
||||
|
||||
///^[0-2][0-3]:[0-5][0-9]:[0-5][0-9]{.}[0-9]{0-6}/i
|
||||
|
|
|
@ -927,11 +927,21 @@ class Playlist {
|
|||
*/
|
||||
private function insertPlaylistElement($plId, $fileId, $pos, $clipLength, $cuein, $cueout, $fadeIn=NULL, $fadeOut=NULL)
|
||||
{
|
||||
if(is_null($fadeIn))
|
||||
$fadeIn = '00:00:00.000';
|
||||
if(is_null($fadeOut))
|
||||
$fadeOut = '00:00:00.000';
|
||||
$defaultFade = Application_Model_Preference::GetDefaultFade();
|
||||
|
||||
if(is_null($fadeIn)) {
|
||||
if($defaultFade != "")
|
||||
$fadeIn = $defaultFade;
|
||||
else
|
||||
$fadeIn = '00:00:00.000';
|
||||
}
|
||||
if(is_null($fadeOut)) {
|
||||
if($defaultFade != "")
|
||||
$fadeOut = $defaultFade;
|
||||
else
|
||||
$fadeOut = '00:00:00.000';
|
||||
}
|
||||
|
||||
$row = new CcPlaylistcontents();
|
||||
$row->setDbPlaylistId($plId);
|
||||
$row->setDbFileId($fileId);
|
||||
|
|
|
@ -78,5 +78,13 @@ class Application_Model_Preference
|
|||
return Application_Model_Preference::GetValue("shows_populated_until");
|
||||
}
|
||||
|
||||
public static function SetDefaultFade($fade) {
|
||||
Application_Model_Preference::SetValue("default_fade", $fade);
|
||||
}
|
||||
|
||||
public static function GetDefaultFade() {
|
||||
return Application_Model_Preference::GetValue("default_fade");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -340,10 +340,6 @@ function createPlaylistMetaForm(json) {
|
|||
data = $("#side_playlist form").serialize();
|
||||
|
||||
$.post(url, data, function(json){
|
||||
if(json.form){
|
||||
|
||||
}
|
||||
|
||||
openDiffSPL(json);
|
||||
})
|
||||
});
|
||||
|
|
|
@ -25,15 +25,12 @@ function endDpSelect(dateText, inst) {
|
|||
|
||||
function createDateInput(el, onSelect) {
|
||||
var date;
|
||||
|
||||
|
||||
el.datepicker({
|
||||
minDate: new Date(),
|
||||
onSelect: onSelect,
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
|
||||
date = $.datepicker.formatDate("yy-mm-dd", new Date());
|
||||
el.val(date);
|
||||
}
|
||||
|
||||
function autoSelect(event, ui) {
|
||||
|
|
|
@ -124,7 +124,7 @@ function viewDisplay( view ) {
|
|||
opt.defaultView = view.name;
|
||||
$(calendarEl).fullCalendar('destroy');
|
||||
$(calendarEl).fullCalendar(opt);
|
||||
$(calendarEl).fullCalendar( 'gotoDate', d )
|
||||
$(calendarEl).fullCalendar( 'gotoDate', d );
|
||||
});
|
||||
|
||||
var x = $(view.element).find(".fc-agenda-head th:first");
|
||||
|
|
Loading…
Reference in New Issue