Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
1e111f176e
15 changed files with 579 additions and 54 deletions
|
@ -263,9 +263,10 @@ class ScheduleController extends Zend_Controller_Action
|
|||
}
|
||||
} else {
|
||||
if($instance->isRepeating()){
|
||||
$menu["edit"] = array("name"=> "Edit", "icon" => "edit", "items" => array());
|
||||
/*$menu["edit"] = array("name"=> "Edit", "icon" => "edit", "items" => array());
|
||||
$menu["edit"]["items"]["instance"] = array("name"=> "Edit Show Instance", "icon" => "edit", "url" => "/Schedule/populate-show-instance-form");
|
||||
$menu["edit"]["items"]["all"] = array("name"=> "Edit Show", "icon" => "edit", "url" => "/Schedule/populate-show-form");
|
||||
$menu["edit"]["items"]["all"] = array("name"=> "Edit Show", "icon" => "edit", "url" => "/Schedule/populate-show-form");*/
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "_type"=>"all", "url" => "/Schedule/populate-show-form");
|
||||
}else{
|
||||
if($instance->isRebroadcast()){
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "_type"=>"rebroadcast", "url" => "/Schedule/populate-show-form");
|
||||
|
@ -284,9 +285,10 @@ class ScheduleController extends Zend_Controller_Action
|
|||
if ($isAdminOrPM || $isDJ) {
|
||||
|
||||
if($instance->isRepeating()){
|
||||
$menu["edit"] = array("name"=> "Edit", "icon" => "edit", "items" => array());
|
||||
/*$menu["edit"] = array("name"=> "Edit", "icon" => "edit", "items" => array());
|
||||
$menu["edit"]["items"]["instance"] = array("name"=> "Edit Show Instance", "icon" => "edit", "url" => "/Schedule/populate-show-instance-form");
|
||||
$menu["edit"]["items"]["all"] = array("name"=> "Edit Show", "icon" => "edit", "url" => "/Schedule/populate-show-form");
|
||||
$menu["edit"]["items"]["all"] = array("name"=> "Edit Show", "icon" => "edit", "url" => "/Schedule/populate-show-form");*/
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "_type"=>"all", "url" => "/Schedule/populate-show-form");
|
||||
}else{
|
||||
if($instance->isRebroadcast()){
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "_type"=>"rebroadcast", "url" => "/Schedule/populate-show-form");
|
||||
|
@ -439,7 +441,9 @@ class ScheduleController extends Zend_Controller_Action
|
|||
unset($this->view->showContent);
|
||||
}
|
||||
|
||||
public function populateShowInstanceFormAction(){
|
||||
// we removed edit show instance option in menu item
|
||||
// this feature is disabled in 2.1 and should be back in 2.2
|
||||
/*public function populateShowInstanceFormAction(){
|
||||
$formWhat = new Application_Form_AddShowWhat();
|
||||
$formWho = new Application_Form_AddShowWho();
|
||||
$formWhen = new Application_Form_AddShowWhen();
|
||||
|
@ -496,15 +500,15 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$formRepeats->disable();
|
||||
$formStyle->disable();
|
||||
|
||||
/*
|
||||
$formRecord->disable();
|
||||
$formAbsoluteRebroadcast->disable();
|
||||
$formRebroadcast->disable();
|
||||
*/
|
||||
|
||||
//$formRecord->disable();
|
||||
//$formAbsoluteRebroadcast->disable();
|
||||
//$formRebroadcast->disable();
|
||||
|
||||
|
||||
$this->view->action = "edit-show-instance";
|
||||
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
||||
}
|
||||
}*/
|
||||
|
||||
public function populateShowFormAction()
|
||||
{
|
||||
|
@ -518,12 +522,12 @@ class ScheduleController extends Zend_Controller_Action
|
|||
// repeating shows. It's value is either "instance","rebroadcast", or "all"
|
||||
$type = $this->_getParam('type');
|
||||
|
||||
if($type == "rebroadcast") {
|
||||
$this->view->action = "edit-show-rebroadcast";
|
||||
/*if($type == "rebroadcast") {
|
||||
//$this->view->action = "edit-show-rebroadcast";
|
||||
} else {
|
||||
$this->view->action = "edit-show";
|
||||
}
|
||||
|
||||
}*/
|
||||
$this->view->action = "edit-show";
|
||||
try{
|
||||
$showInstance = new Application_Model_ShowInstance($showInstanceId);
|
||||
}catch(Exception $e){
|
||||
|
@ -677,10 +681,6 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$formRepeats->disable();
|
||||
$formStyle->disable();
|
||||
}
|
||||
|
||||
if($type == "rebroadcast"){
|
||||
$formWhen->disable();
|
||||
}
|
||||
|
||||
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
||||
$this->view->entries = 5;
|
||||
|
@ -726,7 +726,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$this->view->edit = true;
|
||||
}
|
||||
|
||||
public function editShowInstanceAction(){
|
||||
/*public function editShowInstanceAction(){
|
||||
$js = $this->_getParam('data');
|
||||
$data = array();
|
||||
|
||||
|
@ -743,7 +743,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$this->view->addNewShow = false;
|
||||
$this->view->form = $this->view->render('schedule/add-show-form.phtml');
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
public function editShowAction(){
|
||||
|
||||
|
@ -775,6 +775,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
if (!array_key_exists('add_show_start_time', $data)){
|
||||
$startTime = Application_Common_DateHelper::ConvertToLocalDateTime($show->getStartTime());
|
||||
$data['add_show_start_time'] = $startTime->format("H:i");
|
||||
$validateStartTime = false;
|
||||
}
|
||||
$validateStartDate = false;
|
||||
}
|
||||
|
@ -789,6 +790,9 @@ class ScheduleController extends Zend_Controller_Action
|
|||
if (!$validateStartDate){
|
||||
$this->view->when->getElement('add_show_start_date')->setOptions(array('disabled' => true));
|
||||
}
|
||||
if(!$validateStartTime){
|
||||
$this->view->when->getElement('add_show_start_time')->setOptions(array('disabled' => true));
|
||||
}
|
||||
$this->view->rr->getElement('add_show_record')->setOptions(array('disabled' => true));
|
||||
$this->view->addNewShow = false;
|
||||
$this->view->form = $this->view->render('schedule/add-show-form.phtml');
|
||||
|
|
|
@ -1265,9 +1265,7 @@ class Application_Model_Show {
|
|||
|
||||
Logging::log('$start time of non repeating record '.$start);
|
||||
|
||||
if ($newInstance){
|
||||
self::createRebroadcastInstances($rebroadcasts, $currentUtcTimestamp, $show_id, $show_instance_id, $start, $duration, $timezone);
|
||||
}
|
||||
self::createRebroadcastInstances($rebroadcasts, $currentUtcTimestamp, $show_id, $show_instance_id, $start, $duration, $timezone);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ class CcShowTableMap extends TableMap {
|
|||
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('COLOR', 'DbColor', 'VARCHAR', false, 6, null);
|
||||
$this->addColumn('BACKGROUND_COLOR', 'DbBackgroundColor', 'VARCHAR', false, 6, null);
|
||||
$this->addColumn('LIVE_STREAM_USING_AIRTIME_AUTH', 'DbLiveStreamUsingAirtimeAuth', 'BOOLEAN', false, null, null);
|
||||
$this->addColumn('LIVE_STREAM_USING_CUSTOM_AUTH', 'DbLiveStreamUsingCustomAuth', 'BOOLEAN', false, null, null);
|
||||
$this->addColumn('LIVE_STREAM_USING_AIRTIME_AUTH', 'DbLiveStreamUsingAirtimeAuth', 'BOOLEAN', false, null, false);
|
||||
$this->addColumn('LIVE_STREAM_USING_CUSTOM_AUTH', 'DbLiveStreamUsingCustomAuth', 'BOOLEAN', false, null, false);
|
||||
$this->addColumn('LIVE_STREAM_USER', 'DbLiveStreamUser', 'VARCHAR', false, 255, null);
|
||||
$this->addColumn('LIVE_STREAM_PASS', 'DbLiveStreamPass', 'VARCHAR', false, 255, null);
|
||||
// validators
|
||||
|
|
|
@ -71,12 +71,14 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
|
||||
/**
|
||||
* The value for the live_stream_using_airtime_auth field.
|
||||
* Note: this column has a database default value of: false
|
||||
* @var boolean
|
||||
*/
|
||||
protected $live_stream_using_airtime_auth;
|
||||
|
||||
/**
|
||||
* The value for the live_stream_using_custom_auth field.
|
||||
* Note: this column has a database default value of: false
|
||||
* @var boolean
|
||||
*/
|
||||
protected $live_stream_using_custom_auth;
|
||||
|
@ -138,6 +140,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
$this->name = '';
|
||||
$this->url = '';
|
||||
$this->genre = '';
|
||||
$this->live_stream_using_airtime_auth = false;
|
||||
$this->live_stream_using_custom_auth = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -412,7 +416,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
$v = (boolean) $v;
|
||||
}
|
||||
|
||||
if ($this->live_stream_using_airtime_auth !== $v) {
|
||||
if ($this->live_stream_using_airtime_auth !== $v || $this->isNew()) {
|
||||
$this->live_stream_using_airtime_auth = $v;
|
||||
$this->modifiedColumns[] = CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH;
|
||||
}
|
||||
|
@ -432,7 +436,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
$v = (boolean) $v;
|
||||
}
|
||||
|
||||
if ($this->live_stream_using_custom_auth !== $v) {
|
||||
if ($this->live_stream_using_custom_auth !== $v || $this->isNew()) {
|
||||
$this->live_stream_using_custom_auth = $v;
|
||||
$this->modifiedColumns[] = CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH;
|
||||
}
|
||||
|
@ -502,6 +506,14 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($this->live_stream_using_airtime_auth !== false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->live_stream_using_custom_auth !== false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return TRUE
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
|
|
|
@ -75,7 +75,6 @@ $(document).ready(function(){
|
|||
<ul class="jp-controls">
|
||||
<li><a title="mute" tabindex="1" class="jp-mute" href="javascript:;">mute</a></li>
|
||||
<li><a title="unmute" tabindex="1" class="jp-unmute" href="javascript:;">unmute</a></li>
|
||||
<!--<li><a title="max volume" tabindex="1" class="jp-volume-max" href="javascript:;">max volume</a></li>-->
|
||||
</ul>
|
||||
<div class="jp-volume-bar">
|
||||
<div class="jp-volume-bar-value"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue