CC-3463 : Usability improvements for timeline

started to add cursor options to context menu.
This commit is contained in:
Naomi Aro 2012-03-27 15:46:25 +02:00
parent 296a5c583a
commit dfc6ae6273
2 changed files with 27 additions and 2 deletions

View file

@ -99,7 +99,7 @@ class ShowbuilderController extends Zend_Controller_Action
public function contextMenuAction()
{
$id = $this->_getParam('id');
$now = time();
$now = floatval(microtime(true));
$request = $this->getRequest();
$baseUrl = $request->getBaseUrl();
@ -111,7 +111,12 @@ class ShowbuilderController extends Zend_Controller_Action
$item = CcScheduleQuery::create()->findPK($id);
$instance = $item->getCcShowInstances();
if ($now < intval($item->getDbEnds("U")) && $user->canSchedule($instance->getDbShowId())) {
if ($now < floatval($item->getDbEnds("U.u")) && $user->canSchedule($instance->getDbShowId())) {
//select the cursor
$menu["selCurs"] = array("name"=> "Select Cursor");
$menu["delCurs"] = array("name"=> "Remove Cursor");
//remove/truncate the item from the schedule
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/showbuilder/schedule-remove");
}