CC-5081: Calendar -> Add a linked show icon

This commit is contained in:
denise 2013-05-09 12:14:49 -04:00
parent 9c8935af47
commit fedf564090
4 changed files with 40 additions and 10 deletions

View File

@ -1680,6 +1680,7 @@ SELECT si1.starts AS starts,
show.name AS name,
show.color AS color,
show.background_color AS background_color,
show.linked AS linked,
si1.file_id AS file_id,
si1.id AS instance_id,
si1.created AS created,
@ -1835,6 +1836,7 @@ SQL;
$event["end"] = $endsDT->format("Y-m-d H:i:s");
$event["allDay"] = false;
$event["showId"] = intval($show["show_id"]);
$event["linked"] = intval($show["linked"]);
$event["record"] = intval($show["record"]);
$event["rebroadcast"] = intval($show["rebroadcast"]);
$event["soundcloud_id"] = is_null($show["soundcloud_id"])

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -1958,6 +1958,10 @@ span.errors.sp-errors{
margin-left:3px;
margin-top:2px;
}
.small-icon.linked {
background:url(images/icon_link.png) no-repeat 0 0;
margin-top: 0px !important;
}
.small-icon.recording {
background:url(images/icon_record.png) no-repeat 0 0;
margin-top: 0px !important;

View File

@ -264,23 +264,47 @@ function eventRender(event, element, view) {
if (event.record === 0 && event.rebroadcast === 0) {
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
if (event.show_empty === 1) {
$(element)
if (event.linked) {
$(element)
.find(".fc-event-time")
.before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
.before('<span id="'+event.id+'" class="small-icon linked"></span><span id="'+event.id+'" class="small-icon show-empty"></span>');
} else {
$(element)
.find(".fc-event-time")
.before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
}
} else if (event.show_partial_filled === true) {
$(element)
.find(".fc-event-time")
.before('<span id="'+event.id+'" class="small-icon show-partial-filled"></span>');
if (event.linked) {
$(element)
.find(".fc-event-time")
.before('<span id="'+event.id+'" class="small-icon linked"></span><span id="'+event.id+'" class="small-icon show-partial-filled"></span>');
} else {
$(element)
.find(".fc-event-time")
.before('<span id="'+event.id+'" class="small-icon show-partial-filled"></span>');
}
}
} else if (view.name === 'month') {
if (event.show_empty === 1) {
$(element)
.find(".fc-event-title")
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
if (event.linked) {
$(element)
.find(".fc-event-title")
.after('<span id="'+event.id+'" class="small-icon linked"></span><span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
} else {
$(element)
.find(".fc-event-title")
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
}
} else if (event.show_partial_filled === true) {
$(element)
if (event.linked) {
$(element)
.find(".fc-event-title")
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>');
.after('<span id="'+event.id+'" class="small-icon linked"></span><span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>');
} else {
$(element)
.find(".fc-event-title")
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>');
}
}
}
}