✨ (schedule) display warning icon and tooltip on overbooked show
This commit is contained in:
parent
e232469551
commit
aa9b8aedae
|
@ -2307,6 +2307,9 @@ span.errors.sp-errors{
|
|||
.small-icon.show-partial-filled, .small-icon.media-item-in-use {
|
||||
background:url(images/icon_alert_cal_alt2.png) no-repeat 0 0;
|
||||
}
|
||||
.small-icon.show-overbooked {
|
||||
background:url(images/icon_alert_cal.png) no-repeat 0 0;
|
||||
}
|
||||
.small-icon.is_scheduled {
|
||||
background:url(images/is_scheduled.png) no-repeat 0 0;
|
||||
height: 16px !important;
|
||||
|
|
|
@ -239,6 +239,21 @@ function eventRender(event, element, view) {
|
|||
.find(".fc-event-time")
|
||||
.before('<span class="small-icon show-partial-filled"></span>');
|
||||
}
|
||||
} else if (event.percent > 100) {
|
||||
if (event.linked) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span class="small-icon linked"></span><span class="small-icon show-overbooked"></span>');
|
||||
} else if (event.show_has_auto_playlist === true) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span class="small-icon autoplaylist"></span>');
|
||||
} else {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span class="small-icon show-overbooked"></span>');
|
||||
}
|
||||
|
||||
} else {
|
||||
if (event.linked) {
|
||||
$(element)
|
||||
|
@ -279,6 +294,20 @@ function eventRender(event, element, view) {
|
|||
.find(".fc-event-title")
|
||||
.after('<span title="' + $.i18n._("Show is partially filled") + '" class="small-icon show-partial-filled"></span>');
|
||||
}
|
||||
} else if (event.percent > 100) {
|
||||
if (event.linked) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span class="small-icon linked"></span><span title="' + $.i18n._("Shows longer than their scheduled time will be cut off by a following show.") + '" class="small-icon show-overbooked"></span>');
|
||||
} else if (event.show_has_auto_playlist === true) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span title="' + $.i18n._("Show has an automatic playlist") + '"class="small-icon autoplaylist"></span>');
|
||||
} else {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span title="' + $.i18n._("Shows longer than their scheduled time will be cut off by a following show.") + '" class="small-icon show-overbooked"></span>');
|
||||
}
|
||||
} else {
|
||||
if (event.linked) {
|
||||
$(element)
|
||||
|
@ -583,6 +612,27 @@ function addQtipsToIcons(ele, id) {
|
|||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
} else if ($(ele).hasClass("show-overbooked")) {
|
||||
$(ele).qtip({
|
||||
content: {
|
||||
text: $.i18n._("Shows longer than their scheduled time will be cut off by a following show.")
|
||||
},
|
||||
position: {
|
||||
adjust: {
|
||||
resize: true,
|
||||
method: "flip flip"
|
||||
},
|
||||
at: "right center",
|
||||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//Alert the error and reload the page
|
||||
|
|
|
@ -22,21 +22,6 @@ function closeDialogCalendar(event, ui) {
|
|||
$("#schedule_calendar").fullCalendar( 'refetchEvents' );
|
||||
}
|
||||
|
||||
function checkShowLength(json) {
|
||||
var percent = json.percentFilled;
|
||||
|
||||
if (percent > 100){
|
||||
$("#show_time_warning")
|
||||
.text($.i18n._("Shows longer than their scheduled time will be cut off by a following show."))
|
||||
.show();
|
||||
}
|
||||
else {
|
||||
$("#show_time_warning")
|
||||
.empty()
|
||||
.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function confirmCancelShow(show_instance_id){
|
||||
if (confirm($.i18n._('Cancel Current Show?'))) {
|
||||
var url = baseUrl+"Schedule/cancel-current-show";
|
||||
|
|
Loading…
Reference in New Issue