Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
1c62323eca
|
@ -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"=> "Preview");
|
||||||
|
//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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -786,28 +786,39 @@ var AIRTIME = (function(AIRTIME){
|
||||||
ignoreRightClick: true,
|
ignoreRightClick: true,
|
||||||
|
|
||||||
build: function($el, e) {
|
build: function($el, e) {
|
||||||
var data, items, callback, $tr;
|
var items,
|
||||||
|
$tr = $el.parent(),
|
||||||
$tr = $el.parent();
|
data = $tr.data("aData"),
|
||||||
data = $tr.data("aData");
|
cursorClass = "cursor-selected-row",
|
||||||
|
callback;
|
||||||
|
|
||||||
function processMenuItems(oItems) {
|
function processMenuItems(oItems) {
|
||||||
|
|
||||||
//define a select cursor.
|
//define a preview callback.
|
||||||
|
if (oItems.preview !== undefined) {
|
||||||
|
|
||||||
|
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() {
|
||||||
$(this).parents('tr').next().addClass("cursor-selected-row");
|
$(this).parents('tr').next().addClass(cursorClass);
|
||||||
};
|
};
|
||||||
|
|
||||||
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() {
|
||||||
$(this).parents('tr').next().removeClass("cursor-selected-row");
|
$(this).parents('tr').next().removeClass(cursorClass);
|
||||||
};
|
};
|
||||||
|
|
||||||
oItems.delCurs.callback = callback;
|
oItems.delCurs.callback = callback;
|
||||||
|
@ -817,15 +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.
|
||||||
|
if ($tr.next().find('.marker').length === 0) {
|
||||||
|
delete oItems.selCurs;
|
||||||
|
delete oItems.delCurs;
|
||||||
|
}
|
||||||
|
//check to include either select or remove cursor.
|
||||||
|
else {
|
||||||
|
if ($tr.next().hasClass(cursorClass)) {
|
||||||
|
delete oItems.selCurs;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
delete oItems.delCurs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
items = oItems;
|
items = oItems;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue