added visual icon to event to show if a show has content scheduled.
This commit is contained in:
parent
d95c4ab0fc
commit
28bd92d073
|
@ -126,12 +126,12 @@ class Playlist {
|
|||
}
|
||||
|
||||
public static function Delete($id) {
|
||||
$pl = CcPlaylistQuery::create()->findPK($id);
|
||||
if($pl === NULL)
|
||||
return FALSE;
|
||||
$pl = CcPlaylistQuery::create()->findPK($id);
|
||||
if($pl === NULL)
|
||||
return FALSE;
|
||||
|
||||
$pl->delete();
|
||||
return TRUE;
|
||||
$pl->delete();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -202,6 +202,16 @@ class Show {
|
|||
}
|
||||
}
|
||||
|
||||
public function showHasContent($start_timestamp, $end_timestamp) {
|
||||
|
||||
$con = Propel::getConnection("campcaster");
|
||||
$sql = "SELECT TIMESTAMP '{$end_timestamp}' - TIMESTAMP '{$start_timestamp}'";
|
||||
$r = $con->query($sql);
|
||||
$length = $r->fetchColumn(0);
|
||||
|
||||
return !Schedule::isScheduleEmptyInRange($start_timestamp, $length);
|
||||
}
|
||||
|
||||
public function deleteShow($showId, $dayId=NULL) {
|
||||
$groups = CcShowScheduleQuery::create()->filterByDbShowId($showId)->find();
|
||||
|
||||
|
@ -357,6 +367,12 @@ class Show {
|
|||
$event["isHost"] = true;
|
||||
}
|
||||
|
||||
$start = $date." ".$show["start_time"];
|
||||
$end = $date." ".$show["end_time"];
|
||||
if($this->showHasContent($start, $end)) {
|
||||
$event["hasContent"] = true;
|
||||
}
|
||||
|
||||
return $event;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -271,6 +271,11 @@ function eventRender(event, element, view) {
|
|||
//element.qtip({
|
||||
// content: event.description
|
||||
// });
|
||||
|
||||
if(event.hasContent) {
|
||||
var span = $('<span/>').addClass("ui-icon ui-icon-check");
|
||||
$(element).find(".fc-event-title").after(span);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue