✨ (schedule) display warning icon and tooltip on overbooked show
This commit is contained in:
parent
e232469551
commit
aa9b8aedae
3 changed files with 53 additions and 15 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue