CC-3463 : Usability improvements for timeline
started to add cursor options to context menu.
This commit is contained in:
parent
296a5c583a
commit
dfc6ae6273
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -792,6 +792,26 @@ var AIRTIME = (function(AIRTIME){
|
|||
data = $tr.data("aData");
|
||||
|
||||
function processMenuItems(oItems) {
|
||||
|
||||
//define a select cursor.
|
||||
if (oItems.selCurs !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
$(this).parents('tr').next().addClass("cursor-selected-row");
|
||||
};
|
||||
|
||||
oItems.selCurs.callback = callback;
|
||||
}
|
||||
|
||||
//define a remove cursor.
|
||||
if (oItems.delCurs !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
$(this).parents('tr').next().removeClass("cursor-selected-row");
|
||||
};
|
||||
|
||||
oItems.delCurs.callback = callback;
|
||||
}
|
||||
|
||||
//define a delete callback.
|
||||
if (oItems.del !== undefined) {
|
||||
|
|
Loading…
Reference in New Issue