CC-3463 : Usability improvements for timeline
working on timeline context menu. cursor/play functions.
This commit is contained in:
parent
d9a42c4e40
commit
c1bdc6ff0f
|
@ -110,12 +110,14 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
|
|
||||||
$item = CcScheduleQuery::create()->findPK($id);
|
$item = CcScheduleQuery::create()->findPK($id);
|
||||||
$instance = $item->getCcShowInstances();
|
$instance = $item->getCcShowInstances();
|
||||||
|
|
||||||
|
$menu["preview"] = array("name"=> "Play");
|
||||||
|
//select the cursor
|
||||||
|
$menu["selCurs"] = array("name"=> "Select Cursor");
|
||||||
|
$menu["delCurs"] = array("name"=> "Remove Cursor");
|
||||||
|
|
||||||
if ($now < floatval($item->getDbEnds("U.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
|
//remove/truncate the item from the schedule
|
||||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/showbuilder/schedule-remove");
|
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/showbuilder/schedule-remove");
|
||||||
}
|
}
|
||||||
|
|
|
@ -794,9 +794,17 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
function processMenuItems(oItems) {
|
function processMenuItems(oItems) {
|
||||||
|
|
||||||
$lib = $("#library_content");
|
//define a preview callback.
|
||||||
|
if (oItems.preview !== undefined) {
|
||||||
//define a select cursor.
|
|
||||||
|
callback = function() {
|
||||||
|
open_show_preview(data.instance, data.pos);
|
||||||
|
};
|
||||||
|
|
||||||
|
oItems.preview.callback = callback;
|
||||||
|
}
|
||||||
|
|
||||||
|
//define a select cursor callback.
|
||||||
if (oItems.selCurs !== undefined) {
|
if (oItems.selCurs !== undefined) {
|
||||||
|
|
||||||
callback = function() {
|
callback = function() {
|
||||||
|
@ -806,7 +814,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
oItems.selCurs.callback = callback;
|
oItems.selCurs.callback = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
//define a remove cursor.
|
//define a remove cursor callback.
|
||||||
if (oItems.delCurs !== undefined) {
|
if (oItems.delCurs !== undefined) {
|
||||||
|
|
||||||
callback = function() {
|
callback = function() {
|
||||||
|
@ -820,30 +828,32 @@ var AIRTIME = (function(AIRTIME){
|
||||||
if (oItems.del !== undefined) {
|
if (oItems.del !== undefined) {
|
||||||
|
|
||||||
callback = function() {
|
callback = function() {
|
||||||
AIRTIME.showbuilder.fnRemove([{
|
if (confirm("")) {
|
||||||
id: data.id,
|
AIRTIME.showbuilder.fnRemove([{
|
||||||
timestamp: data.timestamp,
|
id: data.id,
|
||||||
instance: data.instance
|
timestamp: data.timestamp,
|
||||||
}]);
|
instance: data.instance
|
||||||
|
}]);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
oItems.del.callback = callback;
|
oItems.del.callback = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
//only show the cursor selecting options if the library is visible on the page.
|
//only show the cursor selecting options if the library is visible on the page.
|
||||||
if ($lib.filter(":visible").length === 0) {
|
if ($tr.next().find('.marker').length === 0) {
|
||||||
delete oItems.selCurs;
|
delete oItems.selCurs;
|
||||||
delete oItems.delCurs;
|
delete oItems.delCurs;
|
||||||
}
|
}
|
||||||
|
//check to include either select or remove cursor.
|
||||||
else {
|
else {
|
||||||
//check to include either select or remove cursor.
|
if ($tr.next().hasClass(cursorClass)) {
|
||||||
if ($tr.next().hasClass(cursorClass)) {
|
|
||||||
delete oItems.selCurs;
|
delete oItems.selCurs;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
delete oItems.delCurs;
|
delete oItems.delCurs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
items = oItems;
|
items = oItems;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue