Merge branch 'master' of dev.sourcefabric.org:campcaster
This commit is contained in:
commit
7be60fbf84
7 changed files with 49 additions and 14 deletions
|
@ -107,10 +107,10 @@ class Application_Form_EditAudioMD extends Zend_Form
|
||||||
|
|
||||||
$this->addDisplayGroup(array('submit', 'cancel'), 'submitButtons', array(
|
$this->addDisplayGroup(array('submit', 'cancel'), 'submitButtons', array(
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
'FormElements',
|
'FormElements',
|
||||||
array('HtmlTag', array('tag' => 'dd', 'class' => 'element')),
|
'DtDdWrapper'
|
||||||
),
|
)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,27 @@ class Application_Model_Nowplaying
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function HandleRebroadcastShows($rows){
|
||||||
|
$newCopy = array();
|
||||||
|
|
||||||
|
$numRows = count($rows);
|
||||||
|
for ($i=0; $i<$numRows; $i++){
|
||||||
|
$currentRow = $rows[$i];
|
||||||
|
if ($currentRow["rebroadcast"] == 1 && !array_key_exists("group", $currentRow)){
|
||||||
|
$newRow = $currentRow;
|
||||||
|
unset($newRow['group']);
|
||||||
|
$newRow['item_starts'] = $newRow['show_starts'];
|
||||||
|
$newRow['item_ends'] = $newRow['show_ends'];
|
||||||
|
|
||||||
|
array_push($newCopy, $newRow);
|
||||||
|
} else {
|
||||||
|
array_push($newCopy, $currentRow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $newCopy;
|
||||||
|
}
|
||||||
|
|
||||||
public static function GetDataGridData($viewType, $dateString){
|
public static function GetDataGridData($viewType, $dateString){
|
||||||
|
|
||||||
if ($viewType == "now"){
|
if ($viewType == "now"){
|
||||||
|
@ -111,14 +132,13 @@ class Application_Model_Nowplaying
|
||||||
$endCutoff = $date->getNowDayEndDiff();
|
$endCutoff = $date->getNowDayEndDiff();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$rows = Show_DAL::GetShowsInRange($timeNow, $startCutoff, $endCutoff);
|
$rows = Show_DAL::GetShowsInRange($timeNow, $startCutoff, $endCutoff);
|
||||||
$rows = Application_Model_Nowplaying::FindBeginningOfShow($rows);
|
$rows = Application_Model_Nowplaying::FindBeginningOfShow($rows);
|
||||||
|
$rows = Application_Model_Nowplaying::HandleRebroadcastShows($rows);
|
||||||
$rows = Application_Model_Nowplaying::FindGapAtEndOfShow($rows);
|
$rows = Application_Model_Nowplaying::FindGapAtEndOfShow($rows);
|
||||||
//$rows = FindGapsBetweenShows
|
//$rows = FindGapsBetweenShows()
|
||||||
$data = Application_Model_Nowplaying::FilterRowsByDate($rows, $date, $startCutoff, $endCutoff);
|
$data = Application_Model_Nowplaying::FilterRowsByDate($rows, $date, $startCutoff, $endCutoff);
|
||||||
|
|
||||||
|
|
||||||
$date = new Application_Model_DateHelper;
|
$date = new Application_Model_DateHelper;
|
||||||
$timeNow = $date->getDate();
|
$timeNow = $date->getDate();
|
||||||
return array("currentShow"=>Show_DAL::GetCurrentShow($timeNow), "rows"=>$data);
|
return array("currentShow"=>Show_DAL::GetCurrentShow($timeNow), "rows"=>$data);
|
||||||
|
|
|
@ -274,7 +274,7 @@ class Show {
|
||||||
{
|
{
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
$sql = "SELECT starts, ends, record, rebroadcast, instance_id, show_id, name, description,
|
$sql = "SELECT starts, ends, record, rebroadcast, soundcloud_id, instance_id, show_id, name, description,
|
||||||
color, background_color, cc_show_instances.id AS instance_id
|
color, background_color, cc_show_instances.id AS instance_id
|
||||||
FROM cc_show_instances
|
FROM cc_show_instances
|
||||||
LEFT JOIN cc_show ON cc_show.id = cc_show_instances.show_id";
|
LEFT JOIN cc_show ON cc_show.id = cc_show_instances.show_id";
|
||||||
|
@ -565,6 +565,7 @@ class Show {
|
||||||
$event["showId"] = $show["show_id"];
|
$event["showId"] = $show["show_id"];
|
||||||
$event["record"] = intval($show["record"]);
|
$event["record"] = intval($show["record"]);
|
||||||
$event["rebroadcast"] = intval($show["rebroadcast"]);
|
$event["rebroadcast"] = intval($show["rebroadcast"]);
|
||||||
|
$event["soundcloud_id"] = (is_null($show["soundcloud_id"]) ? -1 : $show["soundcloud_id"]);
|
||||||
|
|
||||||
foreach($options as $key=>$value) {
|
foreach($options as $key=>$value) {
|
||||||
$event[$key] = $value;
|
$event[$key] = $value;
|
||||||
|
@ -1013,6 +1014,7 @@ class Show_DAL {
|
||||||
$sql = "SELECT"
|
$sql = "SELECT"
|
||||||
." si.starts as show_starts,"
|
." si.starts as show_starts,"
|
||||||
." si.ends as show_ends,"
|
." si.ends as show_ends,"
|
||||||
|
." si.rebroadcast as rebroadcast,"
|
||||||
." st.starts as item_starts,"
|
." st.starts as item_starts,"
|
||||||
." st.ends as item_ends,"
|
." st.ends as item_ends,"
|
||||||
." st.clip_length as clip_length,"
|
." st.clip_length as clip_length,"
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<div id="schedule-show-style" class="collapsible-content">
|
<div id="schedule-show-style" class="collapsible-content">
|
||||||
<?php echo $this->style; ?>
|
<?php echo $this->style; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-bar">
|
<div class="button-bar bottom">
|
||||||
<button aria-disabled="false" role="button" class="add-show-submit right-floated ui-button ui-widget ui-state-default ui-button-text-icon-primary">
|
<button aria-disabled="false" role="button" class="add-show-submit right-floated ui-button ui-widget ui-state-default ui-button-text-icon-primary">
|
||||||
<span class="ui-icon ui-icon-plusthick"></span>
|
<span class="ui-icon ui-icon-plusthick"></span>
|
||||||
<span class="ui-button-text">Add this show</span>
|
<span class="ui-button-text">Add this show</span>
|
||||||
|
|
|
@ -1085,7 +1085,7 @@ button.ui-button-icons-only {
|
||||||
padding-right: 2.1em;
|
padding-right: 2.1em;
|
||||||
}
|
}
|
||||||
/* no icon support for input elements, provide padding by default */
|
/* no icon support for input elements, provide padding by default */
|
||||||
input.ui-button {
|
input.ui-button, button.ui-button {
|
||||||
padding: .4em 1em;
|
padding: .4em 1em;
|
||||||
}
|
}
|
||||||
/*button icon element(s) */
|
/*button icon element(s) */
|
||||||
|
@ -1117,10 +1117,11 @@ input.ui-button {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* workarounds */
|
/* workarounds */
|
||||||
button.ui-button::-moz-focus-inner {
|
/*button.ui-button::-moz-focus-inner {
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
} /* reset extra padding in Firefox */
|
}*/
|
||||||
|
/* reset extra padding in Firefox */
|
||||||
/*
|
/*
|
||||||
* jQuery UI Dialog 1.8.6
|
* jQuery UI Dialog 1.8.6
|
||||||
*
|
*
|
||||||
|
|
|
@ -1268,6 +1268,9 @@ div.success{
|
||||||
height: 28px;
|
height: 28px;
|
||||||
margin: 0 0 8px 0;
|
margin: 0 0 8px 0;
|
||||||
}
|
}
|
||||||
|
#schedule-add-show .button-bar.bottom {
|
||||||
|
margin: 16px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
.schedule {
|
.schedule {
|
||||||
text-align:left;
|
text-align:left;
|
||||||
|
|
|
@ -149,7 +149,7 @@ function viewDisplay( view ) {
|
||||||
function eventRender(event, element, view) {
|
function eventRender(event, element, view) {
|
||||||
|
|
||||||
//only put progress bar on shows that aren't being recorded and are not a rebroadcast.
|
//only put progress bar on shows that aren't being recorded and are not a rebroadcast.
|
||||||
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 0 && event.rebroadcast === 0) {
|
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 0 /* && event.rebroadcast === 0 */) {
|
||||||
var div = $('<div/>');
|
var div = $('<div/>');
|
||||||
div
|
div
|
||||||
.height('5px')
|
.height('5px')
|
||||||
|
@ -184,7 +184,16 @@ function eventRender(event, element, view) {
|
||||||
if(view.name === 'month' && event.rebroadcast === 1) {
|
if(view.name === 'month' && event.rebroadcast === 1) {
|
||||||
|
|
||||||
$(element).find(".fc-event-title").after('<span class="small-icon rebroadcast"></span>');
|
$(element).find(".fc-event-title").after('<span class="small-icon rebroadcast"></span>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.soundcloud_id != -1 && event.record === 1) {
|
||||||
|
|
||||||
|
$(element).find(".fc-event-time").after('<span class="small-icon soundcloud"></span>');
|
||||||
|
}
|
||||||
|
if(view.name === 'month' && event.soundcloud_id != -1 && event.record === 1) {
|
||||||
|
|
||||||
|
$(element).find(".fc-event-title").after('<span class="small-icon soundcloud"></span>');
|
||||||
|
}
|
||||||
|
|
||||||
if(event.backgroundColor !== "") {
|
if(event.backgroundColor !== "") {
|
||||||
$(element)
|
$(element)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue