Merge branch 'master' of dev.sourcefabric.org:campcaster
This commit is contained in:
commit
4f055788d4
14 changed files with 111 additions and 483 deletions
|
@ -13,8 +13,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('contents', 'html')
|
||||
->addActionContext('contents', 'json')
|
||||
$ajaxContext->addActionContext('contents', 'json')
|
||||
->addActionContext('delete', 'json')
|
||||
->addActionContext('context-menu', 'json')
|
||||
->initContext();
|
||||
|
@ -28,16 +27,16 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->view->headScript()->appendFile('/js/airtime/onready/library.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/jplayer/jquery.jplayer.min.js');
|
||||
|
||||
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/airtime/library/library.js','text/javascript');
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/css/media_library.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/contextmenu.css');
|
||||
|
||||
$this->_helper->layout->setLayout('library');
|
||||
|
||||
unset($this->search_sess->page);
|
||||
unset($this->search_sess->md);
|
||||
$this->_helper->viewRenderer->setResponseSegment('library');
|
||||
|
||||
$this->_helper->actionStack('index', 'playlist');
|
||||
$this->_helper->actionStack('contents', 'library');
|
||||
}
|
||||
|
||||
public function contextMenuAction()
|
||||
|
@ -118,23 +117,10 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
public function contentsAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/airtime/library/library.js','text/javascript');
|
||||
$post = $this->getRequest()->getPost();
|
||||
$datatables = StoredFile::searchFilesForPlaylistBuilder($post);
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/css/media_library.css');
|
||||
|
||||
$this->_helper->viewRenderer->setResponseSegment('library');
|
||||
|
||||
$format = $this->_getParam('format');
|
||||
|
||||
$post = $this->getRequest()->getPost();
|
||||
|
||||
if($format == "json") {
|
||||
|
||||
$datatables = StoredFile::searchFilesForPlaylistBuilder($post);
|
||||
|
||||
die(json_encode($datatables));
|
||||
}
|
||||
die(json_encode($datatables));
|
||||
}
|
||||
|
||||
public function editFileMdAction()
|
||||
|
|
|
@ -14,6 +14,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('event-feed', 'json')
|
||||
->addActionContext('make-context-menu', 'json')
|
||||
->addActionContext('add-show-dialog', 'json')
|
||||
->addActionContext('add-show', 'json')
|
||||
->addActionContext('move-show', 'json')
|
||||
|
@ -33,24 +34,13 @@ class ScheduleController extends Zend_Controller_Action
|
|||
public function indexAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/fullcalendar/fullcalendar.min.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/contextmenu/jquery.contextMenu.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/airtime/schedule/full-calendar-functions.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/airtime/schedule/schedule.js','text/javascript');
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/css/jquery.contextMenu.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/contextmenu.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/fullcalendar.css');
|
||||
|
||||
$eventDefaultMenu = array();
|
||||
//$eventDefaultMenu[] = array('action' => '/Schedule/delete-show', 'text' => 'Delete');
|
||||
|
||||
$this->view->eventDefaultMenu = $eventDefaultMenu;
|
||||
|
||||
$eventHostMenu[] = array('action' => '/Schedule/delete-show', 'text' => 'Delete');
|
||||
$eventHostMenu[] = array('action' => '/Schedule/schedule-show', 'text' => 'Schedule');
|
||||
$eventHostMenu[] = array('action' => '/Schedule/clear-show', 'text' => 'Clear');
|
||||
|
||||
$this->view->eventHostMenu = $eventHostMenu;
|
||||
}
|
||||
|
||||
public function eventFeedAction()
|
||||
|
@ -175,19 +165,42 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
public function deleteShowAction()
|
||||
{
|
||||
$showId = $this->_getParam('showId');
|
||||
$date = $this->_getParam('date');
|
||||
$showId = $this->_getParam('id');
|
||||
$start_timestamp = $this->_getParam('start');
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
$user = new User($userInfo->id, $userInfo->type);
|
||||
$show = new Show($user, $showId);
|
||||
$show->deleteShow($date);
|
||||
$show->deleteShow($start_timestamp);
|
||||
}
|
||||
|
||||
public function makeContextMenuAction()
|
||||
{
|
||||
// action body
|
||||
$id = $this->_getParam('id');
|
||||
$start_timestamp = $this->_getParam('start');
|
||||
|
||||
$today_timestamp = date("Y-m-d H:i:s");
|
||||
|
||||
$params = '/format/json/id/#id#/start/#start#/end/#end#';
|
||||
|
||||
if(strtotime($today_timestamp) < strtotime($start_timestamp)) {
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/delete-show'.$params, 'callback' => 'window["scheduleRefetchEvents"]'),
|
||||
'title' => 'Delete');
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/clear-show'.$params, 'callback' => 'window["scheduleRefetchEvents"]'),
|
||||
'title' => 'Clear');
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/schedule-show-dialog'.$params, 'callback' => 'window["buildScheduleDialog"]'),
|
||||
'title' => 'Schedule');
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
//returns format jjmenu is looking for.
|
||||
die(json_encode($menu));
|
||||
}
|
||||
|
||||
public function scheduleShowAction()
|
||||
|
@ -221,7 +234,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
public function clearShowAction()
|
||||
{
|
||||
$start = $this->_getParam('start');
|
||||
$showId = $this->_getParam('showId');
|
||||
$showId = $this->_getParam('id');
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new User($userInfo->id, $userInfo->type);
|
||||
|
@ -278,7 +291,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
{
|
||||
$start_timestamp = $this->_getParam('start');
|
||||
$end_timestamp = $this->_getParam('end');
|
||||
$showId = $this->_getParam('showId');
|
||||
$showId = $this->_getParam('id');
|
||||
|
||||
$this->sched_sess->showId = $showId;
|
||||
$this->sched_sess->showStart = $start_timestamp;
|
||||
|
|
|
@ -88,7 +88,7 @@ class Show {
|
|||
$start = $data['add_show_start_date'];
|
||||
}
|
||||
|
||||
if(strtotime($start) < strtotime($endDate)) {
|
||||
if(strtotime($start) < strtotime($endDate) || is_null($endDate)) {
|
||||
|
||||
$showDay = new CcShowDays();
|
||||
$showDay->setDbFirstShow($start);
|
||||
|
@ -584,7 +584,7 @@ class Show {
|
|||
$shows[] = $this->makeFullCalendarEvent($row, $repeatDate);
|
||||
}
|
||||
//case for non-ending shows.
|
||||
else if(is_null($show_end_epoch) && $repeat_epoch < $end_epoch) {
|
||||
else if(!isset($show_end_epoch) && $repeat_epoch < $end_epoch) {
|
||||
$shows[] = $this->makeFullCalendarEvent($row, $repeatDate);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<ul>
|
||||
<li><a href="#simpleSearch">Search</a></li>
|
||||
<li><a href="#advancedSearch">Advanced Search</a></li>
|
||||
</ul>
|
||||
<div id="simpleSearch">
|
||||
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Title</th>
|
||||
<th>Creator</th>
|
||||
<th>Album</th>
|
||||
<th>Track</th>
|
||||
<th>Length</th>
|
||||
<th>Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="advancedSearch">
|
||||
Some Text
|
||||
</div>
|
|
@ -0,0 +1,23 @@
|
|||
<ul>
|
||||
<li><a href="#simpleSearch">Search</a></li>
|
||||
<li><a href="#advancedSearch">Advanced Search</a></li>
|
||||
</ul>
|
||||
<div id="simpleSearch">
|
||||
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Title</th>
|
||||
<th>Creator</th>
|
||||
<th>Album</th>
|
||||
<th>Track</th>
|
||||
<th>Length</th>
|
||||
<th>Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="advancedSearch">
|
||||
Some Text
|
||||
</div>
|
|
@ -1,8 +1 @@
|
|||
<div id='schedule_calendar' class="ui-widget-content block-shadow padded"></div>
|
||||
|
||||
<ul id="schedule_event_default_menu" class="contextMenu">
|
||||
<?php echo $this->partialLoop('library/contextMenuPartial.phtml', $this->eventDefaultMenu) ?>
|
||||
</ul>
|
||||
<ul id="schedule_event_host_menu" class="contextMenu">
|
||||
<?php echo $this->partialLoop('library/contextMenuPartial.phtml', $this->eventHostMenu) ?>
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue