Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
96f138a9fe
|
@ -344,6 +344,10 @@ class Application_Model_ShowBuilder
|
|||
$this->getScheduledStatus($startsEpoch, $endsEpoch, $row);
|
||||
$this->isAllowed($p_item, $row);
|
||||
|
||||
if (intval($p_item["si_record"]) === 1) {
|
||||
$row["record"] = true;
|
||||
}
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
mod = AIRTIME.button;
|
||||
|
||||
mod.isDisabled = function(c) {
|
||||
mod.isDisabled = function(c, useParent) {
|
||||
var button = $("." + c);
|
||||
if (useParent) {
|
||||
button = button.parent();
|
||||
}
|
||||
|
||||
if (button.hasClass(DISABLED_CLASS)) {
|
||||
return true;
|
||||
|
@ -25,6 +28,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
if (button.hasClass(DISABLED_CLASS)) {
|
||||
button.removeClass(DISABLED_CLASS);
|
||||
button.removeAttr('disabled');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -37,6 +41,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
if (!button.hasClass(DISABLED_CLASS)) {
|
||||
button.addClass(DISABLED_CLASS);
|
||||
button.attr('disabled', 'disabled');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
|
||||
if (check === true) {
|
||||
AIRTIME.button.enableButton("btn-group #library-plus", true);
|
||||
AIRTIME.button.enableButton("btn-group #library-plus", false);
|
||||
} else {
|
||||
AIRTIME.button.disableButton("btn-group #library-plus", true);
|
||||
AIRTIME.button.disableButton("btn-group #library-plus", false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
|
||||
if (check === true) {
|
||||
AIRTIME.button.enableButton("btn-group #library-plus", true);
|
||||
AIRTIME.button.enableButton("btn-group #library-plus", false);
|
||||
} else {
|
||||
AIRTIME.button.disableButton("btn-group #library-plus", true);
|
||||
AIRTIME.button.disableButton("btn-group #library-plus", false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -138,10 +138,10 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
|
||||
if (check === true) {
|
||||
AIRTIME.button.enableButton("btn-group #sb-trash", true);
|
||||
AIRTIME.button.enableButton("btn-group #sb-trash", false);
|
||||
}
|
||||
else {
|
||||
AIRTIME.button.disableButton("btn-group #sb-trash", true);
|
||||
AIRTIME.button.disableButton("btn-group #sb-trash", false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -112,16 +112,25 @@ var AIRTIME = (function(AIRTIME){
|
|||
};
|
||||
|
||||
mod.checkCancelButton = function() {
|
||||
var $current = $sbTable.find(".sb-current-show.sb-allowed"),
|
||||
|
||||
var $current = $sbTable.find(".sb-current-show"),
|
||||
//this user type should be refactored into a separate users module later
|
||||
//when there's more time and more JS will need to know user data.
|
||||
userType = localStorage.getItem('user-type');
|
||||
userType = localStorage.getItem('user-type'),
|
||||
canCancel = false;
|
||||
|
||||
if ($current.length !== 0 && (userType === 'A' || userType === 'P')) {
|
||||
AIRTIME.button.enableButton("icon-ban-circle", true);
|
||||
if ($current.length !== 0 && $current.hasClass("sb-allowed")) {
|
||||
canCancel = true;
|
||||
}
|
||||
else if ($current.length !== 0 && (userType === 'A' || userType === 'P')) {
|
||||
canCancel = true;
|
||||
}
|
||||
|
||||
if (canCancel === true) {
|
||||
AIRTIME.button.enableButton("icon-ban-circle", true);
|
||||
}
|
||||
else {
|
||||
AIRTIME.button.disableButton("icon-ban-circle", true);
|
||||
AIRTIME.button.disableButton("icon-ban-circle", true);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -953,16 +962,16 @@ var AIRTIME = (function(AIRTIME){
|
|||
"</ul>" +
|
||||
"</div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button title='Remove overbooked tracks' class='ui-state-disabled btn btn-small'>" +
|
||||
"<button title='Remove overbooked tracks' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-cut'></i></button></div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button title='Remove selected scheduled items' class='ui-state-disabled btn btn-small'>" +
|
||||
"<button title='Remove selected scheduled items' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-trash'></i></button></div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button title='Jump to the current playing track' class='ui-state-disabled btn btn-small'>" +
|
||||
"<button title='Jump to the current playing track' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-step-forward'></i></button></div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button title='Cancel current show' class='ui-state-disabled btn btn-small btn-danger'>" +
|
||||
"<button title='Cancel current show' class='ui-state-disabled btn btn-small btn-danger' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-ban-circle'></i></button></div>");
|
||||
|
||||
$toolbar.append($menu);
|
||||
|
@ -978,7 +987,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
data,
|
||||
msg = 'Cancel Current Show?';
|
||||
|
||||
if (AIRTIME.button.isDisabled('icon-ban-circle') === true) {
|
||||
if (AIRTIME.button.isDisabled('icon-ban-circle', true) === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1009,7 +1018,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
$toolbar.find('.icon-step-forward').parent()
|
||||
.click(function() {
|
||||
|
||||
if (AIRTIME.button.isDisabled('icon-step-forward') === true) {
|
||||
if (AIRTIME.button.isDisabled('icon-step-forward', true) === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1023,10 +1032,10 @@ var AIRTIME = (function(AIRTIME){
|
|||
});
|
||||
|
||||
//delete overbooked tracks.
|
||||
$toolbar.find('.icon-cut').parent()
|
||||
$toolbar.find('.icon-cut', true).parent()
|
||||
.click(function() {
|
||||
|
||||
if (AIRTIME.button.isDisabled('icon-cut') === true) {
|
||||
if (AIRTIME.button.isDisabled('icon-cut', true) === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1046,7 +1055,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
$toolbar.find('.icon-trash').parent()
|
||||
.click(function() {
|
||||
|
||||
if (AIRTIME.button.isDisabled('icon-trash') === true) {
|
||||
if (AIRTIME.button.isDisabled('icon-trash', true) === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,17 @@ INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_channels', 'ste
|
|||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_channels', 'stereo', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_channels', 'stereo', 'string');
|
||||
|
||||
|
||||
--clean up database of scheduled items that weren't properly deleted in 2.1.x
|
||||
--due to a bug
|
||||
DELETE
|
||||
FROM cc_schedule
|
||||
WHERE id IN
|
||||
(SELECT s.id
|
||||
FROM cc_schedule s
|
||||
LEFT JOIN cc_show_instances si ON s.instance_id = si.id
|
||||
AND si.modified_instance = 't')
|
||||
|
||||
ALTER TABLE cc_files
|
||||
DROP CONSTRAINT cc_files_gunid_idx;
|
||||
|
||||
|
|
Loading…
Reference in New Issue