Merge branch 'master' of dev.sourcefabric.org:campcaster
This commit is contained in:
commit
eab3675c74
|
@ -69,6 +69,7 @@
|
|||
<actionMethod actionName="showList"/>
|
||||
<actionMethod actionName="getShowData"/>
|
||||
<actionMethod actionName="showContentDialog"/>
|
||||
<actionMethod actionName="editShow"/>
|
||||
</controllerFile>
|
||||
<controllerFile controllerName="Api">
|
||||
<actionMethod actionName="index"/>
|
||||
|
@ -306,6 +307,9 @@
|
|||
<viewControllerScriptsDirectory forControllerName="Playlist">
|
||||
<viewScriptFile forActionName="setPlaylistFades"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
<viewControllerScriptsDirectory forControllerName="Schedule">
|
||||
<viewScriptFile forActionName="editShow"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
</viewScriptsDirectory>
|
||||
<viewHelpersDirectory/>
|
||||
<viewFiltersDirectory enabled="false"/>
|
||||
|
|
|
@ -80,6 +80,9 @@ class LibraryController extends Zend_Controller_Action
|
|||
'title' => 'Close');
|
||||
}
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Playlist/metadata/format/json/id/#id#', 'callback' => 'window["createPlaylistMetaForm"]'),
|
||||
'title' => 'Edit Metadata');
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Playlist/delete'.$params, 'callback' => 'window["deletePlaylist"]'),
|
||||
'title' => 'Delete');
|
||||
|
||||
|
|
|
@ -2,16 +2,12 @@
|
|||
|
||||
class ScheduleController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
protected $sched_sess = null;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if(!Zend_Auth::getInstance()->hasIdentity())
|
||||
{
|
||||
$this->_redirect('login/index');
|
||||
}
|
||||
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('event-feed', 'json')
|
||||
->addActionContext('make-context-menu', 'json')
|
||||
->addActionContext('add-show-dialog', 'json')
|
||||
|
@ -26,6 +22,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
->addActionContext('get-current-playlist', 'json')
|
||||
->addActionContext('find-playlists', 'json')
|
||||
->addActionContext('remove-group', 'json')
|
||||
->addActionContext('edit-show', 'json')
|
||||
->initContext();
|
||||
|
||||
$this->sched_sess = new Zend_Session_Namespace("schedule");
|
||||
|
@ -111,15 +108,9 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
$show = new Show(new User($userInfo->id));
|
||||
$overlap = $show->addShow($data);
|
||||
|
||||
if(isset($overlap)) {
|
||||
$this->view->overlap = $overlap;
|
||||
}
|
||||
else {
|
||||
$this->_redirect('Schedule');
|
||||
}
|
||||
$show = new Show(new User($userInfo->id, $userInfo->type));
|
||||
$show->addShow($data);
|
||||
$this->_redirect('Schedule');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,7 +160,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
public function deleteShowAction()
|
||||
{
|
||||
$showInstanceId = $this->_getParam('id');
|
||||
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new User($userInfo->id);
|
||||
|
||||
|
@ -214,7 +205,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
public function scheduleShowAction()
|
||||
{
|
||||
$showInstanceId = $this->sched_sess->showInstanceId;
|
||||
$showInstanceId = $this->sched_sess->showInstanceId;
|
||||
$search = $this->_getParam('search', null);
|
||||
$plId = $this->_getParam('plId');
|
||||
|
||||
|
@ -245,9 +236,8 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$user = new User($userInfo->id);
|
||||
$show = new ShowInstance($showInstanceId);
|
||||
|
||||
if($user->isHost($show->getShowId())) {
|
||||
if($user->isHost($show->getShowId()))
|
||||
$show->clearShow();
|
||||
}
|
||||
}
|
||||
|
||||
public function getCurrentPlaylistAction()
|
||||
|
@ -257,8 +247,8 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
public function findPlaylistsAction()
|
||||
{
|
||||
$post = $this->getRequest()->getPost();
|
||||
|
||||
$post = $this->getRequest()->getPost();
|
||||
|
||||
$show = new ShowInstance($this->sched_sess->showInstanceId);
|
||||
$playlists = $show->searchPlaylistsForShow($post);
|
||||
|
||||
|
@ -289,7 +279,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
public function scheduleShowDialogAction()
|
||||
{
|
||||
$showInstanceId = $this->_getParam('id');
|
||||
$showInstanceId = $this->_getParam('id');
|
||||
$this->sched_sess->showInstanceId = $showInstanceId;
|
||||
|
||||
$show = new ShowInstance($showInstanceId);
|
||||
|
@ -331,13 +321,39 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
public function showContentDialogAction()
|
||||
{
|
||||
$showInstanceId = $this->_getParam('id');
|
||||
$showInstanceId = $this->_getParam('id');
|
||||
$show = new ShowInstance($showInstanceId);
|
||||
|
||||
$this->view->showContent = $show->getShowListContent();
|
||||
$this->view->dialog = $this->view->render('schedule/show-content-dialog.phtml');
|
||||
unset($this->view->showContent);
|
||||
}
|
||||
|
||||
public function editShowAction()
|
||||
{
|
||||
$formWhat = new Application_Form_AddShowWhat();
|
||||
$formWhat->removeDecorator('DtDdWrapper');
|
||||
$formWho = new Application_Form_AddShowWho();
|
||||
$formWho->removeDecorator('DtDdWrapper');
|
||||
$formWhen = new Application_Form_AddShowWhen();
|
||||
$formWhen->removeDecorator('DtDdWrapper');
|
||||
$formRepeats = new Application_Form_AddShowRepeats();
|
||||
$formRepeats->removeDecorator('DtDdWrapper');
|
||||
$formStyle = new Application_Form_AddShowStyle();
|
||||
$formStyle->removeDecorator('DtDdWrapper');
|
||||
|
||||
$this->view->what = $formWhat;
|
||||
//$this->view->when = $formWhen;
|
||||
//$this->view->repeats = $formRepeats;
|
||||
$this->view->who = $formWho;
|
||||
$this->view->style = $formStyle;
|
||||
|
||||
$this->view->dialog = $this->view->render('schedule/edit-show.phtml');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1 @@
|
|||
<?php
|
||||
|
||||
$this->form->setAction($this->url());
|
||||
echo $this->form;
|
||||
<?php echo $this->form; ?>
|
||||
|
|
|
@ -11,13 +11,6 @@
|
|||
<button id="add-show-submit" class="right-floated">Add this show</button></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php if(isset($this->overlap)) : ?>
|
||||
<div id="schedule-add-show-overlap" style="display:block;">
|
||||
<div>Overlap</div>
|
||||
<?php echo $this->partialLoop('schedule/show-overlap.phtml', $this->overlap); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<div id="schedule-show-what">
|
||||
<?php echo $this->what ?>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<div>
|
||||
<div id="schedule-show-what">
|
||||
<?php echo $this->what ?>
|
||||
</div>
|
||||
<div id="schedule-show-when">
|
||||
<?php echo $this->when ?>
|
||||
<?php echo $this->repeats ?>
|
||||
</div>
|
||||
<div id="schedule-show-who">
|
||||
<?php echo $this->who ?>
|
||||
</div>
|
||||
<div id="schedule-show-style">
|
||||
<?php echo $this->style ?>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +0,0 @@
|
|||
<div>
|
||||
<span><?php echo $this->name ?></span>
|
||||
<span><?php echo $this->start_time ?></span>-<span><?php echo $this->end_time ?></span>
|
||||
</div>
|
|
@ -1,6 +1,6 @@
|
|||
#Note: project.home is automatically generated by the propel-install script.
|
||||
#Any manual changes to this value will be overwritten.
|
||||
project.home = /home/martin/workspace/airtime
|
||||
project.home = /home/naomi/dev-campcaster/campcaster
|
||||
project.build = ${project.home}/build
|
||||
|
||||
#Database driver
|
||||
|
|
|
@ -328,36 +328,49 @@ function closeSPL() {
|
|||
$.post(url, noOpenPL);
|
||||
}
|
||||
|
||||
function createPlaylistMetaForm(json) {
|
||||
var submit, form;
|
||||
|
||||
submit = $('<button id="new_playlist_submit">Submit</button>')
|
||||
.button()
|
||||
.click(function(){
|
||||
var url, data;
|
||||
|
||||
url = '/Playlist/metadata/format/json';
|
||||
data = $("#side_playlist form").serialize();
|
||||
|
||||
$.post(url, data, function(json){
|
||||
if(json.form){
|
||||
|
||||
}
|
||||
|
||||
openDiffSPL(json);
|
||||
})
|
||||
});
|
||||
|
||||
form = $(json.form);
|
||||
|
||||
form.find("input, textarea")
|
||||
.keydown(function(event){
|
||||
//enter was pressed
|
||||
if(event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
$("#new_playlist_submit").click();
|
||||
}
|
||||
})
|
||||
|
||||
$("#side_playlist")
|
||||
.empty()
|
||||
.append(form)
|
||||
.append(submit);
|
||||
}
|
||||
|
||||
function newSPL() {
|
||||
var url;
|
||||
|
||||
url = '/Playlist/new/format/json';
|
||||
|
||||
$.post(url, function(json){
|
||||
var submit;
|
||||
|
||||
submit = $('<button>Submit</button>')
|
||||
.button()
|
||||
.click(function(){
|
||||
var url, data;
|
||||
|
||||
url = '/Playlist/metadata/format/json';
|
||||
data = $("#side_playlist form").serialize();
|
||||
|
||||
$.post(url, data, function(json){
|
||||
if(json.form){
|
||||
|
||||
}
|
||||
|
||||
openDiffSPL(json);
|
||||
})
|
||||
});
|
||||
|
||||
$("#side_playlist")
|
||||
.empty()
|
||||
.append(json.form)
|
||||
.append(submit);
|
||||
});
|
||||
$.post(url, createPlaylistMetaForm);
|
||||
}
|
||||
|
||||
function deleteSPL() {
|
||||
|
|
|
@ -191,6 +191,10 @@ function buildScheduleDialog(json){
|
|||
dialog.dialog('open');
|
||||
}
|
||||
|
||||
function buildEditDialog(json){
|
||||
|
||||
}
|
||||
|
||||
function scheduleRefetchEvents() {
|
||||
$("#schedule_calendar").fullCalendar( 'refetchEvents' );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue