SAAS-1088 - fix broken 'all my shows' checkbox
This commit is contained in:
parent
3fcc3c507a
commit
3df1081c60
|
@ -102,7 +102,54 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
libEmpty.hide();
|
libEmpty.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var sortable;
|
||||||
|
|
||||||
if ($("#show_builder_table").is(":visible")) {
|
if ($("#show_builder_table").is(":visible")) {
|
||||||
|
sortable = "#show_builder_table";
|
||||||
|
} else {
|
||||||
|
sortable = ".active-tab .spl_sortable";
|
||||||
|
//$('#library_display tr[class*="lib-"]')
|
||||||
|
// .draggable(
|
||||||
|
// {
|
||||||
|
// helper: function () {
|
||||||
|
//
|
||||||
|
// var $el = $(this), selected = mod
|
||||||
|
// .getChosenAudioFilesLength(), container, message,
|
||||||
|
// width = $(this).width(), height = 55;
|
||||||
|
//
|
||||||
|
// // dragging an element that has an unselected
|
||||||
|
// // checkbox.
|
||||||
|
// if (mod.isChosenItem($el) === false) {
|
||||||
|
// selected++;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (selected === 1) {
|
||||||
|
// message = $.i18n._("Adding 1 Item");
|
||||||
|
// } else {
|
||||||
|
// message = sprintf($.i18n._("Adding %s Items"), selected);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// container = $('<div class="helper"/>').append(
|
||||||
|
// "<li/>").find("li").addClass(
|
||||||
|
// "ui-state-default").append("<div/>")
|
||||||
|
// .find("div").addClass(
|
||||||
|
// "list-item-container").append(
|
||||||
|
// message).end().width(width)
|
||||||
|
// .height(height).end();
|
||||||
|
//
|
||||||
|
// return container;
|
||||||
|
// },
|
||||||
|
// create: function(event, ui) {
|
||||||
|
// $(this).draggable("option", "cursorAt", {
|
||||||
|
// left: Math.floor(this.clientWidth / 2)
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// cursor: 'move',
|
||||||
|
// distance: 25, // min-distance for dragging
|
||||||
|
// connectToSortable: '.active-tab .spl_sortable'
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
$('#library_display tr[class*="lib-"]')
|
$('#library_display tr[class*="lib-"]')
|
||||||
.draggable(
|
.draggable(
|
||||||
{
|
{
|
||||||
|
@ -135,55 +182,15 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
},
|
},
|
||||||
create: function(event, ui) {
|
create: function(event, ui) {
|
||||||
$(this).draggable("option", "cursorAt", {
|
$(this).draggable("option", "cursorAt", {
|
||||||
left: Math.floor(this.clientWidth / 2)
|
top: 20,
|
||||||
|
left: Math.floor($(this).outerWidth() / 2)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
tolerance: 'pointer',
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
distance: 25, // min-distance for dragging
|
distance: 25, // min-distance for dragging
|
||||||
connectToSortable: '#show_builder_table'
|
connectToSortable: sortable
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
$('#library_display tr[class*="lib-"]')
|
|
||||||
.draggable(
|
|
||||||
{
|
|
||||||
helper: function () {
|
|
||||||
|
|
||||||
var $el = $(this), selected = mod
|
|
||||||
.getChosenAudioFilesLength(), container, message,
|
|
||||||
width = $(this).width(), height = 55;
|
|
||||||
|
|
||||||
// dragging an element that has an unselected
|
|
||||||
// checkbox.
|
|
||||||
if (mod.isChosenItem($el) === false) {
|
|
||||||
selected++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selected === 1) {
|
|
||||||
message = $.i18n._("Adding 1 Item");
|
|
||||||
} else {
|
|
||||||
message = sprintf($.i18n._("Adding %s Items"), selected);
|
|
||||||
}
|
|
||||||
|
|
||||||
container = $('<div class="helper"/>').append(
|
|
||||||
"<li/>").find("li").addClass(
|
|
||||||
"ui-state-default").append("<div/>")
|
|
||||||
.find("div").addClass(
|
|
||||||
"list-item-container").append(
|
|
||||||
message).end().width(width)
|
|
||||||
.height(height).end();
|
|
||||||
|
|
||||||
return container;
|
|
||||||
},
|
|
||||||
create: function(event, ui) {
|
|
||||||
$(this).draggable("option", "cursorAt", {
|
|
||||||
left: Math.floor(this.clientWidth / 2)
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cursor: 'move',
|
|
||||||
distance: 25, // min-distance for dragging
|
|
||||||
connectToSortable: '.active-tab .spl_sortable'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.dblClickAdd = function(data, type) {
|
mod.dblClickAdd = function(data, type) {
|
||||||
|
|
|
@ -94,6 +94,8 @@ AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
check = validateTimeRange();
|
check = validateTimeRange();
|
||||||
|
|
||||||
|
console.log(check);
|
||||||
|
|
||||||
if (check.isValid) {
|
if (check.isValid) {
|
||||||
//reset timestamp value since input values could have changed.
|
//reset timestamp value since input values could have changed.
|
||||||
AIRTIME.showbuilder.resetTimestamp();
|
AIRTIME.showbuilder.resetTimestamp();
|
||||||
|
@ -102,7 +104,7 @@ AIRTIME = (function(AIRTIME) {
|
||||||
fn.start = check.start;
|
fn.start = check.start;
|
||||||
fn.end = check.end;
|
fn.end = check.end;
|
||||||
|
|
||||||
op = $("div.sb-advanced-options");
|
op = $("div.sb-options-form");
|
||||||
if (op.is(":visible")) {
|
if (op.is(":visible")) {
|
||||||
|
|
||||||
if (fn.ops === undefined) {
|
if (fn.ops === undefined) {
|
||||||
|
|
Loading…
Reference in New Issue