Merge branch 'master' of dev.sourcefabric.org:campcaster
This commit is contained in:
commit
f37d977356
|
@ -278,12 +278,51 @@ class Schedule {
|
|||
." WHERE (starts >= '$p_datetime') "
|
||||
." AND (ends <= (TIMESTAMP '$p_datetime' + INTERVAL '$p_length'))";
|
||||
//$_SESSION["debug"] = $sql;
|
||||
//var_dump($sql);
|
||||
//echo $sql;
|
||||
$count = $CC_DBC->GetOne($sql);
|
||||
//var_dump($count);
|
||||
return ($count == '0');
|
||||
}
|
||||
|
||||
public static function getPercentScheduledInRange($s_datetime, $e_datetime) {
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
|
||||
$sql = "SELECT timestamp '{$s_datetime}' > timestamp '{$e_datetime}'";
|
||||
$isNextDay = $CC_DBC->GetOne($sql);
|
||||
|
||||
if($isNextDay === 't') {
|
||||
$sql = "SELECT date '{$e_datetime}' + interval '1 day'";
|
||||
$e_datetime = $CC_DBC->GetOne($sql);
|
||||
}
|
||||
|
||||
$sql = "SELECT SUM(clip_length) FROM ".$CC_CONFIG["scheduleTable"]."
|
||||
WHERE (starts >= '{$s_datetime}')
|
||||
AND (ends <= '{$e_datetime}')";
|
||||
|
||||
$res = $CC_DBC->GetOne($sql);
|
||||
|
||||
if(is_null($res))
|
||||
return 0;
|
||||
|
||||
$con = Propel::getConnection("campcaster");
|
||||
|
||||
$sql = "SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '{$s_datetime}')";
|
||||
$r = $con->query($sql);
|
||||
$s_epoch = $r->fetchColumn(0);
|
||||
|
||||
$sql = "SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '{$e_datetime}')";
|
||||
$r = $con->query($sql);
|
||||
$e_epoch = $r->fetchColumn(0);
|
||||
|
||||
$sql = "SELECT EXTRACT(EPOCH FROM INTERVAL '{$res}')";
|
||||
$r = $con->query($sql);
|
||||
$i_epoch = $r->fetchColumn(0);
|
||||
|
||||
$percent = ceil(($i_epoch / ($e_epoch - $s_epoch)) * 100);
|
||||
|
||||
return $percent;
|
||||
}
|
||||
|
||||
// public function onAddTrackToPlaylist($playlistId, $audioTrackId) {
|
||||
//
|
||||
// }
|
||||
|
|
|
@ -259,8 +259,10 @@ class Show {
|
|||
$sql = $sql_gen ." WHERE ((". $sql_day .") AND (". $sql_range ."))";
|
||||
}
|
||||
if(!is_null($s_time) && !is_null($e_time)) {
|
||||
$sql_time = "(start_time <= '{$s_time}' AND end_time >= '{$e_time}')
|
||||
OR (start_time >= '{$s_time}' AND end_time <= '{$e_time}')
|
||||
$sql_time = "(start_time <= '{$s_time}' AND end_time >= '{$e_time}' AND '{$s_time}' < '{$e_time}')
|
||||
OR (start_time >= '{$s_time}' AND end_time <= '{$e_time}' AND '{$s_time}' > '{$e_time}')
|
||||
OR (start_time >= '{$s_time}' AND end_time <= '{$e_time}' AND start_time < end_time)
|
||||
OR (start_time <= '{$s_time}' AND end_time >= '{$e_time}' AND start_time > end_time)
|
||||
OR (end_time > '{$s_time}' AND end_time <= '{$e_time}')
|
||||
OR (start_time >= '{$s_time}' AND start_time < '{$e_time}')";
|
||||
|
||||
|
@ -342,15 +344,24 @@ class Show {
|
|||
}
|
||||
|
||||
private function makeFullCalendarEvent($show, $date, $options=array()) {
|
||||
global $CC_DBC;
|
||||
|
||||
$start = $date."T".$show["start_time"];
|
||||
$end = $date."T".$show["end_time"];
|
||||
$start_ts = $date." ".$show["start_time"];
|
||||
$end_ts = $date." ".$show["end_time"];
|
||||
|
||||
$sql = "SELECT timestamp '{$start_ts}' > timestamp '{$end_ts}'";
|
||||
$isNextDay = $CC_DBC->GetOne($sql);
|
||||
|
||||
if($isNextDay === 't') {
|
||||
$sql = "SELECT date '{$date}' + interval '1 day {$show["end_time"]}'";
|
||||
$end_ts = $CC_DBC->GetOne($sql);
|
||||
}
|
||||
|
||||
$event = array(
|
||||
"id" => $show["show_id"],
|
||||
"title" => $show["name"],
|
||||
"start" => $start,
|
||||
"end" => $end,
|
||||
"start" => $start_ts,
|
||||
"end" => $end_ts,
|
||||
"allDay" => false,
|
||||
"description" => $show["description"]
|
||||
);
|
||||
|
@ -367,11 +378,8 @@ class Show {
|
|||
$event["isHost"] = true;
|
||||
}
|
||||
|
||||
$start = $date." ".$show["start_time"];
|
||||
$end = $date." ".$show["end_time"];
|
||||
if($this->showHasContent($start, $end)) {
|
||||
$event["hasContent"] = true;
|
||||
}
|
||||
$percent = Schedule::getPercentScheduledInRange($start_ts, $end_ts);
|
||||
$event["percent"] = $percent;
|
||||
|
||||
return $event;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,8 @@ class CcScheduleTableMap extends TableMap {
|
|||
$this->addColumn('FADE_OUT', 'DbFadeOut', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('CUE_IN', 'DbCueIn', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('CUE_OUT', 'DbCueOut', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('SCHEDULE_GROUP_PLAYED', 'DbScheduleGroupPlayed', 'BOOLEAN', false, null, false);
|
||||
$this->addColumn('MEDIA_ITEM_PLAYED', 'DbMediaItemPlayed', 'BOOLEAN', false, null, false);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
|
|
@ -95,6 +95,20 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $cue_out;
|
||||
|
||||
/**
|
||||
* The value for the schedule_group_played field.
|
||||
* Note: this column has a database default value of: false
|
||||
* @var boolean
|
||||
*/
|
||||
protected $schedule_group_played;
|
||||
|
||||
/**
|
||||
* The value for the media_item_played field.
|
||||
* Note: this column has a database default value of: false
|
||||
* @var boolean
|
||||
*/
|
||||
protected $media_item_played;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
|
@ -122,6 +136,8 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$this->fade_out = '00:00:00';
|
||||
$this->cue_in = '00:00:00';
|
||||
$this->cue_out = '00:00:00';
|
||||
$this->schedule_group_played = false;
|
||||
$this->media_item_played = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -405,6 +421,26 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [schedule_group_played] column value.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDbScheduleGroupPlayed()
|
||||
{
|
||||
return $this->schedule_group_played;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [media_item_played] column value.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDbMediaItemPlayed()
|
||||
{
|
||||
return $this->media_item_played;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
|
@ -833,6 +869,46 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbCueOut()
|
||||
|
||||
/**
|
||||
* Set the value of [schedule_group_played] column.
|
||||
*
|
||||
* @param boolean $v new value
|
||||
* @return CcSchedule The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbScheduleGroupPlayed($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (boolean) $v;
|
||||
}
|
||||
|
||||
if ($this->schedule_group_played !== $v || $this->isNew()) {
|
||||
$this->schedule_group_played = $v;
|
||||
$this->modifiedColumns[] = CcSchedulePeer::SCHEDULE_GROUP_PLAYED;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbScheduleGroupPlayed()
|
||||
|
||||
/**
|
||||
* Set the value of [media_item_played] column.
|
||||
*
|
||||
* @param boolean $v new value
|
||||
* @return CcSchedule The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbMediaItemPlayed($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (boolean) $v;
|
||||
}
|
||||
|
||||
if ($this->media_item_played !== $v || $this->isNew()) {
|
||||
$this->media_item_played = $v;
|
||||
$this->modifiedColumns[] = CcSchedulePeer::MEDIA_ITEM_PLAYED;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbMediaItemPlayed()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
|
@ -863,6 +939,14 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($this->schedule_group_played !== false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->media_item_played !== false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return TRUE
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
|
@ -896,6 +980,8 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$this->fade_out = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
|
||||
$this->cue_in = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
|
||||
$this->cue_out = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
|
||||
$this->schedule_group_played = ($row[$startcol + 11] !== null) ? (boolean) $row[$startcol + 11] : null;
|
||||
$this->media_item_played = ($row[$startcol + 12] !== null) ? (boolean) $row[$startcol + 12] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -904,7 +990,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 11; // 11 = CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 13; // 13 = CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcSchedule object", $e);
|
||||
|
@ -1228,6 +1314,12 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
case 10:
|
||||
return $this->getDbCueOut();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getDbScheduleGroupPlayed();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getDbMediaItemPlayed();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
|
@ -1262,6 +1354,8 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$keys[8] => $this->getDbFadeOut(),
|
||||
$keys[9] => $this->getDbCueIn(),
|
||||
$keys[10] => $this->getDbCueOut(),
|
||||
$keys[11] => $this->getDbScheduleGroupPlayed(),
|
||||
$keys[12] => $this->getDbMediaItemPlayed(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
|
@ -1326,6 +1420,12 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
case 10:
|
||||
$this->setDbCueOut($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setDbScheduleGroupPlayed($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setDbMediaItemPlayed($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
|
@ -1361,6 +1461,8 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
if (array_key_exists($keys[8], $arr)) $this->setDbFadeOut($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setDbCueIn($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setDbCueOut($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setDbScheduleGroupPlayed($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setDbMediaItemPlayed($arr[$keys[12]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1383,6 +1485,8 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcSchedulePeer::FADE_OUT)) $criteria->add(CcSchedulePeer::FADE_OUT, $this->fade_out);
|
||||
if ($this->isColumnModified(CcSchedulePeer::CUE_IN)) $criteria->add(CcSchedulePeer::CUE_IN, $this->cue_in);
|
||||
if ($this->isColumnModified(CcSchedulePeer::CUE_OUT)) $criteria->add(CcSchedulePeer::CUE_OUT, $this->cue_out);
|
||||
if ($this->isColumnModified(CcSchedulePeer::SCHEDULE_GROUP_PLAYED)) $criteria->add(CcSchedulePeer::SCHEDULE_GROUP_PLAYED, $this->schedule_group_played);
|
||||
if ($this->isColumnModified(CcSchedulePeer::MEDIA_ITEM_PLAYED)) $criteria->add(CcSchedulePeer::MEDIA_ITEM_PLAYED, $this->media_item_played);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
@ -1455,6 +1559,8 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$copyObj->setDbFadeOut($this->fade_out);
|
||||
$copyObj->setDbCueIn($this->cue_in);
|
||||
$copyObj->setDbCueOut($this->cue_out);
|
||||
$copyObj->setDbScheduleGroupPlayed($this->schedule_group_played);
|
||||
$copyObj->setDbMediaItemPlayed($this->media_item_played);
|
||||
|
||||
$copyObj->setNew(true);
|
||||
}
|
||||
|
@ -1513,6 +1619,8 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$this->fade_out = null;
|
||||
$this->cue_in = null;
|
||||
$this->cue_out = null;
|
||||
$this->schedule_group_played = null;
|
||||
$this->media_item_played = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->clearAllReferences();
|
||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcSchedulePeer {
|
|||
const TM_CLASS = 'CcScheduleTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 11;
|
||||
const NUM_COLUMNS = 13;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
@ -64,6 +64,12 @@ abstract class BaseCcSchedulePeer {
|
|||
/** the column name for the CUE_OUT field */
|
||||
const CUE_OUT = 'cc_schedule.CUE_OUT';
|
||||
|
||||
/** the column name for the SCHEDULE_GROUP_PLAYED field */
|
||||
const SCHEDULE_GROUP_PLAYED = 'cc_schedule.SCHEDULE_GROUP_PLAYED';
|
||||
|
||||
/** the column name for the MEDIA_ITEM_PLAYED field */
|
||||
const MEDIA_ITEM_PLAYED = 'cc_schedule.MEDIA_ITEM_PLAYED';
|
||||
|
||||
/**
|
||||
* An identiy map to hold any loaded instances of CcSchedule objects.
|
||||
* This must be public so that other peer classes can access this when hydrating from JOIN
|
||||
|
@ -80,12 +86,12 @@ abstract class BaseCcSchedulePeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbPlaylistId', 'DbStarts', 'DbEnds', 'DbGroupId', 'DbFileId', 'DbClipLength', 'DbFadeIn', 'DbFadeOut', 'DbCueIn', 'DbCueOut', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbPlaylistId', 'dbStarts', 'dbEnds', 'dbGroupId', 'dbFileId', 'dbClipLength', 'dbFadeIn', 'dbFadeOut', 'dbCueIn', 'dbCueOut', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::PLAYLIST_ID, self::STARTS, self::ENDS, self::GROUP_ID, self::FILE_ID, self::CLIP_LENGTH, self::FADE_IN, self::FADE_OUT, self::CUE_IN, self::CUE_OUT, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'PLAYLIST_ID', 'STARTS', 'ENDS', 'GROUP_ID', 'FILE_ID', 'CLIP_LENGTH', 'FADE_IN', 'FADE_OUT', 'CUE_IN', 'CUE_OUT', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'playlist_id', 'starts', 'ends', 'group_id', 'file_id', 'clip_length', 'fade_in', 'fade_out', 'cue_in', 'cue_out', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbPlaylistId', 'DbStarts', 'DbEnds', 'DbGroupId', 'DbFileId', 'DbClipLength', 'DbFadeIn', 'DbFadeOut', 'DbCueIn', 'DbCueOut', 'DbScheduleGroupPlayed', 'DbMediaItemPlayed', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbPlaylistId', 'dbStarts', 'dbEnds', 'dbGroupId', 'dbFileId', 'dbClipLength', 'dbFadeIn', 'dbFadeOut', 'dbCueIn', 'dbCueOut', 'dbScheduleGroupPlayed', 'dbMediaItemPlayed', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::PLAYLIST_ID, self::STARTS, self::ENDS, self::GROUP_ID, self::FILE_ID, self::CLIP_LENGTH, self::FADE_IN, self::FADE_OUT, self::CUE_IN, self::CUE_OUT, self::SCHEDULE_GROUP_PLAYED, self::MEDIA_ITEM_PLAYED, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'PLAYLIST_ID', 'STARTS', 'ENDS', 'GROUP_ID', 'FILE_ID', 'CLIP_LENGTH', 'FADE_IN', 'FADE_OUT', 'CUE_IN', 'CUE_OUT', 'SCHEDULE_GROUP_PLAYED', 'MEDIA_ITEM_PLAYED', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'playlist_id', 'starts', 'ends', 'group_id', 'file_id', 'clip_length', 'fade_in', 'fade_out', 'cue_in', 'cue_out', 'schedule_group_played', 'media_item_played', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -95,12 +101,12 @@ abstract class BaseCcSchedulePeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbPlaylistId' => 1, 'DbStarts' => 2, 'DbEnds' => 3, 'DbGroupId' => 4, 'DbFileId' => 5, 'DbClipLength' => 6, 'DbFadeIn' => 7, 'DbFadeOut' => 8, 'DbCueIn' => 9, 'DbCueOut' => 10, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbPlaylistId' => 1, 'dbStarts' => 2, 'dbEnds' => 3, 'dbGroupId' => 4, 'dbFileId' => 5, 'dbClipLength' => 6, 'dbFadeIn' => 7, 'dbFadeOut' => 8, 'dbCueIn' => 9, 'dbCueOut' => 10, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::PLAYLIST_ID => 1, self::STARTS => 2, self::ENDS => 3, self::GROUP_ID => 4, self::FILE_ID => 5, self::CLIP_LENGTH => 6, self::FADE_IN => 7, self::FADE_OUT => 8, self::CUE_IN => 9, self::CUE_OUT => 10, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'PLAYLIST_ID' => 1, 'STARTS' => 2, 'ENDS' => 3, 'GROUP_ID' => 4, 'FILE_ID' => 5, 'CLIP_LENGTH' => 6, 'FADE_IN' => 7, 'FADE_OUT' => 8, 'CUE_IN' => 9, 'CUE_OUT' => 10, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'playlist_id' => 1, 'starts' => 2, 'ends' => 3, 'group_id' => 4, 'file_id' => 5, 'clip_length' => 6, 'fade_in' => 7, 'fade_out' => 8, 'cue_in' => 9, 'cue_out' => 10, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbPlaylistId' => 1, 'DbStarts' => 2, 'DbEnds' => 3, 'DbGroupId' => 4, 'DbFileId' => 5, 'DbClipLength' => 6, 'DbFadeIn' => 7, 'DbFadeOut' => 8, 'DbCueIn' => 9, 'DbCueOut' => 10, 'DbScheduleGroupPlayed' => 11, 'DbMediaItemPlayed' => 12, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbPlaylistId' => 1, 'dbStarts' => 2, 'dbEnds' => 3, 'dbGroupId' => 4, 'dbFileId' => 5, 'dbClipLength' => 6, 'dbFadeIn' => 7, 'dbFadeOut' => 8, 'dbCueIn' => 9, 'dbCueOut' => 10, 'dbScheduleGroupPlayed' => 11, 'dbMediaItemPlayed' => 12, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::PLAYLIST_ID => 1, self::STARTS => 2, self::ENDS => 3, self::GROUP_ID => 4, self::FILE_ID => 5, self::CLIP_LENGTH => 6, self::FADE_IN => 7, self::FADE_OUT => 8, self::CUE_IN => 9, self::CUE_OUT => 10, self::SCHEDULE_GROUP_PLAYED => 11, self::MEDIA_ITEM_PLAYED => 12, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'PLAYLIST_ID' => 1, 'STARTS' => 2, 'ENDS' => 3, 'GROUP_ID' => 4, 'FILE_ID' => 5, 'CLIP_LENGTH' => 6, 'FADE_IN' => 7, 'FADE_OUT' => 8, 'CUE_IN' => 9, 'CUE_OUT' => 10, 'SCHEDULE_GROUP_PLAYED' => 11, 'MEDIA_ITEM_PLAYED' => 12, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'playlist_id' => 1, 'starts' => 2, 'ends' => 3, 'group_id' => 4, 'file_id' => 5, 'clip_length' => 6, 'fade_in' => 7, 'fade_out' => 8, 'cue_in' => 9, 'cue_out' => 10, 'schedule_group_played' => 11, 'media_item_played' => 12, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -183,6 +189,8 @@ abstract class BaseCcSchedulePeer {
|
|||
$criteria->addSelectColumn(CcSchedulePeer::FADE_OUT);
|
||||
$criteria->addSelectColumn(CcSchedulePeer::CUE_IN);
|
||||
$criteria->addSelectColumn(CcSchedulePeer::CUE_OUT);
|
||||
$criteria->addSelectColumn(CcSchedulePeer::SCHEDULE_GROUP_PLAYED);
|
||||
$criteria->addSelectColumn(CcSchedulePeer::MEDIA_ITEM_PLAYED);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.PLAYLIST_ID');
|
||||
|
@ -195,6 +203,8 @@ abstract class BaseCcSchedulePeer {
|
|||
$criteria->addSelectColumn($alias . '.FADE_OUT');
|
||||
$criteria->addSelectColumn($alias . '.CUE_IN');
|
||||
$criteria->addSelectColumn($alias . '.CUE_OUT');
|
||||
$criteria->addSelectColumn($alias . '.SCHEDULE_GROUP_PLAYED');
|
||||
$criteria->addSelectColumn($alias . '.MEDIA_ITEM_PLAYED');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* @method CcScheduleQuery orderByDbFadeOut($order = Criteria::ASC) Order by the fade_out column
|
||||
* @method CcScheduleQuery orderByDbCueIn($order = Criteria::ASC) Order by the cue_in column
|
||||
* @method CcScheduleQuery orderByDbCueOut($order = Criteria::ASC) Order by the cue_out column
|
||||
* @method CcScheduleQuery orderByDbScheduleGroupPlayed($order = Criteria::ASC) Order by the schedule_group_played column
|
||||
* @method CcScheduleQuery orderByDbMediaItemPlayed($order = Criteria::ASC) Order by the media_item_played column
|
||||
*
|
||||
* @method CcScheduleQuery groupByDbId() Group by the id column
|
||||
* @method CcScheduleQuery groupByDbPlaylistId() Group by the playlist_id column
|
||||
|
@ -29,6 +31,8 @@
|
|||
* @method CcScheduleQuery groupByDbFadeOut() Group by the fade_out column
|
||||
* @method CcScheduleQuery groupByDbCueIn() Group by the cue_in column
|
||||
* @method CcScheduleQuery groupByDbCueOut() Group by the cue_out column
|
||||
* @method CcScheduleQuery groupByDbScheduleGroupPlayed() Group by the schedule_group_played column
|
||||
* @method CcScheduleQuery groupByDbMediaItemPlayed() Group by the media_item_played column
|
||||
*
|
||||
* @method CcScheduleQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method CcScheduleQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
|
@ -48,6 +52,8 @@
|
|||
* @method CcSchedule findOneByDbFadeOut(string $fade_out) Return the first CcSchedule filtered by the fade_out column
|
||||
* @method CcSchedule findOneByDbCueIn(string $cue_in) Return the first CcSchedule filtered by the cue_in column
|
||||
* @method CcSchedule findOneByDbCueOut(string $cue_out) Return the first CcSchedule filtered by the cue_out column
|
||||
* @method CcSchedule findOneByDbScheduleGroupPlayed(boolean $schedule_group_played) Return the first CcSchedule filtered by the schedule_group_played column
|
||||
* @method CcSchedule findOneByDbMediaItemPlayed(boolean $media_item_played) Return the first CcSchedule filtered by the media_item_played column
|
||||
*
|
||||
* @method array findByDbId(string $id) Return CcSchedule objects filtered by the id column
|
||||
* @method array findByDbPlaylistId(int $playlist_id) Return CcSchedule objects filtered by the playlist_id column
|
||||
|
@ -60,6 +66,8 @@
|
|||
* @method array findByDbFadeOut(string $fade_out) Return CcSchedule objects filtered by the fade_out column
|
||||
* @method array findByDbCueIn(string $cue_in) Return CcSchedule objects filtered by the cue_in column
|
||||
* @method array findByDbCueOut(string $cue_out) Return CcSchedule objects filtered by the cue_out column
|
||||
* @method array findByDbScheduleGroupPlayed(boolean $schedule_group_played) Return CcSchedule objects filtered by the schedule_group_played column
|
||||
* @method array findByDbMediaItemPlayed(boolean $media_item_played) Return CcSchedule objects filtered by the media_item_played column
|
||||
*
|
||||
* @package propel.generator.campcaster.om
|
||||
*/
|
||||
|
@ -496,6 +504,40 @@ abstract class BaseCcScheduleQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcSchedulePeer::CUE_OUT, $dbCueOut, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the schedule_group_played column
|
||||
*
|
||||
* @param boolean|string $dbScheduleGroupPlayed The value to use as filter.
|
||||
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcScheduleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbScheduleGroupPlayed($dbScheduleGroupPlayed = null, $comparison = null)
|
||||
{
|
||||
if (is_string($dbScheduleGroupPlayed)) {
|
||||
$schedule_group_played = in_array(strtolower($dbScheduleGroupPlayed), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
|
||||
}
|
||||
return $this->addUsingAlias(CcSchedulePeer::SCHEDULE_GROUP_PLAYED, $dbScheduleGroupPlayed, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the media_item_played column
|
||||
*
|
||||
* @param boolean|string $dbMediaItemPlayed The value to use as filter.
|
||||
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcScheduleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbMediaItemPlayed($dbMediaItemPlayed = null, $comparison = null)
|
||||
{
|
||||
if (is_string($dbMediaItemPlayed)) {
|
||||
$media_item_played = in_array(strtolower($dbMediaItemPlayed), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
|
||||
}
|
||||
return $this->addUsingAlias(CcSchedulePeer::MEDIA_ITEM_PLAYED, $dbMediaItemPlayed, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
|
|
|
@ -272,11 +272,28 @@ function eventRender(event, element, view) {
|
|||
// content: event.description
|
||||
// });
|
||||
|
||||
if(event.hasContent) {
|
||||
var span = $('<span/>').addClass("ui-icon ui-icon-check");
|
||||
$(element).find(".fc-event-title").after(span);
|
||||
}
|
||||
|
||||
if(view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
||||
var div = $('<div/>');
|
||||
div
|
||||
.height('5px')
|
||||
.width('100px')
|
||||
.css('margin-top', '5px')
|
||||
.progressbar({
|
||||
value: event.percent
|
||||
});
|
||||
|
||||
if(event.percent === 0) {
|
||||
// even at 0, the bar still seems to display a little bit of progress...
|
||||
div.find("div").hide();
|
||||
}
|
||||
else {
|
||||
div.find("div")
|
||||
.removeClass("ui-widget-header")
|
||||
.addClass("ui-state-active");
|
||||
}
|
||||
|
||||
$(element).find(".fc-event-title").after(div);
|
||||
}
|
||||
}
|
||||
|
||||
function eventAfterRender( event, element, view ) {
|
||||
|
|
Loading…
Reference in New Issue