tests with qtip,small changes
This commit is contained in:
parent
31570b497a
commit
f1a59f305b
6 changed files with 38 additions and 7 deletions
|
@ -56,6 +56,7 @@
|
||||||
<actionMethod actionName="moveShow"/>
|
<actionMethod actionName="moveShow"/>
|
||||||
<actionMethod actionName="resizeShow"/>
|
<actionMethod actionName="resizeShow"/>
|
||||||
<actionMethod actionName="deleteShow"/>
|
<actionMethod actionName="deleteShow"/>
|
||||||
|
<actionMethod actionName="makeContextMenu"/>
|
||||||
</controllerFile>
|
</controllerFile>
|
||||||
<controllerFile controllerName="Api">
|
<controllerFile controllerName="Api">
|
||||||
<actionMethod actionName="index"/>
|
<actionMethod actionName="index"/>
|
||||||
|
@ -185,6 +186,9 @@
|
||||||
<viewControllerScriptsDirectory forControllerName="Schedule">
|
<viewControllerScriptsDirectory forControllerName="Schedule">
|
||||||
<viewScriptFile forActionName="deleteShow"/>
|
<viewScriptFile forActionName="deleteShow"/>
|
||||||
</viewControllerScriptsDirectory>
|
</viewControllerScriptsDirectory>
|
||||||
|
<viewControllerScriptsDirectory forControllerName="Schedule">
|
||||||
|
<viewScriptFile forActionName="makeContextMenu"/>
|
||||||
|
</viewControllerScriptsDirectory>
|
||||||
</viewScriptsDirectory>
|
</viewScriptsDirectory>
|
||||||
<viewHelpersDirectory/>
|
<viewHelpersDirectory/>
|
||||||
<viewFiltersDirectory enabled="false"/>
|
<viewFiltersDirectory enabled="false"/>
|
||||||
|
|
|
@ -16,7 +16,7 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
->addActionContext('add-show', 'json')
|
->addActionContext('add-show', 'json')
|
||||||
->addActionContext('move-show', 'json')
|
->addActionContext('move-show', 'json')
|
||||||
->addActionContext('resize-show', 'json')
|
->addActionContext('resize-show', 'json')
|
||||||
->addActionContext('delete-show', 'json')
|
->addActionContext('delete-show', 'json')
|
||||||
->initContext();
|
->initContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$this->view->headScript()->appendFile('/js/fullcalendar/fullcalendar.min.js','text/javascript');
|
$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/jquery.contextMenu.js','text/javascript');
|
||||||
|
$this->view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript');
|
||||||
|
|
||||||
$this->view->headScript()->appendFile('/js/campcaster/schedule/schedule.js','text/javascript');
|
$this->view->headScript()->appendFile('/js/campcaster/schedule/schedule.js','text/javascript');
|
||||||
|
|
||||||
|
@ -32,7 +33,8 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$this->view->headLink()->appendStylesheet('/css/schedule.css');
|
$this->view->headLink()->appendStylesheet('/css/schedule.css');
|
||||||
|
|
||||||
|
|
||||||
$eventDefaultMenu[] = array('action' => '/Schedule/delete-show', 'text' => 'Delete');
|
$eventDefaultMenu = array();
|
||||||
|
//$eventDefaultMenu[] = array('action' => '/Schedule/delete-show', 'text' => 'Delete');
|
||||||
|
|
||||||
$this->view->eventDefaultMenu = $eventDefaultMenu;
|
$this->view->eventDefaultMenu = $eventDefaultMenu;
|
||||||
|
|
||||||
|
@ -118,14 +120,18 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
public function deleteShowAction()
|
public function deleteShowAction()
|
||||||
{
|
{
|
||||||
$showId = $this->_getParam('showId');
|
$showId = $this->_getParam('showId');
|
||||||
|
|
||||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
|
|
||||||
$show = new Show(new User($userInfo->id, $userInfo->type));
|
$show = new Show(new User($userInfo->id, $userInfo->type));
|
||||||
|
|
||||||
$show->deleteShow($showId);
|
$show->deleteShow($showId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function makeContextMenuAction()
|
||||||
|
{
|
||||||
|
// action body
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,3 +147,5 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ class Show {
|
||||||
}
|
}
|
||||||
if(!is_null($start) && is_null($end)) {
|
if(!is_null($start) && is_null($end)) {
|
||||||
$sql_range = "(first_show <= '{$start}' AND last_show IS NULL)
|
$sql_range = "(first_show <= '{$start}' AND last_show IS NULL)
|
||||||
OR (last_show > '{$start}')";
|
OR (first_show <= '{$start}' AND last_show > '{$start}')";
|
||||||
|
|
||||||
$sql = $sql_gen ." WHERE ". $sql_range;
|
$sql = $sql_gen ." WHERE ". $sql_range;
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ class Show {
|
||||||
$event[$key] = $value;
|
$event[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->_user->isAdmin() === "A") {
|
if($this->_user->isAdmin()) {
|
||||||
$event["editable"] = true;
|
$event["editable"] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<br /><br /><center>View script for controller <b>Schedule</b> and script/action name <b>makeContextMenu</b></center>
|
|
@ -137,7 +137,10 @@ function dayClick(date, allDay, jsEvent, view) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function eventRender(event, element, view) {
|
function eventRender(event, element, view) {
|
||||||
|
//element.qtip({
|
||||||
|
// content: event.description
|
||||||
|
// });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function eventAfterRender( event, element, view ) {
|
function eventAfterRender( event, element, view ) {
|
||||||
|
|
15
public/js/qtip/jquery.qtip-1.0.0.min.js
vendored
Normal file
15
public/js/qtip/jquery.qtip-1.0.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue