CC-4154L: Indicate whether a show has scheduled content on the calendar page

-done
This commit is contained in:
denise 2012-08-07 14:57:04 -04:00
parent 975abbaf10
commit 550c97a2dc
3 changed files with 64 additions and 2 deletions

View File

@ -1621,6 +1621,15 @@ class Application_Model_Show {
else if ($p_editable && $nowEpoch < $endsEpoch) {
$options["editable"] = true;
}
$showInstance = new Application_Model_ShowInstance($show["instance_id"]);
$showContent = $showInstance->getShowListContent();
if (empty($showContent)) {
$options["show_empty"] = 1;
} else {
$options["show_empty"] = 0;
}
$events[] = &self::makeFullCalendarEvent($show, $options, $startsDT, $endsDT, $startsEpochStr, $endsEpochStr);
}

View File

@ -1722,17 +1722,21 @@ div.errors{
}
.small-icon.recording {
background:url(images/icon_record.png) no-repeat 0 0;
margin-top: 0px !important;
}
.small-icon.rebroadcast {
background:url(images/icon_rebroadcast.png) no-repeat 0 0;
margin-top: 0px !important;
}
.small-icon.soundcloud {
background:url(images/icon_soundcloud.png) no-repeat 0 0;
width:21px;
margin-top: 0px !important;
}
.small-icon.sc-error {
background:url(images/icon_soundcloud_error2.png) no-repeat 0 0;
width:21px;
margin-top: 0px !important;
}
.small-icon.progress {
background:url(images/upload-icon.gif) no-repeat;
@ -1741,6 +1745,7 @@ div.errors{
border-radius:2px;
-webkit-border-radius:2px;
-moz-border-radius:2px;
margin-top: 0px !important;
}
.small-icon.alert {
background:url(images/icon_alert.png) no-repeat;
@ -1749,6 +1754,11 @@ div.errors{
margin-right:3px;
margin-left:1px;
}
.small-icon.show-empty {
background:url(redmond/images/ui-icons_ff5d1a_256x240.png) no-repeat 0 -144px;
width: 16px;
margin-top: 0px !important;
}
.medium-icon {
display:block;
width:25px;

View File

@ -244,14 +244,39 @@ function eventRender(event, element, view) {
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id === -3) {
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>');
}
//add scheduled show content empty icon
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
if (event.soundcloud_id === -1) {
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
} else if (event.soundcloud_id > 0) {
} else if (event.soundcloud_id === -2) {
} else if (event.soundcloud_id === -3) {
}
}
} else if (view.name === 'month') {
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
if (event.soundcloud_id === -1) {
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon show-empty"></span>');
} else if (event.soundcloud_id > 0) {
} else if (event.soundcloud_id === -2) {
} else if (event.soundcloud_id === -3) {
}
}
}
//rebroadcast icon
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.rebroadcast === 1) {
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon rebroadcast"></span>');
}
if(view.name === 'month' && event.rebroadcast === 1) {
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon rebroadcast"></span>');
}
}
@ -403,6 +428,24 @@ function addQtipToSCIcons(ele){
ready: true // Needed to make it show on first mouseover event
}
});
}else if ($(ele).hasClass("show-empty")){
$(ele).qtip({
content: {
text: "This show has no scheduled content."
},
position:{
adjust: {
resize: true,
method: "flip flip"
},
at: "right center",
my: "left top",
viewport: $(window)
},
show: {
ready: true // Needed to make it show on first mouseover event
}
});
}
}