From 328c1f3caccc75e751325dbdc9a56adf8690c20b Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 3 Jul 2013 15:19:05 -0400 Subject: [PATCH 001/181] IM-733 Create Development timetable for Airtime Development IM-777 Database structure for new History Feature --- .../configs/classmap-airtime-conf.php | 42 + .../application/controllers/ApiController.php | 3 + .../application/models/airtime/CcFileTag.php | 18 + .../models/airtime/CcFileTagPeer.php | 18 + .../models/airtime/CcFileTagQuery.php | 18 + .../models/airtime/CcPlayoutHistory.php | 18 + .../airtime/CcPlayoutHistoryMetaData.php | 18 + .../airtime/CcPlayoutHistoryMetaDataPeer.php | 18 + .../airtime/CcPlayoutHistoryMetaDataQuery.php | 18 + .../models/airtime/CcPlayoutHistoryPeer.php | 18 + .../models/airtime/CcPlayoutHistoryQuery.php | 18 + .../airtime/CcPlayoutHistoryTemplate.php | 18 + .../airtime/CcPlayoutHistoryTemplatePeer.php | 18 + .../airtime/CcPlayoutHistoryTemplateQuery.php | 18 + .../airtime/CcPlayoutHistoryTemplateTag.php | 18 + .../CcPlayoutHistoryTemplateTagPeer.php | 18 + .../CcPlayoutHistoryTemplateTagQuery.php | 18 + .../application/models/airtime/CcTag.php | 18 + .../application/models/airtime/CcTagPeer.php | 18 + .../application/models/airtime/CcTagQuery.php | 18 + .../models/airtime/map/CcFileTagTableMap.php | 56 + .../models/airtime/map/CcFilesTableMap.php | 2 + .../map/CcPlayoutHistoryMetaDataTableMap.php | 56 + .../airtime/map/CcPlayoutHistoryTableMap.php | 57 + .../map/CcPlayoutHistoryTemplateTableMap.php | 54 + .../CcPlayoutHistoryTemplateTagTableMap.php | 56 + .../models/airtime/map/CcTagTableMap.php | 55 + .../models/airtime/om/BaseCcFileTag.php | 936 +++++++++++ .../models/airtime/om/BaseCcFileTagPeer.php | 1365 +++++++++++++++++ .../models/airtime/om/BaseCcFileTagQuery.php | 371 +++++ .../models/airtime/om/BaseCcFiles.php | 313 ++++ .../models/airtime/om/BaseCcFilesPeer.php | 6 + .../models/airtime/om/BaseCcFilesQuery.php | 136 ++ .../airtime/om/BaseCcPlayoutHistory.php | 1161 ++++++++++++++ .../om/BaseCcPlayoutHistoryMetaData.php | 905 +++++++++++ .../om/BaseCcPlayoutHistoryMetaDataPeer.php | 983 ++++++++++++ .../om/BaseCcPlayoutHistoryMetaDataQuery.php | 320 ++++ .../airtime/om/BaseCcPlayoutHistoryPeer.php | 986 ++++++++++++ .../airtime/om/BaseCcPlayoutHistoryQuery.php | 406 +++++ .../om/BaseCcPlayoutHistoryTemplate.php | 893 +++++++++++ .../om/BaseCcPlayoutHistoryTemplatePeer.php | 742 +++++++++ .../om/BaseCcPlayoutHistoryTemplateQuery.php | 259 ++++ .../om/BaseCcPlayoutHistoryTemplateTag.php | 936 +++++++++++ .../BaseCcPlayoutHistoryTemplateTagPeer.php | 1365 +++++++++++++++++ .../BaseCcPlayoutHistoryTemplateTagQuery.php | 371 +++++ .../models/airtime/om/BaseCcTag.php | 1062 +++++++++++++ .../models/airtime/om/BaseCcTagPeer.php | 745 +++++++++ .../models/airtime/om/BaseCcTagQuery.php | 327 ++++ .../application/services/HistoryService.php | 64 + airtime_mvc/build/schema.xml | 48 + airtime_mvc/build/sql/schema.sql | 126 ++ 51 files changed, 15531 insertions(+) create mode 100644 airtime_mvc/application/models/airtime/CcFileTag.php create mode 100644 airtime_mvc/application/models/airtime/CcFileTagPeer.php create mode 100644 airtime_mvc/application/models/airtime/CcFileTagQuery.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistory.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaDataPeer.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaDataQuery.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryPeer.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryQuery.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplate.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplatePeer.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplateQuery.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplateTag.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplateTagPeer.php create mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplateTagQuery.php create mode 100644 airtime_mvc/application/models/airtime/CcTag.php create mode 100644 airtime_mvc/application/models/airtime/CcTagPeer.php create mode 100644 airtime_mvc/application/models/airtime/CcTagQuery.php create mode 100644 airtime_mvc/application/models/airtime/map/CcFileTagTableMap.php create mode 100644 airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php create mode 100644 airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php create mode 100644 airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTableMap.php create mode 100644 airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php create mode 100644 airtime_mvc/application/models/airtime/map/CcTagTableMap.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcFileTag.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcFileTagPeer.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcFileTagQuery.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplate.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplatePeer.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateQuery.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcTag.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php create mode 100644 airtime_mvc/application/services/HistoryService.php diff --git a/airtime_mvc/application/configs/classmap-airtime-conf.php b/airtime_mvc/application/configs/classmap-airtime-conf.php index ef0357425..dcd839f7d 100644 --- a/airtime_mvc/application/configs/classmap-airtime-conf.php +++ b/airtime_mvc/application/configs/classmap-airtime-conf.php @@ -204,4 +204,46 @@ return array ( 'BaseCcLocalePeer' => 'airtime/om/BaseCcLocalePeer.php', 'BaseCcLocale' => 'airtime/om/BaseCcLocale.php', 'BaseCcLocaleQuery' => 'airtime/om/BaseCcLocaleQuery.php', + 'CcTagTableMap' => 'airtime/map/CcTagTableMap.php', + 'CcTagPeer' => 'airtime/CcTagPeer.php', + 'CcTag' => 'airtime/CcTag.php', + 'CcTagQuery' => 'airtime/CcTagQuery.php', + 'BaseCcTagPeer' => 'airtime/om/BaseCcTagPeer.php', + 'BaseCcTag' => 'airtime/om/BaseCcTag.php', + 'BaseCcTagQuery' => 'airtime/om/BaseCcTagQuery.php', + 'CcFileTagTableMap' => 'airtime/map/CcFileTagTableMap.php', + 'CcFileTagPeer' => 'airtime/CcFileTagPeer.php', + 'CcFileTag' => 'airtime/CcFileTag.php', + 'CcFileTagQuery' => 'airtime/CcFileTagQuery.php', + 'BaseCcFileTagPeer' => 'airtime/om/BaseCcFileTagPeer.php', + 'BaseCcFileTag' => 'airtime/om/BaseCcFileTag.php', + 'BaseCcFileTagQuery' => 'airtime/om/BaseCcFileTagQuery.php', + 'CcPlayoutHistoryTableMap' => 'airtime/map/CcPlayoutHistoryTableMap.php', + 'CcPlayoutHistoryPeer' => 'airtime/CcPlayoutHistoryPeer.php', + 'CcPlayoutHistory' => 'airtime/CcPlayoutHistory.php', + 'CcPlayoutHistoryQuery' => 'airtime/CcPlayoutHistoryQuery.php', + 'BaseCcPlayoutHistoryPeer' => 'airtime/om/BaseCcPlayoutHistoryPeer.php', + 'BaseCcPlayoutHistory' => 'airtime/om/BaseCcPlayoutHistory.php', + 'BaseCcPlayoutHistoryQuery' => 'airtime/om/BaseCcPlayoutHistoryQuery.php', + 'CcPlayoutHistoryMetaDataTableMap' => 'airtime/map/CcPlayoutHistoryMetaDataTableMap.php', + 'CcPlayoutHistoryMetaDataPeer' => 'airtime/CcPlayoutHistoryMetaDataPeer.php', + 'CcPlayoutHistoryMetaData' => 'airtime/CcPlayoutHistoryMetaData.php', + 'CcPlayoutHistoryMetaDataQuery' => 'airtime/CcPlayoutHistoryMetaDataQuery.php', + 'BaseCcPlayoutHistoryMetaDataPeer' => 'airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php', + 'BaseCcPlayoutHistoryMetaData' => 'airtime/om/BaseCcPlayoutHistoryMetaData.php', + 'BaseCcPlayoutHistoryMetaDataQuery' => 'airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php', + 'CcPlayoutHistoryTemplateTableMap' => 'airtime/map/CcPlayoutHistoryTemplateTableMap.php', + 'CcPlayoutHistoryTemplatePeer' => 'airtime/CcPlayoutHistoryTemplatePeer.php', + 'CcPlayoutHistoryTemplate' => 'airtime/CcPlayoutHistoryTemplate.php', + 'CcPlayoutHistoryTemplateQuery' => 'airtime/CcPlayoutHistoryTemplateQuery.php', + 'BaseCcPlayoutHistoryTemplatePeer' => 'airtime/om/BaseCcPlayoutHistoryTemplatePeer.php', + 'BaseCcPlayoutHistoryTemplate' => 'airtime/om/BaseCcPlayoutHistoryTemplate.php', + 'BaseCcPlayoutHistoryTemplateQuery' => 'airtime/om/BaseCcPlayoutHistoryTemplateQuery.php', + 'CcPlayoutHistoryTemplateTagTableMap' => 'airtime/map/CcPlayoutHistoryTemplateTagTableMap.php', + 'CcPlayoutHistoryTemplateTagPeer' => 'airtime/CcPlayoutHistoryTemplateTagPeer.php', + 'CcPlayoutHistoryTemplateTag' => 'airtime/CcPlayoutHistoryTemplateTag.php', + 'CcPlayoutHistoryTemplateTagQuery' => 'airtime/CcPlayoutHistoryTemplateTagQuery.php', + 'BaseCcPlayoutHistoryTemplateTagPeer' => 'airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php', + 'BaseCcPlayoutHistoryTemplateTag' => 'airtime/om/BaseCcPlayoutHistoryTemplateTag.php', + 'BaseCcPlayoutHistoryTemplateTagQuery' => 'airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php', ); \ No newline at end of file diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 63c24d14a..cc01e65a0 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -363,6 +363,9 @@ class ApiController extends Zend_Controller_Action $media_id = $this->_getParam("media_id"); Logging::debug("Received notification of new media item start: $media_id"); Application_Model_Schedule::UpdateMediaPlayedStatus($media_id); + + $historyService = new Application_Service_HistoryService(); + $historyService->insertPlayedItem($media_id); //set a 'last played' timestamp for media item //needed for smart blocks diff --git a/airtime_mvc/application/models/airtime/CcFileTag.php b/airtime_mvc/application/models/airtime/CcFileTag.php new file mode 100644 index 000000000..535b66372 --- /dev/null +++ b/airtime_mvc/application/models/airtime/CcFileTag.php @@ -0,0 +1,18 @@ +setName('cc_file_tag'); + $this->setPhpName('CcFileTag'); + $this->setClassname('CcFileTag'); + $this->setPackage('airtime'); + $this->setUseIdGenerator(true); + $this->setPrimaryKeyMethodInfo('cc_file_tag_id_seq'); + // columns + $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); + $this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', true, null, null); + $this->addForeignKey('TAG_ID', 'DbTagId', 'INTEGER', 'cc_tag', 'ID', true, null, null); + // validators + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcTag', 'CcTag', RelationMap::MANY_TO_ONE, array('tag_id' => 'id', ), 'CASCADE', null); + } // buildRelations() + +} // CcFileTagTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php index 56e7a5fff..5a066e96a 100644 --- a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php @@ -123,6 +123,8 @@ class CcFilesTableMap extends TableMap { $this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null); $this->addRelation('CcBlockcontents', 'CcBlockcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null); $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null); + $this->addRelation('CcFileTag', 'CcFileTag', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null); + $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null); } // buildRelations() } // CcFilesTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php new file mode 100644 index 000000000..8e937f6e5 --- /dev/null +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php @@ -0,0 +1,56 @@ +setName('cc_playout_history_metadata'); + $this->setPhpName('CcPlayoutHistoryMetaData'); + $this->setClassname('CcPlayoutHistoryMetaData'); + $this->setPackage('airtime'); + $this->setUseIdGenerator(true); + $this->setPrimaryKeyMethodInfo('cc_playout_history_metadata_id_seq'); + // columns + $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); + $this->addForeignKey('HISTORY_ID', 'DbHistoryId', 'INTEGER', 'cc_playout_history', 'ID', true, null, null); + $this->addColumn('KEY', 'DbKey', 'VARCHAR', true, 128, null); + $this->addColumn('VALUE', 'DbValue', 'VARCHAR', true, 128, null); + // validators + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::MANY_TO_ONE, array('history_id' => 'id', ), 'CASCADE', null); + } // buildRelations() + +} // CcPlayoutHistoryMetaDataTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php new file mode 100644 index 000000000..87a005168 --- /dev/null +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php @@ -0,0 +1,57 @@ +setName('cc_playout_history'); + $this->setPhpName('CcPlayoutHistory'); + $this->setClassname('CcPlayoutHistory'); + $this->setPackage('airtime'); + $this->setUseIdGenerator(true); + $this->setPrimaryKeyMethodInfo('cc_playout_history_id_seq'); + // columns + $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); + $this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null); + $this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null); + $this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null); + // validators + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', null); + } // buildRelations() + +} // CcPlayoutHistoryTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTableMap.php new file mode 100644 index 000000000..e62fe8a42 --- /dev/null +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTableMap.php @@ -0,0 +1,54 @@ +setName('cc_playout_history_template'); + $this->setPhpName('CcPlayoutHistoryTemplate'); + $this->setClassname('CcPlayoutHistoryTemplate'); + $this->setPackage('airtime'); + $this->setUseIdGenerator(true); + $this->setPrimaryKeyMethodInfo('cc_playout_history_template_id_seq'); + // columns + $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); + $this->addColumn('TEMPLATE_NAME', 'DbTemplateName', 'VARCHAR', true, 128, null); + // validators + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CcPlayoutHistoryTemplateTag', 'CcPlayoutHistoryTemplateTag', RelationMap::ONE_TO_MANY, array('id' => 'template_id', ), 'CASCADE', null); + } // buildRelations() + +} // CcPlayoutHistoryTemplateTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php new file mode 100644 index 000000000..f4b18104f --- /dev/null +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php @@ -0,0 +1,56 @@ +setName('cc_playout_history_template_tag'); + $this->setPhpName('CcPlayoutHistoryTemplateTag'); + $this->setClassname('CcPlayoutHistoryTemplateTag'); + $this->setPackage('airtime'); + $this->setUseIdGenerator(true); + $this->setPrimaryKeyMethodInfo('cc_playout_history_template_tag_id_seq'); + // columns + $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); + $this->addForeignKey('TEMPLATE_ID', 'DbTemplateId', 'INTEGER', 'cc_playout_history_template', 'ID', true, null, null); + $this->addForeignKey('TAG_ID', 'DbTagId', 'INTEGER', 'cc_tag', 'ID', true, null, null); + // validators + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplate', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcTag', 'CcTag', RelationMap::MANY_TO_ONE, array('tag_id' => 'id', ), 'CASCADE', null); + } // buildRelations() + +} // CcPlayoutHistoryTemplateTagTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcTagTableMap.php b/airtime_mvc/application/models/airtime/map/CcTagTableMap.php new file mode 100644 index 000000000..b9934edf6 --- /dev/null +++ b/airtime_mvc/application/models/airtime/map/CcTagTableMap.php @@ -0,0 +1,55 @@ +setName('cc_tag'); + $this->setPhpName('CcTag'); + $this->setClassname('CcTag'); + $this->setPackage('airtime'); + $this->setUseIdGenerator(true); + $this->setPrimaryKeyMethodInfo('cc_tag_id_seq'); + // columns + $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); + $this->addColumn('TAG_NAME', 'DbTagName', 'VARCHAR', true, 128, null); + // validators + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CcFileTag', 'CcFileTag', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', null); + $this->addRelation('CcPlayoutHistoryTemplateTag', 'CcPlayoutHistoryTemplateTag', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', null); + } // buildRelations() + +} // CcTagTableMap diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFileTag.php b/airtime_mvc/application/models/airtime/om/BaseCcFileTag.php new file mode 100644 index 000000000..eea6b63e0 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcFileTag.php @@ -0,0 +1,936 @@ +id; + } + + /** + * Get the [file_id] column value. + * + * @return int + */ + public function getDbFileId() + { + return $this->file_id; + } + + /** + * Get the [tag_id] column value. + * + * @return int + */ + public function getDbTagId() + { + return $this->tag_id; + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return CcFileTag The current object (for fluent API support) + */ + public function setDbId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[] = CcFileTagPeer::ID; + } + + return $this; + } // setDbId() + + /** + * Set the value of [file_id] column. + * + * @param int $v new value + * @return CcFileTag The current object (for fluent API support) + */ + public function setDbFileId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->file_id !== $v) { + $this->file_id = $v; + $this->modifiedColumns[] = CcFileTagPeer::FILE_ID; + } + + if ($this->aCcFiles !== null && $this->aCcFiles->getDbId() !== $v) { + $this->aCcFiles = null; + } + + return $this; + } // setDbFileId() + + /** + * Set the value of [tag_id] column. + * + * @param int $v new value + * @return CcFileTag The current object (for fluent API support) + */ + public function setDbTagId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->tag_id !== $v) { + $this->tag_id = $v; + $this->modifiedColumns[] = CcFileTagPeer::TAG_ID; + } + + if ($this->aCcTag !== null && $this->aCcTag->getDbId() !== $v) { + $this->aCcTag = null; + } + + return $this; + } // setDbTagId() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false) + { + try { + + $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; + $this->file_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; + $this->tag_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 3; // 3 = CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS). + + } catch (Exception $e) { + throw new PropelException("Error populating CcFileTag object", $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + + if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) { + $this->aCcFiles = null; + } + if ($this->aCcTag !== null && $this->tag_id !== $this->aCcTag->getDbId()) { + $this->aCcTag = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param PropelPDO $con (optional) The PropelPDO connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $stmt = CcFileTagPeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $row = $stmt->fetch(PDO::FETCH_NUM); + $stmt->closeCursor(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCcFiles = null; + $this->aCcTag = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param PropelPDO $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() + */ + public function delete(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + try { + $ret = $this->preDelete($con); + if ($ret) { + CcFileTagQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()) + ->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CcFileTagPeer::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(PropelPDO $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their coresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCcFiles !== null) { + if ($this->aCcFiles->isModified() || $this->aCcFiles->isNew()) { + $affectedRows += $this->aCcFiles->save($con); + } + $this->setCcFiles($this->aCcFiles); + } + + if ($this->aCcTag !== null) { + if ($this->aCcTag->isModified() || $this->aCcTag->isNew()) { + $affectedRows += $this->aCcTag->save($con); + } + $this->setCcTag($this->aCcTag); + } + + if ($this->isNew() ) { + $this->modifiedColumns[] = CcFileTagPeer::ID; + } + + // If this object has been modified, then save it to the database. + if ($this->isModified()) { + if ($this->isNew()) { + $criteria = $this->buildCriteria(); + if ($criteria->keyContainsValue(CcFileTagPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcFileTagPeer::ID.')'); + } + + $pk = BasePeer::doInsert($criteria, $con); + $affectedRows += 1; + $this->setDbId($pk); //[IMV] update autoincrement primary key + $this->setNew(false); + } else { + $affectedRows += CcFileTagPeer::doUpdate($this, $con); + } + + $this->resetModified(); // [HL] After being saved an object is no longer 'modified' + } + + $this->alreadyInSave = false; + + } + return $affectedRows; + } // doSave() + + /** + * Array of ValidationFailed objects. + * @var array ValidationFailed[] + */ + protected $validationFailures = array(); + + /** + * Gets any ValidationFailed objects that resulted from last call to validate(). + * + * + * @return array ValidationFailed[] + * @see validate() + */ + public function getValidationFailures() + { + return $this->validationFailures; + } + + /** + * Validates the objects modified field values and all objects related to this table. + * + * If $columns is either a column name or an array of column names + * only those columns are validated. + * + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() + */ + public function validate($columns = null) + { + $res = $this->doValidate($columns); + if ($res === true) { + $this->validationFailures = array(); + return true; + } else { + $this->validationFailures = $res; + return false; + } + } + + /** + * This function performs the validation work for complex object models. + * + * In addition to checking the current object, all related objects will + * also be validated. If all pass then true is returned; otherwise + * an aggreagated array of ValidationFailed objects will be returned. + * + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. + */ + protected function doValidate($columns = null) + { + if (!$this->alreadyInValidation) { + $this->alreadyInValidation = true; + $retval = null; + + $failureMap = array(); + + + // We call the validate method on the following object(s) if they + // were passed to this object by their coresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCcFiles !== null) { + if (!$this->aCcFiles->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcFiles->getValidationFailures()); + } + } + + if ($this->aCcTag !== null) { + if (!$this->aCcTag->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcTag->getValidationFailures()); + } + } + + + if (($retval = CcFileTagPeer::doValidate($this, $columns)) !== true) { + $failureMap = array_merge($failureMap, $retval); + } + + + + $this->alreadyInValidation = false; + } + + return (!empty($failureMap) ? $failureMap : true); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return mixed Value of field. + */ + public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcFileTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $field = $this->getByPosition($pos); + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch($pos) { + case 0: + return $this->getDbId(); + break; + case 1: + return $this->getDbFileId(); + break; + case 2: + return $this->getDbTagId(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * Defaults to BasePeer::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false) + { + $keys = CcFileTagPeer::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getDbId(), + $keys[1] => $this->getDbFileId(), + $keys[2] => $this->getDbTagId(), + ); + if ($includeForeignObjects) { + if (null !== $this->aCcFiles) { + $result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true); + } + if (null !== $this->aCcTag) { + $result['CcTag'] = $this->aCcTag->toArray($keyType, $includeLazyLoadColumns, true); + } + } + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return void + */ + public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcFileTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch($pos) { + case 0: + $this->setDbId($value); + break; + case 1: + $this->setDbFileId($value); + break; + case 2: + $this->setDbTagId($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * The default key type is the column's phpname (e.g. 'AuthorId') + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + { + $keys = CcFileTagPeer::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setDbFileId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setDbTagId($arr[$keys[2]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CcFileTagPeer::DATABASE_NAME); + + if ($this->isColumnModified(CcFileTagPeer::ID)) $criteria->add(CcFileTagPeer::ID, $this->id); + if ($this->isColumnModified(CcFileTagPeer::FILE_ID)) $criteria->add(CcFileTagPeer::FILE_ID, $this->file_id); + if ($this->isColumnModified(CcFileTagPeer::TAG_ID)) $criteria->add(CcFileTagPeer::TAG_ID, $this->tag_id); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CcFileTagPeer::DATABASE_NAME); + $criteria->add(CcFileTagPeer::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getDbId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setDbId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + return null === $this->getDbId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of CcFileTag (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false) + { + $copyObj->setDbFileId($this->file_id); + $copyObj->setDbTagId($this->tag_id); + + $copyObj->setNew(true); + $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return CcFileTag Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + return $copyObj; + } + + /** + * Returns a peer instance associated with this om. + * + * Since Peer classes are not to have any instance attributes, this method returns the + * same instance for all member of this class. The method could therefore + * be static, but this would prevent one from overriding the behavior. + * + * @return CcFileTagPeer + */ + public function getPeer() + { + if (self::$peer === null) { + self::$peer = new CcFileTagPeer(); + } + return self::$peer; + } + + /** + * Declares an association between this object and a CcFiles object. + * + * @param CcFiles $v + * @return CcFileTag The current object (for fluent API support) + * @throws PropelException + */ + public function setCcFiles(CcFiles $v = null) + { + if ($v === null) { + $this->setDbFileId(NULL); + } else { + $this->setDbFileId($v->getDbId()); + } + + $this->aCcFiles = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the CcFiles object, it will not be re-added. + if ($v !== null) { + $v->addCcFileTag($this); + } + + return $this; + } + + + /** + * Get the associated CcFiles object + * + * @param PropelPDO Optional Connection object. + * @return CcFiles The associated CcFiles object. + * @throws PropelException + */ + public function getCcFiles(PropelPDO $con = null) + { + if ($this->aCcFiles === null && ($this->file_id !== null)) { + $this->aCcFiles = CcFilesQuery::create()->findPk($this->file_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCcFiles->addCcFileTags($this); + */ + } + return $this->aCcFiles; + } + + /** + * Declares an association between this object and a CcTag object. + * + * @param CcTag $v + * @return CcFileTag The current object (for fluent API support) + * @throws PropelException + */ + public function setCcTag(CcTag $v = null) + { + if ($v === null) { + $this->setDbTagId(NULL); + } else { + $this->setDbTagId($v->getDbId()); + } + + $this->aCcTag = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the CcTag object, it will not be re-added. + if ($v !== null) { + $v->addCcFileTag($this); + } + + return $this; + } + + + /** + * Get the associated CcTag object + * + * @param PropelPDO Optional Connection object. + * @return CcTag The associated CcTag object. + * @throws PropelException + */ + public function getCcTag(PropelPDO $con = null) + { + if ($this->aCcTag === null && ($this->tag_id !== null)) { + $this->aCcTag = CcTagQuery::create()->findPk($this->tag_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCcTag->addCcFileTags($this); + */ + } + return $this->aCcTag; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->file_id = null; + $this->tag_id = null; + $this->alreadyInSave = false; + $this->alreadyInValidation = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all collections of referencing foreign keys. + * + * This method is a user-space workaround for PHP's inability to garbage collect objects + * with circular references. This is currently necessary when using Propel in certain + * daemon or large-volumne/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all associated objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCcFiles = null; + $this->aCcTag = null; + } + + /** + * Catches calls to virtual methods + */ + public function __call($name, $params) + { + if (preg_match('/get(\w+)/', $name, $matches)) { + $virtualColumn = $matches[1]; + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + // no lcfirst in php<5.3... + $virtualColumn[0] = strtolower($virtualColumn[0]); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + throw new PropelException('Call to undefined method: ' . $name); + } + +} // BaseCcFileTag diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFileTagPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcFileTagPeer.php new file mode 100644 index 000000000..e4454a44f --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcFileTagPeer.php @@ -0,0 +1,1365 @@ + array ('DbId', 'DbFileId', 'DbTagId', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbTagId', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::FILE_ID, self::TAG_ID, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'TAG_ID', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'tag_id', ), + BasePeer::TYPE_NUM => array (0, 1, 2, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + */ + private static $fieldKeys = array ( + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbTagId' => 2, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbTagId' => 2, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FILE_ID => 1, self::TAG_ID => 2, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'TAG_ID' => 2, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'tag_id' => 2, ), + BasePeer::TYPE_NUM => array (0, 1, 2, ) + ); + + /** + * Translates a fieldname to another type + * + * @param string $name field name + * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. + * @throws PropelException - if the specified name could not be found in the fieldname mappings. + */ + static public function translateFieldName($name, $fromType, $toType) + { + $toNames = self::getFieldNames($toType); + $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + if ($key === null) { + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + } + return $toNames[$key]; + } + + /** + * Returns an array of field names. + * + * @param string $type The type of fieldnames to return: + * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return array A list of field names + */ + + static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + { + if (!array_key_exists($type, self::$fieldNames)) { + throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); + } + return self::$fieldNames[$type]; + } + + /** + * Convenience method which changes table.column to alias.column. + * + * Using this method you can maintain SQL abstraction while using column aliases. + * + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. CcFileTagPeer::COLUMN_NAME). + * @return string + */ + public static function alias($alias, $column) + { + return str_replace(CcFileTagPeer::TABLE_NAME.'.', $alias.'.', $column); + } + + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CcFileTagPeer::ID); + $criteria->addSelectColumn(CcFileTagPeer::FILE_ID); + $criteria->addSelectColumn(CcFileTagPeer::TAG_ID); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.FILE_ID'); + $criteria->addSelectColumn($alias . '.TAG_ID'); + } + } + + /** + * Returns the number of rows matching criteria. + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @return int Number of matching rows. + */ + public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) + { + // we may modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcFileTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + // BasePeer returns a PDOStatement + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + /** + * Method to select one object from the DB. + * + * @param Criteria $criteria object used to create the SELECT statement. + * @param PropelPDO $con + * @return CcFileTag + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) + { + $critcopy = clone $criteria; + $critcopy->setLimit(1); + $objects = CcFileTagPeer::doSelect($critcopy, $con); + if ($objects) { + return $objects[0]; + } + return null; + } + /** + * Method to do selects. + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelect(Criteria $criteria, PropelPDO $con = null) + { + return CcFileTagPeer::populateObjects(CcFileTagPeer::doSelectStmt($criteria, $con)); + } + /** + * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. + * + * Use this method directly if you want to work with an executed statement durirectly (for example + * to perform your own object hydration). + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con The connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return PDOStatement The executed PDOStatement object. + * @see BasePeer::doSelect() + */ + public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + if (!$criteria->hasSelectClause()) { + $criteria = clone $criteria; + CcFileTagPeer::addSelectColumns($criteria); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + // BasePeer returns a PDOStatement + return BasePeer::doSelect($criteria, $con); + } + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doSelect*() + * methods in your stub classes -- you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by doSelect*() + * and retrieveByPK*() calls. + * + * @param CcFileTag $value A CcFileTag object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool(CcFileTag $obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if ($key === null) { + $key = (string) $obj->getDbId(); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A CcFileTag object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && $value !== null) { + if (is_object($value) && $value instanceof CcFileTag) { + $key = (string) $value->getDbId(); + } elseif (is_scalar($value)) { + // assume we've been passed a primary key + $key = (string) $value; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcFileTag object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } // removeInstanceFromPool() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param string $key The key (@see getPrimaryKeyHash()) for this instance. + * @return CcFileTag Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @see getPrimaryKeyHash() + */ + public static function getInstanceFromPool($key) + { + if (Propel::isInstancePoolingEnabled()) { + if (isset(self::$instances[$key])) { + return self::$instances[$key]; + } + } + return null; // just to be explicit + } + + /** + * Clear the instance pool. + * + * @return void + */ + public static function clearInstancePool() + { + self::$instances = array(); + } + + /** + * Method to invalidate the instance pool of all tables related to cc_file_tag + * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return string A string version of PK or NULL if the components of primary key in result array are all null. + */ + public static function getPrimaryKeyHashFromRow($row, $startcol = 0) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[$startcol] === null) { + return null; + } + return (string) $row[$startcol]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $startcol = 0) + { + return (int) $row[$startcol]; + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(PDOStatement $stmt) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = CcFileTagPeer::getOMClass(false); + // populate the object(s) + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = CcFileTagPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CcFileTagPeer::addInstanceToPool($obj, $key); + } // if key exists + } + $stmt->closeCursor(); + return $results; + } + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CcFileTag object, last column rank) + */ + public static function populateObject($row, $startcol = 0) + { + $key = CcFileTagPeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = CcFileTagPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $startcol, true); // rehydrate + $col = $startcol + CcFileTagPeer::NUM_COLUMNS; + } else { + $cls = CcFileTagPeer::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $startcol); + CcFileTagPeer::addInstanceToPool($obj, $key); + } + return array($obj, $col); + } + + /** + * Returns the number of rows matching criteria, joining the related CcFiles table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcFileTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcTag table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcFileTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Selects a collection of CcFileTag objects pre-filled with their CcFiles objects. + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcFileTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcFileTagPeer::addSelectColumns($criteria); + $startcol = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); + CcFilesPeer::addSelectColumns($criteria); + + $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + + $cls = CcFileTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcFileTagPeer::addInstanceToPool($obj1, $key1); + } // if $obj1 already loaded + + $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol); + if ($key2 !== null) { + $obj2 = CcFilesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcFilesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol); + CcFilesPeer::addInstanceToPool($obj2, $key2); + } // if obj2 already loaded + + // Add the $obj1 (CcFileTag) to $obj2 (CcFiles) + $obj2->addCcFileTag($obj1); + + } // if joined row was not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Selects a collection of CcFileTag objects pre-filled with their CcTag objects. + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcFileTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcFileTagPeer::addSelectColumns($criteria); + $startcol = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); + CcTagPeer::addSelectColumns($criteria); + + $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + + $cls = CcFileTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcFileTagPeer::addInstanceToPool($obj1, $key1); + } // if $obj1 already loaded + + $key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol); + if ($key2 !== null) { + $obj2 = CcTagPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcTagPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol); + CcTagPeer::addInstanceToPool($obj2, $key2); + } // if obj2 already loaded + + // Add the $obj1 (CcFileTag) to $obj2 (CcTag) + $obj2->addCcFileTag($obj1); + + } // if joined row was not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Returns the number of rows matching criteria, joining all related tables + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcFileTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + /** + * Selects a collection of CcFileTag objects pre-filled with all related objects. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcFileTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcFileTagPeer::addSelectColumns($criteria); + $startcol2 = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); + + CcFilesPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); + + CcTagPeer::addSelectColumns($criteria); + $startcol4 = $startcol3 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcFileTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcFileTagPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcFiles rows + + $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcFilesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcFilesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcFilesPeer::addInstanceToPool($obj2, $key2); + } // if obj2 loaded + + // Add the $obj1 (CcFileTag) to the collection in $obj2 (CcFiles) + $obj2->addCcFileTag($obj1); + } // if joined row not null + + // Add objects for joined CcTag rows + + $key3 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol3); + if ($key3 !== null) { + $obj3 = CcTagPeer::getInstanceFromPool($key3); + if (!$obj3) { + + $cls = CcTagPeer::getOMClass(false); + + $obj3 = new $cls(); + $obj3->hydrate($row, $startcol3); + CcTagPeer::addInstanceToPool($obj3, $key3); + } // if obj3 loaded + + // Add the $obj1 (CcFileTag) to the collection in $obj3 (CcTag) + $obj3->addCcFileTag($obj1); + } // if joined row not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcFiles table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcFileTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcTag table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcFileTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Selects a collection of CcFileTag objects pre-filled with all related objects except CcFiles. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcFileTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcFileTagPeer::addSelectColumns($criteria); + $startcol2 = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); + + CcTagPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcFileTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcFileTagPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcTag rows + + $key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcTagPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcTagPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcTagPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcFileTag) to the collection in $obj2 (CcTag) + $obj2->addCcFileTag($obj1); + + } // if joined row is not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Selects a collection of CcFileTag objects pre-filled with all related objects except CcTag. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcFileTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcFileTagPeer::addSelectColumns($criteria); + $startcol2 = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); + + CcFilesPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcFileTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcFileTagPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcFiles rows + + $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcFilesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcFilesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcFilesPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcFileTag) to the collection in $obj2 (CcFiles) + $obj2->addCcFileTag($obj1); + + } // if joined row is not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + /** + * Returns the TableMap related to this peer. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this peer class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getDatabaseMap(BaseCcFileTagPeer::DATABASE_NAME); + if (!$dbMap->hasTable(BaseCcFileTagPeer::TABLE_NAME)) + { + $dbMap->addTableObject(new CcFileTagTableMap()); + } + } + + /** + * The class that the Peer will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is tranalted into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CcFileTagPeer::CLASS_DEFAULT : CcFileTagPeer::OM_CLASS; + } + + /** + * Method perform an INSERT on the database, given a CcFileTag or Criteria object. + * + * @param mixed $values Criteria or CcFileTag object containing data that is used to create the INSERT statement. + * @param PropelPDO $con the PropelPDO connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } else { + $criteria = $values->buildCriteria(); // build Criteria from CcFileTag object + } + + if ($criteria->containsKey(CcFileTagPeer::ID) && $criteria->keyContainsValue(CcFileTagPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcFileTagPeer::ID.')'); + } + + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = BasePeer::doInsert($criteria, $con); + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + + /** + * Method perform an UPDATE on the database, given a CcFileTag or Criteria object. + * + * @param mixed $values Criteria or CcFileTag object containing data that is used to create the UPDATE statement. + * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). + * @return int The number of affected rows (if supported by underlying database driver). + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doUpdate($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $selectCriteria = new Criteria(self::DATABASE_NAME); + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + + $comparison = $criteria->getComparison(CcFileTagPeer::ID); + $value = $criteria->remove(CcFileTagPeer::ID); + if ($value) { + $selectCriteria->add(CcFileTagPeer::ID, $value, $comparison); + } else { + $selectCriteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); + } + + } else { // $values is CcFileTag object + $criteria = $values->buildCriteria(); // gets full criteria + $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) + } + + // set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + return BasePeer::doUpdate($selectCriteria, $criteria, $con); + } + + /** + * Method to DELETE all rows from the cc_file_tag table. + * + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll($con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += BasePeer::doDeleteAll(CcFileTagPeer::TABLE_NAME, $con, CcFileTagPeer::DATABASE_NAME); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CcFileTagPeer::clearInstancePool(); + CcFileTagPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Method perform a DELETE on the database, given a CcFileTag or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CcFileTag object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param PropelPDO $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + // invalidate the cache for all objects of this type, since we have no + // way of knowing (without running a query) what objects should be invalidated + // from the cache based on this Criteria. + CcFileTagPeer::clearInstancePool(); + // rename for clarity + $criteria = clone $values; + } elseif ($values instanceof CcFileTag) { // it's a model object + // invalidate the cache for this single object + CcFileTagPeer::removeInstanceFromPool($values); + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(self::DATABASE_NAME); + $criteria->add(CcFileTagPeer::ID, (array) $values, Criteria::IN); + // invalidate the cache for this object(s) + foreach ((array) $values as $singleval) { + CcFileTagPeer::removeInstanceFromPool($singleval); + } + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + $affectedRows += BasePeer::doDelete($criteria, $con); + CcFileTagPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Validates all modified columns of given CcFileTag object. + * If parameter $columns is either a single column name or an array of column names + * than only those columns are validated. + * + * NOTICE: This does not apply to primary or foreign keys for now. + * + * @param CcFileTag $obj The object to validate. + * @param mixed $cols Column name or array of column names. + * + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. + */ + public static function doValidate(CcFileTag $obj, $cols = null) + { + $columns = array(); + + if ($cols) { + $dbMap = Propel::getDatabaseMap(CcFileTagPeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(CcFileTagPeer::TABLE_NAME); + + if (! is_array($cols)) { + $cols = array($cols); + } + + foreach ($cols as $colName) { + if ($tableMap->containsColumn($colName)) { + $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + $columns[$colName] = $obj->$get(); + } + } + } else { + + } + + return BasePeer::doValidate(CcFileTagPeer::DATABASE_NAME, CcFileTagPeer::TABLE_NAME, $columns); + } + + /** + * Retrieve a single object by pkey. + * + * @param int $pk the primary key. + * @param PropelPDO $con the connection to use + * @return CcFileTag + */ + public static function retrieveByPK($pk, PropelPDO $con = null) + { + + if (null !== ($obj = CcFileTagPeer::getInstanceFromPool((string) $pk))) { + return $obj; + } + + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria = new Criteria(CcFileTagPeer::DATABASE_NAME); + $criteria->add(CcFileTagPeer::ID, $pk); + + $v = CcFileTagPeer::doSelect($criteria, $con); + + return !empty($v) > 0 ? $v[0] : null; + } + + /** + * Retrieve multiple objects by pkey. + * + * @param array $pks List of primary keys + * @param PropelPDO $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function retrieveByPKs($pks, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $objs = null; + if (empty($pks)) { + $objs = array(); + } else { + $criteria = new Criteria(CcFileTagPeer::DATABASE_NAME); + $criteria->add(CcFileTagPeer::ID, $pks, Criteria::IN); + $objs = CcFileTagPeer::doSelect($criteria, $con); + } + return $objs; + } + +} // BaseCcFileTagPeer + +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +BaseCcFileTagPeer::buildTableMap(); + diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFileTagQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcFileTagQuery.php new file mode 100644 index 000000000..991c4e05a --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcFileTagQuery.php @@ -0,0 +1,371 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + return $query; + } + + /** + * Find object by primary key + * Use instance pooling to avoid a database query if the object exists + * + * $obj = $c->findPk(12, $con); + * + * @param mixed $key Primary key to use for the query + * @param PropelPDO $con an optional connection object + * + * @return CcFileTag|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ((null !== ($obj = CcFileTagPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { + // the object is alredy in the instance pool + return $obj; + } else { + // the object has not been requested yet, or the formatter is not an object formatter + $criteria = $this->isKeepQuery() ? clone $this : $this; + $stmt = $criteria + ->filterByPrimaryKey($key) + ->getSelectStatement($con); + return $criteria->getFormatter()->init($criteria)->formatOne($stmt); + } + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param PropelPDO $con an optional connection object + * + * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + $criteria = $this->isKeepQuery() ? clone $this : $this; + return $this + ->filterByPrimaryKeys($keys) + ->find($con); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + return $this->addUsingAlias(CcFileTagPeer::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + return $this->addUsingAlias(CcFileTagPeer::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * @param int|array $dbId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function filterByDbId($dbId = null, $comparison = null) + { + if (is_array($dbId) && null === $comparison) { + $comparison = Criteria::IN; + } + return $this->addUsingAlias(CcFileTagPeer::ID, $dbId, $comparison); + } + + /** + * Filter the query on the file_id column + * + * @param int|array $dbFileId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function filterByDbFileId($dbFileId = null, $comparison = null) + { + if (is_array($dbFileId)) { + $useMinMax = false; + if (isset($dbFileId['min'])) { + $this->addUsingAlias(CcFileTagPeer::FILE_ID, $dbFileId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbFileId['max'])) { + $this->addUsingAlias(CcFileTagPeer::FILE_ID, $dbFileId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcFileTagPeer::FILE_ID, $dbFileId, $comparison); + } + + /** + * Filter the query on the tag_id column + * + * @param int|array $dbTagId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function filterByDbTagId($dbTagId = null, $comparison = null) + { + if (is_array($dbTagId)) { + $useMinMax = false; + if (isset($dbTagId['min'])) { + $this->addUsingAlias(CcFileTagPeer::TAG_ID, $dbTagId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbTagId['max'])) { + $this->addUsingAlias(CcFileTagPeer::TAG_ID, $dbTagId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcFileTagPeer::TAG_ID, $dbTagId, $comparison); + } + + /** + * Filter the query by a related CcFiles object + * + * @param CcFiles $ccFiles the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function filterByCcFiles($ccFiles, $comparison = null) + { + return $this + ->addUsingAlias(CcFileTagPeer::FILE_ID, $ccFiles->getDbId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcFiles relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function joinCcFiles($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcFiles'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcFiles'); + } + + return $this; + } + + /** + * Use the CcFiles relation CcFiles object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcFilesQuery A secondary query class using the current class as primary query + */ + public function useCcFilesQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcFiles($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery'); + } + + /** + * Filter the query by a related CcTag object + * + * @param CcTag $ccTag the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function filterByCcTag($ccTag, $comparison = null) + { + return $this + ->addUsingAlias(CcFileTagPeer::TAG_ID, $ccTag->getDbId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcTag relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function joinCcTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcTag'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcTag'); + } + + return $this; + } + + /** + * Use the CcTag relation CcTag object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcTagQuery A secondary query class using the current class as primary query + */ + public function useCcTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcTag($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcTag', 'CcTagQuery'); + } + + /** + * Exclude object from result + * + * @param CcFileTag $ccFileTag Object to remove from the list of results + * + * @return CcFileTagQuery The current query, for fluid interface + */ + public function prune($ccFileTag = null) + { + if ($ccFileTag) { + $this->addUsingAlias(CcFileTagPeer::ID, $ccFileTag->getDbId(), Criteria::NOT_EQUAL); + } + + return $this; + } + +} // BaseCcFileTagQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php index 55f868769..6879491fa 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php @@ -493,6 +493,16 @@ abstract class BaseCcFiles extends BaseObject implements Persistent */ protected $collCcSchedules; + /** + * @var array CcFileTag[] Collection to store aggregation of CcFileTag objects. + */ + protected $collCcFileTags; + + /** + * @var array CcPlayoutHistory[] Collection to store aggregation of CcPlayoutHistory objects. + */ + protected $collCcPlayoutHistorys; + /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. @@ -3109,6 +3119,10 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $this->collCcSchedules = null; + $this->collCcFileTags = null; + + $this->collCcPlayoutHistorys = null; + } // if (deep) } @@ -3300,6 +3314,22 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } + if ($this->collCcFileTags !== null) { + foreach ($this->collCcFileTags as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->collCcPlayoutHistorys !== null) { + foreach ($this->collCcPlayoutHistorys as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + $this->alreadyInSave = false; } @@ -3427,6 +3457,22 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } + if ($this->collCcFileTags !== null) { + foreach ($this->collCcFileTags as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + + if ($this->collCcPlayoutHistorys !== null) { + foreach ($this->collCcPlayoutHistorys as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + $this->alreadyInValidation = false; } @@ -4351,6 +4397,18 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } + foreach ($this->getCcFileTags() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcFileTag($relObj->copy($deepCopy)); + } + } + + foreach ($this->getCcPlayoutHistorys() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcPlayoutHistory($relObj->copy($deepCopy)); + } + } + } // if ($deepCopy) @@ -5154,6 +5212,249 @@ abstract class BaseCcFiles extends BaseObject implements Persistent return $this->getCcSchedules($query, $con); } + /** + * Clears out the collCcFileTags collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcFileTags() + */ + public function clearCcFileTags() + { + $this->collCcFileTags = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcFileTags collection. + * + * By default this just sets the collCcFileTags collection to an empty array (like clearcollCcFileTags()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcFileTags() + { + $this->collCcFileTags = new PropelObjectCollection(); + $this->collCcFileTags->setModel('CcFileTag'); + } + + /** + * Gets an array of CcFileTag objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcFiles is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcFileTag[] List of CcFileTag objects + * @throws PropelException + */ + public function getCcFileTags($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcFileTags || null !== $criteria) { + if ($this->isNew() && null === $this->collCcFileTags) { + // return empty collection + $this->initCcFileTags(); + } else { + $collCcFileTags = CcFileTagQuery::create(null, $criteria) + ->filterByCcFiles($this) + ->find($con); + if (null !== $criteria) { + return $collCcFileTags; + } + $this->collCcFileTags = $collCcFileTags; + } + } + return $this->collCcFileTags; + } + + /** + * Returns the number of related CcFileTag objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcFileTag objects. + * @throws PropelException + */ + public function countCcFileTags(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcFileTags || null !== $criteria) { + if ($this->isNew() && null === $this->collCcFileTags) { + return 0; + } else { + $query = CcFileTagQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcFiles($this) + ->count($con); + } + } else { + return count($this->collCcFileTags); + } + } + + /** + * Method called to associate a CcFileTag object to this object + * through the CcFileTag foreign key attribute. + * + * @param CcFileTag $l CcFileTag + * @return void + * @throws PropelException + */ + public function addCcFileTag(CcFileTag $l) + { + if ($this->collCcFileTags === null) { + $this->initCcFileTags(); + } + if (!$this->collCcFileTags->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcFileTags[]= $l; + $l->setCcFiles($this); + } + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcFiles is new, it will return + * an empty collection; or if this CcFiles has previously + * been saved, it will retrieve related CcFileTags from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcFiles. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcFileTag[] List of CcFileTag objects + */ + public function getCcFileTagsJoinCcTag($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcFileTagQuery::create(null, $criteria); + $query->joinWith('CcTag', $join_behavior); + + return $this->getCcFileTags($query, $con); + } + + /** + * Clears out the collCcPlayoutHistorys collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcPlayoutHistorys() + */ + public function clearCcPlayoutHistorys() + { + $this->collCcPlayoutHistorys = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcPlayoutHistorys collection. + * + * By default this just sets the collCcPlayoutHistorys collection to an empty array (like clearcollCcPlayoutHistorys()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcPlayoutHistorys() + { + $this->collCcPlayoutHistorys = new PropelObjectCollection(); + $this->collCcPlayoutHistorys->setModel('CcPlayoutHistory'); + } + + /** + * Gets an array of CcPlayoutHistory objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcFiles is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects + * @throws PropelException + */ + public function getCcPlayoutHistorys($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistorys || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistorys) { + // return empty collection + $this->initCcPlayoutHistorys(); + } else { + $collCcPlayoutHistorys = CcPlayoutHistoryQuery::create(null, $criteria) + ->filterByCcFiles($this) + ->find($con); + if (null !== $criteria) { + return $collCcPlayoutHistorys; + } + $this->collCcPlayoutHistorys = $collCcPlayoutHistorys; + } + } + return $this->collCcPlayoutHistorys; + } + + /** + * Returns the number of related CcPlayoutHistory objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcPlayoutHistory objects. + * @throws PropelException + */ + public function countCcPlayoutHistorys(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistorys || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistorys) { + return 0; + } else { + $query = CcPlayoutHistoryQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcFiles($this) + ->count($con); + } + } else { + return count($this->collCcPlayoutHistorys); + } + } + + /** + * Method called to associate a CcPlayoutHistory object to this object + * through the CcPlayoutHistory foreign key attribute. + * + * @param CcPlayoutHistory $l CcPlayoutHistory + * @return void + * @throws PropelException + */ + public function addCcPlayoutHistory(CcPlayoutHistory $l) + { + if ($this->collCcPlayoutHistorys === null) { + $this->initCcPlayoutHistorys(); + } + if (!$this->collCcPlayoutHistorys->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcPlayoutHistorys[]= $l; + $l->setCcFiles($this); + } + } + /** * Clears the current object and sets all attributes to their default values */ @@ -5270,12 +5571,24 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $o->clearAllReferences($deep); } } + if ($this->collCcFileTags) { + foreach ((array) $this->collCcFileTags as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collCcPlayoutHistorys) { + foreach ((array) $this->collCcPlayoutHistorys as $o) { + $o->clearAllReferences($deep); + } + } } // if ($deep) $this->collCcShowInstancess = null; $this->collCcPlaylistcontentss = null; $this->collCcBlockcontentss = null; $this->collCcSchedules = null; + $this->collCcFileTags = null; + $this->collCcPlayoutHistorys = null; $this->aFkOwner = null; $this->aCcSubjsRelatedByDbEditedby = null; $this->aCcMusicDirs = null; diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php index 82ebc7851..8d23b9c9c 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php @@ -695,6 +695,12 @@ abstract class BaseCcFilesPeer { // Invalidate objects in CcSchedulePeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. CcSchedulePeer::clearInstancePool(); + // Invalidate objects in CcFileTagPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcFileTagPeer::clearInstancePool(); + // Invalidate objects in CcPlayoutHistoryPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcPlayoutHistoryPeer::clearInstancePool(); } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php index fe42ad88c..2f222de77 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php @@ -180,6 +180,14 @@ * @method CcFilesQuery rightJoinCcSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSchedule relation * @method CcFilesQuery innerJoinCcSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSchedule relation * + * @method CcFilesQuery leftJoinCcFileTag($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFileTag relation + * @method CcFilesQuery rightJoinCcFileTag($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFileTag relation + * @method CcFilesQuery innerJoinCcFileTag($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFileTag relation + * + * @method CcFilesQuery leftJoinCcPlayoutHistory($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistory relation + * @method CcFilesQuery rightJoinCcPlayoutHistory($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation + * @method CcFilesQuery innerJoinCcPlayoutHistory($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation + * * @method CcFiles findOne(PropelPDO $con = null) Return the first CcFiles matching the query * @method CcFiles findOneOrCreate(PropelPDO $con = null) Return the first CcFiles matching the query, or a new CcFiles object populated from the query conditions when no match is found * @@ -2535,6 +2543,134 @@ abstract class BaseCcFilesQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery'); } + /** + * Filter the query by a related CcFileTag object + * + * @param CcFileTag $ccFileTag the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcFilesQuery The current query, for fluid interface + */ + public function filterByCcFileTag($ccFileTag, $comparison = null) + { + return $this + ->addUsingAlias(CcFilesPeer::ID, $ccFileTag->getDbFileId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcFileTag relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcFilesQuery The current query, for fluid interface + */ + public function joinCcFileTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcFileTag'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcFileTag'); + } + + return $this; + } + + /** + * Use the CcFileTag relation CcFileTag object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcFileTagQuery A secondary query class using the current class as primary query + */ + public function useCcFileTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcFileTag($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcFileTag', 'CcFileTagQuery'); + } + + /** + * Filter the query by a related CcPlayoutHistory object + * + * @param CcPlayoutHistory $ccPlayoutHistory the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcFilesQuery The current query, for fluid interface + */ + public function filterByCcPlayoutHistory($ccPlayoutHistory, $comparison = null) + { + return $this + ->addUsingAlias(CcFilesPeer::ID, $ccPlayoutHistory->getDbFileId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcPlayoutHistory relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcFilesQuery The current query, for fluid interface + */ + public function joinCcPlayoutHistory($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcPlayoutHistory'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcPlayoutHistory'); + } + + return $this; + } + + /** + * Use the CcPlayoutHistory relation CcPlayoutHistory object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryQuery A secondary query class using the current class as primary query + */ + public function useCcPlayoutHistoryQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinCcPlayoutHistory($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery'); + } + /** * Exclude object from result * diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php new file mode 100644 index 000000000..bdae214d1 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php @@ -0,0 +1,1161 @@ +id; + } + + /** + * Get the [file_id] column value. + * + * @return int + */ + public function getDbFileId() + { + return $this->file_id; + } + + /** + * Get the [optionally formatted] temporal [starts] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw DateTime object will be returned. + * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getDbStarts($format = 'Y-m-d H:i:s') + { + if ($this->starts === null) { + return null; + } + + + + try { + $dt = new DateTime($this->starts); + } catch (Exception $x) { + throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->starts, true), $x); + } + + if ($format === null) { + // Because propel.useDateTimeClass is TRUE, we return a DateTime object. + return $dt; + } elseif (strpos($format, '%') !== false) { + return strftime($format, $dt->format('U')); + } else { + return $dt->format($format); + } + } + + /** + * Get the [optionally formatted] temporal [ends] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw DateTime object will be returned. + * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getDbEnds($format = 'Y-m-d H:i:s') + { + if ($this->ends === null) { + return null; + } + + + + try { + $dt = new DateTime($this->ends); + } catch (Exception $x) { + throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->ends, true), $x); + } + + if ($format === null) { + // Because propel.useDateTimeClass is TRUE, we return a DateTime object. + return $dt; + } elseif (strpos($format, '%') !== false) { + return strftime($format, $dt->format('U')); + } else { + return $dt->format($format); + } + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return CcPlayoutHistory The current object (for fluent API support) + */ + public function setDbId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryPeer::ID; + } + + return $this; + } // setDbId() + + /** + * Set the value of [file_id] column. + * + * @param int $v new value + * @return CcPlayoutHistory The current object (for fluent API support) + */ + public function setDbFileId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->file_id !== $v) { + $this->file_id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryPeer::FILE_ID; + } + + if ($this->aCcFiles !== null && $this->aCcFiles->getDbId() !== $v) { + $this->aCcFiles = null; + } + + return $this; + } // setDbFileId() + + /** + * Sets the value of [starts] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will + * be treated as NULL for temporal objects. + * @return CcPlayoutHistory The current object (for fluent API support) + */ + public function setDbStarts($v) + { + // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') + // -- which is unexpected, to say the least. + if ($v === null || $v === '') { + $dt = null; + } elseif ($v instanceof DateTime) { + $dt = $v; + } else { + // some string/numeric value passed; we normalize that so that we can + // validate it. + try { + if (is_numeric($v)) { // if it's a unix timestamp + $dt = new DateTime('@'.$v, new DateTimeZone('UTC')); + // We have to explicitly specify and then change the time zone because of a + // DateTime bug: http://bugs.php.net/bug.php?id=43003 + $dt->setTimeZone(new DateTimeZone(date_default_timezone_get())); + } else { + $dt = new DateTime($v); + } + } catch (Exception $x) { + throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); + } + } + + if ( $this->starts !== null || $dt !== null ) { + // (nested ifs are a little easier to read in this case) + + $currNorm = ($this->starts !== null && $tmpDt = new DateTime($this->starts)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null; + $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null; + + if ( ($currNorm !== $newNorm) // normalized values don't match + ) + { + $this->starts = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null); + $this->modifiedColumns[] = CcPlayoutHistoryPeer::STARTS; + } + } // if either are not null + + return $this; + } // setDbStarts() + + /** + * Sets the value of [ends] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will + * be treated as NULL for temporal objects. + * @return CcPlayoutHistory The current object (for fluent API support) + */ + public function setDbEnds($v) + { + // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') + // -- which is unexpected, to say the least. + if ($v === null || $v === '') { + $dt = null; + } elseif ($v instanceof DateTime) { + $dt = $v; + } else { + // some string/numeric value passed; we normalize that so that we can + // validate it. + try { + if (is_numeric($v)) { // if it's a unix timestamp + $dt = new DateTime('@'.$v, new DateTimeZone('UTC')); + // We have to explicitly specify and then change the time zone because of a + // DateTime bug: http://bugs.php.net/bug.php?id=43003 + $dt->setTimeZone(new DateTimeZone(date_default_timezone_get())); + } else { + $dt = new DateTime($v); + } + } catch (Exception $x) { + throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); + } + } + + if ( $this->ends !== null || $dt !== null ) { + // (nested ifs are a little easier to read in this case) + + $currNorm = ($this->ends !== null && $tmpDt = new DateTime($this->ends)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null; + $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null; + + if ( ($currNorm !== $newNorm) // normalized values don't match + ) + { + $this->ends = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null); + $this->modifiedColumns[] = CcPlayoutHistoryPeer::ENDS; + } + } // if either are not null + + return $this; + } // setDbEnds() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false) + { + try { + + $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; + $this->file_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; + $this->starts = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; + $this->ends = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 4; // 4 = CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS). + + } catch (Exception $e) { + throw new PropelException("Error populating CcPlayoutHistory object", $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + + if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) { + $this->aCcFiles = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param PropelPDO $con (optional) The PropelPDO connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $stmt = CcPlayoutHistoryPeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $row = $stmt->fetch(PDO::FETCH_NUM); + $stmt->closeCursor(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCcFiles = null; + $this->collCcPlayoutHistoryMetaDatas = null; + + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param PropelPDO $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() + */ + public function delete(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + try { + $ret = $this->preDelete($con); + if ($ret) { + CcPlayoutHistoryQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()) + ->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CcPlayoutHistoryPeer::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(PropelPDO $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their coresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCcFiles !== null) { + if ($this->aCcFiles->isModified() || $this->aCcFiles->isNew()) { + $affectedRows += $this->aCcFiles->save($con); + } + $this->setCcFiles($this->aCcFiles); + } + + if ($this->isNew() ) { + $this->modifiedColumns[] = CcPlayoutHistoryPeer::ID; + } + + // If this object has been modified, then save it to the database. + if ($this->isModified()) { + if ($this->isNew()) { + $criteria = $this->buildCriteria(); + if ($criteria->keyContainsValue(CcPlayoutHistoryPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryPeer::ID.')'); + } + + $pk = BasePeer::doInsert($criteria, $con); + $affectedRows += 1; + $this->setDbId($pk); //[IMV] update autoincrement primary key + $this->setNew(false); + } else { + $affectedRows += CcPlayoutHistoryPeer::doUpdate($this, $con); + } + + $this->resetModified(); // [HL] After being saved an object is no longer 'modified' + } + + if ($this->collCcPlayoutHistoryMetaDatas !== null) { + foreach ($this->collCcPlayoutHistoryMetaDatas as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + + $this->alreadyInSave = false; + + } + return $affectedRows; + } // doSave() + + /** + * Array of ValidationFailed objects. + * @var array ValidationFailed[] + */ + protected $validationFailures = array(); + + /** + * Gets any ValidationFailed objects that resulted from last call to validate(). + * + * + * @return array ValidationFailed[] + * @see validate() + */ + public function getValidationFailures() + { + return $this->validationFailures; + } + + /** + * Validates the objects modified field values and all objects related to this table. + * + * If $columns is either a column name or an array of column names + * only those columns are validated. + * + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() + */ + public function validate($columns = null) + { + $res = $this->doValidate($columns); + if ($res === true) { + $this->validationFailures = array(); + return true; + } else { + $this->validationFailures = $res; + return false; + } + } + + /** + * This function performs the validation work for complex object models. + * + * In addition to checking the current object, all related objects will + * also be validated. If all pass then true is returned; otherwise + * an aggreagated array of ValidationFailed objects will be returned. + * + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. + */ + protected function doValidate($columns = null) + { + if (!$this->alreadyInValidation) { + $this->alreadyInValidation = true; + $retval = null; + + $failureMap = array(); + + + // We call the validate method on the following object(s) if they + // were passed to this object by their coresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCcFiles !== null) { + if (!$this->aCcFiles->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcFiles->getValidationFailures()); + } + } + + + if (($retval = CcPlayoutHistoryPeer::doValidate($this, $columns)) !== true) { + $failureMap = array_merge($failureMap, $retval); + } + + + if ($this->collCcPlayoutHistoryMetaDatas !== null) { + foreach ($this->collCcPlayoutHistoryMetaDatas as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + + + $this->alreadyInValidation = false; + } + + return (!empty($failureMap) ? $failureMap : true); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return mixed Value of field. + */ + public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcPlayoutHistoryPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $field = $this->getByPosition($pos); + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch($pos) { + case 0: + return $this->getDbId(); + break; + case 1: + return $this->getDbFileId(); + break; + case 2: + return $this->getDbStarts(); + break; + case 3: + return $this->getDbEnds(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * Defaults to BasePeer::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false) + { + $keys = CcPlayoutHistoryPeer::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getDbId(), + $keys[1] => $this->getDbFileId(), + $keys[2] => $this->getDbStarts(), + $keys[3] => $this->getDbEnds(), + ); + if ($includeForeignObjects) { + if (null !== $this->aCcFiles) { + $result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true); + } + } + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return void + */ + public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcPlayoutHistoryPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch($pos) { + case 0: + $this->setDbId($value); + break; + case 1: + $this->setDbFileId($value); + break; + case 2: + $this->setDbStarts($value); + break; + case 3: + $this->setDbEnds($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * The default key type is the column's phpname (e.g. 'AuthorId') + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + { + $keys = CcPlayoutHistoryPeer::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setDbFileId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setDbStarts($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setDbEnds($arr[$keys[3]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CcPlayoutHistoryPeer::DATABASE_NAME); + + if ($this->isColumnModified(CcPlayoutHistoryPeer::ID)) $criteria->add(CcPlayoutHistoryPeer::ID, $this->id); + if ($this->isColumnModified(CcPlayoutHistoryPeer::FILE_ID)) $criteria->add(CcPlayoutHistoryPeer::FILE_ID, $this->file_id); + if ($this->isColumnModified(CcPlayoutHistoryPeer::STARTS)) $criteria->add(CcPlayoutHistoryPeer::STARTS, $this->starts); + if ($this->isColumnModified(CcPlayoutHistoryPeer::ENDS)) $criteria->add(CcPlayoutHistoryPeer::ENDS, $this->ends); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CcPlayoutHistoryPeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryPeer::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getDbId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setDbId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + return null === $this->getDbId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of CcPlayoutHistory (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false) + { + $copyObj->setDbFileId($this->file_id); + $copyObj->setDbStarts($this->starts); + $copyObj->setDbEnds($this->ends); + + if ($deepCopy) { + // important: temporarily setNew(false) because this affects the behavior of + // the getter/setter methods for fkey referrer objects. + $copyObj->setNew(false); + + foreach ($this->getCcPlayoutHistoryMetaDatas() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcPlayoutHistoryMetaData($relObj->copy($deepCopy)); + } + } + + } // if ($deepCopy) + + + $copyObj->setNew(true); + $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return CcPlayoutHistory Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + return $copyObj; + } + + /** + * Returns a peer instance associated with this om. + * + * Since Peer classes are not to have any instance attributes, this method returns the + * same instance for all member of this class. The method could therefore + * be static, but this would prevent one from overriding the behavior. + * + * @return CcPlayoutHistoryPeer + */ + public function getPeer() + { + if (self::$peer === null) { + self::$peer = new CcPlayoutHistoryPeer(); + } + return self::$peer; + } + + /** + * Declares an association between this object and a CcFiles object. + * + * @param CcFiles $v + * @return CcPlayoutHistory The current object (for fluent API support) + * @throws PropelException + */ + public function setCcFiles(CcFiles $v = null) + { + if ($v === null) { + $this->setDbFileId(NULL); + } else { + $this->setDbFileId($v->getDbId()); + } + + $this->aCcFiles = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the CcFiles object, it will not be re-added. + if ($v !== null) { + $v->addCcPlayoutHistory($this); + } + + return $this; + } + + + /** + * Get the associated CcFiles object + * + * @param PropelPDO Optional Connection object. + * @return CcFiles The associated CcFiles object. + * @throws PropelException + */ + public function getCcFiles(PropelPDO $con = null) + { + if ($this->aCcFiles === null && ($this->file_id !== null)) { + $this->aCcFiles = CcFilesQuery::create()->findPk($this->file_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCcFiles->addCcPlayoutHistorys($this); + */ + } + return $this->aCcFiles; + } + + /** + * Clears out the collCcPlayoutHistoryMetaDatas collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcPlayoutHistoryMetaDatas() + */ + public function clearCcPlayoutHistoryMetaDatas() + { + $this->collCcPlayoutHistoryMetaDatas = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcPlayoutHistoryMetaDatas collection. + * + * By default this just sets the collCcPlayoutHistoryMetaDatas collection to an empty array (like clearcollCcPlayoutHistoryMetaDatas()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcPlayoutHistoryMetaDatas() + { + $this->collCcPlayoutHistoryMetaDatas = new PropelObjectCollection(); + $this->collCcPlayoutHistoryMetaDatas->setModel('CcPlayoutHistoryMetaData'); + } + + /** + * Gets an array of CcPlayoutHistoryMetaData objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcPlayoutHistory is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcPlayoutHistoryMetaData[] List of CcPlayoutHistoryMetaData objects + * @throws PropelException + */ + public function getCcPlayoutHistoryMetaDatas($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistoryMetaDatas || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistoryMetaDatas) { + // return empty collection + $this->initCcPlayoutHistoryMetaDatas(); + } else { + $collCcPlayoutHistoryMetaDatas = CcPlayoutHistoryMetaDataQuery::create(null, $criteria) + ->filterByCcPlayoutHistory($this) + ->find($con); + if (null !== $criteria) { + return $collCcPlayoutHistoryMetaDatas; + } + $this->collCcPlayoutHistoryMetaDatas = $collCcPlayoutHistoryMetaDatas; + } + } + return $this->collCcPlayoutHistoryMetaDatas; + } + + /** + * Returns the number of related CcPlayoutHistoryMetaData objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcPlayoutHistoryMetaData objects. + * @throws PropelException + */ + public function countCcPlayoutHistoryMetaDatas(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistoryMetaDatas || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistoryMetaDatas) { + return 0; + } else { + $query = CcPlayoutHistoryMetaDataQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcPlayoutHistory($this) + ->count($con); + } + } else { + return count($this->collCcPlayoutHistoryMetaDatas); + } + } + + /** + * Method called to associate a CcPlayoutHistoryMetaData object to this object + * through the CcPlayoutHistoryMetaData foreign key attribute. + * + * @param CcPlayoutHistoryMetaData $l CcPlayoutHistoryMetaData + * @return void + * @throws PropelException + */ + public function addCcPlayoutHistoryMetaData(CcPlayoutHistoryMetaData $l) + { + if ($this->collCcPlayoutHistoryMetaDatas === null) { + $this->initCcPlayoutHistoryMetaDatas(); + } + if (!$this->collCcPlayoutHistoryMetaDatas->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcPlayoutHistoryMetaDatas[]= $l; + $l->setCcPlayoutHistory($this); + } + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->file_id = null; + $this->starts = null; + $this->ends = null; + $this->alreadyInSave = false; + $this->alreadyInValidation = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all collections of referencing foreign keys. + * + * This method is a user-space workaround for PHP's inability to garbage collect objects + * with circular references. This is currently necessary when using Propel in certain + * daemon or large-volumne/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all associated objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + if ($this->collCcPlayoutHistoryMetaDatas) { + foreach ((array) $this->collCcPlayoutHistoryMetaDatas as $o) { + $o->clearAllReferences($deep); + } + } + } // if ($deep) + + $this->collCcPlayoutHistoryMetaDatas = null; + $this->aCcFiles = null; + } + + /** + * Catches calls to virtual methods + */ + public function __call($name, $params) + { + if (preg_match('/get(\w+)/', $name, $matches)) { + $virtualColumn = $matches[1]; + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + // no lcfirst in php<5.3... + $virtualColumn[0] = strtolower($virtualColumn[0]); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + throw new PropelException('Call to undefined method: ' . $name); + } + +} // BaseCcPlayoutHistory diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php new file mode 100644 index 000000000..a0cbb9539 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php @@ -0,0 +1,905 @@ +id; + } + + /** + * Get the [history_id] column value. + * + * @return int + */ + public function getDbHistoryId() + { + return $this->history_id; + } + + /** + * Get the [key] column value. + * + * @return string + */ + public function getDbKey() + { + return $this->key; + } + + /** + * Get the [value] column value. + * + * @return string + */ + public function getDbValue() + { + return $this->value; + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return CcPlayoutHistoryMetaData The current object (for fluent API support) + */ + public function setDbId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::ID; + } + + return $this; + } // setDbId() + + /** + * Set the value of [history_id] column. + * + * @param int $v new value + * @return CcPlayoutHistoryMetaData The current object (for fluent API support) + */ + public function setDbHistoryId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->history_id !== $v) { + $this->history_id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::HISTORY_ID; + } + + if ($this->aCcPlayoutHistory !== null && $this->aCcPlayoutHistory->getDbId() !== $v) { + $this->aCcPlayoutHistory = null; + } + + return $this; + } // setDbHistoryId() + + /** + * Set the value of [key] column. + * + * @param string $v new value + * @return CcPlayoutHistoryMetaData The current object (for fluent API support) + */ + public function setDbKey($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->key !== $v) { + $this->key = $v; + $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::KEY; + } + + return $this; + } // setDbKey() + + /** + * Set the value of [value] column. + * + * @param string $v new value + * @return CcPlayoutHistoryMetaData The current object (for fluent API support) + */ + public function setDbValue($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->value !== $v) { + $this->value = $v; + $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::VALUE; + } + + return $this; + } // setDbValue() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false) + { + try { + + $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; + $this->history_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; + $this->key = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; + $this->value = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 4; // 4 = CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS). + + } catch (Exception $e) { + throw new PropelException("Error populating CcPlayoutHistoryMetaData object", $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + + if ($this->aCcPlayoutHistory !== null && $this->history_id !== $this->aCcPlayoutHistory->getDbId()) { + $this->aCcPlayoutHistory = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param PropelPDO $con (optional) The PropelPDO connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $stmt = CcPlayoutHistoryMetaDataPeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $row = $stmt->fetch(PDO::FETCH_NUM); + $stmt->closeCursor(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCcPlayoutHistory = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param PropelPDO $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() + */ + public function delete(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + try { + $ret = $this->preDelete($con); + if ($ret) { + CcPlayoutHistoryMetaDataQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()) + ->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CcPlayoutHistoryMetaDataPeer::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(PropelPDO $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their coresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCcPlayoutHistory !== null) { + if ($this->aCcPlayoutHistory->isModified() || $this->aCcPlayoutHistory->isNew()) { + $affectedRows += $this->aCcPlayoutHistory->save($con); + } + $this->setCcPlayoutHistory($this->aCcPlayoutHistory); + } + + if ($this->isNew() ) { + $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::ID; + } + + // If this object has been modified, then save it to the database. + if ($this->isModified()) { + if ($this->isNew()) { + $criteria = $this->buildCriteria(); + if ($criteria->keyContainsValue(CcPlayoutHistoryMetaDataPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryMetaDataPeer::ID.')'); + } + + $pk = BasePeer::doInsert($criteria, $con); + $affectedRows += 1; + $this->setDbId($pk); //[IMV] update autoincrement primary key + $this->setNew(false); + } else { + $affectedRows += CcPlayoutHistoryMetaDataPeer::doUpdate($this, $con); + } + + $this->resetModified(); // [HL] After being saved an object is no longer 'modified' + } + + $this->alreadyInSave = false; + + } + return $affectedRows; + } // doSave() + + /** + * Array of ValidationFailed objects. + * @var array ValidationFailed[] + */ + protected $validationFailures = array(); + + /** + * Gets any ValidationFailed objects that resulted from last call to validate(). + * + * + * @return array ValidationFailed[] + * @see validate() + */ + public function getValidationFailures() + { + return $this->validationFailures; + } + + /** + * Validates the objects modified field values and all objects related to this table. + * + * If $columns is either a column name or an array of column names + * only those columns are validated. + * + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() + */ + public function validate($columns = null) + { + $res = $this->doValidate($columns); + if ($res === true) { + $this->validationFailures = array(); + return true; + } else { + $this->validationFailures = $res; + return false; + } + } + + /** + * This function performs the validation work for complex object models. + * + * In addition to checking the current object, all related objects will + * also be validated. If all pass then true is returned; otherwise + * an aggreagated array of ValidationFailed objects will be returned. + * + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. + */ + protected function doValidate($columns = null) + { + if (!$this->alreadyInValidation) { + $this->alreadyInValidation = true; + $retval = null; + + $failureMap = array(); + + + // We call the validate method on the following object(s) if they + // were passed to this object by their coresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCcPlayoutHistory !== null) { + if (!$this->aCcPlayoutHistory->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcPlayoutHistory->getValidationFailures()); + } + } + + + if (($retval = CcPlayoutHistoryMetaDataPeer::doValidate($this, $columns)) !== true) { + $failureMap = array_merge($failureMap, $retval); + } + + + + $this->alreadyInValidation = false; + } + + return (!empty($failureMap) ? $failureMap : true); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return mixed Value of field. + */ + public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcPlayoutHistoryMetaDataPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $field = $this->getByPosition($pos); + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch($pos) { + case 0: + return $this->getDbId(); + break; + case 1: + return $this->getDbHistoryId(); + break; + case 2: + return $this->getDbKey(); + break; + case 3: + return $this->getDbValue(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * Defaults to BasePeer::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false) + { + $keys = CcPlayoutHistoryMetaDataPeer::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getDbId(), + $keys[1] => $this->getDbHistoryId(), + $keys[2] => $this->getDbKey(), + $keys[3] => $this->getDbValue(), + ); + if ($includeForeignObjects) { + if (null !== $this->aCcPlayoutHistory) { + $result['CcPlayoutHistory'] = $this->aCcPlayoutHistory->toArray($keyType, $includeLazyLoadColumns, true); + } + } + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return void + */ + public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcPlayoutHistoryMetaDataPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch($pos) { + case 0: + $this->setDbId($value); + break; + case 1: + $this->setDbHistoryId($value); + break; + case 2: + $this->setDbKey($value); + break; + case 3: + $this->setDbValue($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * The default key type is the column's phpname (e.g. 'AuthorId') + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + { + $keys = CcPlayoutHistoryMetaDataPeer::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setDbHistoryId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setDbKey($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setDbValue($arr[$keys[3]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); + + if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $this->id); + if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::HISTORY_ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $this->history_id); + if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::KEY)) $criteria->add(CcPlayoutHistoryMetaDataPeer::KEY, $this->key); + if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::VALUE)) $criteria->add(CcPlayoutHistoryMetaDataPeer::VALUE, $this->value); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getDbId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setDbId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + return null === $this->getDbId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of CcPlayoutHistoryMetaData (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false) + { + $copyObj->setDbHistoryId($this->history_id); + $copyObj->setDbKey($this->key); + $copyObj->setDbValue($this->value); + + $copyObj->setNew(true); + $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return CcPlayoutHistoryMetaData Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + return $copyObj; + } + + /** + * Returns a peer instance associated with this om. + * + * Since Peer classes are not to have any instance attributes, this method returns the + * same instance for all member of this class. The method could therefore + * be static, but this would prevent one from overriding the behavior. + * + * @return CcPlayoutHistoryMetaDataPeer + */ + public function getPeer() + { + if (self::$peer === null) { + self::$peer = new CcPlayoutHistoryMetaDataPeer(); + } + return self::$peer; + } + + /** + * Declares an association between this object and a CcPlayoutHistory object. + * + * @param CcPlayoutHistory $v + * @return CcPlayoutHistoryMetaData The current object (for fluent API support) + * @throws PropelException + */ + public function setCcPlayoutHistory(CcPlayoutHistory $v = null) + { + if ($v === null) { + $this->setDbHistoryId(NULL); + } else { + $this->setDbHistoryId($v->getDbId()); + } + + $this->aCcPlayoutHistory = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the CcPlayoutHistory object, it will not be re-added. + if ($v !== null) { + $v->addCcPlayoutHistoryMetaData($this); + } + + return $this; + } + + + /** + * Get the associated CcPlayoutHistory object + * + * @param PropelPDO Optional Connection object. + * @return CcPlayoutHistory The associated CcPlayoutHistory object. + * @throws PropelException + */ + public function getCcPlayoutHistory(PropelPDO $con = null) + { + if ($this->aCcPlayoutHistory === null && ($this->history_id !== null)) { + $this->aCcPlayoutHistory = CcPlayoutHistoryQuery::create()->findPk($this->history_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCcPlayoutHistory->addCcPlayoutHistoryMetaDatas($this); + */ + } + return $this->aCcPlayoutHistory; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->history_id = null; + $this->key = null; + $this->value = null; + $this->alreadyInSave = false; + $this->alreadyInValidation = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all collections of referencing foreign keys. + * + * This method is a user-space workaround for PHP's inability to garbage collect objects + * with circular references. This is currently necessary when using Propel in certain + * daemon or large-volumne/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all associated objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCcPlayoutHistory = null; + } + + /** + * Catches calls to virtual methods + */ + public function __call($name, $params) + { + if (preg_match('/get(\w+)/', $name, $matches)) { + $virtualColumn = $matches[1]; + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + // no lcfirst in php<5.3... + $virtualColumn[0] = strtolower($virtualColumn[0]); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + throw new PropelException('Call to undefined method: ' . $name); + } + +} // BaseCcPlayoutHistoryMetaData diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php new file mode 100644 index 000000000..0b980ec4e --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php @@ -0,0 +1,983 @@ + array ('DbId', 'DbHistoryId', 'DbKey', 'DbValue', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbHistoryId', 'dbKey', 'dbValue', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::HISTORY_ID, self::KEY, self::VALUE, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'HISTORY_ID', 'KEY', 'VALUE', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'history_id', 'key', 'value', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + */ + private static $fieldKeys = array ( + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbHistoryId' => 1, 'DbKey' => 2, 'DbValue' => 3, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbHistoryId' => 1, 'dbKey' => 2, 'dbValue' => 3, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::HISTORY_ID => 1, self::KEY => 2, self::VALUE => 3, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'HISTORY_ID' => 1, 'KEY' => 2, 'VALUE' => 3, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'history_id' => 1, 'key' => 2, 'value' => 3, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + ); + + /** + * Translates a fieldname to another type + * + * @param string $name field name + * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. + * @throws PropelException - if the specified name could not be found in the fieldname mappings. + */ + static public function translateFieldName($name, $fromType, $toType) + { + $toNames = self::getFieldNames($toType); + $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + if ($key === null) { + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + } + return $toNames[$key]; + } + + /** + * Returns an array of field names. + * + * @param string $type The type of fieldnames to return: + * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return array A list of field names + */ + + static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + { + if (!array_key_exists($type, self::$fieldNames)) { + throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); + } + return self::$fieldNames[$type]; + } + + /** + * Convenience method which changes table.column to alias.column. + * + * Using this method you can maintain SQL abstraction while using column aliases. + * + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. CcPlayoutHistoryMetaDataPeer::COLUMN_NAME). + * @return string + */ + public static function alias($alias, $column) + { + return str_replace(CcPlayoutHistoryMetaDataPeer::TABLE_NAME.'.', $alias.'.', $column); + } + + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::ID); + $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::HISTORY_ID); + $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::KEY); + $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::VALUE); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.HISTORY_ID'); + $criteria->addSelectColumn($alias . '.KEY'); + $criteria->addSelectColumn($alias . '.VALUE'); + } + } + + /** + * Returns the number of rows matching criteria. + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @return int Number of matching rows. + */ + public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) + { + // we may modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + // BasePeer returns a PDOStatement + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + /** + * Method to select one object from the DB. + * + * @param Criteria $criteria object used to create the SELECT statement. + * @param PropelPDO $con + * @return CcPlayoutHistoryMetaData + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) + { + $critcopy = clone $criteria; + $critcopy->setLimit(1); + $objects = CcPlayoutHistoryMetaDataPeer::doSelect($critcopy, $con); + if ($objects) { + return $objects[0]; + } + return null; + } + /** + * Method to do selects. + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelect(Criteria $criteria, PropelPDO $con = null) + { + return CcPlayoutHistoryMetaDataPeer::populateObjects(CcPlayoutHistoryMetaDataPeer::doSelectStmt($criteria, $con)); + } + /** + * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. + * + * Use this method directly if you want to work with an executed statement durirectly (for example + * to perform your own object hydration). + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con The connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return PDOStatement The executed PDOStatement object. + * @see BasePeer::doSelect() + */ + public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + if (!$criteria->hasSelectClause()) { + $criteria = clone $criteria; + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + // BasePeer returns a PDOStatement + return BasePeer::doSelect($criteria, $con); + } + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doSelect*() + * methods in your stub classes -- you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by doSelect*() + * and retrieveByPK*() calls. + * + * @param CcPlayoutHistoryMetaData $value A CcPlayoutHistoryMetaData object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool(CcPlayoutHistoryMetaData $obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if ($key === null) { + $key = (string) $obj->getDbId(); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A CcPlayoutHistoryMetaData object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && $value !== null) { + if (is_object($value) && $value instanceof CcPlayoutHistoryMetaData) { + $key = (string) $value->getDbId(); + } elseif (is_scalar($value)) { + // assume we've been passed a primary key + $key = (string) $value; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlayoutHistoryMetaData object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } // removeInstanceFromPool() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param string $key The key (@see getPrimaryKeyHash()) for this instance. + * @return CcPlayoutHistoryMetaData Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @see getPrimaryKeyHash() + */ + public static function getInstanceFromPool($key) + { + if (Propel::isInstancePoolingEnabled()) { + if (isset(self::$instances[$key])) { + return self::$instances[$key]; + } + } + return null; // just to be explicit + } + + /** + * Clear the instance pool. + * + * @return void + */ + public static function clearInstancePool() + { + self::$instances = array(); + } + + /** + * Method to invalidate the instance pool of all tables related to cc_playout_history_metadata + * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return string A string version of PK or NULL if the components of primary key in result array are all null. + */ + public static function getPrimaryKeyHashFromRow($row, $startcol = 0) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[$startcol] === null) { + return null; + } + return (string) $row[$startcol]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $startcol = 0) + { + return (int) $row[$startcol]; + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(PDOStatement $stmt) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false); + // populate the object(s) + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj, $key); + } // if key exists + } + $stmt->closeCursor(); + return $results; + } + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CcPlayoutHistoryMetaData object, last column rank) + */ + public static function populateObject($row, $startcol = 0) + { + $key = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $startcol, true); // rehydrate + $col = $startcol + CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS; + } else { + $cls = CcPlayoutHistoryMetaDataPeer::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $startcol); + CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj, $key); + } + return array($obj, $col); + } + + /** + * Returns the number of rows matching criteria, joining the related CcPlayoutHistory table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinCcPlayoutHistory(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with their CcPlayoutHistory objects. + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryMetaData objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinCcPlayoutHistory(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + $startcol = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS); + CcPlayoutHistoryPeer::addSelectColumns($criteria); + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + + $cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1); + } // if $obj1 already loaded + + $key2 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, $startcol); + if ($key2 !== null) { + $obj2 = CcPlayoutHistoryPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol); + CcPlayoutHistoryPeer::addInstanceToPool($obj2, $key2); + } // if obj2 already loaded + + // Add the $obj1 (CcPlayoutHistoryMetaData) to $obj2 (CcPlayoutHistory) + $obj2->addCcPlayoutHistoryMetaData($obj1); + + } // if joined row was not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Returns the number of rows matching criteria, joining all related tables + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + /** + * Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with all related objects. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryMetaData objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS); + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcPlayoutHistory rows + + $key2 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcPlayoutHistoryPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcPlayoutHistoryPeer::addInstanceToPool($obj2, $key2); + } // if obj2 loaded + + // Add the $obj1 (CcPlayoutHistoryMetaData) to the collection in $obj2 (CcPlayoutHistory) + $obj2->addCcPlayoutHistoryMetaData($obj1); + } // if joined row not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + /** + * Returns the TableMap related to this peer. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this peer class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getDatabaseMap(BaseCcPlayoutHistoryMetaDataPeer::DATABASE_NAME); + if (!$dbMap->hasTable(BaseCcPlayoutHistoryMetaDataPeer::TABLE_NAME)) + { + $dbMap->addTableObject(new CcPlayoutHistoryMetaDataTableMap()); + } + } + + /** + * The class that the Peer will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is tranalted into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CcPlayoutHistoryMetaDataPeer::CLASS_DEFAULT : CcPlayoutHistoryMetaDataPeer::OM_CLASS; + } + + /** + * Method perform an INSERT on the database, given a CcPlayoutHistoryMetaData or Criteria object. + * + * @param mixed $values Criteria or CcPlayoutHistoryMetaData object containing data that is used to create the INSERT statement. + * @param PropelPDO $con the PropelPDO connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } else { + $criteria = $values->buildCriteria(); // build Criteria from CcPlayoutHistoryMetaData object + } + + if ($criteria->containsKey(CcPlayoutHistoryMetaDataPeer::ID) && $criteria->keyContainsValue(CcPlayoutHistoryMetaDataPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryMetaDataPeer::ID.')'); + } + + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = BasePeer::doInsert($criteria, $con); + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + + /** + * Method perform an UPDATE on the database, given a CcPlayoutHistoryMetaData or Criteria object. + * + * @param mixed $values Criteria or CcPlayoutHistoryMetaData object containing data that is used to create the UPDATE statement. + * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). + * @return int The number of affected rows (if supported by underlying database driver). + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doUpdate($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $selectCriteria = new Criteria(self::DATABASE_NAME); + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + + $comparison = $criteria->getComparison(CcPlayoutHistoryMetaDataPeer::ID); + $value = $criteria->remove(CcPlayoutHistoryMetaDataPeer::ID); + if ($value) { + $selectCriteria->add(CcPlayoutHistoryMetaDataPeer::ID, $value, $comparison); + } else { + $selectCriteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); + } + + } else { // $values is CcPlayoutHistoryMetaData object + $criteria = $values->buildCriteria(); // gets full criteria + $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) + } + + // set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + return BasePeer::doUpdate($selectCriteria, $criteria, $con); + } + + /** + * Method to DELETE all rows from the cc_playout_history_metadata table. + * + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll($con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += BasePeer::doDeleteAll(CcPlayoutHistoryMetaDataPeer::TABLE_NAME, $con, CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CcPlayoutHistoryMetaDataPeer::clearInstancePool(); + CcPlayoutHistoryMetaDataPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Method perform a DELETE on the database, given a CcPlayoutHistoryMetaData or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CcPlayoutHistoryMetaData object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param PropelPDO $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + // invalidate the cache for all objects of this type, since we have no + // way of knowing (without running a query) what objects should be invalidated + // from the cache based on this Criteria. + CcPlayoutHistoryMetaDataPeer::clearInstancePool(); + // rename for clarity + $criteria = clone $values; + } elseif ($values instanceof CcPlayoutHistoryMetaData) { // it's a model object + // invalidate the cache for this single object + CcPlayoutHistoryMetaDataPeer::removeInstanceFromPool($values); + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(self::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, (array) $values, Criteria::IN); + // invalidate the cache for this object(s) + foreach ((array) $values as $singleval) { + CcPlayoutHistoryMetaDataPeer::removeInstanceFromPool($singleval); + } + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + $affectedRows += BasePeer::doDelete($criteria, $con); + CcPlayoutHistoryMetaDataPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Validates all modified columns of given CcPlayoutHistoryMetaData object. + * If parameter $columns is either a single column name or an array of column names + * than only those columns are validated. + * + * NOTICE: This does not apply to primary or foreign keys for now. + * + * @param CcPlayoutHistoryMetaData $obj The object to validate. + * @param mixed $cols Column name or array of column names. + * + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. + */ + public static function doValidate(CcPlayoutHistoryMetaData $obj, $cols = null) + { + $columns = array(); + + if ($cols) { + $dbMap = Propel::getDatabaseMap(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); + + if (! is_array($cols)) { + $cols = array($cols); + } + + foreach ($cols as $colName) { + if ($tableMap->containsColumn($colName)) { + $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + $columns[$colName] = $obj->$get(); + } + } + } else { + + } + + return BasePeer::doValidate(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, CcPlayoutHistoryMetaDataPeer::TABLE_NAME, $columns); + } + + /** + * Retrieve a single object by pkey. + * + * @param int $pk the primary key. + * @param PropelPDO $con the connection to use + * @return CcPlayoutHistoryMetaData + */ + public static function retrieveByPK($pk, PropelPDO $con = null) + { + + if (null !== ($obj = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool((string) $pk))) { + return $obj; + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria = new Criteria(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $pk); + + $v = CcPlayoutHistoryMetaDataPeer::doSelect($criteria, $con); + + return !empty($v) > 0 ? $v[0] : null; + } + + /** + * Retrieve multiple objects by pkey. + * + * @param array $pks List of primary keys + * @param PropelPDO $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function retrieveByPKs($pks, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $objs = null; + if (empty($pks)) { + $objs = array(); + } else { + $criteria = new Criteria(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $pks, Criteria::IN); + $objs = CcPlayoutHistoryMetaDataPeer::doSelect($criteria, $con); + } + return $objs; + } + +} // BaseCcPlayoutHistoryMetaDataPeer + +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +BaseCcPlayoutHistoryMetaDataPeer::buildTableMap(); + diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php new file mode 100644 index 000000000..7a27c61af --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php @@ -0,0 +1,320 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + return $query; + } + + /** + * Find object by primary key + * Use instance pooling to avoid a database query if the object exists + * + * $obj = $c->findPk(12, $con); + * + * @param mixed $key Primary key to use for the query + * @param PropelPDO $con an optional connection object + * + * @return CcPlayoutHistoryMetaData|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ((null !== ($obj = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { + // the object is alredy in the instance pool + return $obj; + } else { + // the object has not been requested yet, or the formatter is not an object formatter + $criteria = $this->isKeepQuery() ? clone $this : $this; + $stmt = $criteria + ->filterByPrimaryKey($key) + ->getSelectStatement($con); + return $criteria->getFormatter()->init($criteria)->formatOne($stmt); + } + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param PropelPDO $con an optional connection object + * + * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + $criteria = $this->isKeepQuery() ? clone $this : $this; + return $this + ->filterByPrimaryKeys($keys) + ->find($con); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * @param int|array $dbId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function filterByDbId($dbId = null, $comparison = null) + { + if (is_array($dbId) && null === $comparison) { + $comparison = Criteria::IN; + } + return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $dbId, $comparison); + } + + /** + * Filter the query on the history_id column + * + * @param int|array $dbHistoryId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function filterByDbHistoryId($dbHistoryId = null, $comparison = null) + { + if (is_array($dbHistoryId)) { + $useMinMax = false; + if (isset($dbHistoryId['min'])) { + $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbHistoryId['max'])) { + $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId, $comparison); + } + + /** + * Filter the query on the key column + * + * @param string $dbKey The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function filterByDbKey($dbKey = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbKey)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbKey)) { + $dbKey = str_replace('*', '%', $dbKey); + $comparison = Criteria::LIKE; + } + } + return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::KEY, $dbKey, $comparison); + } + + /** + * Filter the query on the value column + * + * @param string $dbValue The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function filterByDbValue($dbValue = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbValue)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbValue)) { + $dbValue = str_replace('*', '%', $dbValue); + $comparison = Criteria::LIKE; + } + } + return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::VALUE, $dbValue, $comparison); + } + + /** + * Filter the query by a related CcPlayoutHistory object + * + * @param CcPlayoutHistory $ccPlayoutHistory the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function filterByCcPlayoutHistory($ccPlayoutHistory, $comparison = null) + { + return $this + ->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $ccPlayoutHistory->getDbId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcPlayoutHistory relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function joinCcPlayoutHistory($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcPlayoutHistory'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcPlayoutHistory'); + } + + return $this; + } + + /** + * Use the CcPlayoutHistory relation CcPlayoutHistory object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryQuery A secondary query class using the current class as primary query + */ + public function useCcPlayoutHistoryQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcPlayoutHistory($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery'); + } + + /** + * Exclude object from result + * + * @param CcPlayoutHistoryMetaData $ccPlayoutHistoryMetaData Object to remove from the list of results + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function prune($ccPlayoutHistoryMetaData = null) + { + if ($ccPlayoutHistoryMetaData) { + $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $ccPlayoutHistoryMetaData->getDbId(), Criteria::NOT_EQUAL); + } + + return $this; + } + +} // BaseCcPlayoutHistoryMetaDataQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php new file mode 100644 index 000000000..91fda6a6b --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php @@ -0,0 +1,986 @@ + array ('DbId', 'DbFileId', 'DbStarts', 'DbEnds', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbStarts', 'dbEnds', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::FILE_ID, self::STARTS, self::ENDS, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'STARTS', 'ENDS', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'starts', 'ends', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + */ + private static $fieldKeys = array ( + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbStarts' => 2, 'DbEnds' => 3, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbStarts' => 2, 'dbEnds' => 3, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FILE_ID => 1, self::STARTS => 2, self::ENDS => 3, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'STARTS' => 2, 'ENDS' => 3, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'starts' => 2, 'ends' => 3, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + ); + + /** + * Translates a fieldname to another type + * + * @param string $name field name + * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. + * @throws PropelException - if the specified name could not be found in the fieldname mappings. + */ + static public function translateFieldName($name, $fromType, $toType) + { + $toNames = self::getFieldNames($toType); + $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + if ($key === null) { + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + } + return $toNames[$key]; + } + + /** + * Returns an array of field names. + * + * @param string $type The type of fieldnames to return: + * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return array A list of field names + */ + + static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + { + if (!array_key_exists($type, self::$fieldNames)) { + throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); + } + return self::$fieldNames[$type]; + } + + /** + * Convenience method which changes table.column to alias.column. + * + * Using this method you can maintain SQL abstraction while using column aliases. + * + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. CcPlayoutHistoryPeer::COLUMN_NAME). + * @return string + */ + public static function alias($alias, $column) + { + return str_replace(CcPlayoutHistoryPeer::TABLE_NAME.'.', $alias.'.', $column); + } + + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CcPlayoutHistoryPeer::ID); + $criteria->addSelectColumn(CcPlayoutHistoryPeer::FILE_ID); + $criteria->addSelectColumn(CcPlayoutHistoryPeer::STARTS); + $criteria->addSelectColumn(CcPlayoutHistoryPeer::ENDS); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.FILE_ID'); + $criteria->addSelectColumn($alias . '.STARTS'); + $criteria->addSelectColumn($alias . '.ENDS'); + } + } + + /** + * Returns the number of rows matching criteria. + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @return int Number of matching rows. + */ + public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) + { + // we may modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + // BasePeer returns a PDOStatement + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + /** + * Method to select one object from the DB. + * + * @param Criteria $criteria object used to create the SELECT statement. + * @param PropelPDO $con + * @return CcPlayoutHistory + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) + { + $critcopy = clone $criteria; + $critcopy->setLimit(1); + $objects = CcPlayoutHistoryPeer::doSelect($critcopy, $con); + if ($objects) { + return $objects[0]; + } + return null; + } + /** + * Method to do selects. + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelect(Criteria $criteria, PropelPDO $con = null) + { + return CcPlayoutHistoryPeer::populateObjects(CcPlayoutHistoryPeer::doSelectStmt($criteria, $con)); + } + /** + * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. + * + * Use this method directly if you want to work with an executed statement durirectly (for example + * to perform your own object hydration). + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con The connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return PDOStatement The executed PDOStatement object. + * @see BasePeer::doSelect() + */ + public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + if (!$criteria->hasSelectClause()) { + $criteria = clone $criteria; + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + // BasePeer returns a PDOStatement + return BasePeer::doSelect($criteria, $con); + } + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doSelect*() + * methods in your stub classes -- you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by doSelect*() + * and retrieveByPK*() calls. + * + * @param CcPlayoutHistory $value A CcPlayoutHistory object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool(CcPlayoutHistory $obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if ($key === null) { + $key = (string) $obj->getDbId(); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A CcPlayoutHistory object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && $value !== null) { + if (is_object($value) && $value instanceof CcPlayoutHistory) { + $key = (string) $value->getDbId(); + } elseif (is_scalar($value)) { + // assume we've been passed a primary key + $key = (string) $value; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlayoutHistory object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } // removeInstanceFromPool() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param string $key The key (@see getPrimaryKeyHash()) for this instance. + * @return CcPlayoutHistory Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @see getPrimaryKeyHash() + */ + public static function getInstanceFromPool($key) + { + if (Propel::isInstancePoolingEnabled()) { + if (isset(self::$instances[$key])) { + return self::$instances[$key]; + } + } + return null; // just to be explicit + } + + /** + * Clear the instance pool. + * + * @return void + */ + public static function clearInstancePool() + { + self::$instances = array(); + } + + /** + * Method to invalidate the instance pool of all tables related to cc_playout_history + * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in CcPlayoutHistoryMetaDataPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcPlayoutHistoryMetaDataPeer::clearInstancePool(); + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return string A string version of PK or NULL if the components of primary key in result array are all null. + */ + public static function getPrimaryKeyHashFromRow($row, $startcol = 0) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[$startcol] === null) { + return null; + } + return (string) $row[$startcol]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $startcol = 0) + { + return (int) $row[$startcol]; + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(PDOStatement $stmt) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = CcPlayoutHistoryPeer::getOMClass(false); + // populate the object(s) + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = CcPlayoutHistoryPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CcPlayoutHistoryPeer::addInstanceToPool($obj, $key); + } // if key exists + } + $stmt->closeCursor(); + return $results; + } + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CcPlayoutHistory object, last column rank) + */ + public static function populateObject($row, $startcol = 0) + { + $key = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = CcPlayoutHistoryPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $startcol, true); // rehydrate + $col = $startcol + CcPlayoutHistoryPeer::NUM_COLUMNS; + } else { + $cls = CcPlayoutHistoryPeer::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $startcol); + CcPlayoutHistoryPeer::addInstanceToPool($obj, $key); + } + return array($obj, $col); + } + + /** + * Returns the number of rows matching criteria, joining the related CcFiles table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Selects a collection of CcPlayoutHistory objects pre-filled with their CcFiles objects. + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistory objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + CcFilesPeer::addSelectColumns($criteria); + + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); + } // if $obj1 already loaded + + $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol); + if ($key2 !== null) { + $obj2 = CcFilesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcFilesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol); + CcFilesPeer::addInstanceToPool($obj2, $key2); + } // if obj2 already loaded + + // Add the $obj1 (CcPlayoutHistory) to $obj2 (CcFiles) + $obj2->addCcPlayoutHistory($obj1); + + } // if joined row was not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Returns the number of rows matching criteria, joining all related tables + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + /** + * Selects a collection of CcPlayoutHistory objects pre-filled with all related objects. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistory objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + + CcFilesPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcFiles rows + + $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcFilesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcFilesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcFilesPeer::addInstanceToPool($obj2, $key2); + } // if obj2 loaded + + // Add the $obj1 (CcPlayoutHistory) to the collection in $obj2 (CcFiles) + $obj2->addCcPlayoutHistory($obj1); + } // if joined row not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + /** + * Returns the TableMap related to this peer. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this peer class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getDatabaseMap(BaseCcPlayoutHistoryPeer::DATABASE_NAME); + if (!$dbMap->hasTable(BaseCcPlayoutHistoryPeer::TABLE_NAME)) + { + $dbMap->addTableObject(new CcPlayoutHistoryTableMap()); + } + } + + /** + * The class that the Peer will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is tranalted into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CcPlayoutHistoryPeer::CLASS_DEFAULT : CcPlayoutHistoryPeer::OM_CLASS; + } + + /** + * Method perform an INSERT on the database, given a CcPlayoutHistory or Criteria object. + * + * @param mixed $values Criteria or CcPlayoutHistory object containing data that is used to create the INSERT statement. + * @param PropelPDO $con the PropelPDO connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } else { + $criteria = $values->buildCriteria(); // build Criteria from CcPlayoutHistory object + } + + if ($criteria->containsKey(CcPlayoutHistoryPeer::ID) && $criteria->keyContainsValue(CcPlayoutHistoryPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryPeer::ID.')'); + } + + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = BasePeer::doInsert($criteria, $con); + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + + /** + * Method perform an UPDATE on the database, given a CcPlayoutHistory or Criteria object. + * + * @param mixed $values Criteria or CcPlayoutHistory object containing data that is used to create the UPDATE statement. + * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). + * @return int The number of affected rows (if supported by underlying database driver). + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doUpdate($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $selectCriteria = new Criteria(self::DATABASE_NAME); + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + + $comparison = $criteria->getComparison(CcPlayoutHistoryPeer::ID); + $value = $criteria->remove(CcPlayoutHistoryPeer::ID); + if ($value) { + $selectCriteria->add(CcPlayoutHistoryPeer::ID, $value, $comparison); + } else { + $selectCriteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + } + + } else { // $values is CcPlayoutHistory object + $criteria = $values->buildCriteria(); // gets full criteria + $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) + } + + // set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + return BasePeer::doUpdate($selectCriteria, $criteria, $con); + } + + /** + * Method to DELETE all rows from the cc_playout_history table. + * + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll($con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += BasePeer::doDeleteAll(CcPlayoutHistoryPeer::TABLE_NAME, $con, CcPlayoutHistoryPeer::DATABASE_NAME); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CcPlayoutHistoryPeer::clearInstancePool(); + CcPlayoutHistoryPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Method perform a DELETE on the database, given a CcPlayoutHistory or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CcPlayoutHistory object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param PropelPDO $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + // invalidate the cache for all objects of this type, since we have no + // way of knowing (without running a query) what objects should be invalidated + // from the cache based on this Criteria. + CcPlayoutHistoryPeer::clearInstancePool(); + // rename for clarity + $criteria = clone $values; + } elseif ($values instanceof CcPlayoutHistory) { // it's a model object + // invalidate the cache for this single object + CcPlayoutHistoryPeer::removeInstanceFromPool($values); + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(self::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryPeer::ID, (array) $values, Criteria::IN); + // invalidate the cache for this object(s) + foreach ((array) $values as $singleval) { + CcPlayoutHistoryPeer::removeInstanceFromPool($singleval); + } + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + $affectedRows += BasePeer::doDelete($criteria, $con); + CcPlayoutHistoryPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Validates all modified columns of given CcPlayoutHistory object. + * If parameter $columns is either a single column name or an array of column names + * than only those columns are validated. + * + * NOTICE: This does not apply to primary or foreign keys for now. + * + * @param CcPlayoutHistory $obj The object to validate. + * @param mixed $cols Column name or array of column names. + * + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. + */ + public static function doValidate(CcPlayoutHistory $obj, $cols = null) + { + $columns = array(); + + if ($cols) { + $dbMap = Propel::getDatabaseMap(CcPlayoutHistoryPeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(CcPlayoutHistoryPeer::TABLE_NAME); + + if (! is_array($cols)) { + $cols = array($cols); + } + + foreach ($cols as $colName) { + if ($tableMap->containsColumn($colName)) { + $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + $columns[$colName] = $obj->$get(); + } + } + } else { + + } + + return BasePeer::doValidate(CcPlayoutHistoryPeer::DATABASE_NAME, CcPlayoutHistoryPeer::TABLE_NAME, $columns); + } + + /** + * Retrieve a single object by pkey. + * + * @param int $pk the primary key. + * @param PropelPDO $con the connection to use + * @return CcPlayoutHistory + */ + public static function retrieveByPK($pk, PropelPDO $con = null) + { + + if (null !== ($obj = CcPlayoutHistoryPeer::getInstanceFromPool((string) $pk))) { + return $obj; + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria = new Criteria(CcPlayoutHistoryPeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryPeer::ID, $pk); + + $v = CcPlayoutHistoryPeer::doSelect($criteria, $con); + + return !empty($v) > 0 ? $v[0] : null; + } + + /** + * Retrieve multiple objects by pkey. + * + * @param array $pks List of primary keys + * @param PropelPDO $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function retrieveByPKs($pks, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $objs = null; + if (empty($pks)) { + $objs = array(); + } else { + $criteria = new Criteria(CcPlayoutHistoryPeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryPeer::ID, $pks, Criteria::IN); + $objs = CcPlayoutHistoryPeer::doSelect($criteria, $con); + } + return $objs; + } + +} // BaseCcPlayoutHistoryPeer + +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +BaseCcPlayoutHistoryPeer::buildTableMap(); + diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php new file mode 100644 index 000000000..370238102 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php @@ -0,0 +1,406 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + return $query; + } + + /** + * Find object by primary key + * Use instance pooling to avoid a database query if the object exists + * + * $obj = $c->findPk(12, $con); + * + * @param mixed $key Primary key to use for the query + * @param PropelPDO $con an optional connection object + * + * @return CcPlayoutHistory|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ((null !== ($obj = CcPlayoutHistoryPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { + // the object is alredy in the instance pool + return $obj; + } else { + // the object has not been requested yet, or the formatter is not an object formatter + $criteria = $this->isKeepQuery() ? clone $this : $this; + $stmt = $criteria + ->filterByPrimaryKey($key) + ->getSelectStatement($con); + return $criteria->getFormatter()->init($criteria)->formatOne($stmt); + } + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param PropelPDO $con an optional connection object + * + * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + $criteria = $this->isKeepQuery() ? clone $this : $this; + return $this + ->filterByPrimaryKeys($keys) + ->find($con); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + return $this->addUsingAlias(CcPlayoutHistoryPeer::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + return $this->addUsingAlias(CcPlayoutHistoryPeer::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * @param int|array $dbId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByDbId($dbId = null, $comparison = null) + { + if (is_array($dbId) && null === $comparison) { + $comparison = Criteria::IN; + } + return $this->addUsingAlias(CcPlayoutHistoryPeer::ID, $dbId, $comparison); + } + + /** + * Filter the query on the file_id column + * + * @param int|array $dbFileId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByDbFileId($dbFileId = null, $comparison = null) + { + if (is_array($dbFileId)) { + $useMinMax = false; + if (isset($dbFileId['min'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::FILE_ID, $dbFileId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbFileId['max'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::FILE_ID, $dbFileId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryPeer::FILE_ID, $dbFileId, $comparison); + } + + /** + * Filter the query on the starts column + * + * @param string|array $dbStarts The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByDbStarts($dbStarts = null, $comparison = null) + { + if (is_array($dbStarts)) { + $useMinMax = false; + if (isset($dbStarts['min'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::STARTS, $dbStarts['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbStarts['max'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::STARTS, $dbStarts['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryPeer::STARTS, $dbStarts, $comparison); + } + + /** + * Filter the query on the ends column + * + * @param string|array $dbEnds The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByDbEnds($dbEnds = null, $comparison = null) + { + if (is_array($dbEnds)) { + $useMinMax = false; + if (isset($dbEnds['min'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::ENDS, $dbEnds['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbEnds['max'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::ENDS, $dbEnds['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryPeer::ENDS, $dbEnds, $comparison); + } + + /** + * Filter the query by a related CcFiles object + * + * @param CcFiles $ccFiles the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByCcFiles($ccFiles, $comparison = null) + { + return $this + ->addUsingAlias(CcPlayoutHistoryPeer::FILE_ID, $ccFiles->getDbId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcFiles relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function joinCcFiles($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcFiles'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcFiles'); + } + + return $this; + } + + /** + * Use the CcFiles relation CcFiles object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcFilesQuery A secondary query class using the current class as primary query + */ + public function useCcFilesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinCcFiles($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery'); + } + + /** + * Filter the query by a related CcPlayoutHistoryMetaData object + * + * @param CcPlayoutHistoryMetaData $ccPlayoutHistoryMetaData the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByCcPlayoutHistoryMetaData($ccPlayoutHistoryMetaData, $comparison = null) + { + return $this + ->addUsingAlias(CcPlayoutHistoryPeer::ID, $ccPlayoutHistoryMetaData->getDbHistoryId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcPlayoutHistoryMetaData relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function joinCcPlayoutHistoryMetaData($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcPlayoutHistoryMetaData'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcPlayoutHistoryMetaData'); + } + + return $this; + } + + /** + * Use the CcPlayoutHistoryMetaData relation CcPlayoutHistoryMetaData object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryMetaDataQuery A secondary query class using the current class as primary query + */ + public function useCcPlayoutHistoryMetaDataQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcPlayoutHistoryMetaData($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaDataQuery'); + } + + /** + * Exclude object from result + * + * @param CcPlayoutHistory $ccPlayoutHistory Object to remove from the list of results + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function prune($ccPlayoutHistory = null) + { + if ($ccPlayoutHistory) { + $this->addUsingAlias(CcPlayoutHistoryPeer::ID, $ccPlayoutHistory->getDbId(), Criteria::NOT_EQUAL); + } + + return $this; + } + +} // BaseCcPlayoutHistoryQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplate.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplate.php new file mode 100644 index 000000000..847d866f9 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplate.php @@ -0,0 +1,893 @@ +id; + } + + /** + * Get the [template_name] column value. + * + * @return string + */ + public function getDbTemplateName() + { + return $this->template_name; + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return CcPlayoutHistoryTemplate The current object (for fluent API support) + */ + public function setDbId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryTemplatePeer::ID; + } + + return $this; + } // setDbId() + + /** + * Set the value of [template_name] column. + * + * @param string $v new value + * @return CcPlayoutHistoryTemplate The current object (for fluent API support) + */ + public function setDbTemplateName($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->template_name !== $v) { + $this->template_name = $v; + $this->modifiedColumns[] = CcPlayoutHistoryTemplatePeer::TEMPLATE_NAME; + } + + return $this; + } // setDbTemplateName() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false) + { + try { + + $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; + $this->template_name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 2; // 2 = CcPlayoutHistoryTemplatePeer::NUM_COLUMNS - CcPlayoutHistoryTemplatePeer::NUM_LAZY_LOAD_COLUMNS). + + } catch (Exception $e) { + throw new PropelException("Error populating CcPlayoutHistoryTemplate object", $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param PropelPDO $con (optional) The PropelPDO connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $stmt = CcPlayoutHistoryTemplatePeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $row = $stmt->fetch(PDO::FETCH_NUM); + $stmt->closeCursor(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->collCcPlayoutHistoryTemplateTags = null; + + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param PropelPDO $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() + */ + public function delete(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + try { + $ret = $this->preDelete($con); + if ($ret) { + CcPlayoutHistoryTemplateQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()) + ->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CcPlayoutHistoryTemplatePeer::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(PropelPDO $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + if ($this->isNew() ) { + $this->modifiedColumns[] = CcPlayoutHistoryTemplatePeer::ID; + } + + // If this object has been modified, then save it to the database. + if ($this->isModified()) { + if ($this->isNew()) { + $criteria = $this->buildCriteria(); + if ($criteria->keyContainsValue(CcPlayoutHistoryTemplatePeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplatePeer::ID.')'); + } + + $pk = BasePeer::doInsert($criteria, $con); + $affectedRows = 1; + $this->setDbId($pk); //[IMV] update autoincrement primary key + $this->setNew(false); + } else { + $affectedRows = CcPlayoutHistoryTemplatePeer::doUpdate($this, $con); + } + + $this->resetModified(); // [HL] After being saved an object is no longer 'modified' + } + + if ($this->collCcPlayoutHistoryTemplateTags !== null) { + foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + + $this->alreadyInSave = false; + + } + return $affectedRows; + } // doSave() + + /** + * Array of ValidationFailed objects. + * @var array ValidationFailed[] + */ + protected $validationFailures = array(); + + /** + * Gets any ValidationFailed objects that resulted from last call to validate(). + * + * + * @return array ValidationFailed[] + * @see validate() + */ + public function getValidationFailures() + { + return $this->validationFailures; + } + + /** + * Validates the objects modified field values and all objects related to this table. + * + * If $columns is either a column name or an array of column names + * only those columns are validated. + * + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() + */ + public function validate($columns = null) + { + $res = $this->doValidate($columns); + if ($res === true) { + $this->validationFailures = array(); + return true; + } else { + $this->validationFailures = $res; + return false; + } + } + + /** + * This function performs the validation work for complex object models. + * + * In addition to checking the current object, all related objects will + * also be validated. If all pass then true is returned; otherwise + * an aggreagated array of ValidationFailed objects will be returned. + * + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. + */ + protected function doValidate($columns = null) + { + if (!$this->alreadyInValidation) { + $this->alreadyInValidation = true; + $retval = null; + + $failureMap = array(); + + + if (($retval = CcPlayoutHistoryTemplatePeer::doValidate($this, $columns)) !== true) { + $failureMap = array_merge($failureMap, $retval); + } + + + if ($this->collCcPlayoutHistoryTemplateTags !== null) { + foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + + + $this->alreadyInValidation = false; + } + + return (!empty($failureMap) ? $failureMap : true); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return mixed Value of field. + */ + public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcPlayoutHistoryTemplatePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $field = $this->getByPosition($pos); + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch($pos) { + case 0: + return $this->getDbId(); + break; + case 1: + return $this->getDbTemplateName(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * Defaults to BasePeer::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true) + { + $keys = CcPlayoutHistoryTemplatePeer::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getDbId(), + $keys[1] => $this->getDbTemplateName(), + ); + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return void + */ + public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcPlayoutHistoryTemplatePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch($pos) { + case 0: + $this->setDbId($value); + break; + case 1: + $this->setDbTemplateName($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * The default key type is the column's phpname (e.g. 'AuthorId') + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + { + $keys = CcPlayoutHistoryTemplatePeer::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setDbTemplateName($arr[$keys[1]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); + + if ($this->isColumnModified(CcPlayoutHistoryTemplatePeer::ID)) $criteria->add(CcPlayoutHistoryTemplatePeer::ID, $this->id); + if ($this->isColumnModified(CcPlayoutHistoryTemplatePeer::TEMPLATE_NAME)) $criteria->add(CcPlayoutHistoryTemplatePeer::TEMPLATE_NAME, $this->template_name); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryTemplatePeer::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getDbId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setDbId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + return null === $this->getDbId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of CcPlayoutHistoryTemplate (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false) + { + $copyObj->setDbTemplateName($this->template_name); + + if ($deepCopy) { + // important: temporarily setNew(false) because this affects the behavior of + // the getter/setter methods for fkey referrer objects. + $copyObj->setNew(false); + + foreach ($this->getCcPlayoutHistoryTemplateTags() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcPlayoutHistoryTemplateTag($relObj->copy($deepCopy)); + } + } + + } // if ($deepCopy) + + + $copyObj->setNew(true); + $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return CcPlayoutHistoryTemplate Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + return $copyObj; + } + + /** + * Returns a peer instance associated with this om. + * + * Since Peer classes are not to have any instance attributes, this method returns the + * same instance for all member of this class. The method could therefore + * be static, but this would prevent one from overriding the behavior. + * + * @return CcPlayoutHistoryTemplatePeer + */ + public function getPeer() + { + if (self::$peer === null) { + self::$peer = new CcPlayoutHistoryTemplatePeer(); + } + return self::$peer; + } + + /** + * Clears out the collCcPlayoutHistoryTemplateTags collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcPlayoutHistoryTemplateTags() + */ + public function clearCcPlayoutHistoryTemplateTags() + { + $this->collCcPlayoutHistoryTemplateTags = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcPlayoutHistoryTemplateTags collection. + * + * By default this just sets the collCcPlayoutHistoryTemplateTags collection to an empty array (like clearcollCcPlayoutHistoryTemplateTags()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcPlayoutHistoryTemplateTags() + { + $this->collCcPlayoutHistoryTemplateTags = new PropelObjectCollection(); + $this->collCcPlayoutHistoryTemplateTags->setModel('CcPlayoutHistoryTemplateTag'); + } + + /** + * Gets an array of CcPlayoutHistoryTemplateTag objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcPlayoutHistoryTemplate is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcPlayoutHistoryTemplateTag[] List of CcPlayoutHistoryTemplateTag objects + * @throws PropelException + */ + public function getCcPlayoutHistoryTemplateTags($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistoryTemplateTags || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateTags) { + // return empty collection + $this->initCcPlayoutHistoryTemplateTags(); + } else { + $collCcPlayoutHistoryTemplateTags = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria) + ->filterByCcPlayoutHistoryTemplate($this) + ->find($con); + if (null !== $criteria) { + return $collCcPlayoutHistoryTemplateTags; + } + $this->collCcPlayoutHistoryTemplateTags = $collCcPlayoutHistoryTemplateTags; + } + } + return $this->collCcPlayoutHistoryTemplateTags; + } + + /** + * Returns the number of related CcPlayoutHistoryTemplateTag objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcPlayoutHistoryTemplateTag objects. + * @throws PropelException + */ + public function countCcPlayoutHistoryTemplateTags(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistoryTemplateTags || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateTags) { + return 0; + } else { + $query = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcPlayoutHistoryTemplate($this) + ->count($con); + } + } else { + return count($this->collCcPlayoutHistoryTemplateTags); + } + } + + /** + * Method called to associate a CcPlayoutHistoryTemplateTag object to this object + * through the CcPlayoutHistoryTemplateTag foreign key attribute. + * + * @param CcPlayoutHistoryTemplateTag $l CcPlayoutHistoryTemplateTag + * @return void + * @throws PropelException + */ + public function addCcPlayoutHistoryTemplateTag(CcPlayoutHistoryTemplateTag $l) + { + if ($this->collCcPlayoutHistoryTemplateTags === null) { + $this->initCcPlayoutHistoryTemplateTags(); + } + if (!$this->collCcPlayoutHistoryTemplateTags->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcPlayoutHistoryTemplateTags[]= $l; + $l->setCcPlayoutHistoryTemplate($this); + } + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcPlayoutHistoryTemplate is new, it will return + * an empty collection; or if this CcPlayoutHistoryTemplate has previously + * been saved, it will retrieve related CcPlayoutHistoryTemplateTags from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcPlayoutHistoryTemplate. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcPlayoutHistoryTemplateTag[] List of CcPlayoutHistoryTemplateTag objects + */ + public function getCcPlayoutHistoryTemplateTagsJoinCcTag($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria); + $query->joinWith('CcTag', $join_behavior); + + return $this->getCcPlayoutHistoryTemplateTags($query, $con); + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->template_name = null; + $this->alreadyInSave = false; + $this->alreadyInValidation = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all collections of referencing foreign keys. + * + * This method is a user-space workaround for PHP's inability to garbage collect objects + * with circular references. This is currently necessary when using Propel in certain + * daemon or large-volumne/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all associated objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + if ($this->collCcPlayoutHistoryTemplateTags) { + foreach ((array) $this->collCcPlayoutHistoryTemplateTags as $o) { + $o->clearAllReferences($deep); + } + } + } // if ($deep) + + $this->collCcPlayoutHistoryTemplateTags = null; + } + + /** + * Catches calls to virtual methods + */ + public function __call($name, $params) + { + if (preg_match('/get(\w+)/', $name, $matches)) { + $virtualColumn = $matches[1]; + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + // no lcfirst in php<5.3... + $virtualColumn[0] = strtolower($virtualColumn[0]); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + throw new PropelException('Call to undefined method: ' . $name); + } + +} // BaseCcPlayoutHistoryTemplate diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplatePeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplatePeer.php new file mode 100644 index 000000000..76647d520 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplatePeer.php @@ -0,0 +1,742 @@ + array ('DbId', 'DbTemplateName', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTemplateName', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::TEMPLATE_NAME, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TEMPLATE_NAME', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'template_name', ), + BasePeer::TYPE_NUM => array (0, 1, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + */ + private static $fieldKeys = array ( + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTemplateName' => 1, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTemplateName' => 1, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TEMPLATE_NAME => 1, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TEMPLATE_NAME' => 1, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'template_name' => 1, ), + BasePeer::TYPE_NUM => array (0, 1, ) + ); + + /** + * Translates a fieldname to another type + * + * @param string $name field name + * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. + * @throws PropelException - if the specified name could not be found in the fieldname mappings. + */ + static public function translateFieldName($name, $fromType, $toType) + { + $toNames = self::getFieldNames($toType); + $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + if ($key === null) { + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + } + return $toNames[$key]; + } + + /** + * Returns an array of field names. + * + * @param string $type The type of fieldnames to return: + * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return array A list of field names + */ + + static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + { + if (!array_key_exists($type, self::$fieldNames)) { + throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); + } + return self::$fieldNames[$type]; + } + + /** + * Convenience method which changes table.column to alias.column. + * + * Using this method you can maintain SQL abstraction while using column aliases. + * + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. CcPlayoutHistoryTemplatePeer::COLUMN_NAME). + * @return string + */ + public static function alias($alias, $column) + { + return str_replace(CcPlayoutHistoryTemplatePeer::TABLE_NAME.'.', $alias.'.', $column); + } + + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CcPlayoutHistoryTemplatePeer::ID); + $criteria->addSelectColumn(CcPlayoutHistoryTemplatePeer::TEMPLATE_NAME); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.TEMPLATE_NAME'); + } + } + + /** + * Returns the number of rows matching criteria. + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @return int Number of matching rows. + */ + public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) + { + // we may modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryTemplatePeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + // BasePeer returns a PDOStatement + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + /** + * Method to select one object from the DB. + * + * @param Criteria $criteria object used to create the SELECT statement. + * @param PropelPDO $con + * @return CcPlayoutHistoryTemplate + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) + { + $critcopy = clone $criteria; + $critcopy->setLimit(1); + $objects = CcPlayoutHistoryTemplatePeer::doSelect($critcopy, $con); + if ($objects) { + return $objects[0]; + } + return null; + } + /** + * Method to do selects. + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelect(Criteria $criteria, PropelPDO $con = null) + { + return CcPlayoutHistoryTemplatePeer::populateObjects(CcPlayoutHistoryTemplatePeer::doSelectStmt($criteria, $con)); + } + /** + * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. + * + * Use this method directly if you want to work with an executed statement durirectly (for example + * to perform your own object hydration). + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con The connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return PDOStatement The executed PDOStatement object. + * @see BasePeer::doSelect() + */ + public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + if (!$criteria->hasSelectClause()) { + $criteria = clone $criteria; + CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + // BasePeer returns a PDOStatement + return BasePeer::doSelect($criteria, $con); + } + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doSelect*() + * methods in your stub classes -- you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by doSelect*() + * and retrieveByPK*() calls. + * + * @param CcPlayoutHistoryTemplate $value A CcPlayoutHistoryTemplate object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool(CcPlayoutHistoryTemplate $obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if ($key === null) { + $key = (string) $obj->getDbId(); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A CcPlayoutHistoryTemplate object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && $value !== null) { + if (is_object($value) && $value instanceof CcPlayoutHistoryTemplate) { + $key = (string) $value->getDbId(); + } elseif (is_scalar($value)) { + // assume we've been passed a primary key + $key = (string) $value; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlayoutHistoryTemplate object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } // removeInstanceFromPool() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param string $key The key (@see getPrimaryKeyHash()) for this instance. + * @return CcPlayoutHistoryTemplate Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @see getPrimaryKeyHash() + */ + public static function getInstanceFromPool($key) + { + if (Propel::isInstancePoolingEnabled()) { + if (isset(self::$instances[$key])) { + return self::$instances[$key]; + } + } + return null; // just to be explicit + } + + /** + * Clear the instance pool. + * + * @return void + */ + public static function clearInstancePool() + { + self::$instances = array(); + } + + /** + * Method to invalidate the instance pool of all tables related to cc_playout_history_template + * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in CcPlayoutHistoryTemplateTagPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcPlayoutHistoryTemplateTagPeer::clearInstancePool(); + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return string A string version of PK or NULL if the components of primary key in result array are all null. + */ + public static function getPrimaryKeyHashFromRow($row, $startcol = 0) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[$startcol] === null) { + return null; + } + return (string) $row[$startcol]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $startcol = 0) + { + return (int) $row[$startcol]; + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(PDOStatement $stmt) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = CcPlayoutHistoryTemplatePeer::getOMClass(false); + // populate the object(s) + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj, $key); + } // if key exists + } + $stmt->closeCursor(); + return $results; + } + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CcPlayoutHistoryTemplate object, last column rank) + */ + public static function populateObject($row, $startcol = 0) + { + $key = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $startcol, true); // rehydrate + $col = $startcol + CcPlayoutHistoryTemplatePeer::NUM_COLUMNS; + } else { + $cls = CcPlayoutHistoryTemplatePeer::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $startcol); + CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj, $key); + } + return array($obj, $col); + } + /** + * Returns the TableMap related to this peer. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this peer class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getDatabaseMap(BaseCcPlayoutHistoryTemplatePeer::DATABASE_NAME); + if (!$dbMap->hasTable(BaseCcPlayoutHistoryTemplatePeer::TABLE_NAME)) + { + $dbMap->addTableObject(new CcPlayoutHistoryTemplateTableMap()); + } + } + + /** + * The class that the Peer will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is tranalted into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CcPlayoutHistoryTemplatePeer::CLASS_DEFAULT : CcPlayoutHistoryTemplatePeer::OM_CLASS; + } + + /** + * Method perform an INSERT on the database, given a CcPlayoutHistoryTemplate or Criteria object. + * + * @param mixed $values Criteria or CcPlayoutHistoryTemplate object containing data that is used to create the INSERT statement. + * @param PropelPDO $con the PropelPDO connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } else { + $criteria = $values->buildCriteria(); // build Criteria from CcPlayoutHistoryTemplate object + } + + if ($criteria->containsKey(CcPlayoutHistoryTemplatePeer::ID) && $criteria->keyContainsValue(CcPlayoutHistoryTemplatePeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplatePeer::ID.')'); + } + + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = BasePeer::doInsert($criteria, $con); + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + + /** + * Method perform an UPDATE on the database, given a CcPlayoutHistoryTemplate or Criteria object. + * + * @param mixed $values Criteria or CcPlayoutHistoryTemplate object containing data that is used to create the UPDATE statement. + * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). + * @return int The number of affected rows (if supported by underlying database driver). + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doUpdate($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $selectCriteria = new Criteria(self::DATABASE_NAME); + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + + $comparison = $criteria->getComparison(CcPlayoutHistoryTemplatePeer::ID); + $value = $criteria->remove(CcPlayoutHistoryTemplatePeer::ID); + if ($value) { + $selectCriteria->add(CcPlayoutHistoryTemplatePeer::ID, $value, $comparison); + } else { + $selectCriteria->setPrimaryTableName(CcPlayoutHistoryTemplatePeer::TABLE_NAME); + } + + } else { // $values is CcPlayoutHistoryTemplate object + $criteria = $values->buildCriteria(); // gets full criteria + $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) + } + + // set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + return BasePeer::doUpdate($selectCriteria, $criteria, $con); + } + + /** + * Method to DELETE all rows from the cc_playout_history_template table. + * + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll($con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += BasePeer::doDeleteAll(CcPlayoutHistoryTemplatePeer::TABLE_NAME, $con, CcPlayoutHistoryTemplatePeer::DATABASE_NAME); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CcPlayoutHistoryTemplatePeer::clearInstancePool(); + CcPlayoutHistoryTemplatePeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Method perform a DELETE on the database, given a CcPlayoutHistoryTemplate or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CcPlayoutHistoryTemplate object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param PropelPDO $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + // invalidate the cache for all objects of this type, since we have no + // way of knowing (without running a query) what objects should be invalidated + // from the cache based on this Criteria. + CcPlayoutHistoryTemplatePeer::clearInstancePool(); + // rename for clarity + $criteria = clone $values; + } elseif ($values instanceof CcPlayoutHistoryTemplate) { // it's a model object + // invalidate the cache for this single object + CcPlayoutHistoryTemplatePeer::removeInstanceFromPool($values); + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(self::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryTemplatePeer::ID, (array) $values, Criteria::IN); + // invalidate the cache for this object(s) + foreach ((array) $values as $singleval) { + CcPlayoutHistoryTemplatePeer::removeInstanceFromPool($singleval); + } + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + $affectedRows += BasePeer::doDelete($criteria, $con); + CcPlayoutHistoryTemplatePeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Validates all modified columns of given CcPlayoutHistoryTemplate object. + * If parameter $columns is either a single column name or an array of column names + * than only those columns are validated. + * + * NOTICE: This does not apply to primary or foreign keys for now. + * + * @param CcPlayoutHistoryTemplate $obj The object to validate. + * @param mixed $cols Column name or array of column names. + * + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. + */ + public static function doValidate(CcPlayoutHistoryTemplate $obj, $cols = null) + { + $columns = array(); + + if ($cols) { + $dbMap = Propel::getDatabaseMap(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(CcPlayoutHistoryTemplatePeer::TABLE_NAME); + + if (! is_array($cols)) { + $cols = array($cols); + } + + foreach ($cols as $colName) { + if ($tableMap->containsColumn($colName)) { + $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + $columns[$colName] = $obj->$get(); + } + } + } else { + + } + + return BasePeer::doValidate(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, CcPlayoutHistoryTemplatePeer::TABLE_NAME, $columns); + } + + /** + * Retrieve a single object by pkey. + * + * @param int $pk the primary key. + * @param PropelPDO $con the connection to use + * @return CcPlayoutHistoryTemplate + */ + public static function retrieveByPK($pk, PropelPDO $con = null) + { + + if (null !== ($obj = CcPlayoutHistoryTemplatePeer::getInstanceFromPool((string) $pk))) { + return $obj; + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria = new Criteria(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryTemplatePeer::ID, $pk); + + $v = CcPlayoutHistoryTemplatePeer::doSelect($criteria, $con); + + return !empty($v) > 0 ? $v[0] : null; + } + + /** + * Retrieve multiple objects by pkey. + * + * @param array $pks List of primary keys + * @param PropelPDO $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function retrieveByPKs($pks, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $objs = null; + if (empty($pks)) { + $objs = array(); + } else { + $criteria = new Criteria(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryTemplatePeer::ID, $pks, Criteria::IN); + $objs = CcPlayoutHistoryTemplatePeer::doSelect($criteria, $con); + } + return $objs; + } + +} // BaseCcPlayoutHistoryTemplatePeer + +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +BaseCcPlayoutHistoryTemplatePeer::buildTableMap(); + diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateQuery.php new file mode 100644 index 000000000..602c7f0b3 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateQuery.php @@ -0,0 +1,259 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + return $query; + } + + /** + * Find object by primary key + * Use instance pooling to avoid a database query if the object exists + * + * $obj = $c->findPk(12, $con); + * + * @param mixed $key Primary key to use for the query + * @param PropelPDO $con an optional connection object + * + * @return CcPlayoutHistoryTemplate|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ((null !== ($obj = CcPlayoutHistoryTemplatePeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { + // the object is alredy in the instance pool + return $obj; + } else { + // the object has not been requested yet, or the formatter is not an object formatter + $criteria = $this->isKeepQuery() ? clone $this : $this; + $stmt = $criteria + ->filterByPrimaryKey($key) + ->getSelectStatement($con); + return $criteria->getFormatter()->init($criteria)->formatOne($stmt); + } + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param PropelPDO $con an optional connection object + * + * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + $criteria = $this->isKeepQuery() ? clone $this : $this; + return $this + ->filterByPrimaryKeys($keys) + ->find($con); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * @param int|array $dbId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface + */ + public function filterByDbId($dbId = null, $comparison = null) + { + if (is_array($dbId) && null === $comparison) { + $comparison = Criteria::IN; + } + return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $dbId, $comparison); + } + + /** + * Filter the query on the template_name column + * + * @param string $dbTemplateName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface + */ + public function filterByDbTemplateName($dbTemplateName = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbTemplateName)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbTemplateName)) { + $dbTemplateName = str_replace('*', '%', $dbTemplateName); + $comparison = Criteria::LIKE; + } + } + return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::TEMPLATE_NAME, $dbTemplateName, $comparison); + } + + /** + * Filter the query by a related CcPlayoutHistoryTemplateTag object + * + * @param CcPlayoutHistoryTemplateTag $ccPlayoutHistoryTemplateTag the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface + */ + public function filterByCcPlayoutHistoryTemplateTag($ccPlayoutHistoryTemplateTag, $comparison = null) + { + return $this + ->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $ccPlayoutHistoryTemplateTag->getDbTemplateId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcPlayoutHistoryTemplateTag relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface + */ + public function joinCcPlayoutHistoryTemplateTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplateTag'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcPlayoutHistoryTemplateTag'); + } + + return $this; + } + + /** + * Use the CcPlayoutHistoryTemplateTag relation CcPlayoutHistoryTemplateTag object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryTemplateTagQuery A secondary query class using the current class as primary query + */ + public function useCcPlayoutHistoryTemplateTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcPlayoutHistoryTemplateTag($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplateTag', 'CcPlayoutHistoryTemplateTagQuery'); + } + + /** + * Exclude object from result + * + * @param CcPlayoutHistoryTemplate $ccPlayoutHistoryTemplate Object to remove from the list of results + * + * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface + */ + public function prune($ccPlayoutHistoryTemplate = null) + { + if ($ccPlayoutHistoryTemplate) { + $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $ccPlayoutHistoryTemplate->getDbId(), Criteria::NOT_EQUAL); + } + + return $this; + } + +} // BaseCcPlayoutHistoryTemplateQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php new file mode 100644 index 000000000..5a7808729 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php @@ -0,0 +1,936 @@ +id; + } + + /** + * Get the [template_id] column value. + * + * @return int + */ + public function getDbTemplateId() + { + return $this->template_id; + } + + /** + * Get the [tag_id] column value. + * + * @return int + */ + public function getDbTagId() + { + return $this->tag_id; + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) + */ + public function setDbId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::ID; + } + + return $this; + } // setDbId() + + /** + * Set the value of [template_id] column. + * + * @param int $v new value + * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) + */ + public function setDbTemplateId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->template_id !== $v) { + $this->template_id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID; + } + + if ($this->aCcPlayoutHistoryTemplate !== null && $this->aCcPlayoutHistoryTemplate->getDbId() !== $v) { + $this->aCcPlayoutHistoryTemplate = null; + } + + return $this; + } // setDbTemplateId() + + /** + * Set the value of [tag_id] column. + * + * @param int $v new value + * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) + */ + public function setDbTagId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->tag_id !== $v) { + $this->tag_id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::TAG_ID; + } + + if ($this->aCcTag !== null && $this->aCcTag->getDbId() !== $v) { + $this->aCcTag = null; + } + + return $this; + } // setDbTagId() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false) + { + try { + + $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; + $this->template_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; + $this->tag_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 3; // 3 = CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS). + + } catch (Exception $e) { + throw new PropelException("Error populating CcPlayoutHistoryTemplateTag object", $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + + if ($this->aCcPlayoutHistoryTemplate !== null && $this->template_id !== $this->aCcPlayoutHistoryTemplate->getDbId()) { + $this->aCcPlayoutHistoryTemplate = null; + } + if ($this->aCcTag !== null && $this->tag_id !== $this->aCcTag->getDbId()) { + $this->aCcTag = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param PropelPDO $con (optional) The PropelPDO connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $stmt = CcPlayoutHistoryTemplateTagPeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $row = $stmt->fetch(PDO::FETCH_NUM); + $stmt->closeCursor(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCcPlayoutHistoryTemplate = null; + $this->aCcTag = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param PropelPDO $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() + */ + public function delete(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + try { + $ret = $this->preDelete($con); + if ($ret) { + CcPlayoutHistoryTemplateTagQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()) + ->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(PropelPDO $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their coresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCcPlayoutHistoryTemplate !== null) { + if ($this->aCcPlayoutHistoryTemplate->isModified() || $this->aCcPlayoutHistoryTemplate->isNew()) { + $affectedRows += $this->aCcPlayoutHistoryTemplate->save($con); + } + $this->setCcPlayoutHistoryTemplate($this->aCcPlayoutHistoryTemplate); + } + + if ($this->aCcTag !== null) { + if ($this->aCcTag->isModified() || $this->aCcTag->isNew()) { + $affectedRows += $this->aCcTag->save($con); + } + $this->setCcTag($this->aCcTag); + } + + if ($this->isNew() ) { + $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::ID; + } + + // If this object has been modified, then save it to the database. + if ($this->isModified()) { + if ($this->isNew()) { + $criteria = $this->buildCriteria(); + if ($criteria->keyContainsValue(CcPlayoutHistoryTemplateTagPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplateTagPeer::ID.')'); + } + + $pk = BasePeer::doInsert($criteria, $con); + $affectedRows += 1; + $this->setDbId($pk); //[IMV] update autoincrement primary key + $this->setNew(false); + } else { + $affectedRows += CcPlayoutHistoryTemplateTagPeer::doUpdate($this, $con); + } + + $this->resetModified(); // [HL] After being saved an object is no longer 'modified' + } + + $this->alreadyInSave = false; + + } + return $affectedRows; + } // doSave() + + /** + * Array of ValidationFailed objects. + * @var array ValidationFailed[] + */ + protected $validationFailures = array(); + + /** + * Gets any ValidationFailed objects that resulted from last call to validate(). + * + * + * @return array ValidationFailed[] + * @see validate() + */ + public function getValidationFailures() + { + return $this->validationFailures; + } + + /** + * Validates the objects modified field values and all objects related to this table. + * + * If $columns is either a column name or an array of column names + * only those columns are validated. + * + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() + */ + public function validate($columns = null) + { + $res = $this->doValidate($columns); + if ($res === true) { + $this->validationFailures = array(); + return true; + } else { + $this->validationFailures = $res; + return false; + } + } + + /** + * This function performs the validation work for complex object models. + * + * In addition to checking the current object, all related objects will + * also be validated. If all pass then true is returned; otherwise + * an aggreagated array of ValidationFailed objects will be returned. + * + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. + */ + protected function doValidate($columns = null) + { + if (!$this->alreadyInValidation) { + $this->alreadyInValidation = true; + $retval = null; + + $failureMap = array(); + + + // We call the validate method on the following object(s) if they + // were passed to this object by their coresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCcPlayoutHistoryTemplate !== null) { + if (!$this->aCcPlayoutHistoryTemplate->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcPlayoutHistoryTemplate->getValidationFailures()); + } + } + + if ($this->aCcTag !== null) { + if (!$this->aCcTag->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcTag->getValidationFailures()); + } + } + + + if (($retval = CcPlayoutHistoryTemplateTagPeer::doValidate($this, $columns)) !== true) { + $failureMap = array_merge($failureMap, $retval); + } + + + + $this->alreadyInValidation = false; + } + + return (!empty($failureMap) ? $failureMap : true); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return mixed Value of field. + */ + public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcPlayoutHistoryTemplateTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $field = $this->getByPosition($pos); + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch($pos) { + case 0: + return $this->getDbId(); + break; + case 1: + return $this->getDbTemplateId(); + break; + case 2: + return $this->getDbTagId(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * Defaults to BasePeer::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false) + { + $keys = CcPlayoutHistoryTemplateTagPeer::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getDbId(), + $keys[1] => $this->getDbTemplateId(), + $keys[2] => $this->getDbTagId(), + ); + if ($includeForeignObjects) { + if (null !== $this->aCcPlayoutHistoryTemplate) { + $result['CcPlayoutHistoryTemplate'] = $this->aCcPlayoutHistoryTemplate->toArray($keyType, $includeLazyLoadColumns, true); + } + if (null !== $this->aCcTag) { + $result['CcTag'] = $this->aCcTag->toArray($keyType, $includeLazyLoadColumns, true); + } + } + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return void + */ + public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcPlayoutHistoryTemplateTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch($pos) { + case 0: + $this->setDbId($value); + break; + case 1: + $this->setDbTemplateId($value); + break; + case 2: + $this->setDbTagId($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * The default key type is the column's phpname (e.g. 'AuthorId') + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + { + $keys = CcPlayoutHistoryTemplateTagPeer::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setDbTemplateId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setDbTagId($arr[$keys[2]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); + + if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $this->id); + if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $this->template_id); + if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::TAG_ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $this->tag_id); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getDbId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setDbId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + return null === $this->getDbId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of CcPlayoutHistoryTemplateTag (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false) + { + $copyObj->setDbTemplateId($this->template_id); + $copyObj->setDbTagId($this->tag_id); + + $copyObj->setNew(true); + $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return CcPlayoutHistoryTemplateTag Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + return $copyObj; + } + + /** + * Returns a peer instance associated with this om. + * + * Since Peer classes are not to have any instance attributes, this method returns the + * same instance for all member of this class. The method could therefore + * be static, but this would prevent one from overriding the behavior. + * + * @return CcPlayoutHistoryTemplateTagPeer + */ + public function getPeer() + { + if (self::$peer === null) { + self::$peer = new CcPlayoutHistoryTemplateTagPeer(); + } + return self::$peer; + } + + /** + * Declares an association between this object and a CcPlayoutHistoryTemplate object. + * + * @param CcPlayoutHistoryTemplate $v + * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) + * @throws PropelException + */ + public function setCcPlayoutHistoryTemplate(CcPlayoutHistoryTemplate $v = null) + { + if ($v === null) { + $this->setDbTemplateId(NULL); + } else { + $this->setDbTemplateId($v->getDbId()); + } + + $this->aCcPlayoutHistoryTemplate = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the CcPlayoutHistoryTemplate object, it will not be re-added. + if ($v !== null) { + $v->addCcPlayoutHistoryTemplateTag($this); + } + + return $this; + } + + + /** + * Get the associated CcPlayoutHistoryTemplate object + * + * @param PropelPDO Optional Connection object. + * @return CcPlayoutHistoryTemplate The associated CcPlayoutHistoryTemplate object. + * @throws PropelException + */ + public function getCcPlayoutHistoryTemplate(PropelPDO $con = null) + { + if ($this->aCcPlayoutHistoryTemplate === null && ($this->template_id !== null)) { + $this->aCcPlayoutHistoryTemplate = CcPlayoutHistoryTemplateQuery::create()->findPk($this->template_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCcPlayoutHistoryTemplate->addCcPlayoutHistoryTemplateTags($this); + */ + } + return $this->aCcPlayoutHistoryTemplate; + } + + /** + * Declares an association between this object and a CcTag object. + * + * @param CcTag $v + * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) + * @throws PropelException + */ + public function setCcTag(CcTag $v = null) + { + if ($v === null) { + $this->setDbTagId(NULL); + } else { + $this->setDbTagId($v->getDbId()); + } + + $this->aCcTag = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the CcTag object, it will not be re-added. + if ($v !== null) { + $v->addCcPlayoutHistoryTemplateTag($this); + } + + return $this; + } + + + /** + * Get the associated CcTag object + * + * @param PropelPDO Optional Connection object. + * @return CcTag The associated CcTag object. + * @throws PropelException + */ + public function getCcTag(PropelPDO $con = null) + { + if ($this->aCcTag === null && ($this->tag_id !== null)) { + $this->aCcTag = CcTagQuery::create()->findPk($this->tag_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCcTag->addCcPlayoutHistoryTemplateTags($this); + */ + } + return $this->aCcTag; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->template_id = null; + $this->tag_id = null; + $this->alreadyInSave = false; + $this->alreadyInValidation = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all collections of referencing foreign keys. + * + * This method is a user-space workaround for PHP's inability to garbage collect objects + * with circular references. This is currently necessary when using Propel in certain + * daemon or large-volumne/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all associated objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCcPlayoutHistoryTemplate = null; + $this->aCcTag = null; + } + + /** + * Catches calls to virtual methods + */ + public function __call($name, $params) + { + if (preg_match('/get(\w+)/', $name, $matches)) { + $virtualColumn = $matches[1]; + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + // no lcfirst in php<5.3... + $virtualColumn[0] = strtolower($virtualColumn[0]); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + throw new PropelException('Call to undefined method: ' . $name); + } + +} // BaseCcPlayoutHistoryTemplateTag diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php new file mode 100644 index 000000000..76e232d4a --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php @@ -0,0 +1,1365 @@ + array ('DbId', 'DbTemplateId', 'DbTagId', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTemplateId', 'dbTagId', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::TEMPLATE_ID, self::TAG_ID, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TEMPLATE_ID', 'TAG_ID', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'template_id', 'tag_id', ), + BasePeer::TYPE_NUM => array (0, 1, 2, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + */ + private static $fieldKeys = array ( + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTemplateId' => 1, 'DbTagId' => 2, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTemplateId' => 1, 'dbTagId' => 2, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TEMPLATE_ID => 1, self::TAG_ID => 2, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TEMPLATE_ID' => 1, 'TAG_ID' => 2, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'template_id' => 1, 'tag_id' => 2, ), + BasePeer::TYPE_NUM => array (0, 1, 2, ) + ); + + /** + * Translates a fieldname to another type + * + * @param string $name field name + * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. + * @throws PropelException - if the specified name could not be found in the fieldname mappings. + */ + static public function translateFieldName($name, $fromType, $toType) + { + $toNames = self::getFieldNames($toType); + $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + if ($key === null) { + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + } + return $toNames[$key]; + } + + /** + * Returns an array of field names. + * + * @param string $type The type of fieldnames to return: + * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return array A list of field names + */ + + static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + { + if (!array_key_exists($type, self::$fieldNames)) { + throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); + } + return self::$fieldNames[$type]; + } + + /** + * Convenience method which changes table.column to alias.column. + * + * Using this method you can maintain SQL abstraction while using column aliases. + * + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. CcPlayoutHistoryTemplateTagPeer::COLUMN_NAME). + * @return string + */ + public static function alias($alias, $column) + { + return str_replace(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME.'.', $alias.'.', $column); + } + + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::ID); + $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID); + $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::TAG_ID); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.TEMPLATE_ID'); + $criteria->addSelectColumn($alias . '.TAG_ID'); + } + } + + /** + * Returns the number of rows matching criteria. + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @return int Number of matching rows. + */ + public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) + { + // we may modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + // BasePeer returns a PDOStatement + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + /** + * Method to select one object from the DB. + * + * @param Criteria $criteria object used to create the SELECT statement. + * @param PropelPDO $con + * @return CcPlayoutHistoryTemplateTag + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) + { + $critcopy = clone $criteria; + $critcopy->setLimit(1); + $objects = CcPlayoutHistoryTemplateTagPeer::doSelect($critcopy, $con); + if ($objects) { + return $objects[0]; + } + return null; + } + /** + * Method to do selects. + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelect(Criteria $criteria, PropelPDO $con = null) + { + return CcPlayoutHistoryTemplateTagPeer::populateObjects(CcPlayoutHistoryTemplateTagPeer::doSelectStmt($criteria, $con)); + } + /** + * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. + * + * Use this method directly if you want to work with an executed statement durirectly (for example + * to perform your own object hydration). + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con The connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return PDOStatement The executed PDOStatement object. + * @see BasePeer::doSelect() + */ + public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + if (!$criteria->hasSelectClause()) { + $criteria = clone $criteria; + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + // BasePeer returns a PDOStatement + return BasePeer::doSelect($criteria, $con); + } + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doSelect*() + * methods in your stub classes -- you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by doSelect*() + * and retrieveByPK*() calls. + * + * @param CcPlayoutHistoryTemplateTag $value A CcPlayoutHistoryTemplateTag object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool(CcPlayoutHistoryTemplateTag $obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if ($key === null) { + $key = (string) $obj->getDbId(); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A CcPlayoutHistoryTemplateTag object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && $value !== null) { + if (is_object($value) && $value instanceof CcPlayoutHistoryTemplateTag) { + $key = (string) $value->getDbId(); + } elseif (is_scalar($value)) { + // assume we've been passed a primary key + $key = (string) $value; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlayoutHistoryTemplateTag object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } // removeInstanceFromPool() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param string $key The key (@see getPrimaryKeyHash()) for this instance. + * @return CcPlayoutHistoryTemplateTag Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @see getPrimaryKeyHash() + */ + public static function getInstanceFromPool($key) + { + if (Propel::isInstancePoolingEnabled()) { + if (isset(self::$instances[$key])) { + return self::$instances[$key]; + } + } + return null; // just to be explicit + } + + /** + * Clear the instance pool. + * + * @return void + */ + public static function clearInstancePool() + { + self::$instances = array(); + } + + /** + * Method to invalidate the instance pool of all tables related to cc_playout_history_template_tag + * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return string A string version of PK or NULL if the components of primary key in result array are all null. + */ + public static function getPrimaryKeyHashFromRow($row, $startcol = 0) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[$startcol] === null) { + return null; + } + return (string) $row[$startcol]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $startcol = 0) + { + return (int) $row[$startcol]; + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(PDOStatement $stmt) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false); + // populate the object(s) + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj, $key); + } // if key exists + } + $stmt->closeCursor(); + return $results; + } + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CcPlayoutHistoryTemplateTag object, last column rank) + */ + public static function populateObject($row, $startcol = 0) + { + $key = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $startcol, true); // rehydrate + $col = $startcol + CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS; + } else { + $cls = CcPlayoutHistoryTemplateTagPeer::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $startcol); + CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj, $key); + } + return array($obj, $col); + } + + /** + * Returns the number of rows matching criteria, joining the related CcPlayoutHistoryTemplate table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinCcPlayoutHistoryTemplate(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcTag table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with their CcPlayoutHistoryTemplate objects. + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryTemplateTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinCcPlayoutHistoryTemplate(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + $startcol = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS); + CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + + $cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1); + } // if $obj1 already loaded + + $key2 = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol); + if ($key2 !== null) { + $obj2 = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcPlayoutHistoryTemplatePeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol); + CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj2, $key2); + } // if obj2 already loaded + + // Add the $obj1 (CcPlayoutHistoryTemplateTag) to $obj2 (CcPlayoutHistoryTemplate) + $obj2->addCcPlayoutHistoryTemplateTag($obj1); + + } // if joined row was not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with their CcTag objects. + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryTemplateTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + $startcol = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS); + CcTagPeer::addSelectColumns($criteria); + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + + $cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1); + } // if $obj1 already loaded + + $key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol); + if ($key2 !== null) { + $obj2 = CcTagPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcTagPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol); + CcTagPeer::addInstanceToPool($obj2, $key2); + } // if obj2 already loaded + + // Add the $obj1 (CcPlayoutHistoryTemplateTag) to $obj2 (CcTag) + $obj2->addCcPlayoutHistoryTemplateTag($obj1); + + } // if joined row was not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Returns the number of rows matching criteria, joining all related tables + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + /** + * Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with all related objects. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryTemplateTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS); + + CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcPlayoutHistoryTemplatePeer::NUM_COLUMNS - CcPlayoutHistoryTemplatePeer::NUM_LAZY_LOAD_COLUMNS); + + CcTagPeer::addSelectColumns($criteria); + $startcol4 = $startcol3 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcPlayoutHistoryTemplate rows + + $key2 = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcPlayoutHistoryTemplatePeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj2, $key2); + } // if obj2 loaded + + // Add the $obj1 (CcPlayoutHistoryTemplateTag) to the collection in $obj2 (CcPlayoutHistoryTemplate) + $obj2->addCcPlayoutHistoryTemplateTag($obj1); + } // if joined row not null + + // Add objects for joined CcTag rows + + $key3 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol3); + if ($key3 !== null) { + $obj3 = CcTagPeer::getInstanceFromPool($key3); + if (!$obj3) { + + $cls = CcTagPeer::getOMClass(false); + + $obj3 = new $cls(); + $obj3->hydrate($row, $startcol3); + CcTagPeer::addInstanceToPool($obj3, $key3); + } // if obj3 loaded + + // Add the $obj1 (CcPlayoutHistoryTemplateTag) to the collection in $obj3 (CcTag) + $obj3->addCcPlayoutHistoryTemplateTag($obj1); + } // if joined row not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcPlayoutHistoryTemplate table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcPlayoutHistoryTemplate(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcTag table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with all related objects except CcPlayoutHistoryTemplate. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryTemplateTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcPlayoutHistoryTemplate(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS); + + CcTagPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcTag rows + + $key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcTagPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcTagPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcTagPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcPlayoutHistoryTemplateTag) to the collection in $obj2 (CcTag) + $obj2->addCcPlayoutHistoryTemplateTag($obj1); + + } // if joined row is not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with all related objects except CcTag. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryTemplateTag objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS); + + CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcPlayoutHistoryTemplatePeer::NUM_COLUMNS - CcPlayoutHistoryTemplatePeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcPlayoutHistoryTemplate rows + + $key2 = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcPlayoutHistoryTemplatePeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcPlayoutHistoryTemplateTag) to the collection in $obj2 (CcPlayoutHistoryTemplate) + $obj2->addCcPlayoutHistoryTemplateTag($obj1); + + } // if joined row is not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + /** + * Returns the TableMap related to this peer. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this peer class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getDatabaseMap(BaseCcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); + if (!$dbMap->hasTable(BaseCcPlayoutHistoryTemplateTagPeer::TABLE_NAME)) + { + $dbMap->addTableObject(new CcPlayoutHistoryTemplateTagTableMap()); + } + } + + /** + * The class that the Peer will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is tranalted into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CcPlayoutHistoryTemplateTagPeer::CLASS_DEFAULT : CcPlayoutHistoryTemplateTagPeer::OM_CLASS; + } + + /** + * Method perform an INSERT on the database, given a CcPlayoutHistoryTemplateTag or Criteria object. + * + * @param mixed $values Criteria or CcPlayoutHistoryTemplateTag object containing data that is used to create the INSERT statement. + * @param PropelPDO $con the PropelPDO connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } else { + $criteria = $values->buildCriteria(); // build Criteria from CcPlayoutHistoryTemplateTag object + } + + if ($criteria->containsKey(CcPlayoutHistoryTemplateTagPeer::ID) && $criteria->keyContainsValue(CcPlayoutHistoryTemplateTagPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplateTagPeer::ID.')'); + } + + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = BasePeer::doInsert($criteria, $con); + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + + /** + * Method perform an UPDATE on the database, given a CcPlayoutHistoryTemplateTag or Criteria object. + * + * @param mixed $values Criteria or CcPlayoutHistoryTemplateTag object containing data that is used to create the UPDATE statement. + * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). + * @return int The number of affected rows (if supported by underlying database driver). + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doUpdate($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $selectCriteria = new Criteria(self::DATABASE_NAME); + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + + $comparison = $criteria->getComparison(CcPlayoutHistoryTemplateTagPeer::ID); + $value = $criteria->remove(CcPlayoutHistoryTemplateTagPeer::ID); + if ($value) { + $selectCriteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $value, $comparison); + } else { + $selectCriteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); + } + + } else { // $values is CcPlayoutHistoryTemplateTag object + $criteria = $values->buildCriteria(); // gets full criteria + $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) + } + + // set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + return BasePeer::doUpdate($selectCriteria, $criteria, $con); + } + + /** + * Method to DELETE all rows from the cc_playout_history_template_tag table. + * + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll($con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += BasePeer::doDeleteAll(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME, $con, CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CcPlayoutHistoryTemplateTagPeer::clearInstancePool(); + CcPlayoutHistoryTemplateTagPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Method perform a DELETE on the database, given a CcPlayoutHistoryTemplateTag or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CcPlayoutHistoryTemplateTag object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param PropelPDO $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + // invalidate the cache for all objects of this type, since we have no + // way of knowing (without running a query) what objects should be invalidated + // from the cache based on this Criteria. + CcPlayoutHistoryTemplateTagPeer::clearInstancePool(); + // rename for clarity + $criteria = clone $values; + } elseif ($values instanceof CcPlayoutHistoryTemplateTag) { // it's a model object + // invalidate the cache for this single object + CcPlayoutHistoryTemplateTagPeer::removeInstanceFromPool($values); + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(self::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, (array) $values, Criteria::IN); + // invalidate the cache for this object(s) + foreach ((array) $values as $singleval) { + CcPlayoutHistoryTemplateTagPeer::removeInstanceFromPool($singleval); + } + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + $affectedRows += BasePeer::doDelete($criteria, $con); + CcPlayoutHistoryTemplateTagPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Validates all modified columns of given CcPlayoutHistoryTemplateTag object. + * If parameter $columns is either a single column name or an array of column names + * than only those columns are validated. + * + * NOTICE: This does not apply to primary or foreign keys for now. + * + * @param CcPlayoutHistoryTemplateTag $obj The object to validate. + * @param mixed $cols Column name or array of column names. + * + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. + */ + public static function doValidate(CcPlayoutHistoryTemplateTag $obj, $cols = null) + { + $columns = array(); + + if ($cols) { + $dbMap = Propel::getDatabaseMap(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); + + if (! is_array($cols)) { + $cols = array($cols); + } + + foreach ($cols as $colName) { + if ($tableMap->containsColumn($colName)) { + $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + $columns[$colName] = $obj->$get(); + } + } + } else { + + } + + return BasePeer::doValidate(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, CcPlayoutHistoryTemplateTagPeer::TABLE_NAME, $columns); + } + + /** + * Retrieve a single object by pkey. + * + * @param int $pk the primary key. + * @param PropelPDO $con the connection to use + * @return CcPlayoutHistoryTemplateTag + */ + public static function retrieveByPK($pk, PropelPDO $con = null) + { + + if (null !== ($obj = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool((string) $pk))) { + return $obj; + } + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria = new Criteria(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $pk); + + $v = CcPlayoutHistoryTemplateTagPeer::doSelect($criteria, $con); + + return !empty($v) > 0 ? $v[0] : null; + } + + /** + * Retrieve multiple objects by pkey. + * + * @param array $pks List of primary keys + * @param PropelPDO $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function retrieveByPKs($pks, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $objs = null; + if (empty($pks)) { + $objs = array(); + } else { + $criteria = new Criteria(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); + $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $pks, Criteria::IN); + $objs = CcPlayoutHistoryTemplateTagPeer::doSelect($criteria, $con); + } + return $objs; + } + +} // BaseCcPlayoutHistoryTemplateTagPeer + +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +BaseCcPlayoutHistoryTemplateTagPeer::buildTableMap(); + diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php new file mode 100644 index 000000000..24ef4a191 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php @@ -0,0 +1,371 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + return $query; + } + + /** + * Find object by primary key + * Use instance pooling to avoid a database query if the object exists + * + * $obj = $c->findPk(12, $con); + * + * @param mixed $key Primary key to use for the query + * @param PropelPDO $con an optional connection object + * + * @return CcPlayoutHistoryTemplateTag|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ((null !== ($obj = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { + // the object is alredy in the instance pool + return $obj; + } else { + // the object has not been requested yet, or the formatter is not an object formatter + $criteria = $this->isKeepQuery() ? clone $this : $this; + $stmt = $criteria + ->filterByPrimaryKey($key) + ->getSelectStatement($con); + return $criteria->getFormatter()->init($criteria)->formatOne($stmt); + } + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param PropelPDO $con an optional connection object + * + * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + $criteria = $this->isKeepQuery() ? clone $this : $this; + return $this + ->filterByPrimaryKeys($keys) + ->find($con); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * @param int|array $dbId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function filterByDbId($dbId = null, $comparison = null) + { + if (is_array($dbId) && null === $comparison) { + $comparison = Criteria::IN; + } + return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::ID, $dbId, $comparison); + } + + /** + * Filter the query on the template_id column + * + * @param int|array $dbTemplateId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function filterByDbTemplateId($dbTemplateId = null, $comparison = null) + { + if (is_array($dbTemplateId)) { + $useMinMax = false; + if (isset($dbTemplateId['min'])) { + $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $dbTemplateId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbTemplateId['max'])) { + $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $dbTemplateId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $dbTemplateId, $comparison); + } + + /** + * Filter the query on the tag_id column + * + * @param int|array $dbTagId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function filterByDbTagId($dbTagId = null, $comparison = null) + { + if (is_array($dbTagId)) { + $useMinMax = false; + if (isset($dbTagId['min'])) { + $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $dbTagId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbTagId['max'])) { + $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $dbTagId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $dbTagId, $comparison); + } + + /** + * Filter the query by a related CcPlayoutHistoryTemplate object + * + * @param CcPlayoutHistoryTemplate $ccPlayoutHistoryTemplate the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function filterByCcPlayoutHistoryTemplate($ccPlayoutHistoryTemplate, $comparison = null) + { + return $this + ->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $ccPlayoutHistoryTemplate->getDbId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcPlayoutHistoryTemplate relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function joinCcPlayoutHistoryTemplate($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplate'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcPlayoutHistoryTemplate'); + } + + return $this; + } + + /** + * Use the CcPlayoutHistoryTemplate relation CcPlayoutHistoryTemplate object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryTemplateQuery A secondary query class using the current class as primary query + */ + public function useCcPlayoutHistoryTemplateQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcPlayoutHistoryTemplate($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplateQuery'); + } + + /** + * Filter the query by a related CcTag object + * + * @param CcTag $ccTag the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function filterByCcTag($ccTag, $comparison = null) + { + return $this + ->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $ccTag->getDbId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcTag relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function joinCcTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcTag'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcTag'); + } + + return $this; + } + + /** + * Use the CcTag relation CcTag object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcTagQuery A secondary query class using the current class as primary query + */ + public function useCcTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcTag($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcTag', 'CcTagQuery'); + } + + /** + * Exclude object from result + * + * @param CcPlayoutHistoryTemplateTag $ccPlayoutHistoryTemplateTag Object to remove from the list of results + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function prune($ccPlayoutHistoryTemplateTag = null) + { + if ($ccPlayoutHistoryTemplateTag) { + $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::ID, $ccPlayoutHistoryTemplateTag->getDbId(), Criteria::NOT_EQUAL); + } + + return $this; + } + +} // BaseCcPlayoutHistoryTemplateTagQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTag.php b/airtime_mvc/application/models/airtime/om/BaseCcTag.php new file mode 100644 index 000000000..c071c8972 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcTag.php @@ -0,0 +1,1062 @@ +id; + } + + /** + * Get the [tag_name] column value. + * + * @return string + */ + public function getDbTagName() + { + return $this->tag_name; + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return CcTag The current object (for fluent API support) + */ + public function setDbId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[] = CcTagPeer::ID; + } + + return $this; + } // setDbId() + + /** + * Set the value of [tag_name] column. + * + * @param string $v new value + * @return CcTag The current object (for fluent API support) + */ + public function setDbTagName($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->tag_name !== $v) { + $this->tag_name = $v; + $this->modifiedColumns[] = CcTagPeer::TAG_NAME; + } + + return $this; + } // setDbTagName() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false) + { + try { + + $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; + $this->tag_name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 2; // 2 = CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS). + + } catch (Exception $e) { + throw new PropelException("Error populating CcTag object", $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param PropelPDO $con (optional) The PropelPDO connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $stmt = CcTagPeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $row = $stmt->fetch(PDO::FETCH_NUM); + $stmt->closeCursor(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->collCcFileTags = null; + + $this->collCcPlayoutHistoryTemplateTags = null; + + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param PropelPDO $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() + */ + public function delete(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + try { + $ret = $this->preDelete($con); + if ($ret) { + CcTagQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()) + ->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CcTagPeer::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(PropelPDO $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + if ($this->isNew() ) { + $this->modifiedColumns[] = CcTagPeer::ID; + } + + // If this object has been modified, then save it to the database. + if ($this->isModified()) { + if ($this->isNew()) { + $criteria = $this->buildCriteria(); + if ($criteria->keyContainsValue(CcTagPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcTagPeer::ID.')'); + } + + $pk = BasePeer::doInsert($criteria, $con); + $affectedRows = 1; + $this->setDbId($pk); //[IMV] update autoincrement primary key + $this->setNew(false); + } else { + $affectedRows = CcTagPeer::doUpdate($this, $con); + } + + $this->resetModified(); // [HL] After being saved an object is no longer 'modified' + } + + if ($this->collCcFileTags !== null) { + foreach ($this->collCcFileTags as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->collCcPlayoutHistoryTemplateTags !== null) { + foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + + $this->alreadyInSave = false; + + } + return $affectedRows; + } // doSave() + + /** + * Array of ValidationFailed objects. + * @var array ValidationFailed[] + */ + protected $validationFailures = array(); + + /** + * Gets any ValidationFailed objects that resulted from last call to validate(). + * + * + * @return array ValidationFailed[] + * @see validate() + */ + public function getValidationFailures() + { + return $this->validationFailures; + } + + /** + * Validates the objects modified field values and all objects related to this table. + * + * If $columns is either a column name or an array of column names + * only those columns are validated. + * + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() + */ + public function validate($columns = null) + { + $res = $this->doValidate($columns); + if ($res === true) { + $this->validationFailures = array(); + return true; + } else { + $this->validationFailures = $res; + return false; + } + } + + /** + * This function performs the validation work for complex object models. + * + * In addition to checking the current object, all related objects will + * also be validated. If all pass then true is returned; otherwise + * an aggreagated array of ValidationFailed objects will be returned. + * + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. + */ + protected function doValidate($columns = null) + { + if (!$this->alreadyInValidation) { + $this->alreadyInValidation = true; + $retval = null; + + $failureMap = array(); + + + if (($retval = CcTagPeer::doValidate($this, $columns)) !== true) { + $failureMap = array_merge($failureMap, $retval); + } + + + if ($this->collCcFileTags !== null) { + foreach ($this->collCcFileTags as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + + if ($this->collCcPlayoutHistoryTemplateTags !== null) { + foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + + + $this->alreadyInValidation = false; + } + + return (!empty($failureMap) ? $failureMap : true); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return mixed Value of field. + */ + public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $field = $this->getByPosition($pos); + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch($pos) { + case 0: + return $this->getDbId(); + break; + case 1: + return $this->getDbTagName(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * Defaults to BasePeer::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true) + { + $keys = CcTagPeer::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getDbId(), + $keys[1] => $this->getDbTagName(), + ); + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return void + */ + public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch($pos) { + case 0: + $this->setDbId($value); + break; + case 1: + $this->setDbTagName($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * The default key type is the column's phpname (e.g. 'AuthorId') + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + { + $keys = CcTagPeer::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setDbTagName($arr[$keys[1]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CcTagPeer::DATABASE_NAME); + + if ($this->isColumnModified(CcTagPeer::ID)) $criteria->add(CcTagPeer::ID, $this->id); + if ($this->isColumnModified(CcTagPeer::TAG_NAME)) $criteria->add(CcTagPeer::TAG_NAME, $this->tag_name); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CcTagPeer::DATABASE_NAME); + $criteria->add(CcTagPeer::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getDbId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setDbId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + return null === $this->getDbId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of CcTag (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false) + { + $copyObj->setDbTagName($this->tag_name); + + if ($deepCopy) { + // important: temporarily setNew(false) because this affects the behavior of + // the getter/setter methods for fkey referrer objects. + $copyObj->setNew(false); + + foreach ($this->getCcFileTags() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcFileTag($relObj->copy($deepCopy)); + } + } + + foreach ($this->getCcPlayoutHistoryTemplateTags() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcPlayoutHistoryTemplateTag($relObj->copy($deepCopy)); + } + } + + } // if ($deepCopy) + + + $copyObj->setNew(true); + $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return CcTag Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + return $copyObj; + } + + /** + * Returns a peer instance associated with this om. + * + * Since Peer classes are not to have any instance attributes, this method returns the + * same instance for all member of this class. The method could therefore + * be static, but this would prevent one from overriding the behavior. + * + * @return CcTagPeer + */ + public function getPeer() + { + if (self::$peer === null) { + self::$peer = new CcTagPeer(); + } + return self::$peer; + } + + /** + * Clears out the collCcFileTags collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcFileTags() + */ + public function clearCcFileTags() + { + $this->collCcFileTags = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcFileTags collection. + * + * By default this just sets the collCcFileTags collection to an empty array (like clearcollCcFileTags()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcFileTags() + { + $this->collCcFileTags = new PropelObjectCollection(); + $this->collCcFileTags->setModel('CcFileTag'); + } + + /** + * Gets an array of CcFileTag objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcTag is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcFileTag[] List of CcFileTag objects + * @throws PropelException + */ + public function getCcFileTags($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcFileTags || null !== $criteria) { + if ($this->isNew() && null === $this->collCcFileTags) { + // return empty collection + $this->initCcFileTags(); + } else { + $collCcFileTags = CcFileTagQuery::create(null, $criteria) + ->filterByCcTag($this) + ->find($con); + if (null !== $criteria) { + return $collCcFileTags; + } + $this->collCcFileTags = $collCcFileTags; + } + } + return $this->collCcFileTags; + } + + /** + * Returns the number of related CcFileTag objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcFileTag objects. + * @throws PropelException + */ + public function countCcFileTags(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcFileTags || null !== $criteria) { + if ($this->isNew() && null === $this->collCcFileTags) { + return 0; + } else { + $query = CcFileTagQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcTag($this) + ->count($con); + } + } else { + return count($this->collCcFileTags); + } + } + + /** + * Method called to associate a CcFileTag object to this object + * through the CcFileTag foreign key attribute. + * + * @param CcFileTag $l CcFileTag + * @return void + * @throws PropelException + */ + public function addCcFileTag(CcFileTag $l) + { + if ($this->collCcFileTags === null) { + $this->initCcFileTags(); + } + if (!$this->collCcFileTags->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcFileTags[]= $l; + $l->setCcTag($this); + } + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcTag is new, it will return + * an empty collection; or if this CcTag has previously + * been saved, it will retrieve related CcFileTags from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcTag. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcFileTag[] List of CcFileTag objects + */ + public function getCcFileTagsJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcFileTagQuery::create(null, $criteria); + $query->joinWith('CcFiles', $join_behavior); + + return $this->getCcFileTags($query, $con); + } + + /** + * Clears out the collCcPlayoutHistoryTemplateTags collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcPlayoutHistoryTemplateTags() + */ + public function clearCcPlayoutHistoryTemplateTags() + { + $this->collCcPlayoutHistoryTemplateTags = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcPlayoutHistoryTemplateTags collection. + * + * By default this just sets the collCcPlayoutHistoryTemplateTags collection to an empty array (like clearcollCcPlayoutHistoryTemplateTags()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcPlayoutHistoryTemplateTags() + { + $this->collCcPlayoutHistoryTemplateTags = new PropelObjectCollection(); + $this->collCcPlayoutHistoryTemplateTags->setModel('CcPlayoutHistoryTemplateTag'); + } + + /** + * Gets an array of CcPlayoutHistoryTemplateTag objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcTag is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcPlayoutHistoryTemplateTag[] List of CcPlayoutHistoryTemplateTag objects + * @throws PropelException + */ + public function getCcPlayoutHistoryTemplateTags($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistoryTemplateTags || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateTags) { + // return empty collection + $this->initCcPlayoutHistoryTemplateTags(); + } else { + $collCcPlayoutHistoryTemplateTags = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria) + ->filterByCcTag($this) + ->find($con); + if (null !== $criteria) { + return $collCcPlayoutHistoryTemplateTags; + } + $this->collCcPlayoutHistoryTemplateTags = $collCcPlayoutHistoryTemplateTags; + } + } + return $this->collCcPlayoutHistoryTemplateTags; + } + + /** + * Returns the number of related CcPlayoutHistoryTemplateTag objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcPlayoutHistoryTemplateTag objects. + * @throws PropelException + */ + public function countCcPlayoutHistoryTemplateTags(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistoryTemplateTags || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateTags) { + return 0; + } else { + $query = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcTag($this) + ->count($con); + } + } else { + return count($this->collCcPlayoutHistoryTemplateTags); + } + } + + /** + * Method called to associate a CcPlayoutHistoryTemplateTag object to this object + * through the CcPlayoutHistoryTemplateTag foreign key attribute. + * + * @param CcPlayoutHistoryTemplateTag $l CcPlayoutHistoryTemplateTag + * @return void + * @throws PropelException + */ + public function addCcPlayoutHistoryTemplateTag(CcPlayoutHistoryTemplateTag $l) + { + if ($this->collCcPlayoutHistoryTemplateTags === null) { + $this->initCcPlayoutHistoryTemplateTags(); + } + if (!$this->collCcPlayoutHistoryTemplateTags->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcPlayoutHistoryTemplateTags[]= $l; + $l->setCcTag($this); + } + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcTag is new, it will return + * an empty collection; or if this CcTag has previously + * been saved, it will retrieve related CcPlayoutHistoryTemplateTags from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcTag. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcPlayoutHistoryTemplateTag[] List of CcPlayoutHistoryTemplateTag objects + */ + public function getCcPlayoutHistoryTemplateTagsJoinCcPlayoutHistoryTemplate($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria); + $query->joinWith('CcPlayoutHistoryTemplate', $join_behavior); + + return $this->getCcPlayoutHistoryTemplateTags($query, $con); + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->tag_name = null; + $this->alreadyInSave = false; + $this->alreadyInValidation = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all collections of referencing foreign keys. + * + * This method is a user-space workaround for PHP's inability to garbage collect objects + * with circular references. This is currently necessary when using Propel in certain + * daemon or large-volumne/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all associated objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + if ($this->collCcFileTags) { + foreach ((array) $this->collCcFileTags as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collCcPlayoutHistoryTemplateTags) { + foreach ((array) $this->collCcPlayoutHistoryTemplateTags as $o) { + $o->clearAllReferences($deep); + } + } + } // if ($deep) + + $this->collCcFileTags = null; + $this->collCcPlayoutHistoryTemplateTags = null; + } + + /** + * Catches calls to virtual methods + */ + public function __call($name, $params) + { + if (preg_match('/get(\w+)/', $name, $matches)) { + $virtualColumn = $matches[1]; + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + // no lcfirst in php<5.3... + $virtualColumn[0] = strtolower($virtualColumn[0]); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + throw new PropelException('Call to undefined method: ' . $name); + } + +} // BaseCcTag diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php new file mode 100644 index 000000000..486f0ea42 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php @@ -0,0 +1,745 @@ + array ('DbId', 'DbTagName', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTagName', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::TAG_NAME, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TAG_NAME', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'tag_name', ), + BasePeer::TYPE_NUM => array (0, 1, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + */ + private static $fieldKeys = array ( + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTagName' => 1, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTagName' => 1, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TAG_NAME => 1, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TAG_NAME' => 1, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'tag_name' => 1, ), + BasePeer::TYPE_NUM => array (0, 1, ) + ); + + /** + * Translates a fieldname to another type + * + * @param string $name field name + * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. + * @throws PropelException - if the specified name could not be found in the fieldname mappings. + */ + static public function translateFieldName($name, $fromType, $toType) + { + $toNames = self::getFieldNames($toType); + $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + if ($key === null) { + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + } + return $toNames[$key]; + } + + /** + * Returns an array of field names. + * + * @param string $type The type of fieldnames to return: + * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return array A list of field names + */ + + static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + { + if (!array_key_exists($type, self::$fieldNames)) { + throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); + } + return self::$fieldNames[$type]; + } + + /** + * Convenience method which changes table.column to alias.column. + * + * Using this method you can maintain SQL abstraction while using column aliases. + * + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. CcTagPeer::COLUMN_NAME). + * @return string + */ + public static function alias($alias, $column) + { + return str_replace(CcTagPeer::TABLE_NAME.'.', $alias.'.', $column); + } + + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CcTagPeer::ID); + $criteria->addSelectColumn(CcTagPeer::TAG_NAME); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.TAG_NAME'); + } + } + + /** + * Returns the number of rows matching criteria. + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @return int Number of matching rows. + */ + public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) + { + // we may modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcTagPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcTagPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName + + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + // BasePeer returns a PDOStatement + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + /** + * Method to select one object from the DB. + * + * @param Criteria $criteria object used to create the SELECT statement. + * @param PropelPDO $con + * @return CcTag + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) + { + $critcopy = clone $criteria; + $critcopy->setLimit(1); + $objects = CcTagPeer::doSelect($critcopy, $con); + if ($objects) { + return $objects[0]; + } + return null; + } + /** + * Method to do selects. + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelect(Criteria $criteria, PropelPDO $con = null) + { + return CcTagPeer::populateObjects(CcTagPeer::doSelectStmt($criteria, $con)); + } + /** + * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. + * + * Use this method directly if you want to work with an executed statement durirectly (for example + * to perform your own object hydration). + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con The connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return PDOStatement The executed PDOStatement object. + * @see BasePeer::doSelect() + */ + public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + if (!$criteria->hasSelectClause()) { + $criteria = clone $criteria; + CcTagPeer::addSelectColumns($criteria); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + // BasePeer returns a PDOStatement + return BasePeer::doSelect($criteria, $con); + } + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doSelect*() + * methods in your stub classes -- you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by doSelect*() + * and retrieveByPK*() calls. + * + * @param CcTag $value A CcTag object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool(CcTag $obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if ($key === null) { + $key = (string) $obj->getDbId(); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A CcTag object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && $value !== null) { + if (is_object($value) && $value instanceof CcTag) { + $key = (string) $value->getDbId(); + } elseif (is_scalar($value)) { + // assume we've been passed a primary key + $key = (string) $value; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcTag object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } // removeInstanceFromPool() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param string $key The key (@see getPrimaryKeyHash()) for this instance. + * @return CcTag Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @see getPrimaryKeyHash() + */ + public static function getInstanceFromPool($key) + { + if (Propel::isInstancePoolingEnabled()) { + if (isset(self::$instances[$key])) { + return self::$instances[$key]; + } + } + return null; // just to be explicit + } + + /** + * Clear the instance pool. + * + * @return void + */ + public static function clearInstancePool() + { + self::$instances = array(); + } + + /** + * Method to invalidate the instance pool of all tables related to cc_tag + * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in CcFileTagPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcFileTagPeer::clearInstancePool(); + // Invalidate objects in CcPlayoutHistoryTemplateTagPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcPlayoutHistoryTemplateTagPeer::clearInstancePool(); + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return string A string version of PK or NULL if the components of primary key in result array are all null. + */ + public static function getPrimaryKeyHashFromRow($row, $startcol = 0) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[$startcol] === null) { + return null; + } + return (string) $row[$startcol]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $startcol = 0) + { + return (int) $row[$startcol]; + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(PDOStatement $stmt) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = CcTagPeer::getOMClass(false); + // populate the object(s) + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key = CcTagPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = CcTagPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CcTagPeer::addInstanceToPool($obj, $key); + } // if key exists + } + $stmt->closeCursor(); + return $results; + } + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CcTag object, last column rank) + */ + public static function populateObject($row, $startcol = 0) + { + $key = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = CcTagPeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $startcol, true); // rehydrate + $col = $startcol + CcTagPeer::NUM_COLUMNS; + } else { + $cls = CcTagPeer::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $startcol); + CcTagPeer::addInstanceToPool($obj, $key); + } + return array($obj, $col); + } + /** + * Returns the TableMap related to this peer. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this peer class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getDatabaseMap(BaseCcTagPeer::DATABASE_NAME); + if (!$dbMap->hasTable(BaseCcTagPeer::TABLE_NAME)) + { + $dbMap->addTableObject(new CcTagTableMap()); + } + } + + /** + * The class that the Peer will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is tranalted into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CcTagPeer::CLASS_DEFAULT : CcTagPeer::OM_CLASS; + } + + /** + * Method perform an INSERT on the database, given a CcTag or Criteria object. + * + * @param mixed $values Criteria or CcTag object containing data that is used to create the INSERT statement. + * @param PropelPDO $con the PropelPDO connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } else { + $criteria = $values->buildCriteria(); // build Criteria from CcTag object + } + + if ($criteria->containsKey(CcTagPeer::ID) && $criteria->keyContainsValue(CcTagPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcTagPeer::ID.')'); + } + + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = BasePeer::doInsert($criteria, $con); + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + + /** + * Method perform an UPDATE on the database, given a CcTag or Criteria object. + * + * @param mixed $values Criteria or CcTag object containing data that is used to create the UPDATE statement. + * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). + * @return int The number of affected rows (if supported by underlying database driver). + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doUpdate($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $selectCriteria = new Criteria(self::DATABASE_NAME); + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + + $comparison = $criteria->getComparison(CcTagPeer::ID); + $value = $criteria->remove(CcTagPeer::ID); + if ($value) { + $selectCriteria->add(CcTagPeer::ID, $value, $comparison); + } else { + $selectCriteria->setPrimaryTableName(CcTagPeer::TABLE_NAME); + } + + } else { // $values is CcTag object + $criteria = $values->buildCriteria(); // gets full criteria + $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) + } + + // set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + return BasePeer::doUpdate($selectCriteria, $criteria, $con); + } + + /** + * Method to DELETE all rows from the cc_tag table. + * + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll($con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += BasePeer::doDeleteAll(CcTagPeer::TABLE_NAME, $con, CcTagPeer::DATABASE_NAME); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CcTagPeer::clearInstancePool(); + CcTagPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Method perform a DELETE on the database, given a CcTag or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CcTag object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param PropelPDO $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + // invalidate the cache for all objects of this type, since we have no + // way of knowing (without running a query) what objects should be invalidated + // from the cache based on this Criteria. + CcTagPeer::clearInstancePool(); + // rename for clarity + $criteria = clone $values; + } elseif ($values instanceof CcTag) { // it's a model object + // invalidate the cache for this single object + CcTagPeer::removeInstanceFromPool($values); + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(self::DATABASE_NAME); + $criteria->add(CcTagPeer::ID, (array) $values, Criteria::IN); + // invalidate the cache for this object(s) + foreach ((array) $values as $singleval) { + CcTagPeer::removeInstanceFromPool($singleval); + } + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + $affectedRows += BasePeer::doDelete($criteria, $con); + CcTagPeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Validates all modified columns of given CcTag object. + * If parameter $columns is either a single column name or an array of column names + * than only those columns are validated. + * + * NOTICE: This does not apply to primary or foreign keys for now. + * + * @param CcTag $obj The object to validate. + * @param mixed $cols Column name or array of column names. + * + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. + */ + public static function doValidate(CcTag $obj, $cols = null) + { + $columns = array(); + + if ($cols) { + $dbMap = Propel::getDatabaseMap(CcTagPeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(CcTagPeer::TABLE_NAME); + + if (! is_array($cols)) { + $cols = array($cols); + } + + foreach ($cols as $colName) { + if ($tableMap->containsColumn($colName)) { + $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + $columns[$colName] = $obj->$get(); + } + } + } else { + + } + + return BasePeer::doValidate(CcTagPeer::DATABASE_NAME, CcTagPeer::TABLE_NAME, $columns); + } + + /** + * Retrieve a single object by pkey. + * + * @param int $pk the primary key. + * @param PropelPDO $con the connection to use + * @return CcTag + */ + public static function retrieveByPK($pk, PropelPDO $con = null) + { + + if (null !== ($obj = CcTagPeer::getInstanceFromPool((string) $pk))) { + return $obj; + } + + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria = new Criteria(CcTagPeer::DATABASE_NAME); + $criteria->add(CcTagPeer::ID, $pk); + + $v = CcTagPeer::doSelect($criteria, $con); + + return !empty($v) > 0 ? $v[0] : null; + } + + /** + * Retrieve multiple objects by pkey. + * + * @param array $pks List of primary keys + * @param PropelPDO $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function retrieveByPKs($pks, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $objs = null; + if (empty($pks)) { + $objs = array(); + } else { + $criteria = new Criteria(CcTagPeer::DATABASE_NAME); + $criteria->add(CcTagPeer::ID, $pks, Criteria::IN); + $objs = CcTagPeer::doSelect($criteria, $con); + } + return $objs; + } + +} // BaseCcTagPeer + +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +BaseCcTagPeer::buildTableMap(); + diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php new file mode 100644 index 000000000..f5dd5f9a3 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php @@ -0,0 +1,327 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + return $query; + } + + /** + * Find object by primary key + * Use instance pooling to avoid a database query if the object exists + * + * $obj = $c->findPk(12, $con); + * + * @param mixed $key Primary key to use for the query + * @param PropelPDO $con an optional connection object + * + * @return CcTag|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ((null !== ($obj = CcTagPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { + // the object is alredy in the instance pool + return $obj; + } else { + // the object has not been requested yet, or the formatter is not an object formatter + $criteria = $this->isKeepQuery() ? clone $this : $this; + $stmt = $criteria + ->filterByPrimaryKey($key) + ->getSelectStatement($con); + return $criteria->getFormatter()->init($criteria)->formatOne($stmt); + } + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param PropelPDO $con an optional connection object + * + * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + $criteria = $this->isKeepQuery() ? clone $this : $this; + return $this + ->filterByPrimaryKeys($keys) + ->find($con); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return CcTagQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + return $this->addUsingAlias(CcTagPeer::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return CcTagQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + return $this->addUsingAlias(CcTagPeer::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * @param int|array $dbId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcTagQuery The current query, for fluid interface + */ + public function filterByDbId($dbId = null, $comparison = null) + { + if (is_array($dbId) && null === $comparison) { + $comparison = Criteria::IN; + } + return $this->addUsingAlias(CcTagPeer::ID, $dbId, $comparison); + } + + /** + * Filter the query on the tag_name column + * + * @param string $dbTagName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcTagQuery The current query, for fluid interface + */ + public function filterByDbTagName($dbTagName = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbTagName)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbTagName)) { + $dbTagName = str_replace('*', '%', $dbTagName); + $comparison = Criteria::LIKE; + } + } + return $this->addUsingAlias(CcTagPeer::TAG_NAME, $dbTagName, $comparison); + } + + /** + * Filter the query by a related CcFileTag object + * + * @param CcFileTag $ccFileTag the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcTagQuery The current query, for fluid interface + */ + public function filterByCcFileTag($ccFileTag, $comparison = null) + { + return $this + ->addUsingAlias(CcTagPeer::ID, $ccFileTag->getDbTagId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcFileTag relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcTagQuery The current query, for fluid interface + */ + public function joinCcFileTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcFileTag'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcFileTag'); + } + + return $this; + } + + /** + * Use the CcFileTag relation CcFileTag object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcFileTagQuery A secondary query class using the current class as primary query + */ + public function useCcFileTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcFileTag($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcFileTag', 'CcFileTagQuery'); + } + + /** + * Filter the query by a related CcPlayoutHistoryTemplateTag object + * + * @param CcPlayoutHistoryTemplateTag $ccPlayoutHistoryTemplateTag the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcTagQuery The current query, for fluid interface + */ + public function filterByCcPlayoutHistoryTemplateTag($ccPlayoutHistoryTemplateTag, $comparison = null) + { + return $this + ->addUsingAlias(CcTagPeer::ID, $ccPlayoutHistoryTemplateTag->getDbTagId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcPlayoutHistoryTemplateTag relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcTagQuery The current query, for fluid interface + */ + public function joinCcPlayoutHistoryTemplateTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplateTag'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcPlayoutHistoryTemplateTag'); + } + + return $this; + } + + /** + * Use the CcPlayoutHistoryTemplateTag relation CcPlayoutHistoryTemplateTag object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryTemplateTagQuery A secondary query class using the current class as primary query + */ + public function useCcPlayoutHistoryTemplateTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcPlayoutHistoryTemplateTag($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplateTag', 'CcPlayoutHistoryTemplateTagQuery'); + } + + /** + * Exclude object from result + * + * @param CcTag $ccTag Object to remove from the list of results + * + * @return CcTagQuery The current query, for fluid interface + */ + public function prune($ccTag = null) + { + if ($ccTag) { + $this->addUsingAlias(CcTagPeer::ID, $ccTag->getDbId(), Criteria::NOT_EQUAL); + } + + return $this; + } + +} // BaseCcTagQuery diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php new file mode 100644 index 000000000..fc92c5c71 --- /dev/null +++ b/airtime_mvc/application/services/HistoryService.php @@ -0,0 +1,64 @@ +con = isset($con) ? $con : Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME); + $this->timezone = date_default_timezone_get(); + } + + public function insertPlayedItem($schedId) { + + $this->con->beginTransaction(); + + try { + + $item = CcScheduleQuery::create()->findPK($schedId, $this->con); + + //TODO figure out how to combine these all into 1 query. + $showInstance = $item->getCcShowInstances($this->con); + $show = $showInstance->getCcShow($this->con); + + $fileId = $item->getDbFileId(); + + //don't add webstreams + if (isset($fileId)) { + + //$starts = $item->getDbStarts(null); + //$ends = $item->getDbEnds(null); + + $metadata = array(); + //$metadata["date"] = $starts->format('Y-m-d'); + //$metadata["start"] = $starts->format('H:i:s'); + //$metadata["end"] = $ends->format('H:i:s'); + $metadata["showname"] = $show->getDbName(); + + $history = new CcPlayoutHistory(); + $history->setDbFileId($fileId); + $history->setDbStarts($item->getDbStarts(null)); + $history->setDbEnds($item->getDbEnds(null)); + + foreach ($metadata as $key => $val) { + $meta = new CcPlayoutHistoryMetaData(); + $meta->setDbKey($key); + $meta->setDbValue($val); + + $history->addCcPlayoutHistoryMetaData($meta); + } + + $history->save($this->con); + } + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + throw $e; + } + } + +} \ No newline at end of file diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 2c24d3c71..12261e16a 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -479,4 +479,52 @@ + + + +
+ + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + +
+ + + + + + + + + + +
diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index 3c5110cfb..bbc885877 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -752,6 +752,120 @@ CREATE TABLE "cc_locale" COMMENT ON TABLE "cc_locale" IS ''; +SET search_path TO public; +----------------------------------------------------------------------------- +-- cc_tag +----------------------------------------------------------------------------- + +DROP TABLE "cc_tag" CASCADE; + + +CREATE TABLE "cc_tag" +( + "id" serial NOT NULL, + "tag_name" VARCHAR(128) NOT NULL, + PRIMARY KEY ("id") +); + +COMMENT ON TABLE "cc_tag" IS ''; + + +SET search_path TO public; +----------------------------------------------------------------------------- +-- cc_file_tag +----------------------------------------------------------------------------- + +DROP TABLE "cc_file_tag" CASCADE; + + +CREATE TABLE "cc_file_tag" +( + "id" serial NOT NULL, + "file_id" INTEGER NOT NULL, + "tag_id" INTEGER NOT NULL, + PRIMARY KEY ("id") +); + +COMMENT ON TABLE "cc_file_tag" IS ''; + + +SET search_path TO public; +----------------------------------------------------------------------------- +-- cc_playout_history +----------------------------------------------------------------------------- + +DROP TABLE "cc_playout_history" CASCADE; + + +CREATE TABLE "cc_playout_history" +( + "id" serial NOT NULL, + "file_id" INTEGER, + "starts" TIMESTAMP NOT NULL, + "ends" TIMESTAMP NOT NULL, + PRIMARY KEY ("id") +); + +COMMENT ON TABLE "cc_playout_history" IS ''; + + +SET search_path TO public; +----------------------------------------------------------------------------- +-- cc_playout_history_metadata +----------------------------------------------------------------------------- + +DROP TABLE "cc_playout_history_metadata" CASCADE; + + +CREATE TABLE "cc_playout_history_metadata" +( + "id" serial NOT NULL, + "history_id" INTEGER NOT NULL, + "key" VARCHAR(128) NOT NULL, + "value" VARCHAR(128) NOT NULL, + PRIMARY KEY ("id") +); + +COMMENT ON TABLE "cc_playout_history_metadata" IS ''; + + +SET search_path TO public; +----------------------------------------------------------------------------- +-- cc_playout_history_template +----------------------------------------------------------------------------- + +DROP TABLE "cc_playout_history_template" CASCADE; + + +CREATE TABLE "cc_playout_history_template" +( + "id" serial NOT NULL, + "template_name" VARCHAR(128) NOT NULL, + PRIMARY KEY ("id") +); + +COMMENT ON TABLE "cc_playout_history_template" IS ''; + + +SET search_path TO public; +----------------------------------------------------------------------------- +-- cc_playout_history_template_tag +----------------------------------------------------------------------------- + +DROP TABLE "cc_playout_history_template_tag" CASCADE; + + +CREATE TABLE "cc_playout_history_template_tag" +( + "id" serial NOT NULL, + "template_id" INTEGER NOT NULL, + "tag_id" INTEGER NOT NULL, + PRIMARY KEY ("id") +); + +COMMENT ON TABLE "cc_playout_history_template_tag" IS ''; + + SET search_path TO public; ALTER TABLE "cc_files" ADD CONSTRAINT "cc_files_owner_fkey" FOREIGN KEY ("owner_id") REFERENCES "cc_subjs" ("id"); @@ -808,3 +922,15 @@ ALTER TABLE "cc_webstream_metadata" ADD CONSTRAINT "cc_schedule_inst_fkey" FOREI ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_timestamp_inst_fkey" FOREIGN KEY ("timestamp_id") REFERENCES "cc_timestamp" ("id") ON DELETE CASCADE; ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_mount_name_inst_fkey" FOREIGN KEY ("mount_name_id") REFERENCES "cc_mount_name" ("id") ON DELETE CASCADE; + +ALTER TABLE "cc_file_tag" ADD CONSTRAINT "cc_file_tag_file_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE; + +ALTER TABLE "cc_file_tag" ADD CONSTRAINT "c_file_tag_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE; + +ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_playout_history_file_tag_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE; + +ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "cc_playout_history_metadata_entry_fkey" FOREIGN KEY ("history_id") REFERENCES "cc_playout_history" ("id") ON DELETE CASCADE; + +ALTER TABLE "cc_playout_history_template_tag" ADD CONSTRAINT "cc_playout_history_template_template_fkey" FOREIGN KEY ("template_id") REFERENCES "cc_playout_history_template" ("id") ON DELETE CASCADE; + +ALTER TABLE "cc_playout_history_template_tag" ADD CONSTRAINT "cc_playout_history_template_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE; From 9f7e85b2734953a0b94282f6cf72f38eaa734737 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 3 Jul 2013 15:20:40 -0400 Subject: [PATCH 002/181] IM-733 Create Development timetable for Airtime Development IM-777 Database structure for new History Feature --- .../application/services/HistoryService.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index fc92c5c71..77158fbd2 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -5,10 +5,10 @@ class Application_Service_HistoryService private $con; private $timezone; - public function __construct() - { + public function __construct() + { $this->con = isset($con) ? $con : Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME); - $this->timezone = date_default_timezone_get(); + $this->timezone = date_default_timezone_get(); } public function insertPlayedItem($schedId) { @@ -37,14 +37,14 @@ class Application_Service_HistoryService //$metadata["end"] = $ends->format('H:i:s'); $metadata["showname"] = $show->getDbName(); - $history = new CcPlayoutHistory(); + $history = new CcPlayoutHistory(); $history->setDbFileId($fileId); $history->setDbStarts($item->getDbStarts(null)); $history->setDbEnds($item->getDbEnds(null)); foreach ($metadata as $key => $val) { - $meta = new CcPlayoutHistoryMetaData(); - $meta->setDbKey($key); + $meta = new CcPlayoutHistoryMetaData(); + $meta->setDbKey($key); $meta->setDbValue($val); $history->addCcPlayoutHistoryMetaData($meta); @@ -55,9 +55,9 @@ class Application_Service_HistoryService $this->con->commit(); } - catch (Exception $e) { - $this->con->rollback(); - throw $e; + catch (Exception $e) { + $this->con->rollback(); + throw $e; } } From e63518f2dadceda9e3965d2d072d3fefd9e93d36 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 3 Jul 2013 16:00:48 -0400 Subject: [PATCH 003/181] IM-733 Create Development timetable for Airtime Development IM-777 Database structure for new History Feature moving original functionality into the service. --- .../controllers/PlayouthistoryController.php | 10 +-- .../application/models/PlayoutHistory.php | 83 ------------------- .../application/services/HistoryService.php | 59 ++++++++++++- 3 files changed, 61 insertions(+), 91 deletions(-) delete mode 100644 airtime_mvc/application/models/PlayoutHistory.php diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 3269fcd46..bd4fe2950 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -70,13 +70,9 @@ class PlayouthistoryController extends Zend_Controller_Action $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - Logging::info("history starts {$startsDT->format("Y-m-d H:i:s")}"); - Logging::info("history ends {$endsDT->format("Y-m-d H:i:s")}"); - - $history = new Application_Model_PlayoutHistory($startsDT, $endsDT, $params); - - $r = $history->getItems(); - + $historyService = new Application_Service_HistoryService(); + $r = $historyService->getItems($startsDT, $endsDT, $params); + $this->view->sEcho = $r["sEcho"]; $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; $this->view->iTotalRecords = $r["iTotalRecords"]; diff --git a/airtime_mvc/application/models/PlayoutHistory.php b/airtime_mvc/application/models/PlayoutHistory.php deleted file mode 100644 index 7da1ff2c2..000000000 --- a/airtime_mvc/application/models/PlayoutHistory.php +++ /dev/null @@ -1,83 +0,0 @@ - "artist_name", - "title" => "track_title", - "played" => "played", - "length" => "length", - "composer" => "composer", - "copyright" => "copyright", - ); - - public function __construct($p_startDT, $p_endDT, $p_opts) - { - $this->con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME); - $this->startDT = $p_startDT; - $this->endDT = $p_endDT; - $this->timezone = date_default_timezone_get(); - $this->epoch_now = time(); - $this->opts = $p_opts; - } - - /* - * map front end mDataProp labels to proper column names for searching etc. - */ - private function translateColumns() - { - for ($i = 0; $i < $this->opts["iColumns"]; $i++) { - - $this->opts["mDataProp_{$i}"] = $this->mDataPropMap[$this->opts["mDataProp_{$i}"]]; - } - } - - public function getItems() - { - $this->translateColumns(); - - $select = array( - "file.track_title as title", - "file.artist_name as artist", - "playout.played", - "playout.file_id", - "file.composer", - "file.copyright", - "file.length" - ); - - $start = $this->startDT->format("Y-m-d H:i:s"); - $end = $this->endDT->format("Y-m-d H:i:s"); - - $historyTable = "( - select count(schedule.file_id) as played, schedule.file_id as file_id - from cc_schedule as schedule - where schedule.starts >= '{$start}' and schedule.starts < '{$end}' - and schedule.playout_status > 0 and schedule.media_item_played != FALSE and schedule.broadcasted = 1 - group by schedule.file_id - ) - AS playout left join cc_files as file on (file.id = playout.file_id)"; - - $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $this->opts, "history"); - - foreach ($results["history"] as &$row) { - $formatter = new LengthFormatter($row['length']); - $row['length'] = $formatter->format(); - } - - return $results; - } -} diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 77158fbd2..d336f2f00 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -1,14 +1,71 @@ "artist_name", + "title" => "track_title", + "played" => "played", + "length" => "length", + "composer" => "composer", + "copyright" => "copyright", + ); + public function __construct() { $this->con = isset($con) ? $con : Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME); - $this->timezone = date_default_timezone_get(); + $this->timezone = date_default_timezone_get(); + } + + /* + * map front end mDataProp labels to proper column names for searching etc. + */ + private function translateColumns($opts) + { + for ($i = 0; $i < $opts["iColumns"]; $i++) { + + $opts["mDataProp_{$i}"] = $this->mDataPropMap[$opts["mDataProp_{$i}"]]; + } + } + + public function getItems($startDT, $endDT, $opts) + { + $this->translateColumns($opts); + + $select = array( + "file.track_title as title", + "file.artist_name as artist", + "playout.played", + "playout.file_id", + "file.composer", + "file.copyright", + "file.length" + ); + + $start = $startDT->format("Y-m-d H:i:s"); + $end = $endDT->format("Y-m-d H:i:s"); + + $historyTable = "( + select count(history.file_id) as played, history.file_id as file_id + from cc_playout_history as history + where history.starts >= '{$start}' and history.starts < '{$end}' + group by history.file_id + ) AS playout + left join cc_files as file on (file.id = playout.file_id)"; + + $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $opts, "history"); + + foreach ($results["history"] as &$row) { + $formatter = new LengthFormatter($row['length']); + $row['length'] = $formatter->format(); + } + + return $results; } public function insertPlayedItem($schedId) { From 1abbe85d6d8f5ab15dd64461d53289f7b57a32a0 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 3 Jul 2013 16:02:17 -0400 Subject: [PATCH 004/181] IM-733 Create Development timetable for Airtime Development IM-777 Database structure for new History Feature dos2unix fix --- .../controllers/PlayouthistoryController.php | 2 +- .../application/services/HistoryService.php | 100 +++++++++--------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index bd4fe2950..cc28897fb 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -70,7 +70,7 @@ class PlayouthistoryController extends Zend_Controller_Action $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - $historyService = new Application_Service_HistoryService(); + $historyService = new Application_Service_HistoryService(); $r = $historyService->getItems($startsDT, $endsDT, $params); $this->view->sEcho = $r["sEcho"]; diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index d336f2f00..a90fb7074 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -7,13 +7,13 @@ class Application_Service_HistoryService private $con; private $timezone; - private $mDataPropMap = array( - "artist" => "artist_name", - "title" => "track_title", - "played" => "played", - "length" => "length", - "composer" => "composer", - "copyright" => "copyright", + private $mDataPropMap = array( + "artist" => "artist_name", + "title" => "track_title", + "played" => "played", + "length" => "length", + "composer" => "composer", + "copyright" => "copyright", ); public function __construct() @@ -22,50 +22,50 @@ class Application_Service_HistoryService $this->timezone = date_default_timezone_get(); } - /* - * map front end mDataProp labels to proper column names for searching etc. - */ - private function translateColumns($opts) - { - for ($i = 0; $i < $opts["iColumns"]; $i++) { - - $opts["mDataProp_{$i}"] = $this->mDataPropMap[$opts["mDataProp_{$i}"]]; - } - } - - public function getItems($startDT, $endDT, $opts) - { - $this->translateColumns($opts); - - $select = array( - "file.track_title as title", - "file.artist_name as artist", - "playout.played", - "playout.file_id", - "file.composer", - "file.copyright", - "file.length" - ); - - $start = $startDT->format("Y-m-d H:i:s"); - $end = $endDT->format("Y-m-d H:i:s"); - - $historyTable = "( - select count(history.file_id) as played, history.file_id as file_id - from cc_playout_history as history - where history.starts >= '{$start}' and history.starts < '{$end}' - group by history.file_id + /* + * map front end mDataProp labels to proper column names for searching etc. + */ + private function translateColumns($opts) + { + for ($i = 0; $i < $opts["iColumns"]; $i++) { + + $opts["mDataProp_{$i}"] = $this->mDataPropMap[$opts["mDataProp_{$i}"]]; + } + } + + public function getItems($startDT, $endDT, $opts) + { + $this->translateColumns($opts); + + $select = array( + "file.track_title as title", + "file.artist_name as artist", + "playout.played", + "playout.file_id", + "file.composer", + "file.copyright", + "file.length" + ); + + $start = $startDT->format("Y-m-d H:i:s"); + $end = $endDT->format("Y-m-d H:i:s"); + + $historyTable = "( + select count(history.file_id) as played, history.file_id as file_id + from cc_playout_history as history + where history.starts >= '{$start}' and history.starts < '{$end}' + group by history.file_id ) AS playout - left join cc_files as file on (file.id = playout.file_id)"; - - $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $opts, "history"); - - foreach ($results["history"] as &$row) { - $formatter = new LengthFormatter($row['length']); - $row['length'] = $formatter->format(); - } - - return $results; + left join cc_files as file on (file.id = playout.file_id)"; + + $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $opts, "history"); + + foreach ($results["history"] as &$row) { + $formatter = new LengthFormatter($row['length']); + $row['length'] = $formatter->format(); + } + + return $results; } public function insertPlayedItem($schedId) { From c744d88f23b2909826e1a0ffbe551a73eeb05df9 Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 8 Jul 2013 18:00:02 -0400 Subject: [PATCH 005/181] IM-784 : Create Editing Abilities For History --- .../controllers/PlayouthistoryController.php | 24 +++++- .../application/forms/EditHistoryFile.php | 86 +++++++++++++++++++ .../application/forms/EditHistoryItem.php | 8 ++ .../application/services/HistoryService.php | 57 ++++++++---- .../scripts/form/edit-history-file.phtml | 3 + .../scripts/form/edit-history-item.phtml | 0 .../js/airtime/playouthistory/historytable.js | 61 ++++++++++--- 7 files changed, 209 insertions(+), 30 deletions(-) create mode 100644 airtime_mvc/application/forms/EditHistoryFile.php create mode 100644 airtime_mvc/application/forms/EditHistoryItem.php create mode 100644 airtime_mvc/application/views/scripts/form/edit-history-file.phtml create mode 100644 airtime_mvc/application/views/scripts/form/edit-history-item.phtml diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index cc28897fb..da7e7d8a8 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -7,6 +7,7 @@ class PlayouthistoryController extends Zend_Controller_Action $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext ->addActionContext('playout-history-feed', 'json') + ->addActionContext('edit-aggregate-item', 'json') ->initContext(); } @@ -71,12 +72,33 @@ class PlayouthistoryController extends Zend_Controller_Action $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); $historyService = new Application_Service_HistoryService(); - $r = $historyService->getItems($startsDT, $endsDT, $params); + $r = $historyService->getAggregateView($startsDT, $endsDT, $params); $this->view->sEcho = $r["sEcho"]; $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; $this->view->iTotalRecords = $r["iTotalRecords"]; $this->view->history = $r["history"]; } + + public function editAggregateItemAction() + { + $file_id = $this->_getParam('id'); + + $historyService = new Application_Service_HistoryService(); + $form = $historyService->makeHistoryFileForm($file_id); + + $this->view->form = $form; + $this->view->dialog = $this->view->render('form/edit-history-file.phtml'); + + unset($this->view->form); + } + + public function updateAggregateItemAction() + { + $file_id = $this->_getParam('id'); + + $historyService = new Application_Service_HistoryService(); + $historyService->editPlayedFile($file_id); + } } diff --git a/airtime_mvc/application/forms/EditHistoryFile.php b/airtime_mvc/application/forms/EditHistoryFile.php new file mode 100644 index 000000000..8d5ca61cf --- /dev/null +++ b/airtime_mvc/application/forms/EditHistoryFile.php @@ -0,0 +1,86 @@ +setDecorators( + array( + array('ViewScript', array('viewScript' => 'form/edit-history-file.phtml')) + ) + ); + */ + + $this->setMethod('post'); + + + $this->addElement('hidden', 'file_id'); + + /* Title form element */ + $title = new Zend_Form_Element_Text('his_file_title'); + $title->setLabel(_('Title:')); + $title->setAttrib('class', 'input_text'); + $title->addFilter('StringTrim'); + //$title->setDecorators(array('viewHelper')); + $this->addElement($title); + + /* Creator form element */ + $creator = new Zend_Form_Element_Text('his_file_creator'); + $creator->setLabel(_('Creator:')); + $creator->setAttrib('class', 'input_text'); + $creator->addFilter('StringTrim'); + //$creator->setDecorators(array('viewHelper')); + $this->addElement($creator); + + /* Composer form element */ + $composer = new Zend_Form_Element_Text('his_file_composer'); + $composer->setLabel(_('Composer:')); + $composer->setAttrib('class', 'input_text'); + $composer->addFilter('StringTrim'); + //$composer->setDecorators(array('viewHelper')); + $this->addElement($composer); + + /* Copyright form element */ + $copyright = new Zend_Form_Element_Text('his_file_copyright'); + $copyright->setLabel(_('Copyright:')); + $copyright->setAttrib('class', 'input_text'); + $copyright->addFilter('StringTrim'); + //$copyright->setDecorators(array('viewHelper')); + $this->addElement($copyright); + + // Add the submit button + $this->addElement('button', 'his_file_save', array( + 'ignore' => true, + 'class' => 'btn', + 'label' => _('Save'), + 'decorators' => array( + 'ViewHelper' + ) + )); + + // Add the cancel button + $this->addElement('button', 'his_file_cancel', array( + 'ignore' => true, + 'class' => 'btn', + 'label' => _('Cancel'), + 'decorators' => array( + 'ViewHelper' + ) + )); + + $this->addDisplayGroup( + array( + 'his_file_save', + 'his_file_cancel' + ), + 'submitButtons', + array( + 'decorators' => array( + 'FormElements', + 'DtDdWrapper' + ) + ) + ); + } +} \ No newline at end of file diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php new file mode 100644 index 000000000..396c79fb2 --- /dev/null +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -0,0 +1,8 @@ + "artist_name", - "title" => "track_title", - "played" => "played", - "length" => "length", - "composer" => "composer", - "copyright" => "copyright", + private $mDataPropMap = array ( + "artist" => "artist_name", + "title" => "track_title", + "played" => "played", + "length" => "length", + "composer" => "composer", + "copyright" => "copyright", ); public function __construct() @@ -29,22 +29,24 @@ class Application_Service_HistoryService { for ($i = 0; $i < $opts["iColumns"]; $i++) { - $opts["mDataProp_{$i}"] = $this->mDataPropMap[$opts["mDataProp_{$i}"]]; + if ($opts["bSearchable_{$i}"] === "true") { + $opts["mDataProp_{$i}"] = $this->mDataPropMap[$opts["mDataProp_{$i}"]]; + } } } - public function getItems($startDT, $endDT, $opts) + public function getAggregateView($startDT, $endDT, $opts) { $this->translateColumns($opts); - $select = array( - "file.track_title as title", - "file.artist_name as artist", - "playout.played", - "playout.file_id", - "file.composer", - "file.copyright", - "file.length" + $select = array ( + "file.track_title as title", + "file.artist_name as artist", + "playout.played", + "playout.file_id", + "file.composer", + "file.copyright", + "file.length" ); $start = $startDT->format("Y-m-d H:i:s"); @@ -117,5 +119,26 @@ class Application_Service_HistoryService throw $e; } } + + public function makeHistoryItemForm() { + + } + + public function makeHistoryFileForm($id) { + + $form = new Application_Form_EditHistoryFile(); + + return $form; + } + + /* id is an id in cc_playout_history */ + public function editPlayedItem($id) { + + } + + /* id is an id in cc_files */ + public function editPlayedFile($id) { + + } } \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/form/edit-history-file.phtml b/airtime_mvc/application/views/scripts/form/edit-history-file.phtml new file mode 100644 index 000000000..70f5806a4 --- /dev/null +++ b/airtime_mvc/application/views/scripts/form/edit-history-file.phtml @@ -0,0 +1,3 @@ +
+ form; ?> +
\ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml new file mode 100644 index 000000000..e69de29bb diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 0cbd672ff..a562ee893 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -1,18 +1,21 @@ function getFileName(ext){ - var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m" - filename = filename.replace(/:/g,"h") - if(ext == "pdf"){ - filename = filename+".pdf" - }else{ - filename = filename+".csv" + var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m"; + filename = filename.replace(/:/g,"h"); + + if (ext == "pdf"){ + filename = filename+".pdf"; + } + else { + filename = filename+".csv"; } return filename; } function setFlashFileName( nButton, oConfig, oFlash ) { - var filename = getFileName(oConfig.sExtends) + var filename = getFileName(oConfig.sExtends); oFlash.setFileName( filename ); - if(oConfig.sExtends == "pdf"){ + + if (oConfig.sExtends == "pdf") { this.fnSetText( oFlash, "title:"+ this.fnGetTitle(oConfig) +"\n"+ "message:"+ oConfig.sPdfMessage +"\n"+ @@ -21,9 +24,9 @@ function setFlashFileName( nButton, oConfig, oFlash ) { "size:"+ oConfig.sPdfSize +"\n"+ "--/TableToolsOpts--\n" + this.fnGetTableData(oConfig)); - }else{ - this.fnSetText( oFlash, - this.fnGetTableData(oConfig)); + } + else { + this.fnSetText(oFlash, this.fnGetTableData(oConfig)); } } @@ -60,6 +63,16 @@ var AIRTIME = (function(AIRTIME) { "data": aoData, "success": fnCallback } ); + }, + + fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { + var url = baseUrl+"Playouthistory/edit-aggregate-item/format/json/id/"+aData.file_id, + $link = $("", { + "href": url, + "text": $.i18n._("Edit") + }); + + $('td.his_edit', nRow).html($link); }; oTable = historyTableDiv.dataTable( { @@ -70,7 +83,8 @@ var AIRTIME = (function(AIRTIME) { {"sTitle": $.i18n._("Played"), "mDataProp": "played", "sClass": "his_artist"}, /* times played */ {"sTitle": $.i18n._("Length"), "mDataProp": "length", "sClass": "his_length library_length"}, /* Length */ {"sTitle": $.i18n._("Composer"), "mDataProp": "composer", "sClass": "his_composer"}, /* Composer */ - {"sTitle": $.i18n._("Copyright"), "mDataProp": "copyright", "sClass": "his_copyright"} /* Copyright */ + {"sTitle": $.i18n._("Copyright"), "mDataProp": "copyright", "sClass": "his_copyright"}, /* Copyright */ + {"sTitle" : $.i18n._("Admin"), "mDataProp": "file_id", "bSearchable" : false, "sClass": "his_edit"}, /* id of history item */ ], "bProcessing": true, @@ -80,6 +94,8 @@ var AIRTIME = (function(AIRTIME) { "fnServerData": fnServerData, + "fnRowCallback": fnRowCallback, + "oLanguage": datatables_dict, "aLengthMenu": [[50, 100, 500, -1], [50, 100, 500, $.i18n._("All")]], @@ -184,6 +200,27 @@ $(document).ready(function(){ history_content.find(dateEndId).datepicker(oBaseDatePickerSettings); history_content.find(timeEndId).timepicker(oBaseTimePickerSettings); + history_content.on("click", "td.his_edit", function(e) { + var url = e.target.href; + + e.preventDefault(); + + $.get(url, function(json) { + var dialog = $(json.dialog); + + dialog.dialog({ + autoOpen: false, + title: $.i18n._("Edit History Record"), + //width: 460, + //height: 660, + modal: true + //close: closeDialogLibrary + }); + + dialog.dialog('open'); + + }, "json"); + }); history_content.find("#his_submit").click(function(ev){ var fn, From 29c8570ade6b449b1b401005aec1dabebcccb1a1 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 18 Jul 2013 01:31:20 -0400 Subject: [PATCH 006/181] editing in progress --- .../controllers/PlayouthistoryController.php | 65 ++- .../application/forms/EditHistoryFile.php | 39 +- airtime_mvc/application/models/Datatables.php | 133 +++-- airtime_mvc/application/models/StoredFile.php | 12 + .../application/services/HistoryService.php | 161 ++++-- .../scripts/form/edit-history-file.phtml | 2 +- .../views/scripts/playouthistory/index.phtml | 18 +- .../js/airtime/playouthistory/historytable.js | 459 ++++++++++-------- 8 files changed, 551 insertions(+), 338 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index da7e7d8a8..75221f659 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -6,8 +6,11 @@ class PlayouthistoryController extends Zend_Controller_Action { $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext - ->addActionContext('playout-history-feed', 'json') + ->addActionContext('aggregate-history-feed', 'json') + ->addActionContext('item-history-feed', 'json') ->addActionContext('edit-aggregate-item', 'json') + ->addActionContext('edit-list-item', 'json') + ->addActionContext('update-aggregate-item', 'json') ->initContext(); } @@ -58,7 +61,7 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']); } - public function playoutHistoryFeedAction() + public function aggregateHistoryFeedAction() { $request = $this->getRequest(); $current_time = time(); @@ -73,32 +76,70 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $r = $historyService->getAggregateView($startsDT, $endsDT, $params); - + $this->view->sEcho = $r["sEcho"]; $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; $this->view->iTotalRecords = $r["iTotalRecords"]; $this->view->history = $r["history"]; } - + + public function itemHistoryFeedAction() + { + $request = $this->getRequest(); + $current_time = time(); + + $params = $request->getParams(); + + $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); + $ends_epoch = $request->getParam("end", $current_time); + + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); + $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); + + $historyService = new Application_Service_HistoryService(); + $r = $historyService->getListView($startsDT, $endsDT, $params); + + $this->view->sEcho = $r["sEcho"]; + $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; + $this->view->iTotalRecords = $r["iTotalRecords"]; + $this->view->history = $r["history"]; + } + public function editAggregateItemAction() { $file_id = $this->_getParam('id'); - + $historyService = new Application_Service_HistoryService(); $form = $historyService->makeHistoryFileForm($file_id); - + $this->view->form = $form; $this->view->dialog = $this->view->render('form/edit-history-file.phtml'); - + unset($this->view->form); } + public function editListItemAction() + { + $file_id = $this->_getParam('id'); + + $historyService = new Application_Service_HistoryService(); + $form = $historyService->makeHistoryFileForm($file_id); + + $this->view->form = $form; + $this->view->dialog = $this->view->render('form/edit-history-file.phtml'); + + unset($this->view->form); + } + public function updateAggregateItemAction() { - $file_id = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); - $historyService->editPlayedFile($file_id); - } + $request = $this->getRequest(); + $params = $request->getPost(); + Logging::info($params); + $historyService = new Application_Service_HistoryService(); + $json = $historyService->editPlayedFile($params); + + $this->view->data = $json; + } } diff --git a/airtime_mvc/application/forms/EditHistoryFile.php b/airtime_mvc/application/forms/EditHistoryFile.php index 8d5ca61cf..d20c5ae38 100644 --- a/airtime_mvc/application/forms/EditHistoryFile.php +++ b/airtime_mvc/application/forms/EditHistoryFile.php @@ -3,7 +3,7 @@ class Application_Form_EditHistoryFile extends Zend_Form { public function init() { - + /* $this->setDecorators( array( @@ -11,12 +11,17 @@ class Application_Form_EditHistoryFile extends Zend_Form ) ); */ - + $this->setMethod('post'); - - - $this->addElement('hidden', 'file_id'); - + + + $file_id = new Zend_Form_Element_Hidden('his_file_id'); + $file_id->setValidators(array( + new Zend_Validate_Int() + )); + $this->addElement($file_id); + + /* Title form element */ $title = new Zend_Form_Element_Text('his_file_title'); $title->setLabel(_('Title:')); @@ -24,7 +29,7 @@ class Application_Form_EditHistoryFile extends Zend_Form $title->addFilter('StringTrim'); //$title->setDecorators(array('viewHelper')); $this->addElement($title); - + /* Creator form element */ $creator = new Zend_Form_Element_Text('his_file_creator'); $creator->setLabel(_('Creator:')); @@ -32,7 +37,7 @@ class Application_Form_EditHistoryFile extends Zend_Form $creator->addFilter('StringTrim'); //$creator->setDecorators(array('viewHelper')); $this->addElement($creator); - + /* Composer form element */ $composer = new Zend_Form_Element_Text('his_file_composer'); $composer->setLabel(_('Composer:')); @@ -40,7 +45,7 @@ class Application_Form_EditHistoryFile extends Zend_Form $composer->addFilter('StringTrim'); //$composer->setDecorators(array('viewHelper')); $this->addElement($composer); - + /* Copyright form element */ $copyright = new Zend_Form_Element_Text('his_file_copyright'); $copyright->setLabel(_('Copyright:')); @@ -48,33 +53,33 @@ class Application_Form_EditHistoryFile extends Zend_Form $copyright->addFilter('StringTrim'); //$copyright->setDecorators(array('viewHelper')); $this->addElement($copyright); - + // Add the submit button $this->addElement('button', 'his_file_save', array( 'ignore' => true, - 'class' => 'btn', + 'class' => 'btn his_file_save', 'label' => _('Save'), 'decorators' => array( 'ViewHelper' ) )); - + // Add the cancel button $this->addElement('button', 'his_file_cancel', array( 'ignore' => true, - 'class' => 'btn', + 'class' => 'btn his_file_cancel', 'label' => _('Cancel'), 'decorators' => array( 'ViewHelper' ) )); - + $this->addDisplayGroup( array( - 'his_file_save', + 'his_file_save', 'his_file_cancel' - ), - 'submitButtons', + ), + 'submitButtons', array( 'decorators' => array( 'FormElements', diff --git a/airtime_mvc/application/models/Datatables.php b/airtime_mvc/application/models/Datatables.php index b3b370352..064d0e405 100644 --- a/airtime_mvc/application/models/Datatables.php +++ b/airtime_mvc/application/models/Datatables.php @@ -58,43 +58,6 @@ class Application_Model_Datatables public static function findEntries($con, $displayColumns, $fromTable, $data, $dataProp = "aaData") { - $librarySetting = - Application_Model_Preference::getCurrentLibraryTableColumnMap(); - //$displayColumns[] = 'owner'; - - // map that maps original column position to db name - $current2dbname = array(); - // array of search terms - $orig2searchTerm = array(); - foreach ($data as $key => $d) { - if (strstr($key, "mDataProp_")) { - list($dump, $index) = explode("_", $key); - $current2dbname[$index] = $d; - } elseif (strstr($key, "sSearch_")) { - list($dump, $index) = explode("_", $key); - $orig2searchTerm[$index] = $d; - } - } - - // map that maps dbname to searchTerm - $dbname2searchTerm = array(); - foreach ($current2dbname as $currentPos => $dbname) { - $new_index = $librarySetting($currentPos); - // TODO : Fix this retarded hack later. Just a band aid for - // now at least we print some warnings so that we don't - // forget about this -- cc-4462 - if ( array_key_exists($new_index, $orig2searchTerm) ) { - $dbname2searchTerm[$dbname] = $orig2searchTerm[$new_index]; - } else { - Logging::warn("Trying to reorder to unknown index - printing as much debugging as possible..."); - $debug = array( - '$new_index' => $new_index, - '$currentPos' => $currentPos, - '$orig2searchTerm' => $orig2searchTerm); - Logging::warn($debug); - } - } $where = array(); /* Holds the parameters for binding after the statement has been @@ -102,6 +65,45 @@ class Application_Model_Datatables $params = array(); if (isset($data['advSearch']) && $data['advSearch'] === 'true') { + + $librarySetting = + Application_Model_Preference::getCurrentLibraryTableColumnMap(); + //$displayColumns[] = 'owner'; + + // map that maps original column position to db name + $current2dbname = array(); + // array of search terms + $orig2searchTerm = array(); + foreach ($data as $key => $d) { + if (strstr($key, "mDataProp_")) { + list($dump, $index) = explode("_", $key); + $current2dbname[$index] = $d; + } elseif (strstr($key, "sSearch_")) { + list($dump, $index) = explode("_", $key); + $orig2searchTerm[$index] = $d; + } + } + + // map that maps dbname to searchTerm + $dbname2searchTerm = array(); + foreach ($current2dbname as $currentPos => $dbname) { + $new_index = $librarySetting($currentPos); + // TODO : Fix this retarded hack later. Just a band aid for + // now at least we print some warnings so that we don't + // forget about this -- cc-4462 + if ( array_key_exists($new_index, $orig2searchTerm) ) { + $dbname2searchTerm[$dbname] = $orig2searchTerm[$new_index]; + } else { + Logging::warn("Trying to reorder to unknown index + printing as much debugging as possible..."); + $debug = array( + '$new_index' => $new_index, + '$currentPos' => $currentPos, + '$orig2searchTerm' => $orig2searchTerm); + Logging::warn($debug); + } + } + $advancedWhere = self::buildWhereClauseForAdvancedSearch($dbname2searchTerm); if (!empty($advancedWhere['clause'])) { $where[] = join(" AND ", $advancedWhere['clause']); @@ -119,7 +121,6 @@ class Application_Model_Datatables $sql = $selectorCount." FROM ".$fromTable; $sqlTotalRows = $sql; - if (isset($searchTerms)) { $searchCols = array(); for ($i = 0; $i < $data["iColumns"]; $i++) { @@ -164,57 +165,47 @@ class Application_Model_Datatables $sql = $selectorRows." FROM ".$fromTable." WHERE ".$where." ORDER BY ".$orderby; - //limit the results returned. - if ($displayLength !== -1) { - $sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength; - } - } else { - $sql = $selectorRows." FROM ".$fromTable." ORDER BY ".$orderby; - - //limit the results returned. - if ($displayLength !== -1) { - $sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength; - } } + else { + $sql = $selectorRows." FROM ".$fromTable." ORDER BY ".$orderby; + } + + //limit the results returned. + if ($displayLength !== -1) { + $sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength; + } + try { - + + Logging::info($sqlTotalRows); + $r = $con->query($sqlTotalRows); $totalRows = $r->fetchColumn(0); if (isset($sqlTotalDisplayRows)) { + Logging::info("sql is set"); + Logging::info($sqlTotalDisplayRows); $totalDisplayRows = Application_Common_Database::prepareAndExecute($sqlTotalDisplayRows, $params, 'column'); - } else { + } + else { + Logging::info("sql is not set."); $totalDisplayRows = $totalRows; } //TODO if ($needToBind) { $results = Application_Common_Database::prepareAndExecute($sql, $params); - } else { + } + else { $stmt = $con->query($sql); $stmt->setFetchMode(PDO::FETCH_ASSOC); $results = $stmt->fetchAll(); } - - // we need to go over all items and fix length for playlist - // in case the playlist contains dynamic block - foreach ($results as &$r) { - //this function is also called for Manage Users so in - //this case there will be no 'ftype' - if (isset($r['ftype'])) { - if ($r['ftype'] == 'playlist') { - $pl = new Application_Model_Playlist($r['id']); - $r['length'] = $pl->getLength(); - } elseif ($r['ftype'] == "block") { - $bl = new Application_Model_Block($r['id']); - $r['bl_type'] = $bl->isStatic() ? 'static' : 'dynamic'; - $r['length'] = $bl->getLength(); - } - } - } - } catch (Exception $e) { - Logging::debug($e->getMessage()); } + catch (Exception $e) { + Logging::info($e->getMessage()); + } + return array( "sEcho" => intval($data["sEcho"]), "iTotalDisplayRecords" => intval($totalDisplayRows), diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 9640c36bc..f3f349219 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -778,6 +778,18 @@ SQL; foreach ($results['aaData'] as &$row) { $row['id'] = intval($row['id']); + //taken from Datatables.php, needs to be cleaned up there. + if (isset($r['ftype'])) { + if ($r['ftype'] == 'playlist') { + $pl = new Application_Model_Playlist($r['id']); + $r['length'] = $pl->getLength(); + } elseif ($r['ftype'] == "block") { + $bl = new Application_Model_Block($r['id']); + $r['bl_type'] = $bl->isStatic() ? 'static' : 'dynamic'; + $r['length'] = $bl->getLength(); + } + } + if ($row['ftype'] === "audioclip") { $cuein_formatter = new LengthFormatter($row["cuein"]); diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 7d5bec71c..366940fae 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -6,7 +6,7 @@ class Application_Service_HistoryService { private $con; private $timezone; - + private $mDataPropMap = array ( "artist" => "artist_name", "title" => "track_title", @@ -14,131 +14,200 @@ class Application_Service_HistoryService "length" => "length", "composer" => "composer", "copyright" => "copyright", + "starts" => "starts", + "ends" => "ends" ); - + public function __construct() { $this->con = isset($con) ? $con : Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME); $this->timezone = date_default_timezone_get(); } - + /* * map front end mDataProp labels to proper column names for searching etc. */ private function translateColumns($opts) { for ($i = 0; $i < $opts["iColumns"]; $i++) { - + if ($opts["bSearchable_{$i}"] === "true") { $opts["mDataProp_{$i}"] = $this->mDataPropMap[$opts["mDataProp_{$i}"]]; - } + } } } - + + public function getListView($startDT, $endDT, $opts) + { + $this->translateColumns($opts); + + $select = array ( + "file.track_title as title", + "file.artist_name as artist", + "playout.starts", + "playout.ends", + "playout.history_id" + ); + + $start = $startDT->format("Y-m-d H:i:s"); + $end = $endDT->format("Y-m-d H:i:s"); + + $historyTable = "( + select history.starts as starts, history.ends as ends, + history.id as history_id, history.file_id as file_id + from cc_playout_history as history + where history.starts >= '{$start}' and history.starts < '{$end}' + ) AS playout + left join cc_files as file on (file.id = playout.file_id)"; + + $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $opts, "history"); + + return $results; + } + public function getAggregateView($startDT, $endDT, $opts) { $this->translateColumns($opts); - + $select = array ( "file.track_title as title", "file.artist_name as artist", - "playout.played", + "playout.played as played", "playout.file_id", - "file.composer", - "file.copyright", - "file.length" + "file.composer as composer", + "file.copyright as copyright", + "file.length as length" ); - + $start = $startDT->format("Y-m-d H:i:s"); - $end = $endDT->format("Y-m-d H:i:s"); - + $end = $endDT->format("Y-m-d H:i:s"); + $historyTable = "( select count(history.file_id) as played, history.file_id as file_id from cc_playout_history as history where history.starts >= '{$start}' and history.starts < '{$end}' group by history.file_id - ) AS playout + ) AS playout left join cc_files as file on (file.id = playout.file_id)"; - + $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $opts, "history"); - + foreach ($results["history"] as &$row) { $formatter = new LengthFormatter($row['length']); $row['length'] = $formatter->format(); } - + return $results; } - + public function insertPlayedItem($schedId) { - + $this->con->beginTransaction(); - + try { - + $item = CcScheduleQuery::create()->findPK($schedId, $this->con); - + //TODO figure out how to combine these all into 1 query. $showInstance = $item->getCcShowInstances($this->con); $show = $showInstance->getCcShow($this->con); - + $fileId = $item->getDbFileId(); - + //don't add webstreams if (isset($fileId)) { - + //$starts = $item->getDbStarts(null); //$ends = $item->getDbEnds(null); - + $metadata = array(); //$metadata["date"] = $starts->format('Y-m-d'); //$metadata["start"] = $starts->format('H:i:s'); //$metadata["end"] = $ends->format('H:i:s'); $metadata["showname"] = $show->getDbName(); - + $history = new CcPlayoutHistory(); $history->setDbFileId($fileId); $history->setDbStarts($item->getDbStarts(null)); $history->setDbEnds($item->getDbEnds(null)); - + foreach ($metadata as $key => $val) { $meta = new CcPlayoutHistoryMetaData(); $meta->setDbKey($key); $meta->setDbValue($val); - + $history->addCcPlayoutHistoryMetaData($meta); } - + $history->save($this->con); } - + $this->con->commit(); - } + } catch (Exception $e) { $this->con->rollback(); throw $e; } } - - public function makeHistoryItemForm() { - + + /* id is an id in cc_playout_history */ + public function makeHistoryItemForm($id) { + } - + + /* id is an id in cc_files */ public function makeHistoryFileForm($id) { - - $form = new Application_Form_EditHistoryFile(); - - return $form; + + try { + $form = new Application_Form_EditHistoryFile(); + + $file = Application_Model_StoredFile::RecallById($id, $this->con); + $md = $file->getDbColMetadata(); + + $form->populate(array( + 'his_file_id' => $id, + 'his_file_title' => $md[MDATA_KEY_TITLE], + 'his_file_creator' => $md[MDATA_KEY_CREATOR], + 'his_file_composer' => $md[MDATA_KEY_COMPOSER], + 'his_file_copyright' => $md[MDATA_KEY_COPYRIGHT] + )); + + return $form; + } + catch (Exception $e) { + Logging::debug($e); + } } - + /* id is an id in cc_playout_history */ public function editPlayedItem($id) { - + } - + /* id is an id in cc_files */ - public function editPlayedFile($id) { - + public function editPlayedFile($data) { + + $form = new Application_Form_EditHistoryFile(); + + $json = $form->processAjax($data); + Logging::info($json); + + if ($form->isValid($data)) { + + $id = $data["his_file_id"]; + $file = Application_Model_StoredFile::RecallById($id, $this->con); + + $md = array( + MDATA_KEY_TITLE => $data['his_file_title'], + MDATA_KEY_CREATOR => $data['his_file_creator'], + MDATA_KEY_COMPOSER => $data['his_file_composer'], + MDATA_KEY_COPYRIGHT => $data['his_file_copyright'] + ); + + $file->setDbColMetadata($md); + } + + return $json; } } \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/form/edit-history-file.phtml b/airtime_mvc/application/views/scripts/form/edit-history-file.phtml index 70f5806a4..886790693 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-file.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-file.phtml @@ -1,3 +1,3 @@
- form; ?> + form; ?>
\ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index d7b5a2f99..7d2fb43f3 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -1,4 +1,18 @@
\ No newline at end of file diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index a562ee893..24ffe2a72 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -1,35 +1,3 @@ -function getFileName(ext){ - var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m"; - filename = filename.replace(/:/g,"h"); - - if (ext == "pdf"){ - filename = filename+".pdf"; - } - else { - filename = filename+".csv"; - } - return filename; -} - -function setFlashFileName( nButton, oConfig, oFlash ) { - var filename = getFileName(oConfig.sExtends); - oFlash.setFileName( filename ); - - if (oConfig.sExtends == "pdf") { - this.fnSetText( oFlash, - "title:"+ this.fnGetTitle(oConfig) +"\n"+ - "message:"+ oConfig.sPdfMessage +"\n"+ - "colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+ - "orientation:"+ oConfig.sPdfOrientation +"\n"+ - "size:"+ oConfig.sPdfSize +"\n"+ - "--/TableToolsOpts--\n" + - this.fnGetTableData(oConfig)); - } - else { - this.fnSetText(oFlash, this.fnGetTableData(oConfig)); - } -} - var AIRTIME = (function(AIRTIME) { var mod; @@ -38,33 +6,97 @@ var AIRTIME = (function(AIRTIME) { } mod = AIRTIME.history; - mod.historyTable = function() { - var oTable, - historyContentDiv = $("#history_content"), - historyTableDiv = historyContentDiv.find("#history_table"), - tableHeight = historyContentDiv.height() - 200, - fnServerData; - - fnServerData = function ( sSource, aoData, fnCallback ) { - - if (fnServerData.hasOwnProperty("start")) { - aoData.push( { name: "start", value: fnServerData.start} ); - } - if (fnServerData.hasOwnProperty("end")) { - aoData.push( { name: "end", value: fnServerData.end} ); - } - - aoData.push( { name: "format", value: "json"} ); - - $.ajax( { - "dataType": 'json', - "type": "GET", - "url": sSource, - "data": aoData, - "success": fnCallback - } ); - }, + var $historyContentDiv; + + var oTableTools = { + "sSwfPath": baseUrl+"js/datatables/plugin/TableTools/swf/copy_cvs_xls_pdf.swf", + "aButtons": [ + { + "sExtends": "copy", + "fnComplete": function(nButton, oConfig, oFlash, text) { + var lines = text.split('\n').length, + len = this.s.dt.nTFoot === null ? lines-1 : lines-2, + plural = (len==1) ? "" : "s"; + alert(sprintf($.i18n._('Copied %s row%s to the clipboard'), len, plural)); + } + }, + { + "sExtends": "csv", + "fnClick": setFlashFileName + }, + { + "sExtends": "pdf", + "fnClick": setFlashFileName + }, + { + "sExtends": "print", + "sInfo" : sprintf($.i18n._("%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished."), "
", "

") + } + ] + }; + + var lengthMenu = [[50, 100, 500, -1], [50, 100, 500, $.i18n._("All")]]; + + var sDom = 'lf<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>'; + + function getFileName(ext){ + var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m"; + filename = filename.replace(/:/g,"h"); + if (ext == "pdf"){ + filename = filename+".pdf"; + } + else { + filename = filename+".csv"; + } + return filename; + } + + function setFlashFileName( nButton, oConfig, oFlash ) { + var filename = getFileName(oConfig.sExtends); + oFlash.setFileName( filename ); + + if (oConfig.sExtends == "pdf") { + this.fnSetText( oFlash, + "title:"+ this.fnGetTitle(oConfig) +"\n"+ + "message:"+ oConfig.sPdfMessage +"\n"+ + "colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+ + "orientation:"+ oConfig.sPdfOrientation +"\n"+ + "size:"+ oConfig.sPdfSize +"\n"+ + "--/TableToolsOpts--\n" + + this.fnGetTableData(oConfig)); + } + else { + this.fnSetText(oFlash, this.fnGetTableData(oConfig)); + } + } + + /* This callback can be used for all history tables */ + function fnServerData( sSource, aoData, fnCallback ) { + + if (fnServerData.hasOwnProperty("start")) { + aoData.push( { name: "start", value: fnServerData.start} ); + } + if (fnServerData.hasOwnProperty("end")) { + aoData.push( { name: "end", value: fnServerData.end} ); + } + + aoData.push( { name: "format", value: "json"} ); + + $.ajax( { + "dataType": 'json', + "type": "GET", + "url": sSource, + "data": aoData, + "success": fnCallback + } ); + } + + function aggregateHistoryTable() { + var oTable, + $historyTableDiv = $historyContentDiv.find("#history_table_aggregate"), + fnRowCallback; + fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { var url = baseUrl+"Playouthistory/edit-aggregate-item/format/json/id/"+aData.file_id, $link = $("", { @@ -75,7 +107,7 @@ var AIRTIME = (function(AIRTIME) { $('td.his_edit', nRow).html($link); }; - oTable = historyTableDiv.dataTable( { + oTable = $historyTableDiv.dataTable( { "aoColumns": [ {"sTitle": $.i18n._("Title"), "mDataProp": "title", "sClass": "his_title"}, /* Title */ @@ -89,150 +121,199 @@ var AIRTIME = (function(AIRTIME) { "bProcessing": true, "bServerSide": true, - "sAjaxSource": baseUrl+"Playouthistory/playout-history-feed", + "sAjaxSource": baseUrl+"playouthistory/aggregate-history-feed", "sAjaxDataProp": "history", - "fnServerData": fnServerData, - "fnRowCallback": fnRowCallback, - "oLanguage": datatables_dict, - - "aLengthMenu": [[50, 100, 500, -1], [50, 100, 500, $.i18n._("All")]], + "aLengthMenu": lengthMenu, "iDisplayLength": 50, - "sPaginationType": "full_numbers", "bJQueryUI": true, "bAutoWidth": true, - - "sDom": 'lf<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>', - - "oTableTools": { - "sSwfPath": baseUrl+"js/datatables/plugin/TableTools/swf/copy_cvs_xls_pdf.swf", - "aButtons": [ - { - "sExtends": "copy", - "fnComplete": function(nButton, oConfig, oFlash, text) { - var lines = text.split('\n').length, - len = this.s.dt.nTFoot === null ? lines-1 : lines-2, - plural = (len==1) ? "" : "s"; - alert(sprintf($.i18n._('Copied %s row%s to the clipboard'), len, plural)); - } - }, - { - "sExtends": "csv", - "fnClick": setFlashFileName - }, - { - "sExtends": "pdf", - "fnClick": setFlashFileName - }, - { - "sExtends": "print", - "sInfo" : sprintf($.i18n._("%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished."), "

", "

") - } - ] - } + "sDom": sDom, + "oTableTools": oTableTools }); oTable.fnSetFilteringDelay(350); - - historyContentDiv.find(".dataTables_scrolling").css("max-height", tableHeight); - + return oTable; + } + + function itemHistoryTable() { + var oTable, + $historyTableDiv = $historyContentDiv.find("#history_table_list"), + fnRowCallback; + + fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { + var url = baseUrl+"playouthistory/edit-list-item/format/json/id/"+aData.history_id, + $link = $("", { + "href": url, + "text": $.i18n._("Edit") + }); + + $('td.his_edit', nRow).html($link); + }; + + oTable = $historyTableDiv.dataTable( { + + "aoColumns": [ + {"sTitle": $.i18n._("Start"), "mDataProp": "starts", "sClass": "his_starts"}, /* Starts */ + {"sTitle": $.i18n._("End"), "mDataProp": "ends", "sClass": "his_ends"}, /* Ends */ + {"sTitle": $.i18n._("Title"), "mDataProp": "title", "sClass": "his_title"}, /* Title */ + {"sTitle": $.i18n._("Creator"), "mDataProp": "artist", "sClass": "his_artist"}, /* Creator */ + {"sTitle" : $.i18n._("Admin"), "mDataProp": "history_id", "bSearchable" : false, "sClass": "his_edit"}, /* id of history item */ + ], + + "bProcessing": true, + "bServerSide": true, + "sAjaxSource": baseUrl+"playouthistory/item-history-feed", + "sAjaxDataProp": "history", + "fnServerData": fnServerData, + "fnRowCallback": fnRowCallback, + "oLanguage": datatables_dict, + "aLengthMenu": lengthMenu, + "iDisplayLength": 50, + "sPaginationType": "full_numbers", + "bJQueryUI": true, + "bAutoWidth": true, + "sDom": sDom, + "oTableTools": oTableTools + }); + oTable.fnSetFilteringDelay(350); + + return oTable; + } + + mod.onReady = function() { + + var viewport = AIRTIME.utilities.findViewportDimensions(), + widgetHeight = viewport.height - 185, + screenWidth = Math.floor(viewport.width - 110), + oBaseDatePickerSettings, + oBaseTimePickerSettings, + oTable, + dateStartId = "#his_date_start", + timeStartId = "#his_time_start", + dateEndId = "#his_date_end", + timeEndId = "#his_time_end", + $hisDialogEl; + + $historyContentDiv = $("#history_content"); + + function removeHistoryDialog() { + $hisDialogEl.dialog("destroy"); + $hisDialogEl.remove(); + } + + function makeHistoryDialog(html) { + $hisDialogEl = $(html); + + $hisDialogEl.dialog({ + title: $.i18n._("Edit History Record"), + modal: true, + close: function() { + removeHistoryDialog(); + } + }); + } + + /* + * Icon hover states for search. + */ + $historyContentDiv.on("mouseenter", ".his-timerange .ui-button", function(ev) { + $(this).addClass("ui-state-hover"); + }); + $historyContentDiv.on("mouseleave", ".his-timerange .ui-button", function(ev) { + $(this).removeClass("ui-state-hover"); + }); + + $historyContentDiv + .height(widgetHeight) + .width(screenWidth); + + oBaseDatePickerSettings = { + dateFormat: 'yy-mm-dd', + //i18n_months, i18n_days_short are in common.js + monthNames: i18n_months, + dayNamesMin: i18n_days_short, + onSelect: function(sDate, oDatePicker) { + $(this).datepicker( "setDate", sDate ); + } + }; + + oBaseTimePickerSettings = { + showPeriodLabels: false, + showCloseButton: true, + closeButtonText: $.i18n._("Done"), + showLeadingZero: false, + defaultTime: '0:00', + hourText: $.i18n._("Hour"), + minuteText: $.i18n._("Minute") + }; + + oTable = aggregateHistoryTable(); + itemHistoryTable(); + + $historyContentDiv.find(dateStartId).datepicker(oBaseDatePickerSettings); + $historyContentDiv.find(timeStartId).timepicker(oBaseTimePickerSettings); + $historyContentDiv.find(dateEndId).datepicker(oBaseDatePickerSettings); + $historyContentDiv.find(timeEndId).timepicker(oBaseTimePickerSettings); + + $historyContentDiv.on("click", "td.his_edit", function(e) { + var url = e.target.href; + + e.preventDefault(); + + $.get(url, function(json) { + + makeHistoryDialog(json.dialog); + + }, "json"); + }); + + $('body').on("click", ".his_file_save", function(e) { + + e.preventDefault(); + + var $form = $(this).parents("form"); + var data = $form.serializeArray(); + + var url = baseUrl+"Playouthistory/update-aggregate-item/format/json"; + + $.post(url, data, function(json) { + + //TODO put errors on form. + if (json.data !== "true") { + //makeHistoryDialog(json.dialog); + } + else { + removeHistoryDialog(); + oTable.fnDraw(); + } + + }, "json"); + + }); + + $historyContentDiv.find("#his_submit").click(function(ev){ + var fn, + oRange; + + oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId); + + fn = oTable.fnSettings().fnServerData; + fn.start = oRange.start; + fn.end = oRange.end; + + oTable.fnDraw(); + }); + + $historyContentDiv.find("#his-tabs").tabs(); + }; return AIRTIME; }(AIRTIME || {})); -$(document).ready(function(){ - - var viewport = AIRTIME.utilities.findViewportDimensions(), - history_content = $("#history_content"), - widgetHeight = viewport.height - 185, - screenWidth = Math.floor(viewport.width - 110), - oBaseDatePickerSettings, - oBaseTimePickerSettings, - oTable, - dateStartId = "#his_date_start", - timeStartId = "#his_time_start", - dateEndId = "#his_date_end", - timeEndId = "#his_time_end"; - - /* - * Icon hover states for search. - */ - history_content.on("mouseenter", ".his-timerange .ui-button", function(ev) { - $(this).addClass("ui-state-hover"); - }); - history_content.on("mouseleave", ".his-timerange .ui-button", function(ev) { - $(this).removeClass("ui-state-hover"); - }); - - history_content - .height(widgetHeight) - .width(screenWidth); - - oBaseDatePickerSettings = { - dateFormat: 'yy-mm-dd', - //i18n_months, i18n_days_short are in common.js - monthNames: i18n_months, - dayNamesMin: i18n_days_short, - onSelect: function(sDate, oDatePicker) { - $(this).datepicker( "setDate", sDate ); - } - }; - - oBaseTimePickerSettings = { - showPeriodLabels: false, - showCloseButton: true, - closeButtonText: $.i18n._("Done"), - showLeadingZero: false, - defaultTime: '0:00', - hourText: $.i18n._("Hour"), - minuteText: $.i18n._("Minute") - }; - - oTable = AIRTIME.history.historyTable(); - - history_content.find(dateStartId).datepicker(oBaseDatePickerSettings); - history_content.find(timeStartId).timepicker(oBaseTimePickerSettings); - history_content.find(dateEndId).datepicker(oBaseDatePickerSettings); - history_content.find(timeEndId).timepicker(oBaseTimePickerSettings); - - history_content.on("click", "td.his_edit", function(e) { - var url = e.target.href; - - e.preventDefault(); - - $.get(url, function(json) { - var dialog = $(json.dialog); - - dialog.dialog({ - autoOpen: false, - title: $.i18n._("Edit History Record"), - //width: 460, - //height: 660, - modal: true - //close: closeDialogLibrary - }); - - dialog.dialog('open'); - - }, "json"); - }); - - history_content.find("#his_submit").click(function(ev){ - var fn, - oRange; - - oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId); - - fn = oTable.fnSettings().fnServerData; - fn.start = oRange.start; - fn.end = oRange.end; - - oTable.fnDraw(); - }); - -}); +$(document).ready(AIRTIME.history.onReady); \ No newline at end of file From ec44b81f6a6072a5f4d2bd53e8e478b59693fcda Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 18 Jul 2013 01:37:39 -0400 Subject: [PATCH 007/181] clrf --- .../controllers/PlayouthistoryController.php | 22 +++--- .../application/forms/EditHistoryFile.php | 4 +- airtime_mvc/application/models/Datatables.php | 78 +++++++++---------- airtime_mvc/application/models/StoredFile.php | 18 ++--- .../application/services/HistoryService.php | 64 +++++++-------- 5 files changed, 93 insertions(+), 93 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 75221f659..1837546bf 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -118,17 +118,17 @@ class PlayouthistoryController extends Zend_Controller_Action unset($this->view->form); } - public function editListItemAction() - { - $file_id = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); - $form = $historyService->makeHistoryFileForm($file_id); - - $this->view->form = $form; - $this->view->dialog = $this->view->render('form/edit-history-file.phtml'); - - unset($this->view->form); + public function editListItemAction() + { + $file_id = $this->_getParam('id'); + + $historyService = new Application_Service_HistoryService(); + $form = $historyService->makeHistoryFileForm($file_id); + + $this->view->form = $form; + $this->view->dialog = $this->view->render('form/edit-history-file.phtml'); + + unset($this->view->form); } public function updateAggregateItemAction() diff --git a/airtime_mvc/application/forms/EditHistoryFile.php b/airtime_mvc/application/forms/EditHistoryFile.php index d20c5ae38..315033174 100644 --- a/airtime_mvc/application/forms/EditHistoryFile.php +++ b/airtime_mvc/application/forms/EditHistoryFile.php @@ -16,8 +16,8 @@ class Application_Form_EditHistoryFile extends Zend_Form $file_id = new Zend_Form_Element_Hidden('his_file_id'); - $file_id->setValidators(array( - new Zend_Validate_Int() + $file_id->setValidators(array( + new Zend_Validate_Int() )); $this->addElement($file_id); diff --git a/airtime_mvc/application/models/Datatables.php b/airtime_mvc/application/models/Datatables.php index 064d0e405..ef6b6e80e 100644 --- a/airtime_mvc/application/models/Datatables.php +++ b/airtime_mvc/application/models/Datatables.php @@ -66,42 +66,42 @@ class Application_Model_Datatables if (isset($data['advSearch']) && $data['advSearch'] === 'true') { - $librarySetting = - Application_Model_Preference::getCurrentLibraryTableColumnMap(); - //$displayColumns[] = 'owner'; - - // map that maps original column position to db name - $current2dbname = array(); - // array of search terms - $orig2searchTerm = array(); - foreach ($data as $key => $d) { - if (strstr($key, "mDataProp_")) { - list($dump, $index) = explode("_", $key); - $current2dbname[$index] = $d; - } elseif (strstr($key, "sSearch_")) { - list($dump, $index) = explode("_", $key); - $orig2searchTerm[$index] = $d; - } - } - - // map that maps dbname to searchTerm - $dbname2searchTerm = array(); - foreach ($current2dbname as $currentPos => $dbname) { - $new_index = $librarySetting($currentPos); - // TODO : Fix this retarded hack later. Just a band aid for - // now at least we print some warnings so that we don't - // forget about this -- cc-4462 - if ( array_key_exists($new_index, $orig2searchTerm) ) { - $dbname2searchTerm[$dbname] = $orig2searchTerm[$new_index]; - } else { - Logging::warn("Trying to reorder to unknown index - printing as much debugging as possible..."); - $debug = array( - '$new_index' => $new_index, - '$currentPos' => $currentPos, - '$orig2searchTerm' => $orig2searchTerm); - Logging::warn($debug); - } + $librarySetting = + Application_Model_Preference::getCurrentLibraryTableColumnMap(); + //$displayColumns[] = 'owner'; + + // map that maps original column position to db name + $current2dbname = array(); + // array of search terms + $orig2searchTerm = array(); + foreach ($data as $key => $d) { + if (strstr($key, "mDataProp_")) { + list($dump, $index) = explode("_", $key); + $current2dbname[$index] = $d; + } elseif (strstr($key, "sSearch_")) { + list($dump, $index) = explode("_", $key); + $orig2searchTerm[$index] = $d; + } + } + + // map that maps dbname to searchTerm + $dbname2searchTerm = array(); + foreach ($current2dbname as $currentPos => $dbname) { + $new_index = $librarySetting($currentPos); + // TODO : Fix this retarded hack later. Just a band aid for + // now at least we print some warnings so that we don't + // forget about this -- cc-4462 + if ( array_key_exists($new_index, $orig2searchTerm) ) { + $dbname2searchTerm[$dbname] = $orig2searchTerm[$new_index]; + } else { + Logging::warn("Trying to reorder to unknown index + printing as much debugging as possible..."); + $debug = array( + '$new_index' => $new_index, + '$currentPos' => $currentPos, + '$orig2searchTerm' => $orig2searchTerm); + Logging::warn($debug); + } } $advancedWhere = self::buildWhereClauseForAdvancedSearch($dbname2searchTerm); @@ -170,9 +170,9 @@ class Application_Model_Datatables $sql = $selectorRows." FROM ".$fromTable." ORDER BY ".$orderby; } - //limit the results returned. - if ($displayLength !== -1) { - $sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength; + //limit the results returned. + if ($displayLength !== -1) { + $sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength; } try { diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index f3f349219..6f0a98cce 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -779,15 +779,15 @@ SQL; $row['id'] = intval($row['id']); //taken from Datatables.php, needs to be cleaned up there. - if (isset($r['ftype'])) { - if ($r['ftype'] == 'playlist') { - $pl = new Application_Model_Playlist($r['id']); - $r['length'] = $pl->getLength(); - } elseif ($r['ftype'] == "block") { - $bl = new Application_Model_Block($r['id']); - $r['bl_type'] = $bl->isStatic() ? 'static' : 'dynamic'; - $r['length'] = $bl->getLength(); - } + if (isset($r['ftype'])) { + if ($r['ftype'] == 'playlist') { + $pl = new Application_Model_Playlist($r['id']); + $r['length'] = $pl->getLength(); + } elseif ($r['ftype'] == "block") { + $bl = new Application_Model_Block($r['id']); + $r['bl_type'] = $bl->isStatic() ? 'static' : 'dynamic'; + $r['length'] = $bl->getLength(); + } } if ($row['ftype'] === "audioclip") { diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 366940fae..1c2812e65 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -39,29 +39,29 @@ class Application_Service_HistoryService public function getListView($startDT, $endDT, $opts) { - $this->translateColumns($opts); - - $select = array ( - "file.track_title as title", - "file.artist_name as artist", - "playout.starts", - "playout.ends", - "playout.history_id" - ); - - $start = $startDT->format("Y-m-d H:i:s"); - $end = $endDT->format("Y-m-d H:i:s"); - - $historyTable = "( + $this->translateColumns($opts); + + $select = array ( + "file.track_title as title", + "file.artist_name as artist", + "playout.starts", + "playout.ends", + "playout.history_id" + ); + + $start = $startDT->format("Y-m-d H:i:s"); + $end = $endDT->format("Y-m-d H:i:s"); + + $historyTable = "( select history.starts as starts, history.ends as ends, - history.id as history_id, history.file_id as file_id - from cc_playout_history as history - where history.starts >= '{$start}' and history.starts < '{$end}' - ) AS playout - left join cc_files as file on (file.id = playout.file_id)"; - - $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $opts, "history"); - + history.id as history_id, history.file_id as file_id + from cc_playout_history as history + where history.starts >= '{$start}' and history.starts < '{$end}' + ) AS playout + left join cc_files as file on (file.id = playout.file_id)"; + + $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $opts, "history"); + return $results; } @@ -157,7 +157,7 @@ class Application_Service_HistoryService /* id is an id in cc_files */ public function makeHistoryFileForm($id) { - + try { $form = new Application_Form_EditHistoryFile(); @@ -165,17 +165,17 @@ class Application_Service_HistoryService $md = $file->getDbColMetadata(); $form->populate(array( - 'his_file_id' => $id, - 'his_file_title' => $md[MDATA_KEY_TITLE], - 'his_file_creator' => $md[MDATA_KEY_CREATOR], - 'his_file_composer' => $md[MDATA_KEY_COMPOSER], + 'his_file_id' => $id, + 'his_file_title' => $md[MDATA_KEY_TITLE], + 'his_file_creator' => $md[MDATA_KEY_CREATOR], + 'his_file_composer' => $md[MDATA_KEY_COMPOSER], 'his_file_copyright' => $md[MDATA_KEY_COPYRIGHT] )); - return $form; - } - catch (Exception $e) { - Logging::debug($e); + return $form; + } + catch (Exception $e) { + Logging::debug($e); } } @@ -203,7 +203,7 @@ class Application_Service_HistoryService MDATA_KEY_COMPOSER => $data['his_file_composer'], MDATA_KEY_COPYRIGHT => $data['his_file_copyright'] ); - + $file->setDbColMetadata($md); } From 634eb40a0c9763a789864ce0753478bfb125be1f Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Mon, 22 Jul 2013 10:45:39 -0400 Subject: [PATCH 008/181] creating an entry. --- .../controllers/PlayouthistoryController.php | 11 +++++++++++ .../application/forms/EditHistoryItem.php | 17 ++++++++++++++++- .../application/services/HistoryService.php | 6 +++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 1837546bf..39d972a6d 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -9,6 +9,7 @@ class PlayouthistoryController extends Zend_Controller_Action ->addActionContext('aggregate-history-feed', 'json') ->addActionContext('item-history-feed', 'json') ->addActionContext('edit-aggregate-item', 'json') + ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') ->addActionContext('update-aggregate-item', 'json') ->initContext(); @@ -118,6 +119,16 @@ class PlayouthistoryController extends Zend_Controller_Action unset($this->view->form); } + public function createListItemAction() + { + $request = $this->getRequest(); + $params = $request->getPost(); + Logging::info($params); + + $historyService = new Application_Service_HistoryService(); + $historyService->createPlayedItem($params); + } + public function editListItemAction() { $file_id = $this->_getParam('id'); diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php index 396c79fb2..086c910c5 100644 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -3,6 +3,21 @@ class Application_Form_EditHistoryItem extends Zend_Form { public function init() { - + + $file_id = new Zend_Form_Element_Hidden('his_file_id'); + $file_id->setValidators(array( + new Zend_Validate_Int() + )); + $this->addElement($file_id); + + + /* Title form element */ + $title = new Zend_Form_Element_Text('his_file_title'); + $title->setLabel(_('Title:')); + $title->setAttrib('class', 'input_text'); + $title->addFilter('StringTrim'); + //$title->setDecorators(array('viewHelper')); + $this->addElement($title); + } } \ No newline at end of file diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 1c2812e65..48d32ae6a 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -175,10 +175,14 @@ class Application_Service_HistoryService return $form; } catch (Exception $e) { - Logging::debug($e); + Logging::info($e); } } + public function createPlayedItem() { + + } + /* id is an id in cc_playout_history */ public function editPlayedItem($id) { From 19ba788bae62d99220b7faee2f425cf387a57a50 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Mon, 22 Jul 2013 10:47:11 -0400 Subject: [PATCH 009/181] CLRF --- .../controllers/PlayouthistoryController.php | 12 ++++----- .../application/forms/EditHistoryItem.php | 26 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 39d972a6d..e43e992ea 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -119,14 +119,14 @@ class PlayouthistoryController extends Zend_Controller_Action unset($this->view->form); } - public function createListItemAction() - { + public function createListItemAction() + { $request = $this->getRequest(); $params = $request->getPost(); - Logging::info($params); - - $historyService = new Application_Service_HistoryService(); - $historyService->createPlayedItem($params); + Logging::info($params); + + $historyService = new Application_Service_HistoryService(); + $historyService->createPlayedItem($params); } public function editListItemAction() diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php index 086c910c5..19ce8f79b 100644 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -4,19 +4,19 @@ class Application_Form_EditHistoryItem extends Zend_Form { public function init() { - $file_id = new Zend_Form_Element_Hidden('his_file_id'); - $file_id->setValidators(array( - new Zend_Validate_Int() - )); - $this->addElement($file_id); - - - /* Title form element */ - $title = new Zend_Form_Element_Text('his_file_title'); - $title->setLabel(_('Title:')); - $title->setAttrib('class', 'input_text'); - $title->addFilter('StringTrim'); - //$title->setDecorators(array('viewHelper')); + $file_id = new Zend_Form_Element_Hidden('his_file_id'); + $file_id->setValidators(array( + new Zend_Validate_Int() + )); + $this->addElement($file_id); + + + /* Title form element */ + $title = new Zend_Form_Element_Text('his_file_title'); + $title->setLabel(_('Title:')); + $title->setAttrib('class', 'input_text'); + $title->addFilter('StringTrim'); + //$title->setDecorators(array('viewHelper')); $this->addElement($title); } From 69afc715d1292669ec8683faad9660f746a89a83 Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 22 Jul 2013 18:11:44 -0400 Subject: [PATCH 010/181] creating templates for validation. --- airtime_mvc/application/configs/constants.php | 9 + .../application/configs/navigation.php | 28 +- .../controllers/PlayouthistoryController.php | 52 ++- .../application/forms/EditHistoryItem.php | 213 ++++++++- airtime_mvc/application/models/Preference.php | 8 + .../map/CcPlayoutHistoryMetaDataTableMap.php | 2 + .../CcPlayoutHistoryTemplateTagTableMap.php | 1 + .../models/airtime/map/CcTagTableMap.php | 2 + .../airtime/om/BaseCcPlayoutHistory.php | 25 ++ .../om/BaseCcPlayoutHistoryMetaData.php | 145 +++++- .../om/BaseCcPlayoutHistoryMetaDataPeer.php | 418 +++++++++++++++++- .../om/BaseCcPlayoutHistoryMetaDataQuery.php | 103 +++++ .../om/BaseCcPlayoutHistoryTemplateTag.php | 50 ++- .../BaseCcPlayoutHistoryTemplateTagPeer.php | 31 +- .../BaseCcPlayoutHistoryTemplateTagQuery.php | 35 ++ .../models/airtime/om/BaseCcTag.php | 246 ++++++++++- .../models/airtime/om/BaseCcTagPeer.php | 34 +- .../models/airtime/om/BaseCcTagQuery.php | 94 ++++ .../application/services/HistoryService.php | 87 +++- .../scripts/form/edit-history-item.phtml | 3 + .../views/scripts/playouthistory/index.phtml | 9 +- airtime_mvc/build/schema.xml | 8 +- airtime_mvc/build/sql/schema.sql | 7 +- .../js/airtime/playouthistory/historytable.js | 24 + 24 files changed, 1552 insertions(+), 82 deletions(-) diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 4a1f3e55a..6020c0983 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -38,6 +38,15 @@ define('MDATA_KEY_CUE_OUT' , 'cueout'); define('UI_MDATA_VALUE_FORMAT_FILE' , 'File'); define('UI_MDATA_VALUE_FORMAT_STREAM' , 'live stream'); +//Constants for playout history template fields +define('TEMPLATE_DATE', 'date'); +define('TEMPLATE_TIME', 'time'); +define('TEMPLATE_DATETIME', 'datetime'); +define('TEMPLATE_STRING', 'string'); +define('TEMPLATE_BOOLEAN', 'boolean'); +define('TEMPLATE_INT', 'integer'); +define('TEMPLATE_FLOAT', 'float'); + // Session Keys define('UI_PLAYLISTCONTROLLER_OBJ_SESSNAME', 'PLAYLISTCONTROLLER_OBJ'); /*define('UI_PLAYLIST_SESSNAME', 'PLAYLIST'); diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index 32b4af39d..ebbe7b12a 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -79,13 +79,6 @@ $pages = array( 'action' => 'index', 'resource' => 'systemstatus' ), - array( - 'label' => _('Playout History'), - 'module' => 'default', - 'controller' => 'playouthistory', - 'action' => 'index', - 'resource' => 'playouthistory' - ), array( 'label' => _('Listener Stats'), 'module' => 'default', @@ -95,6 +88,27 @@ $pages = array( ) ) ), + array( + 'label' => _('History'), + 'uri' => '#', + 'resource' => 'playouthistory', + 'pages' => array( + array( + 'label' => _('Playout History'), + 'module' => 'default', + 'controller' => 'playouthistory', + 'action' => 'index', + 'resource' => 'playouthistory' + ), + array( + 'label' => _('History Templates'), + 'module' => 'default', + 'controller' => 'playouthistory', + 'action' => 'template', + 'resource' => 'playouthistory' + ), + ) + ), array( 'label' => _('Help'), 'uri' => '#', diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index e43e992ea..2c7e0ca83 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -11,7 +11,13 @@ class PlayouthistoryController extends Zend_Controller_Action ->addActionContext('edit-aggregate-item', 'json') ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') + ->addActionContext('update-list-item', 'json') ->addActionContext('update-aggregate-item', 'json') + ->addActionContext('create-template', 'json') + ->addActionContext('edit-template', 'json') + ->addActionContext('delete-template', 'json') + ->addActionContext('create-template-field', 'json') + ->addActionContext('delete-template-field', 'json') ->initContext(); } @@ -134,13 +140,25 @@ class PlayouthistoryController extends Zend_Controller_Action $file_id = $this->_getParam('id'); $historyService = new Application_Service_HistoryService(); - $form = $historyService->makeHistoryFileForm($file_id); + $form = $historyService->makeHistoryItemForm($file_id); $this->view->form = $form; - $this->view->dialog = $this->view->render('form/edit-history-file.phtml'); + $this->view->dialog = $this->view->render('form/edit-history-item.phtml'); unset($this->view->form); } + + public function updateListItemAction() + { + $request = $this->getRequest(); + $params = $request->getPost(); + Logging::info($params); + + $historyService = new Application_Service_HistoryService(); + $json = $historyService->editPlayedItem($params); + + $this->view->data = $json; + } public function updateAggregateItemAction() { @@ -153,4 +171,34 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->data = $json; } + + public function templateAction() + { + + } + + public function createTemplateAction() + { + + } + + public function editTemplateAction() + { + + } + + public function deleteTemplateAction() + { + + } + + public function createTemplateFieldAction() + { + + } + + public function deleteTemplateFieldAction() + { + + } } diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php index 19ce8f79b..99ae87c8d 100644 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -2,22 +2,209 @@ class Application_Form_EditHistoryItem extends Zend_Form { + const VALIDATE_DATETIME_FORMAT = 'yyyy-MM-dd HH-mm-ss'; + const VALIDATE_DATE_FORMAT = 'yyyy-MM-dd'; + const VALIDATE_TIME_FORMAT = 'HH-mm-ss'; + + const ID_PREFIX = "his_item_"; + + const ITEM_TYPE = "type"; + const ITEM_CLASS = "class"; + const ITEM_ID_SUFFIX = "name"; + + private $formElTypes = array( + TEMPLATE_DATE => array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => "input_text" + ), + "validators" => array( + array( + "class" => "Zend_Validate_Date", + "params" => array( + "format" => self::VALIDATE_DATE_FORMAT + ) + ) + ), + "filters" => array( + "StringTrim" + ) + ), + TEMPLATE_TIME => array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => "input_text" + ), + "validators" => array( + array( + "class" => "Zend_Validate_Date", + "params" => array( + "format" => self::VALIDATE_TIME_FORMAT + ) + ) + ), + "filters" => array( + "StringTrim" + ) + ), + TEMPLATE_DATETIME => array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => "input_text" + ), + "validators" => array( + array( + "class" => "Zend_Validate_Date", + "params" => array( + "format" => self::VALIDATE_DATETIME_FORMAT + ) + ) + ), + "filters" => array( + "StringTrim" + ) + ), + TEMPLATE_STRING => array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => "input_text" + ), + "filters" => array( + "StringTrim" + ) + ), + TEMPLATE_BOOLEAN => array( + "class" => "Zend_Form_Element_Checkbox", + "filters" => array( + "Boolean" + ) + ), + TEMPLATE_INT => array( + "class" => "Zend_Form_Element_Text", + "validators" => array( + array( + "class" => "Zend_Validate_Int", + ) + ), + "attrs" => array( + "class" => "input_text" + ), + "filters" => array( + "Int" + ) + ), + TEMPLATE_FLOAT => array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => "input_text" + ), + "validators" => array( + array( + "class" => "Zend_Validate_Float", + ) + ) + ), + ); + public function init() { - $file_id = new Zend_Form_Element_Hidden('his_file_id'); - $file_id->setValidators(array( - new Zend_Validate_Int() + $history_id = new Zend_Form_Element_Hidden(self::ID_PREFIX.'id'); + $history_id->setValidators(array( + new Zend_Validate_Int() )); - $this->addElement($file_id); - - - /* Title form element */ - $title = new Zend_Form_Element_Text('his_file_title'); - $title->setLabel(_('Title:')); - $title->setAttrib('class', 'input_text'); - $title->addFilter('StringTrim'); - //$title->setDecorators(array('viewHelper')); - $this->addElement($title); + $this->addElement($history_id); + } + + public function createFromTemplate($template) { + + for ($i = 0, $len = count($template); $i < $len; $i++) { + + $item = $template[$i]; + + $formElType = $this->formElTypes[$item[self::ITEM_TYPE]]; + + $label = $item[self::ITEM_ID_SUFFIX]; + $id = self::ID_PREFIX.$label; + $el = new $formElType[self::ITEM_CLASS]($id); + + //cleaning up presentation of tag name for labels. + $label = implode(" ", explode("_", $label)); + $label = ucwords($label); + $el->setLabel(_($label)); + + if (isset($formElType["attrs"])) { + + $attrs = $formElType["filters"]; + + foreach ($attrs as $key => $value) { + $el->setAttrib($key, $value); + } + } + if (isset($formElType["filters"])) { + + $filters = $formElType["filters"]; + + foreach ($filters as $filter) { + $el->addFilter($filter); + } + } + + if (isset($formElType["validators"])) { + + $validators = $formElType["validators"]; + + foreach ($validators as $index => $arr) { + $validator = new $arr[self::ITEM_CLASS](); + + //extra validator info + if (isset($arr["params"])) { + + foreach ($arr["params"] as $key => $value) { + $method = "set".ucfirst($key); + $validator->$method($value); + } + } + + $el->addValidator($validator); + } + } + + $this->addElement($el); + } + + // Add the submit button + $this->addElement('button', 'his_item_save', array( + 'ignore' => true, + 'class' => 'btn his_item_save', + 'label' => _('Save'), + 'decorators' => array( + 'ViewHelper' + ) + )); + + // Add the cancel button + $this->addElement('button', 'his_item_cancel', array( + 'ignore' => true, + 'class' => 'btn his_item_cancel', + 'label' => _('Cancel'), + 'decorators' => array( + 'ViewHelper' + ) + )); + + $this->addDisplayGroup( + array( + 'his_item_save', + 'his_item_cancel' + ), + 'submitButtons', + array( + 'decorators' => array( + 'FormElements', + 'DtDdWrapper' + ) + ) + ); } } \ No newline at end of file diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 5df8d878f..b5f17900f 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -1369,4 +1369,12 @@ class Application_Model_Preference { self::setValue("replay_gain_modifier", $rg_modifier, true); } + + public static function SetHistoryItemTemplate($value) { + self::setValue("history_item_template", $value); + } + + public static function GetHistoryItemTemplate() { + return self::getValue("history_item_template"); + } } diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php index 8e937f6e5..4a7fe7d69 100644 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php @@ -40,6 +40,7 @@ class CcPlayoutHistoryMetaDataTableMap extends TableMap { // columns $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); $this->addForeignKey('HISTORY_ID', 'DbHistoryId', 'INTEGER', 'cc_playout_history', 'ID', true, null, null); + $this->addForeignKey('TAG_ID', 'DbTagId', 'INTEGER', 'cc_tag', 'ID', true, null, null); $this->addColumn('KEY', 'DbKey', 'VARCHAR', true, 128, null); $this->addColumn('VALUE', 'DbValue', 'VARCHAR', true, 128, null); // validators @@ -51,6 +52,7 @@ class CcPlayoutHistoryMetaDataTableMap extends TableMap { public function buildRelations() { $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::MANY_TO_ONE, array('history_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcTag', 'CcTag', RelationMap::MANY_TO_ONE, array('tag_id' => 'id', ), 'CASCADE', null); } // buildRelations() } // CcPlayoutHistoryMetaDataTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php index f4b18104f..a9e105c07 100644 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php @@ -41,6 +41,7 @@ class CcPlayoutHistoryTemplateTagTableMap extends TableMap { $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); $this->addForeignKey('TEMPLATE_ID', 'DbTemplateId', 'INTEGER', 'cc_playout_history_template', 'ID', true, null, null); $this->addForeignKey('TAG_ID', 'DbTagId', 'INTEGER', 'cc_tag', 'ID', true, null, null); + $this->addColumn('POSITION', 'DbTagPosition', 'INTEGER', true, null, null); // validators } // initialize() diff --git a/airtime_mvc/application/models/airtime/map/CcTagTableMap.php b/airtime_mvc/application/models/airtime/map/CcTagTableMap.php index b9934edf6..0cfbcbb2c 100644 --- a/airtime_mvc/application/models/airtime/map/CcTagTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcTagTableMap.php @@ -40,6 +40,7 @@ class CcTagTableMap extends TableMap { // columns $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); $this->addColumn('TAG_NAME', 'DbTagName', 'VARCHAR', true, 128, null); + $this->addColumn('TAG_TYPE', 'DbTagType', 'VARCHAR', true, 128, 'boolean'); // validators } // initialize() @@ -49,6 +50,7 @@ class CcTagTableMap extends TableMap { public function buildRelations() { $this->addRelation('CcFileTag', 'CcFileTag', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', null); + $this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', null); $this->addRelation('CcPlayoutHistoryTemplateTag', 'CcPlayoutHistoryTemplateTag', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', null); } // buildRelations() diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php index bdae214d1..5001da76c 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php @@ -1099,6 +1099,31 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent } } + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcPlayoutHistory is new, it will return + * an empty collection; or if this CcPlayoutHistory has previously + * been saved, it will retrieve related CcPlayoutHistoryMetaDatas from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcPlayoutHistory. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcPlayoutHistoryMetaData[] List of CcPlayoutHistoryMetaData objects + */ + public function getCcPlayoutHistoryMetaDatasJoinCcTag($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcPlayoutHistoryMetaDataQuery::create(null, $criteria); + $query->joinWith('CcTag', $join_behavior); + + return $this->getCcPlayoutHistoryMetaDatas($query, $con); + } + /** * Clears the current object and sets all attributes to their default values */ diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php index a0cbb9539..a1da0ea27 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php @@ -36,6 +36,12 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi */ protected $history_id; + /** + * The value for the tag_id field. + * @var int + */ + protected $tag_id; + /** * The value for the key field. * @var string @@ -53,6 +59,11 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi */ protected $aCcPlayoutHistory; + /** + * @var CcTag + */ + protected $aCcTag; + /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. @@ -87,6 +98,16 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi return $this->history_id; } + /** + * Get the [tag_id] column value. + * + * @return int + */ + public function getDbTagId() + { + return $this->tag_id; + } + /** * Get the [key] column value. * @@ -151,6 +172,30 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi return $this; } // setDbHistoryId() + /** + * Set the value of [tag_id] column. + * + * @param int $v new value + * @return CcPlayoutHistoryMetaData The current object (for fluent API support) + */ + public function setDbTagId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->tag_id !== $v) { + $this->tag_id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::TAG_ID; + } + + if ($this->aCcTag !== null && $this->aCcTag->getDbId() !== $v) { + $this->aCcTag = null; + } + + return $this; + } // setDbTagId() + /** * Set the value of [key] column. * @@ -225,8 +270,9 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; $this->history_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; - $this->key = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; - $this->value = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; + $this->tag_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null; + $this->key = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; + $this->value = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null; $this->resetModified(); $this->setNew(false); @@ -235,7 +281,7 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi $this->ensureConsistency(); } - return $startcol + 4; // 4 = CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 5; // 5 = CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating CcPlayoutHistoryMetaData object", $e); @@ -261,6 +307,9 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi if ($this->aCcPlayoutHistory !== null && $this->history_id !== $this->aCcPlayoutHistory->getDbId()) { $this->aCcPlayoutHistory = null; } + if ($this->aCcTag !== null && $this->tag_id !== $this->aCcTag->getDbId()) { + $this->aCcTag = null; + } } // ensureConsistency /** @@ -301,6 +350,7 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi if ($deep) { // also de-associate any related objects? $this->aCcPlayoutHistory = null; + $this->aCcTag = null; } // if (deep) } @@ -423,6 +473,13 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi $this->setCcPlayoutHistory($this->aCcPlayoutHistory); } + if ($this->aCcTag !== null) { + if ($this->aCcTag->isModified() || $this->aCcTag->isNew()) { + $affectedRows += $this->aCcTag->save($con); + } + $this->setCcTag($this->aCcTag); + } + if ($this->isNew() ) { $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::ID; } @@ -523,6 +580,12 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi } } + if ($this->aCcTag !== null) { + if (!$this->aCcTag->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcTag->getValidationFailures()); + } + } + if (($retval = CcPlayoutHistoryMetaDataPeer::doValidate($this, $columns)) !== true) { $failureMap = array_merge($failureMap, $retval); @@ -569,9 +632,12 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi return $this->getDbHistoryId(); break; case 2: - return $this->getDbKey(); + return $this->getDbTagId(); break; case 3: + return $this->getDbKey(); + break; + case 4: return $this->getDbValue(); break; default: @@ -600,13 +666,17 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi $result = array( $keys[0] => $this->getDbId(), $keys[1] => $this->getDbHistoryId(), - $keys[2] => $this->getDbKey(), - $keys[3] => $this->getDbValue(), + $keys[2] => $this->getDbTagId(), + $keys[3] => $this->getDbKey(), + $keys[4] => $this->getDbValue(), ); if ($includeForeignObjects) { if (null !== $this->aCcPlayoutHistory) { $result['CcPlayoutHistory'] = $this->aCcPlayoutHistory->toArray($keyType, $includeLazyLoadColumns, true); } + if (null !== $this->aCcTag) { + $result['CcTag'] = $this->aCcTag->toArray($keyType, $includeLazyLoadColumns, true); + } } return $result; } @@ -645,9 +715,12 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi $this->setDbHistoryId($value); break; case 2: - $this->setDbKey($value); + $this->setDbTagId($value); break; case 3: + $this->setDbKey($value); + break; + case 4: $this->setDbValue($value); break; } // switch() @@ -676,8 +749,9 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setDbHistoryId($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setDbKey($arr[$keys[2]]); - if (array_key_exists($keys[3], $arr)) $this->setDbValue($arr[$keys[3]]); + if (array_key_exists($keys[2], $arr)) $this->setDbTagId($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setDbKey($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setDbValue($arr[$keys[4]]); } /** @@ -691,6 +765,7 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $this->id); if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::HISTORY_ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $this->history_id); + if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::TAG_ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::TAG_ID, $this->tag_id); if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::KEY)) $criteria->add(CcPlayoutHistoryMetaDataPeer::KEY, $this->key); if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::VALUE)) $criteria->add(CcPlayoutHistoryMetaDataPeer::VALUE, $this->value); @@ -755,6 +830,7 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi public function copyInto($copyObj, $deepCopy = false) { $copyObj->setDbHistoryId($this->history_id); + $copyObj->setDbTagId($this->tag_id); $copyObj->setDbKey($this->key); $copyObj->setDbValue($this->value); @@ -849,6 +925,55 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi return $this->aCcPlayoutHistory; } + /** + * Declares an association between this object and a CcTag object. + * + * @param CcTag $v + * @return CcPlayoutHistoryMetaData The current object (for fluent API support) + * @throws PropelException + */ + public function setCcTag(CcTag $v = null) + { + if ($v === null) { + $this->setDbTagId(NULL); + } else { + $this->setDbTagId($v->getDbId()); + } + + $this->aCcTag = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the CcTag object, it will not be re-added. + if ($v !== null) { + $v->addCcPlayoutHistoryMetaData($this); + } + + return $this; + } + + + /** + * Get the associated CcTag object + * + * @param PropelPDO Optional Connection object. + * @return CcTag The associated CcTag object. + * @throws PropelException + */ + public function getCcTag(PropelPDO $con = null) + { + if ($this->aCcTag === null && ($this->tag_id !== null)) { + $this->aCcTag = CcTagQuery::create()->findPk($this->tag_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCcTag->addCcPlayoutHistoryMetaDatas($this); + */ + } + return $this->aCcTag; + } + /** * Clears the current object and sets all attributes to their default values */ @@ -856,6 +981,7 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi { $this->id = null; $this->history_id = null; + $this->tag_id = null; $this->key = null; $this->value = null; $this->alreadyInSave = false; @@ -881,6 +1007,7 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi } // if ($deep) $this->aCcPlayoutHistory = null; + $this->aCcTag = null; } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php index 0b980ec4e..51ab1cc20 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php @@ -26,7 +26,7 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { const TM_CLASS = 'CcPlayoutHistoryMetaDataTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 4; + const NUM_COLUMNS = 5; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -37,6 +37,9 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { /** the column name for the HISTORY_ID field */ const HISTORY_ID = 'cc_playout_history_metadata.HISTORY_ID'; + /** the column name for the TAG_ID field */ + const TAG_ID = 'cc_playout_history_metadata.TAG_ID'; + /** the column name for the KEY field */ const KEY = 'cc_playout_history_metadata.KEY'; @@ -59,12 +62,12 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbHistoryId', 'DbKey', 'DbValue', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbHistoryId', 'dbKey', 'dbValue', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::HISTORY_ID, self::KEY, self::VALUE, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'HISTORY_ID', 'KEY', 'VALUE', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'history_id', 'key', 'value', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbHistoryId', 'DbTagId', 'DbKey', 'DbValue', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbHistoryId', 'dbTagId', 'dbKey', 'dbValue', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::HISTORY_ID, self::TAG_ID, self::KEY, self::VALUE, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'HISTORY_ID', 'TAG_ID', 'KEY', 'VALUE', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'history_id', 'tag_id', 'key', 'value', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) ); /** @@ -74,12 +77,12 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbHistoryId' => 1, 'DbKey' => 2, 'DbValue' => 3, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbHistoryId' => 1, 'dbKey' => 2, 'dbValue' => 3, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::HISTORY_ID => 1, self::KEY => 2, self::VALUE => 3, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'HISTORY_ID' => 1, 'KEY' => 2, 'VALUE' => 3, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'history_id' => 1, 'key' => 2, 'value' => 3, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbHistoryId' => 1, 'DbTagId' => 2, 'DbKey' => 3, 'DbValue' => 4, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbHistoryId' => 1, 'dbTagId' => 2, 'dbKey' => 3, 'dbValue' => 4, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::HISTORY_ID => 1, self::TAG_ID => 2, self::KEY => 3, self::VALUE => 4, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'HISTORY_ID' => 1, 'TAG_ID' => 2, 'KEY' => 3, 'VALUE' => 4, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'history_id' => 1, 'tag_id' => 2, 'key' => 3, 'value' => 4, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) ); /** @@ -153,11 +156,13 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { if (null === $alias) { $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::ID); $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::HISTORY_ID); + $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::TAG_ID); $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::KEY); $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::VALUE); } else { $criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.HISTORY_ID'); + $criteria->addSelectColumn($alias . '.TAG_ID'); $criteria->addSelectColumn($alias . '.KEY'); $criteria->addSelectColumn($alias . '.VALUE'); } @@ -495,6 +500,56 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { } + /** + * Returns the number of rows matching criteria, joining the related CcTag table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + /** * Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with their CcPlayoutHistory objects. * @param Criteria $criteria @@ -561,6 +616,72 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { } + /** + * Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with their CcTag objects. + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryMetaData objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + $startcol = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS); + CcTagPeer::addSelectColumns($criteria); + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + + $cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1); + } // if $obj1 already loaded + + $key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol); + if ($key2 !== null) { + $obj2 = CcTagPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcTagPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol); + CcTagPeer::addInstanceToPool($obj2, $key2); + } // if obj2 already loaded + + // Add the $obj1 (CcPlayoutHistoryMetaData) to $obj2 (CcTag) + $obj2->addCcPlayoutHistoryMetaData($obj1); + + } // if joined row was not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + /** * Returns the number of rows matching criteria, joining all related tables * @@ -599,6 +720,8 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { @@ -635,8 +758,13 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { CcPlayoutHistoryPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + CcTagPeer::addSelectColumns($criteria); + $startcol4 = $startcol3 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS); + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -672,6 +800,270 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer { $obj2->addCcPlayoutHistoryMetaData($obj1); } // if joined row not null + // Add objects for joined CcTag rows + + $key3 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol3); + if ($key3 !== null) { + $obj3 = CcTagPeer::getInstanceFromPool($key3); + if (!$obj3) { + + $cls = CcTagPeer::getOMClass(false); + + $obj3 = new $cls(); + $obj3->hydrate($row, $startcol3); + CcTagPeer::addInstanceToPool($obj3, $key3); + } // if obj3 loaded + + // Add the $obj1 (CcPlayoutHistoryMetaData) to the collection in $obj3 (CcTag) + $obj3->addCcPlayoutHistoryMetaData($obj1); + } // if joined row not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcPlayoutHistory table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcPlayoutHistory(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcTag table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with all related objects except CcPlayoutHistory. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryMetaData objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcPlayoutHistory(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS); + + CcTagPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcTag rows + + $key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcTagPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcTagPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcTagPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcPlayoutHistoryMetaData) to the collection in $obj2 (CcTag) + $obj2->addCcPlayoutHistoryMetaData($obj1); + + } // if joined row is not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with all related objects except CcTag. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistoryMetaData objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS); + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcPlayoutHistory rows + + $key2 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcPlayoutHistoryPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcPlayoutHistoryPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcPlayoutHistoryMetaData) to the collection in $obj2 (CcPlayoutHistory) + $obj2->addCcPlayoutHistoryMetaData($obj1); + + } // if joined row is not null + $results[] = $obj1; } $stmt->closeCursor(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php index 7a27c61af..b418a8b36 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php @@ -8,11 +8,13 @@ * * @method CcPlayoutHistoryMetaDataQuery orderByDbId($order = Criteria::ASC) Order by the id column * @method CcPlayoutHistoryMetaDataQuery orderByDbHistoryId($order = Criteria::ASC) Order by the history_id column + * @method CcPlayoutHistoryMetaDataQuery orderByDbTagId($order = Criteria::ASC) Order by the tag_id column * @method CcPlayoutHistoryMetaDataQuery orderByDbKey($order = Criteria::ASC) Order by the key column * @method CcPlayoutHistoryMetaDataQuery orderByDbValue($order = Criteria::ASC) Order by the value column * * @method CcPlayoutHistoryMetaDataQuery groupByDbId() Group by the id column * @method CcPlayoutHistoryMetaDataQuery groupByDbHistoryId() Group by the history_id column + * @method CcPlayoutHistoryMetaDataQuery groupByDbTagId() Group by the tag_id column * @method CcPlayoutHistoryMetaDataQuery groupByDbKey() Group by the key column * @method CcPlayoutHistoryMetaDataQuery groupByDbValue() Group by the value column * @@ -24,16 +26,22 @@ * @method CcPlayoutHistoryMetaDataQuery rightJoinCcPlayoutHistory($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation * @method CcPlayoutHistoryMetaDataQuery innerJoinCcPlayoutHistory($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation * + * @method CcPlayoutHistoryMetaDataQuery leftJoinCcTag($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcTag relation + * @method CcPlayoutHistoryMetaDataQuery rightJoinCcTag($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTag relation + * @method CcPlayoutHistoryMetaDataQuery innerJoinCcTag($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTag relation + * * @method CcPlayoutHistoryMetaData findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryMetaData matching the query * @method CcPlayoutHistoryMetaData findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryMetaData matching the query, or a new CcPlayoutHistoryMetaData object populated from the query conditions when no match is found * * @method CcPlayoutHistoryMetaData findOneByDbId(int $id) Return the first CcPlayoutHistoryMetaData filtered by the id column * @method CcPlayoutHistoryMetaData findOneByDbHistoryId(int $history_id) Return the first CcPlayoutHistoryMetaData filtered by the history_id column + * @method CcPlayoutHistoryMetaData findOneByDbTagId(int $tag_id) Return the first CcPlayoutHistoryMetaData filtered by the tag_id column * @method CcPlayoutHistoryMetaData findOneByDbKey(string $key) Return the first CcPlayoutHistoryMetaData filtered by the key column * @method CcPlayoutHistoryMetaData findOneByDbValue(string $value) Return the first CcPlayoutHistoryMetaData filtered by the value column * * @method array findByDbId(int $id) Return CcPlayoutHistoryMetaData objects filtered by the id column * @method array findByDbHistoryId(int $history_id) Return CcPlayoutHistoryMetaData objects filtered by the history_id column + * @method array findByDbTagId(int $tag_id) Return CcPlayoutHistoryMetaData objects filtered by the tag_id column * @method array findByDbKey(string $key) Return CcPlayoutHistoryMetaData objects filtered by the key column * @method array findByDbValue(string $value) Return CcPlayoutHistoryMetaData objects filtered by the value column * @@ -193,6 +201,37 @@ abstract class BaseCcPlayoutHistoryMetaDataQuery extends ModelCriteria return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId, $comparison); } + /** + * Filter the query on the tag_id column + * + * @param int|array $dbTagId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function filterByDbTagId($dbTagId = null, $comparison = null) + { + if (is_array($dbTagId)) { + $useMinMax = false; + if (isset($dbTagId['min'])) { + $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::TAG_ID, $dbTagId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbTagId['max'])) { + $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::TAG_ID, $dbTagId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::TAG_ID, $dbTagId, $comparison); + } + /** * Filter the query on the key column * @@ -301,6 +340,70 @@ abstract class BaseCcPlayoutHistoryMetaDataQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery'); } + /** + * Filter the query by a related CcTag object + * + * @param CcTag $ccTag the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function filterByCcTag($ccTag, $comparison = null) + { + return $this + ->addUsingAlias(CcPlayoutHistoryMetaDataPeer::TAG_ID, $ccTag->getDbId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcTag relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface + */ + public function joinCcTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcTag'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcTag'); + } + + return $this; + } + + /** + * Use the CcTag relation CcTag object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcTagQuery A secondary query class using the current class as primary query + */ + public function useCcTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcTag($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcTag', 'CcTagQuery'); + } + /** * Exclude object from result * diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php index 5a7808729..40cf15fd4 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php @@ -42,6 +42,12 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe */ protected $tag_id; + /** + * The value for the position field. + * @var int + */ + protected $position; + /** * @var CcPlayoutHistoryTemplate */ @@ -96,6 +102,16 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe return $this->tag_id; } + /** + * Get the [position] column value. + * + * @return int + */ + public function getDbTagPosition() + { + return $this->position; + } + /** * Set the value of [id] column. * @@ -164,6 +180,26 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe return $this; } // setDbTagId() + /** + * Set the value of [position] column. + * + * @param int $v new value + * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) + */ + public function setDbTagPosition($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->position !== $v) { + $this->position = $v; + $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::POSITION; + } + + return $this; + } // setDbTagPosition() + /** * Indicates whether the columns in this object are only set to default values. * @@ -199,6 +235,7 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; $this->template_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; $this->tag_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null; + $this->position = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null; $this->resetModified(); $this->setNew(false); @@ -207,7 +244,7 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe $this->ensureConsistency(); } - return $startcol + 3; // 3 = CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 4; // 4 = CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating CcPlayoutHistoryTemplateTag object", $e); @@ -560,6 +597,9 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe case 2: return $this->getDbTagId(); break; + case 3: + return $this->getDbTagPosition(); + break; default: return null; break; @@ -587,6 +627,7 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe $keys[0] => $this->getDbId(), $keys[1] => $this->getDbTemplateId(), $keys[2] => $this->getDbTagId(), + $keys[3] => $this->getDbTagPosition(), ); if ($includeForeignObjects) { if (null !== $this->aCcPlayoutHistoryTemplate) { @@ -635,6 +676,9 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe case 2: $this->setDbTagId($value); break; + case 3: + $this->setDbTagPosition($value); + break; } // switch() } @@ -662,6 +706,7 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setDbTemplateId($arr[$keys[1]]); if (array_key_exists($keys[2], $arr)) $this->setDbTagId($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setDbTagPosition($arr[$keys[3]]); } /** @@ -676,6 +721,7 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $this->id); if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $this->template_id); if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::TAG_ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $this->tag_id); + if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::POSITION)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::POSITION, $this->position); return $criteria; } @@ -739,6 +785,7 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe { $copyObj->setDbTemplateId($this->template_id); $copyObj->setDbTagId($this->tag_id); + $copyObj->setDbTagPosition($this->position); $copyObj->setNew(true); $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value @@ -888,6 +935,7 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe $this->id = null; $this->template_id = null; $this->tag_id = null; + $this->position = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->clearAllReferences(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php index 76e232d4a..922f55183 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php @@ -26,7 +26,7 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer { const TM_CLASS = 'CcPlayoutHistoryTemplateTagTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 3; + const NUM_COLUMNS = 4; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -40,6 +40,9 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer { /** the column name for the TAG_ID field */ const TAG_ID = 'cc_playout_history_template_tag.TAG_ID'; + /** the column name for the POSITION field */ + const POSITION = 'cc_playout_history_template_tag.POSITION'; + /** * An identiy map to hold any loaded instances of CcPlayoutHistoryTemplateTag objects. * This must be public so that other peer classes can access this when hydrating from JOIN @@ -56,12 +59,12 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer { * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbTemplateId', 'DbTagId', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTemplateId', 'dbTagId', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::TEMPLATE_ID, self::TAG_ID, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TEMPLATE_ID', 'TAG_ID', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'template_id', 'tag_id', ), - BasePeer::TYPE_NUM => array (0, 1, 2, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbTemplateId', 'DbTagId', 'DbTagPosition', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTemplateId', 'dbTagId', 'dbTagPosition', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::TEMPLATE_ID, self::TAG_ID, self::POSITION, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TEMPLATE_ID', 'TAG_ID', 'POSITION', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'template_id', 'tag_id', 'position', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) ); /** @@ -71,12 +74,12 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer { * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTemplateId' => 1, 'DbTagId' => 2, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTemplateId' => 1, 'dbTagId' => 2, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TEMPLATE_ID => 1, self::TAG_ID => 2, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TEMPLATE_ID' => 1, 'TAG_ID' => 2, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'template_id' => 1, 'tag_id' => 2, ), - BasePeer::TYPE_NUM => array (0, 1, 2, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTemplateId' => 1, 'DbTagId' => 2, 'DbTagPosition' => 3, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTemplateId' => 1, 'dbTagId' => 2, 'dbTagPosition' => 3, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TEMPLATE_ID => 1, self::TAG_ID => 2, self::POSITION => 3, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TEMPLATE_ID' => 1, 'TAG_ID' => 2, 'POSITION' => 3, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'template_id' => 1, 'tag_id' => 2, 'position' => 3, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) ); /** @@ -151,10 +154,12 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer { $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::ID); $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID); $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::TAG_ID); + $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::POSITION); } else { $criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.TEMPLATE_ID'); $criteria->addSelectColumn($alias . '.TAG_ID'); + $criteria->addSelectColumn($alias . '.POSITION'); } } diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php index 24ef4a191..0dec085ab 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php @@ -9,10 +9,12 @@ * @method CcPlayoutHistoryTemplateTagQuery orderByDbId($order = Criteria::ASC) Order by the id column * @method CcPlayoutHistoryTemplateTagQuery orderByDbTemplateId($order = Criteria::ASC) Order by the template_id column * @method CcPlayoutHistoryTemplateTagQuery orderByDbTagId($order = Criteria::ASC) Order by the tag_id column + * @method CcPlayoutHistoryTemplateTagQuery orderByDbTagPosition($order = Criteria::ASC) Order by the position column * * @method CcPlayoutHistoryTemplateTagQuery groupByDbId() Group by the id column * @method CcPlayoutHistoryTemplateTagQuery groupByDbTemplateId() Group by the template_id column * @method CcPlayoutHistoryTemplateTagQuery groupByDbTagId() Group by the tag_id column + * @method CcPlayoutHistoryTemplateTagQuery groupByDbTagPosition() Group by the position column * * @method CcPlayoutHistoryTemplateTagQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method CcPlayoutHistoryTemplateTagQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query @@ -32,10 +34,12 @@ * @method CcPlayoutHistoryTemplateTag findOneByDbId(int $id) Return the first CcPlayoutHistoryTemplateTag filtered by the id column * @method CcPlayoutHistoryTemplateTag findOneByDbTemplateId(int $template_id) Return the first CcPlayoutHistoryTemplateTag filtered by the template_id column * @method CcPlayoutHistoryTemplateTag findOneByDbTagId(int $tag_id) Return the first CcPlayoutHistoryTemplateTag filtered by the tag_id column + * @method CcPlayoutHistoryTemplateTag findOneByDbTagPosition(int $position) Return the first CcPlayoutHistoryTemplateTag filtered by the position column * * @method array findByDbId(int $id) Return CcPlayoutHistoryTemplateTag objects filtered by the id column * @method array findByDbTemplateId(int $template_id) Return CcPlayoutHistoryTemplateTag objects filtered by the template_id column * @method array findByDbTagId(int $tag_id) Return CcPlayoutHistoryTemplateTag objects filtered by the tag_id column + * @method array findByDbTagPosition(int $position) Return CcPlayoutHistoryTemplateTag objects filtered by the position column * * @package propel.generator.airtime.om */ @@ -224,6 +228,37 @@ abstract class BaseCcPlayoutHistoryTemplateTagQuery extends ModelCriteria return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $dbTagId, $comparison); } + /** + * Filter the query on the position column + * + * @param int|array $dbTagPosition The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface + */ + public function filterByDbTagPosition($dbTagPosition = null, $comparison = null) + { + if (is_array($dbTagPosition)) { + $useMinMax = false; + if (isset($dbTagPosition['min'])) { + $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::POSITION, $dbTagPosition['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbTagPosition['max'])) { + $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::POSITION, $dbTagPosition['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::POSITION, $dbTagPosition, $comparison); + } + /** * Filter the query by a related CcPlayoutHistoryTemplate object * diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTag.php b/airtime_mvc/application/models/airtime/om/BaseCcTag.php index c071c8972..af656868b 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcTag.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcTag.php @@ -36,11 +36,23 @@ abstract class BaseCcTag extends BaseObject implements Persistent */ protected $tag_name; + /** + * The value for the tag_type field. + * Note: this column has a database default value of: 'boolean' + * @var string + */ + protected $tag_type; + /** * @var array CcFileTag[] Collection to store aggregation of CcFileTag objects. */ protected $collCcFileTags; + /** + * @var array CcPlayoutHistoryMetaData[] Collection to store aggregation of CcPlayoutHistoryMetaData objects. + */ + protected $collCcPlayoutHistoryMetaDatas; + /** * @var array CcPlayoutHistoryTemplateTag[] Collection to store aggregation of CcPlayoutHistoryTemplateTag objects. */ @@ -60,6 +72,27 @@ abstract class BaseCcTag extends BaseObject implements Persistent */ protected $alreadyInValidation = false; + /** + * Applies default values to this object. + * This method should be called from the object's constructor (or + * equivalent initialization method). + * @see __construct() + */ + public function applyDefaultValues() + { + $this->tag_type = 'boolean'; + } + + /** + * Initializes internal state of BaseCcTag object. + * @see applyDefaults() + */ + public function __construct() + { + parent::__construct(); + $this->applyDefaultValues(); + } + /** * Get the [id] column value. * @@ -80,6 +113,16 @@ abstract class BaseCcTag extends BaseObject implements Persistent return $this->tag_name; } + /** + * Get the [tag_type] column value. + * + * @return string + */ + public function getDbTagType() + { + return $this->tag_type; + } + /** * Set the value of [id] column. * @@ -120,6 +163,26 @@ abstract class BaseCcTag extends BaseObject implements Persistent return $this; } // setDbTagName() + /** + * Set the value of [tag_type] column. + * + * @param string $v new value + * @return CcTag The current object (for fluent API support) + */ + public function setDbTagType($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->tag_type !== $v || $this->isNew()) { + $this->tag_type = $v; + $this->modifiedColumns[] = CcTagPeer::TAG_TYPE; + } + + return $this; + } // setDbTagType() + /** * Indicates whether the columns in this object are only set to default values. * @@ -130,6 +193,10 @@ abstract class BaseCcTag extends BaseObject implements Persistent */ public function hasOnlyDefaultValues() { + if ($this->tag_type !== 'boolean') { + return false; + } + // otherwise, everything was equal, so return TRUE return true; } // hasOnlyDefaultValues() @@ -154,6 +221,7 @@ abstract class BaseCcTag extends BaseObject implements Persistent $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; $this->tag_name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; + $this->tag_type = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; $this->resetModified(); $this->setNew(false); @@ -162,7 +230,7 @@ abstract class BaseCcTag extends BaseObject implements Persistent $this->ensureConsistency(); } - return $startcol + 2; // 2 = CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 3; // 3 = CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating CcTag object", $e); @@ -226,6 +294,8 @@ abstract class BaseCcTag extends BaseObject implements Persistent $this->collCcFileTags = null; + $this->collCcPlayoutHistoryMetaDatas = null; + $this->collCcPlayoutHistoryTemplateTags = null; } // if (deep) @@ -369,6 +439,14 @@ abstract class BaseCcTag extends BaseObject implements Persistent } } + if ($this->collCcPlayoutHistoryMetaDatas !== null) { + foreach ($this->collCcPlayoutHistoryMetaDatas as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + if ($this->collCcPlayoutHistoryTemplateTags !== null) { foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) { if (!$referrerFK->isDeleted()) { @@ -456,6 +534,14 @@ abstract class BaseCcTag extends BaseObject implements Persistent } } + if ($this->collCcPlayoutHistoryMetaDatas !== null) { + foreach ($this->collCcPlayoutHistoryMetaDatas as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + if ($this->collCcPlayoutHistoryTemplateTags !== null) { foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) { if (!$referrerFK->validate($columns)) { @@ -503,6 +589,9 @@ abstract class BaseCcTag extends BaseObject implements Persistent case 1: return $this->getDbTagName(); break; + case 2: + return $this->getDbTagType(); + break; default: return null; break; @@ -528,6 +617,7 @@ abstract class BaseCcTag extends BaseObject implements Persistent $result = array( $keys[0] => $this->getDbId(), $keys[1] => $this->getDbTagName(), + $keys[2] => $this->getDbTagType(), ); return $result; } @@ -565,6 +655,9 @@ abstract class BaseCcTag extends BaseObject implements Persistent case 1: $this->setDbTagName($value); break; + case 2: + $this->setDbTagType($value); + break; } // switch() } @@ -591,6 +684,7 @@ abstract class BaseCcTag extends BaseObject implements Persistent if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setDbTagName($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setDbTagType($arr[$keys[2]]); } /** @@ -604,6 +698,7 @@ abstract class BaseCcTag extends BaseObject implements Persistent if ($this->isColumnModified(CcTagPeer::ID)) $criteria->add(CcTagPeer::ID, $this->id); if ($this->isColumnModified(CcTagPeer::TAG_NAME)) $criteria->add(CcTagPeer::TAG_NAME, $this->tag_name); + if ($this->isColumnModified(CcTagPeer::TAG_TYPE)) $criteria->add(CcTagPeer::TAG_TYPE, $this->tag_type); return $criteria; } @@ -666,6 +761,7 @@ abstract class BaseCcTag extends BaseObject implements Persistent public function copyInto($copyObj, $deepCopy = false) { $copyObj->setDbTagName($this->tag_name); + $copyObj->setDbTagType($this->tag_type); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of @@ -678,6 +774,12 @@ abstract class BaseCcTag extends BaseObject implements Persistent } } + foreach ($this->getCcPlayoutHistoryMetaDatas() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcPlayoutHistoryMetaData($relObj->copy($deepCopy)); + } + } + foreach ($this->getCcPlayoutHistoryTemplateTags() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addCcPlayoutHistoryTemplateTag($relObj->copy($deepCopy)); @@ -863,6 +965,140 @@ abstract class BaseCcTag extends BaseObject implements Persistent return $this->getCcFileTags($query, $con); } + /** + * Clears out the collCcPlayoutHistoryMetaDatas collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcPlayoutHistoryMetaDatas() + */ + public function clearCcPlayoutHistoryMetaDatas() + { + $this->collCcPlayoutHistoryMetaDatas = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcPlayoutHistoryMetaDatas collection. + * + * By default this just sets the collCcPlayoutHistoryMetaDatas collection to an empty array (like clearcollCcPlayoutHistoryMetaDatas()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcPlayoutHistoryMetaDatas() + { + $this->collCcPlayoutHistoryMetaDatas = new PropelObjectCollection(); + $this->collCcPlayoutHistoryMetaDatas->setModel('CcPlayoutHistoryMetaData'); + } + + /** + * Gets an array of CcPlayoutHistoryMetaData objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcTag is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcPlayoutHistoryMetaData[] List of CcPlayoutHistoryMetaData objects + * @throws PropelException + */ + public function getCcPlayoutHistoryMetaDatas($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistoryMetaDatas || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistoryMetaDatas) { + // return empty collection + $this->initCcPlayoutHistoryMetaDatas(); + } else { + $collCcPlayoutHistoryMetaDatas = CcPlayoutHistoryMetaDataQuery::create(null, $criteria) + ->filterByCcTag($this) + ->find($con); + if (null !== $criteria) { + return $collCcPlayoutHistoryMetaDatas; + } + $this->collCcPlayoutHistoryMetaDatas = $collCcPlayoutHistoryMetaDatas; + } + } + return $this->collCcPlayoutHistoryMetaDatas; + } + + /** + * Returns the number of related CcPlayoutHistoryMetaData objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcPlayoutHistoryMetaData objects. + * @throws PropelException + */ + public function countCcPlayoutHistoryMetaDatas(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistoryMetaDatas || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistoryMetaDatas) { + return 0; + } else { + $query = CcPlayoutHistoryMetaDataQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcTag($this) + ->count($con); + } + } else { + return count($this->collCcPlayoutHistoryMetaDatas); + } + } + + /** + * Method called to associate a CcPlayoutHistoryMetaData object to this object + * through the CcPlayoutHistoryMetaData foreign key attribute. + * + * @param CcPlayoutHistoryMetaData $l CcPlayoutHistoryMetaData + * @return void + * @throws PropelException + */ + public function addCcPlayoutHistoryMetaData(CcPlayoutHistoryMetaData $l) + { + if ($this->collCcPlayoutHistoryMetaDatas === null) { + $this->initCcPlayoutHistoryMetaDatas(); + } + if (!$this->collCcPlayoutHistoryMetaDatas->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcPlayoutHistoryMetaDatas[]= $l; + $l->setCcTag($this); + } + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcTag is new, it will return + * an empty collection; or if this CcTag has previously + * been saved, it will retrieve related CcPlayoutHistoryMetaDatas from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcTag. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcPlayoutHistoryMetaData[] List of CcPlayoutHistoryMetaData objects + */ + public function getCcPlayoutHistoryMetaDatasJoinCcPlayoutHistory($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcPlayoutHistoryMetaDataQuery::create(null, $criteria); + $query->joinWith('CcPlayoutHistory', $join_behavior); + + return $this->getCcPlayoutHistoryMetaDatas($query, $con); + } + /** * Clears out the collCcPlayoutHistoryTemplateTags collection * @@ -1004,9 +1240,11 @@ abstract class BaseCcTag extends BaseObject implements Persistent { $this->id = null; $this->tag_name = null; + $this->tag_type = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->clearAllReferences(); + $this->applyDefaultValues(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); @@ -1029,6 +1267,11 @@ abstract class BaseCcTag extends BaseObject implements Persistent $o->clearAllReferences($deep); } } + if ($this->collCcPlayoutHistoryMetaDatas) { + foreach ((array) $this->collCcPlayoutHistoryMetaDatas as $o) { + $o->clearAllReferences($deep); + } + } if ($this->collCcPlayoutHistoryTemplateTags) { foreach ((array) $this->collCcPlayoutHistoryTemplateTags as $o) { $o->clearAllReferences($deep); @@ -1037,6 +1280,7 @@ abstract class BaseCcTag extends BaseObject implements Persistent } // if ($deep) $this->collCcFileTags = null; + $this->collCcPlayoutHistoryMetaDatas = null; $this->collCcPlayoutHistoryTemplateTags = null; } diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php index 486f0ea42..6a68b6ede 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php @@ -26,7 +26,7 @@ abstract class BaseCcTagPeer { const TM_CLASS = 'CcTagTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 2; + const NUM_COLUMNS = 3; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -37,6 +37,9 @@ abstract class BaseCcTagPeer { /** the column name for the TAG_NAME field */ const TAG_NAME = 'cc_tag.TAG_NAME'; + /** the column name for the TAG_TYPE field */ + const TAG_TYPE = 'cc_tag.TAG_TYPE'; + /** * An identiy map to hold any loaded instances of CcTag objects. * This must be public so that other peer classes can access this when hydrating from JOIN @@ -53,12 +56,12 @@ abstract class BaseCcTagPeer { * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbTagName', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTagName', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::TAG_NAME, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TAG_NAME', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'tag_name', ), - BasePeer::TYPE_NUM => array (0, 1, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbTagName', 'DbTagType', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTagName', 'dbTagType', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::TAG_NAME, self::TAG_TYPE, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TAG_NAME', 'TAG_TYPE', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'tag_name', 'tag_type', ), + BasePeer::TYPE_NUM => array (0, 1, 2, ) ); /** @@ -68,12 +71,12 @@ abstract class BaseCcTagPeer { * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTagName' => 1, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTagName' => 1, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TAG_NAME => 1, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TAG_NAME' => 1, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'tag_name' => 1, ), - BasePeer::TYPE_NUM => array (0, 1, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTagName' => 1, 'DbTagType' => 2, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTagName' => 1, 'dbTagType' => 2, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TAG_NAME => 1, self::TAG_TYPE => 2, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TAG_NAME' => 1, 'TAG_TYPE' => 2, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'tag_name' => 1, 'tag_type' => 2, ), + BasePeer::TYPE_NUM => array (0, 1, 2, ) ); /** @@ -147,9 +150,11 @@ abstract class BaseCcTagPeer { if (null === $alias) { $criteria->addSelectColumn(CcTagPeer::ID); $criteria->addSelectColumn(CcTagPeer::TAG_NAME); + $criteria->addSelectColumn(CcTagPeer::TAG_TYPE); } else { $criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.TAG_NAME'); + $criteria->addSelectColumn($alias . '.TAG_TYPE'); } } @@ -346,6 +351,9 @@ abstract class BaseCcTagPeer { // Invalidate objects in CcFileTagPeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. CcFileTagPeer::clearInstancePool(); + // Invalidate objects in CcPlayoutHistoryMetaDataPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcPlayoutHistoryMetaDataPeer::clearInstancePool(); // Invalidate objects in CcPlayoutHistoryTemplateTagPeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. CcPlayoutHistoryTemplateTagPeer::clearInstancePool(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php index f5dd5f9a3..c90d8cb09 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php @@ -8,9 +8,11 @@ * * @method CcTagQuery orderByDbId($order = Criteria::ASC) Order by the id column * @method CcTagQuery orderByDbTagName($order = Criteria::ASC) Order by the tag_name column + * @method CcTagQuery orderByDbTagType($order = Criteria::ASC) Order by the tag_type column * * @method CcTagQuery groupByDbId() Group by the id column * @method CcTagQuery groupByDbTagName() Group by the tag_name column + * @method CcTagQuery groupByDbTagType() Group by the tag_type column * * @method CcTagQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method CcTagQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query @@ -20,6 +22,10 @@ * @method CcTagQuery rightJoinCcFileTag($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFileTag relation * @method CcTagQuery innerJoinCcFileTag($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFileTag relation * + * @method CcTagQuery leftJoinCcPlayoutHistoryMetaData($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistoryMetaData relation + * @method CcTagQuery rightJoinCcPlayoutHistoryMetaData($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryMetaData relation + * @method CcTagQuery innerJoinCcPlayoutHistoryMetaData($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistoryMetaData relation + * * @method CcTagQuery leftJoinCcPlayoutHistoryTemplateTag($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistoryTemplateTag relation * @method CcTagQuery rightJoinCcPlayoutHistoryTemplateTag($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryTemplateTag relation * @method CcTagQuery innerJoinCcPlayoutHistoryTemplateTag($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistoryTemplateTag relation @@ -29,9 +35,11 @@ * * @method CcTag findOneByDbId(int $id) Return the first CcTag filtered by the id column * @method CcTag findOneByDbTagName(string $tag_name) Return the first CcTag filtered by the tag_name column + * @method CcTag findOneByDbTagType(string $tag_type) Return the first CcTag filtered by the tag_type column * * @method array findByDbId(int $id) Return CcTag objects filtered by the id column * @method array findByDbTagName(string $tag_name) Return CcTag objects filtered by the tag_name column + * @method array findByDbTagType(string $tag_type) Return CcTag objects filtered by the tag_type column * * @package propel.generator.airtime.om */ @@ -180,6 +188,28 @@ abstract class BaseCcTagQuery extends ModelCriteria return $this->addUsingAlias(CcTagPeer::TAG_NAME, $dbTagName, $comparison); } + /** + * Filter the query on the tag_type column + * + * @param string $dbTagType The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcTagQuery The current query, for fluid interface + */ + public function filterByDbTagType($dbTagType = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbTagType)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbTagType)) { + $dbTagType = str_replace('*', '%', $dbTagType); + $comparison = Criteria::LIKE; + } + } + return $this->addUsingAlias(CcTagPeer::TAG_TYPE, $dbTagType, $comparison); + } + /** * Filter the query by a related CcFileTag object * @@ -244,6 +274,70 @@ abstract class BaseCcTagQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'CcFileTag', 'CcFileTagQuery'); } + /** + * Filter the query by a related CcPlayoutHistoryMetaData object + * + * @param CcPlayoutHistoryMetaData $ccPlayoutHistoryMetaData the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcTagQuery The current query, for fluid interface + */ + public function filterByCcPlayoutHistoryMetaData($ccPlayoutHistoryMetaData, $comparison = null) + { + return $this + ->addUsingAlias(CcTagPeer::ID, $ccPlayoutHistoryMetaData->getDbTagId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcPlayoutHistoryMetaData relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcTagQuery The current query, for fluid interface + */ + public function joinCcPlayoutHistoryMetaData($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcPlayoutHistoryMetaData'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcPlayoutHistoryMetaData'); + } + + return $this; + } + + /** + * Use the CcPlayoutHistoryMetaData relation CcPlayoutHistoryMetaData object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryMetaDataQuery A secondary query class using the current class as primary query + */ + public function useCcPlayoutHistoryMetaDataQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcPlayoutHistoryMetaData($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaDataQuery'); + } + /** * Filter the query by a related CcPlayoutHistoryTemplateTag object * diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 48d32ae6a..103a73049 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -131,6 +131,7 @@ class Application_Service_HistoryService $history->setDbStarts($item->getDbStarts(null)); $history->setDbEnds($item->getDbEnds(null)); + /* foreach ($metadata as $key => $val) { $meta = new CcPlayoutHistoryMetaData(); $meta->setDbKey($key); @@ -138,6 +139,7 @@ class Application_Service_HistoryService $history->addCcPlayoutHistoryMetaData($meta); } + */ $history->save($this->con); } @@ -151,8 +153,20 @@ class Application_Service_HistoryService } /* id is an id in cc_playout_history */ - public function makeHistoryItemForm($id) { - + public function makeHistoryItemForm() { + + try { + $form = new Application_Form_EditHistoryItem(); + $template = $this->getItemTemplate(); + + $form->createFromTemplate($template); + + return $form; + } + catch (Exception $e) { + Logging::info($e); + throw $e; + } } /* id is an id in cc_files */ @@ -176,16 +190,51 @@ class Application_Service_HistoryService } catch (Exception $e) { Logging::info($e); + throw $e; } } - public function createPlayedItem() { + public function createPlayedItem($data) { + try { + $form = $this->makeHistoryItemForm(); + + $json = $form->processAjax($data); + Logging::info($json); + + if ($form->isValid($data)) { + $values = $form->getElementsAndSubFormsOrdered(); + Logging::info("created list item"); + Logging::info($values); + } + + return $json; + } + catch (Exception $e) { + Logging::info($e); + } } /* id is an id in cc_playout_history */ public function editPlayedItem($id) { + try { + $form = $this->makeHistoryItemForm(); + + $json = $form->processAjax($data); + Logging::info($json); + + if ($form->isValid($data)) { + $values = $form->getElementsAndSubFormsOrdered(); + Logging::info("edited list item"); + Logging::info($values); + } + + return $json; + } + catch (Exception $e) { + Logging::info($e); + } } /* id is an id in cc_files */ @@ -213,5 +262,37 @@ class Application_Service_HistoryService return $json; } + + + //---------------- Following code is for History Templates --------------------------// + + + private function defaultItemTemplate() { + + $fields = array(); + + //array index is the position of the item in the history template table. + $fields[] = array("name" => "start", "type" => TEMPLATE_DATETIME, "isFileMd" => false); + $fields[] = array("name" => "end", "type" => TEMPLATE_DATETIME, "isFileMd" => false); + $fields[] = array("name" => MDATA_KEY_TITLE, "type" => TEMPLATE_STRING, "isFileMd" => true); //these fields can be populated from an associated file. + $fields[] = array("name" => MDATA_KEY_CREATOR, "type" => TEMPLATE_STRING, "isFileMd" => true); + + return $fields; + } + + private function getItemTemplate() { + + $template_id = Application_Model_Preference::GetHistoryItemTemplate(); + + if (is_numeric($template_id)) { + Logging::info("template id is: $template_id"); + } + else { + Logging::info("Using default template"); + $template = $this->defaultItemTemplate(); + } + + return $template; + } } \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml index e69de29bb..886790693 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml @@ -0,0 +1,3 @@ +

\ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index 7d2fb43f3..86da61578 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -1,17 +1,16 @@
date_form; ?> -
-
+
-
+
diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 12261e16a..37b274cd9 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -482,6 +482,7 @@ +
@@ -490,7 +491,7 @@ - +
@@ -506,11 +507,15 @@ + + + +
@@ -520,6 +525,7 @@ + diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index bbc885877..f77e3cd98 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -764,6 +764,7 @@ CREATE TABLE "cc_tag" ( "id" serial NOT NULL, "tag_name" VARCHAR(128) NOT NULL, + "tag_type" VARCHAR(128) default 'boolean' NOT NULL, PRIMARY KEY ("id") ); @@ -821,6 +822,7 @@ CREATE TABLE "cc_playout_history_metadata" ( "id" serial NOT NULL, "history_id" INTEGER NOT NULL, + "tag_id" INTEGER NOT NULL, "key" VARCHAR(128) NOT NULL, "value" VARCHAR(128) NOT NULL, PRIMARY KEY ("id") @@ -860,6 +862,7 @@ CREATE TABLE "cc_playout_history_template_tag" "id" serial NOT NULL, "template_id" INTEGER NOT NULL, "tag_id" INTEGER NOT NULL, + "position" INTEGER NOT NULL, PRIMARY KEY ("id") ); @@ -925,12 +928,14 @@ ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_mount_name_inst_fkey" FOREIGN ALTER TABLE "cc_file_tag" ADD CONSTRAINT "cc_file_tag_file_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE; -ALTER TABLE "cc_file_tag" ADD CONSTRAINT "c_file_tag_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE; +ALTER TABLE "cc_file_tag" ADD CONSTRAINT "cc_file_tag_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE; ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_playout_history_file_tag_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE; ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "cc_playout_history_metadata_entry_fkey" FOREIGN KEY ("history_id") REFERENCES "cc_playout_history" ("id") ON DELETE CASCADE; +ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "c_playout_metadata_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE; + ALTER TABLE "cc_playout_history_template_tag" ADD CONSTRAINT "cc_playout_history_template_template_fkey" FOREIGN KEY ("template_id") REFERENCES "cc_playout_history_template" ("id") ON DELETE CASCADE; ALTER TABLE "cc_playout_history_template_tag" ADD CONSTRAINT "cc_playout_history_template_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE; diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 24ffe2a72..9a7b8e248 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -295,6 +295,30 @@ var AIRTIME = (function(AIRTIME) { }); + $('body').on("click", ".his_item_save", function(e) { + + e.preventDefault(); + + var $form = $(this).parents("form"); + var data = $form.serializeArray(); + + var url = baseUrl+"Playouthistory/update-list-item/format/json"; + + $.post(url, data, function(json) { + + //TODO put errors on form. + if (json.data !== "true") { + //makeHistoryDialog(json.dialog); + } + else { + removeHistoryDialog(); + oTable.fnDraw(); + } + + }, "json"); + + }); + $historyContentDiv.find("#his_submit").click(function(ev){ var fn, oRange; From ecb2f81211b43ed2d143772ab6809564d3f98037 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 23 Jul 2013 18:01:43 -0400 Subject: [PATCH 011/181] creating an new row for edit/delete links in the datatable working on creating/editing records. --- .../controllers/PlayouthistoryController.php | 13 +- .../application/services/HistoryService.php | 130 +++++++++++----- .../views/scripts/playouthistory/index.phtml | 1 + .../scripts/playouthistory/template.phtml | 3 + .../js/airtime/playouthistory/historytable.js | 140 ++++++++++++++---- 5 files changed, 215 insertions(+), 72 deletions(-) create mode 100644 airtime_mvc/application/views/scripts/playouthistory/template.phtml diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 2c7e0ca83..8b84902e3 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -11,6 +11,7 @@ class PlayouthistoryController extends Zend_Controller_Action ->addActionContext('edit-aggregate-item', 'json') ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') + ->addActionContext('delete-list-item', 'json') ->addActionContext('update-list-item', 'json') ->addActionContext('update-aggregate-item', 'json') ->addActionContext('create-template', 'json') @@ -137,10 +138,10 @@ class PlayouthistoryController extends Zend_Controller_Action public function editListItemAction() { - $file_id = $this->_getParam('id'); + $history_id = $this->_getParam('id', null); $historyService = new Application_Service_HistoryService(); - $form = $historyService->makeHistoryItemForm($file_id); + $form = $historyService->makeHistoryItemForm($history_id); $this->view->form = $form; $this->view->dialog = $this->view->render('form/edit-history-item.phtml'); @@ -148,6 +149,14 @@ class PlayouthistoryController extends Zend_Controller_Action unset($this->view->form); } + public function deleteListItemAction() + { + $history_id = $this->_getParam('id'); + + $historyService = new Application_Service_HistoryService(); + $historyService->deletePlayedItem($history_id); + } + public function updateListItemAction() { $request = $this->getRequest(); diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 103a73049..7e6b80718 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -21,7 +21,7 @@ class Application_Service_HistoryService public function __construct() { $this->con = isset($con) ? $con : Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME); - $this->timezone = date_default_timezone_get(); + $this->timezone = Application_Model_Preference::GetTimezone(); } /* @@ -61,6 +61,21 @@ class Application_Service_HistoryService left join cc_files as file on (file.id = playout.file_id)"; $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $opts, "history"); + + $timezoneUTC = new DateTimeZone("UTC"); + $timezoneLocal = new DateTimeZone($this->timezone); + + //need to display the results in the station's timezone. + foreach ($results["history"] as $index => &$result) { + + $dateTime = new DateTime($result["starts"], $timezoneUTC); + $dateTime->setTimezone($timezoneLocal); + $result["starts"] = $dateTime->format("Y-m-d H:i:s"); + + $dateTime = new DateTime($result["ends"], $timezoneUTC); + $dateTime->setTimezone($timezoneLocal); + $result["ends"] = $dateTime->format("Y-m-d H:i:s"); + } return $results; } @@ -153,7 +168,7 @@ class Application_Service_HistoryService } /* id is an id in cc_playout_history */ - public function makeHistoryItemForm() { + public function makeHistoryItemForm($id) { try { $form = new Application_Form_EditHistoryItem(); @@ -197,18 +212,23 @@ class Application_Service_HistoryService public function createPlayedItem($data) { try { - $form = $this->makeHistoryItemForm(); + $form = $this->makeHistoryItemForm(null); + $history_id = $form->getElement("his_item_id"); - $json = $form->processAjax($data); - Logging::info($json); - if ($form->isValid($data)) { - $values = $form->getElementsAndSubFormsOrdered(); + $history_id->setIgnore(true); + $values = $form->getValues(); + Logging::info("created list item"); Logging::info($values); } + else { + Logging::info("created list item NOT VALID"); + } + + Logging::info($form->getMessages()); - return $json; + //return $json; } catch (Exception $e) { Logging::info($e); @@ -216,21 +236,25 @@ class Application_Service_HistoryService } /* id is an id in cc_playout_history */ - public function editPlayedItem($id) { + public function editPlayedItem($data) { try { - $form = $this->makeHistoryItemForm(); + $id = $data["his_item_id"]; + $form = $this->makeHistoryItemForm($id); + $history_id = $form->getElement("his_item_id"); + $history_id->setRequired(true); - $json = $form->processAjax($data); - Logging::info($json); - if ($form->isValid($data)) { - $values = $form->getElementsAndSubFormsOrdered(); - Logging::info("edited list item"); - Logging::info($values); - } - - return $json; + $values = $form->getValues(); + + Logging::info("edited list item"); + Logging::info($values); + } + else { + Logging::info("edited list item NOT VALID"); + } + + Logging::info($form->getMessages()); } catch (Exception $e) { Logging::info($e); @@ -240,29 +264,59 @@ class Application_Service_HistoryService /* id is an id in cc_files */ public function editPlayedFile($data) { - $form = new Application_Form_EditHistoryFile(); - - $json = $form->processAjax($data); - Logging::info($json); - - if ($form->isValid($data)) { - - $id = $data["his_file_id"]; - $file = Application_Model_StoredFile::RecallById($id, $this->con); - - $md = array( - MDATA_KEY_TITLE => $data['his_file_title'], - MDATA_KEY_CREATOR => $data['his_file_creator'], - MDATA_KEY_COMPOSER => $data['his_file_composer'], - MDATA_KEY_COPYRIGHT => $data['his_file_copyright'] - ); - - $file->setDbColMetadata($md); - } + $this->con->beginTransaction(); + + try { + $form = new Application_Form_EditHistoryFile(); + + $json = $form->processAjax($data); + Logging::info($json); + + if ($form->isValid($data)) { + + $id = $data["his_file_id"]; + $file = Application_Model_StoredFile::RecallById($id, $this->con); + + $md = array( + MDATA_KEY_TITLE => $data['his_file_title'], + MDATA_KEY_CREATOR => $data['his_file_creator'], + MDATA_KEY_COMPOSER => $data['his_file_composer'], + MDATA_KEY_COPYRIGHT => $data['his_file_copyright'] + ); + + $file->setDbColMetadata($md); + } + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + Logging::info($e); + throw $e; + } return $json; } + /* id is an id in cc_playout_history */ + public function deletePlayedItem($id) { + + $this->con->beginTransaction(); + + try { + + $record = CcPlayoutHistoryQuery::create()->findPk($id, $this->con); + $record->delete($this->con); + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + Logging::info($e); + throw $e; + } + } + //---------------- Following code is for History Templates --------------------------// diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index 86da61578..c2a8da2f5 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -7,6 +7,7 @@
  • +
    diff --git a/airtime_mvc/application/views/scripts/playouthistory/template.phtml b/airtime_mvc/application/views/scripts/playouthistory/template.phtml new file mode 100644 index 000000000..5c59f19ef --- /dev/null +++ b/airtime_mvc/application/views/scripts/playouthistory/template.phtml @@ -0,0 +1,3 @@ +
    + +
    \ No newline at end of file diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 9a7b8e248..729b7b7df 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -35,9 +35,9 @@ var AIRTIME = (function(AIRTIME) { ] }; - var lengthMenu = [[50, 100, 500, -1], [50, 100, 500, $.i18n._("All")]]; + var lengthMenu = [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, $.i18n._("All")]]; - var sDom = 'lf<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>'; + var sDom = 'l<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>'; function getFileName(ext){ var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m"; @@ -98,13 +98,9 @@ var AIRTIME = (function(AIRTIME) { fnRowCallback; fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { - var url = baseUrl+"Playouthistory/edit-aggregate-item/format/json/id/"+aData.file_id, - $link = $("", { - "href": url, - "text": $.i18n._("Edit") - }); - - $('td.his_edit', nRow).html($link); + var editUrl = baseUrl+"Playouthistory/edit-aggregate-item/format/json/id/"+aData.file_id; + + nRow.setAttribute('url-edit', editUrl); }; oTable = $historyTableDiv.dataTable( { @@ -115,8 +111,7 @@ var AIRTIME = (function(AIRTIME) { {"sTitle": $.i18n._("Played"), "mDataProp": "played", "sClass": "his_artist"}, /* times played */ {"sTitle": $.i18n._("Length"), "mDataProp": "length", "sClass": "his_length library_length"}, /* Length */ {"sTitle": $.i18n._("Composer"), "mDataProp": "composer", "sClass": "his_composer"}, /* Composer */ - {"sTitle": $.i18n._("Copyright"), "mDataProp": "copyright", "sClass": "his_copyright"}, /* Copyright */ - {"sTitle" : $.i18n._("Admin"), "mDataProp": "file_id", "bSearchable" : false, "sClass": "his_edit"}, /* id of history item */ + {"sTitle": $.i18n._("Copyright"), "mDataProp": "copyright", "sClass": "his_copyright"} /* Copyright */ ], "bProcessing": true, @@ -145,13 +140,11 @@ var AIRTIME = (function(AIRTIME) { fnRowCallback; fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { - var url = baseUrl+"playouthistory/edit-list-item/format/json/id/"+aData.history_id, - $link = $("", { - "href": url, - "text": $.i18n._("Edit") - }); - - $('td.his_edit', nRow).html($link); + var editUrl = baseUrl+"playouthistory/edit-list-item/format/json/id/"+aData.history_id, + deleteUrl = baseUrl+"playouthistory/delete-list-item/format/json/id/"+aData.history_id; + + nRow.setAttribute('url-edit', editUrl); + nRow.setAttribute('url-delete', deleteUrl); }; oTable = $historyTableDiv.dataTable( { @@ -160,8 +153,7 @@ var AIRTIME = (function(AIRTIME) { {"sTitle": $.i18n._("Start"), "mDataProp": "starts", "sClass": "his_starts"}, /* Starts */ {"sTitle": $.i18n._("End"), "mDataProp": "ends", "sClass": "his_ends"}, /* Ends */ {"sTitle": $.i18n._("Title"), "mDataProp": "title", "sClass": "his_title"}, /* Title */ - {"sTitle": $.i18n._("Creator"), "mDataProp": "artist", "sClass": "his_artist"}, /* Creator */ - {"sTitle" : $.i18n._("Admin"), "mDataProp": "history_id", "bSearchable" : false, "sClass": "his_edit"}, /* id of history item */ + {"sTitle": $.i18n._("Creator"), "mDataProp": "artist", "sClass": "his_artist"} /* Creator */ ], "bProcessing": true, @@ -191,7 +183,8 @@ var AIRTIME = (function(AIRTIME) { screenWidth = Math.floor(viewport.width - 110), oBaseDatePickerSettings, oBaseTimePickerSettings, - oTable, + oTableAgg, + oTableItem, dateStartId = "#his_date_start", timeStartId = "#his_time_start", dateEndId = "#his_date_end", @@ -251,15 +244,72 @@ var AIRTIME = (function(AIRTIME) { minuteText: $.i18n._("Minute") }; - oTable = aggregateHistoryTable(); - itemHistoryTable(); + oTableItem = itemHistoryTable(); + oTableAgg = aggregateHistoryTable(); $historyContentDiv.find(dateStartId).datepicker(oBaseDatePickerSettings); $historyContentDiv.find(timeStartId).timepicker(oBaseTimePickerSettings); $historyContentDiv.find(dateEndId).datepicker(oBaseDatePickerSettings); $historyContentDiv.find(timeEndId).timepicker(oBaseTimePickerSettings); - $historyContentDiv.on("click", "td.his_edit", function(e) { + // 'open' an information row when a row is clicked on + //for create/edit/delete + function openRow(oTable, tr) { + var links = ['url-edit', 'url-delete'], + i, len, + attr, + name, + $link, + $div; + + $div = $("
    "); + + for (i = 0, len = links.length; i < len; i++) { + + attr = links[i]; + + if (tr.hasAttribute(attr)) { + name = attr.split("-")[1]; + + $link = $("", { + "href": tr.getAttribute(attr), + "text": $.i18n._(name), + "class": "his_"+name + }); + + $div.append($link); + } + } + + if (oTable.fnIsOpen(tr)) { + oTable.fnClose(tr); + } + else { + oTable.fnOpen(tr, $div, "his_update"); + } + } + + $historyContentDiv.on("click", "#history_table_list tr", function(ev) { + openRow(oTableItem, this); + }); + + $historyContentDiv.on("click", "#history_table_aggregate tr", function(ev) { + openRow(oTableAgg, this); + }); + + $("#his_create").click(function(e) { + var url = baseUrl+"playouthistory/edit-list-item/format/json" ; + + e.preventDefault(); + + $.get(url, function(json) { + + makeHistoryDialog(json.dialog); + + }, "json"); + }); + + $historyContentDiv.on("click", "a.his_edit", function(e) { var url = e.target.href; e.preventDefault(); @@ -271,6 +321,27 @@ var AIRTIME = (function(AIRTIME) { }, "json"); }); + $historyContentDiv.on("click", "a.his_delete", function(e) { + var url = e.target.href, + doDelete; + + e.preventDefault(); + + doDelete = confirm($.i18n._("Delete this history record?")); + + if (doDelete) { + $.post(url, function(json) { + oTableAgg.fnDraw(); + oTableItem.fnDraw(); + + }, "json"); + } + }); + + $('body').on("click", ".his_file_cancel, .his_item_cancel", function(e) { + removeHistoryDialog(); + }); + $('body').on("click", ".his_file_save", function(e) { e.preventDefault(); @@ -288,7 +359,7 @@ var AIRTIME = (function(AIRTIME) { } else { removeHistoryDialog(); - oTable.fnDraw(); + oTableAgg.fnDraw(); } }, "json"); @@ -299,11 +370,15 @@ var AIRTIME = (function(AIRTIME) { e.preventDefault(); - var $form = $(this).parents("form"); - var data = $form.serializeArray(); - - var url = baseUrl+"Playouthistory/update-list-item/format/json"; + var $form = $(this).parents("form"), + data = $form.serializeArray(), + id = data[0].value, + createUrl = baseUrl+"Playouthistory/create-list-item/format/json", + updateUrl = baseUrl+"Playouthistory/update-list-item/format/json", + url; + url = (id === "") ? createUrl : updateUrl; + $.post(url, data, function(json) { //TODO put errors on form. @@ -312,7 +387,7 @@ var AIRTIME = (function(AIRTIME) { } else { removeHistoryDialog(); - oTable.fnDraw(); + oTableItem.fnDraw(); } }, "json"); @@ -325,11 +400,12 @@ var AIRTIME = (function(AIRTIME) { oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId); - fn = oTable.fnSettings().fnServerData; + fn = fnServerData; fn.start = oRange.start; fn.end = oRange.end; - oTable.fnDraw(); + oTableAgg.fnDraw(); + oTableItem.fnDraw(); }); $historyContentDiv.find("#his-tabs").tabs(); From c7b5592fa940d474289b248bb7827ff05e706f83 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 26 Jul 2013 11:36:58 -0400 Subject: [PATCH 012/181] starting to populate with the template. --- .../application/services/HistoryService.php | 99 +++++++++++-------- .../js/airtime/playouthistory/historytable.js | 3 +- 2 files changed, 62 insertions(+), 40 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 7e6b80718..0aa5467de 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -61,17 +61,17 @@ class Application_Service_HistoryService left join cc_files as file on (file.id = playout.file_id)"; $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $opts, "history"); - + $timezoneUTC = new DateTimeZone("UTC"); $timezoneLocal = new DateTimeZone($this->timezone); - + //need to display the results in the station's timezone. foreach ($results["history"] as $index => &$result) { - + $dateTime = new DateTime($result["starts"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); $result["starts"] = $dateTime->format("Y-m-d H:i:s"); - + $dateTime = new DateTime($result["ends"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); $result["ends"] = $dateTime->format("Y-m-d H:i:s"); @@ -169,13 +169,13 @@ class Application_Service_HistoryService /* id is an id in cc_playout_history */ public function makeHistoryItemForm($id) { - + try { $form = new Application_Form_EditHistoryItem(); $template = $this->getItemTemplate(); - + $form->createFromTemplate($template); - + return $form; } catch (Exception $e) { @@ -207,6 +207,26 @@ class Application_Service_HistoryService Logging::info($e); throw $e; } + } + + public function populateTemplateItem($values) { + + $template = $this->getItemTemplate(); + $historyRecord = new CcPlayoutHistory(); + + $timezoneUTC = new DateTimeZone("UTC"); + $timezoneLocal = new DateTimeZone($this->timezone); + + $dateTime = new DateTime($values["starts"], $timezoneLocal); + $dateTime->setTimezone($timezoneLocal); + $historyRecord->setDbStarts($dateTime->format("Y-m-d H:i:s")); + + $dateTime = new DateTime($result["ends"], $timezoneUTC); + $dateTime->setTimezone($timezoneUTC); + $historyRecord->setDbEnds($dateTime->format("Y-m-d H:i:s")); + + + } public function createPlayedItem($data) { @@ -214,20 +234,20 @@ class Application_Service_HistoryService try { $form = $this->makeHistoryItemForm(null); $history_id = $form->getElement("his_item_id"); - + if ($form->isValid($data)) { $history_id->setIgnore(true); $values = $form->getValues(); - + Logging::info("created list item"); Logging::info($values); } else { Logging::info("created list item NOT VALID"); } - + Logging::info($form->getMessages()); - + //return $json; } catch (Exception $e) { @@ -243,8 +263,9 @@ class Application_Service_HistoryService $form = $this->makeHistoryItemForm($id); $history_id = $form->getElement("his_item_id"); $history_id->setRequired(true); - + if ($form->isValid($data)) { + $history_id->setIgnore(true); $values = $form->getValues(); Logging::info("edited list item"); @@ -253,7 +274,7 @@ class Application_Service_HistoryService else { Logging::info("edited list item NOT VALID"); } - + Logging::info($form->getMessages()); } catch (Exception $e) { @@ -265,28 +286,28 @@ class Application_Service_HistoryService public function editPlayedFile($data) { $this->con->beginTransaction(); - + try { $form = new Application_Form_EditHistoryFile(); - + $json = $form->processAjax($data); Logging::info($json); - + if ($form->isValid($data)) { - + $id = $data["his_file_id"]; $file = Application_Model_StoredFile::RecallById($id, $this->con); - + $md = array( MDATA_KEY_TITLE => $data['his_file_title'], MDATA_KEY_CREATOR => $data['his_file_creator'], MDATA_KEY_COMPOSER => $data['his_file_composer'], MDATA_KEY_COPYRIGHT => $data['his_file_copyright'] ); - + $file->setDbColMetadata($md); } - + $this->con->commit(); } catch (Exception $e) { @@ -297,17 +318,17 @@ class Application_Service_HistoryService return $json; } - + /* id is an id in cc_playout_history */ public function deletePlayedItem($id) { - + $this->con->beginTransaction(); - + try { - + $record = CcPlayoutHistoryQuery::create()->findPk($id, $this->con); $record->delete($this->con); - + $this->con->commit(); } catch (Exception $e) { @@ -316,28 +337,28 @@ class Application_Service_HistoryService throw $e; } } - - + + //---------------- Following code is for History Templates --------------------------// - - + + private function defaultItemTemplate() { - + $fields = array(); - + //array index is the position of the item in the history template table. - $fields[] = array("name" => "start", "type" => TEMPLATE_DATETIME, "isFileMd" => false); - $fields[] = array("name" => "end", "type" => TEMPLATE_DATETIME, "isFileMd" => false); + $fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false); + $fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false); $fields[] = array("name" => MDATA_KEY_TITLE, "type" => TEMPLATE_STRING, "isFileMd" => true); //these fields can be populated from an associated file. - $fields[] = array("name" => MDATA_KEY_CREATOR, "type" => TEMPLATE_STRING, "isFileMd" => true); - + $fields[] = array("name" => MDATA_KEY_CREATOR, "type" => TEMPLATE_STRING, "isFileMd" => true); + return $fields; } - + private function getItemTemplate() { - + $template_id = Application_Model_Preference::GetHistoryItemTemplate(); - + if (is_numeric($template_id)) { Logging::info("template id is: $template_id"); } @@ -345,7 +366,7 @@ class Application_Service_HistoryService Logging::info("Using default template"); $template = $this->defaultItemTemplate(); } - + return $template; } diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 729b7b7df..5f5650e44 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -58,7 +58,8 @@ var AIRTIME = (function(AIRTIME) { if (oConfig.sExtends == "pdf") { this.fnSetText( oFlash, - "title:"+ this.fnGetTitle(oConfig) +"\n"+ + //"title:"+ this.fnGetTitle(oConfig) +"\n"+ + "title: Testing the Title Out\n"+ "message:"+ oConfig.sPdfMessage +"\n"+ "colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+ "orientation:"+ oConfig.sPdfOrientation +"\n"+ From 46ecdf393d8d63659455d1da600ba0912b2b47d4 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 26 Jul 2013 17:33:17 -0400 Subject: [PATCH 013/181] dynamic form rendering for template bootstrap datetime widget. jquery update is needed, testing with hosted jquery first. --- airtime_mvc/application/Bootstrap.php | 9 +- .../controllers/PlayouthistoryController.php | 6 +- .../application/forms/EditHistoryItem.php | 110 +- .../application/services/HistoryService.php | 43 +- .../scripts/form/edit-history-item.phtml | 63 +- .../views/scripts/playouthistory/dialog.phtml | 1 + .../css/bootstrap-datetimepicker.min.css | 8 + .../js/airtime/playouthistory/historytable.js | 5 +- .../bootstrap-datetimepicker.min.js | 26 + airtime_mvc/public/js/libs/jquery-1.10.2.js | 9789 +++++++++++++++++ .../public/js/libs/jquery-migrate-1.2.1.js | 521 + 11 files changed, 10512 insertions(+), 69 deletions(-) create mode 100644 airtime_mvc/application/views/scripts/playouthistory/dialog.phtml create mode 100644 airtime_mvc/public/css/bootstrap-datetimepicker.min.css create mode 100644 airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js create mode 100644 airtime_mvc/public/js/libs/jquery-1.10.2.js create mode 100644 airtime_mvc/public/js/libs/jquery-migrate-1.2.1.js diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php index e289e9c54..a3aab34c5 100644 --- a/airtime_mvc/application/Bootstrap.php +++ b/airtime_mvc/application/Bootstrap.php @@ -86,8 +86,13 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $baseUrl = Application_Common_OsPath::getBaseDir(); - $view->headScript()->appendFile($baseUrl.'js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + //$view->headScript()->appendFile($baseUrl.'js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile('http://code.jquery.com/jquery-1.10.1.min.js','text/javascript'); + $view->headScript()->appendFile('http://code.jquery.com/jquery-migrate-1.2.1.min.js','text/javascript'); + + //$view->headScript()->appendFile($baseUrl.'js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile('http://code.jquery.com/ui/1.10.3/jquery-ui.js','text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/qtip/jquery.qtip.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 8b84902e3..b77420594 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -56,6 +56,7 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); @@ -67,6 +68,7 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools/css/TableTools.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/bootstrap-datetimepicker.min.css?'.$CC_CONFIG['airtime_version']); } public function aggregateHistoryFeedAction() @@ -121,7 +123,7 @@ class PlayouthistoryController extends Zend_Controller_Action $form = $historyService->makeHistoryFileForm($file_id); $this->view->form = $form; - $this->view->dialog = $this->view->render('form/edit-history-file.phtml'); + $this->view->dialog = $this->view->render('playouthistory/dialog.phtml'); unset($this->view->form); } @@ -144,7 +146,7 @@ class PlayouthistoryController extends Zend_Controller_Action $form = $historyService->makeHistoryItemForm($history_id); $this->view->form = $form; - $this->view->dialog = $this->view->render('form/edit-history-item.phtml'); + $this->view->dialog = $this->view->render('playouthistory/dialog.phtml'); unset($this->view->form); } diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php index 99ae87c8d..eebc6b849 100644 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -2,9 +2,9 @@ class Application_Form_EditHistoryItem extends Zend_Form { - const VALIDATE_DATETIME_FORMAT = 'yyyy-MM-dd HH-mm-ss'; + const VALIDATE_DATETIME_FORMAT = 'yyyy-MM-dd HH:mm:ss'; const VALIDATE_DATE_FORMAT = 'yyyy-MM-dd'; - const VALIDATE_TIME_FORMAT = 'HH-mm-ss'; + const VALIDATE_TIME_FORMAT = 'HH:mm:ss'; const ID_PREFIX = "his_item_"; @@ -12,11 +12,13 @@ class Application_Form_EditHistoryItem extends Zend_Form const ITEM_CLASS = "class"; const ITEM_ID_SUFFIX = "name"; + const TEXT_INPUT_CLASS = "input_text"; + private $formElTypes = array( TEMPLATE_DATE => array( "class" => "Zend_Form_Element_Text", "attrs" => array( - "class" => "input_text" + "class" => self::TEXT_INPUT_CLASS ), "validators" => array( array( @@ -33,7 +35,7 @@ class Application_Form_EditHistoryItem extends Zend_Form TEMPLATE_TIME => array( "class" => "Zend_Form_Element_Text", "attrs" => array( - "class" => "input_text" + "class" => self::TEXT_INPUT_CLASS ), "validators" => array( array( @@ -50,7 +52,7 @@ class Application_Form_EditHistoryItem extends Zend_Form TEMPLATE_DATETIME => array( "class" => "Zend_Form_Element_Text", "attrs" => array( - "class" => "input_text" + "class" => self::TEXT_INPUT_CLASS ), "validators" => array( array( @@ -67,7 +69,7 @@ class Application_Form_EditHistoryItem extends Zend_Form TEMPLATE_STRING => array( "class" => "Zend_Form_Element_Text", "attrs" => array( - "class" => "input_text" + "class" => self::TEXT_INPUT_CLASS ), "filters" => array( "StringTrim" @@ -87,7 +89,7 @@ class Application_Form_EditHistoryItem extends Zend_Form ) ), "attrs" => array( - "class" => "input_text" + "class" => self::TEXT_INPUT_CLASS ), "filters" => array( "Int" @@ -96,7 +98,7 @@ class Application_Form_EditHistoryItem extends Zend_Form TEMPLATE_FLOAT => array( "class" => "Zend_Form_Element_Text", "attrs" => array( - "class" => "input_text" + "class" => self::TEXT_INPUT_CLASS ), "validators" => array( array( @@ -107,16 +109,69 @@ class Application_Form_EditHistoryItem extends Zend_Form ); public function init() { + + $this->setDecorators(array( + 'PrepareElements', + array('ViewScript', array('viewScript' => 'form/edit-history-item.phtml')) + )); $history_id = new Zend_Form_Element_Hidden(self::ID_PREFIX.'id'); $history_id->setValidators(array( new Zend_Validate_Int() )); + $history_id->setDecorators(array('ViewHelper')); $this->addElement($history_id); + + $starts = new Zend_Form_Element_Text(self::ID_PREFIX.'starts'); + $starts->setValidators(array( + new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT) + )); + $starts->setAttrib('class', self::TEXT_INPUT_CLASS); + $starts->setAttrib('data-format', self::VALIDATE_DATETIME_FORMAT); + $starts->addFilter('StringTrim'); + $starts->setLabel(_('Start Time')); + $starts->setDecorators(array('ViewHelper')); + $this->addElement($starts); + + $ends = new Zend_Form_Element_Text(self::ID_PREFIX.'ends'); + $ends->setValidators(array( + new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT) + )); + $ends->setAttrib('class', self::TEXT_INPUT_CLASS); + $ends->setAttrib('data-format', self::VALIDATE_DATETIME_FORMAT); + $ends->addFilter('StringTrim'); + $ends->setLabel(_('End Time')); + $ends->setDecorators(array('ViewHelper')); + $this->addElement($ends); + + $dynamic_attrs = new Zend_Form_SubForm(); + $this->addSubForm($dynamic_attrs, self::ID_PREFIX.'template'); + + // Add the submit button + $this->addElement('button', 'his_item_save', array( + 'ignore' => true, + 'class' => 'btn his_item_save', + 'label' => _('Save'), + 'decorators' => array( + 'ViewHelper' + ) + )); + + // Add the cancel button + $this->addElement('button', 'his_item_cancel', array( + 'ignore' => true, + 'class' => 'btn his_item_cancel', + 'label' => _('Cancel'), + 'decorators' => array( + 'ViewHelper' + ) + )); } public function createFromTemplate($template) { + $templateSubForm = $this->getSubForm(self::ID_PREFIX.'template'); + for ($i = 0, $len = count($template); $i < $len; $i++) { $item = $template[$i]; @@ -170,41 +225,8 @@ class Application_Form_EditHistoryItem extends Zend_Form } } - $this->addElement($el); - } - - // Add the submit button - $this->addElement('button', 'his_item_save', array( - 'ignore' => true, - 'class' => 'btn his_item_save', - 'label' => _('Save'), - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add the cancel button - $this->addElement('button', 'his_item_cancel', array( - 'ignore' => true, - 'class' => 'btn his_item_cancel', - 'label' => _('Cancel'), - 'decorators' => array( - 'ViewHelper' - ) - )); - - $this->addDisplayGroup( - array( - 'his_item_save', - 'his_item_cancel' - ), - 'submitButtons', - array( - 'decorators' => array( - 'FormElements', - 'DtDdWrapper' - ) - ) - ); + $el->setDecorators(array('ViewHelper')); + $templateSubForm->addElement($el); + } } } \ No newline at end of file diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 0aa5467de..da76a3a8c 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -211,21 +211,30 @@ class Application_Service_HistoryService public function populateTemplateItem($values) { - $template = $this->getItemTemplate(); - $historyRecord = new CcPlayoutHistory(); - - $timezoneUTC = new DateTimeZone("UTC"); - $timezoneLocal = new DateTimeZone($this->timezone); - - $dateTime = new DateTime($values["starts"], $timezoneLocal); - $dateTime->setTimezone($timezoneLocal); - $historyRecord->setDbStarts($dateTime->format("Y-m-d H:i:s")); - - $dateTime = new DateTime($result["ends"], $timezoneUTC); - $dateTime->setTimezone($timezoneUTC); - $historyRecord->setDbEnds($dateTime->format("Y-m-d H:i:s")); - - + $this->con->beginTransaction(); + + try { + $template = $this->getItemTemplate(); + $historyRecord = new CcPlayoutHistory(); + + $timezoneUTC = new DateTimeZone("UTC"); + $timezoneLocal = new DateTimeZone($this->timezone); + + $dateTime = new DateTime($values["starts"], $timezoneLocal); + $dateTime->setTimezone($timezoneLocal); + $historyRecord->setDbStarts($dateTime->format("Y-m-d H:i:s")); + + $dateTime = new DateTime($result["ends"], $timezoneUTC); + $dateTime->setTimezone($timezoneUTC); + $historyRecord->setDbEnds($dateTime->format("Y-m-d H:i:s")); + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + Logging::info($e); + throw $e; + } } @@ -347,8 +356,8 @@ class Application_Service_HistoryService $fields = array(); //array index is the position of the item in the history template table. - $fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false); - $fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false); + //$fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false); + //$fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false); $fields[] = array("name" => MDATA_KEY_TITLE, "type" => TEMPLATE_STRING, "isFileMd" => true); //these fields can be populated from an associated file. $fields[] = array("name" => MDATA_KEY_CREATOR, "type" => TEMPLATE_STRING, "isFileMd" => true); diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml index 886790693..7f87f20d6 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml @@ -1,3 +1,60 @@ -
    - form; ?> -
    \ No newline at end of file +
    +element ?> + +
    + + +
    + getElement($name); ?> +
    + + +
    + +
    +
    +
    +
    + getElement($name) ?> + + + +
    +
    + getElement($name)->hasErrors()) : ?> +
      + getElement($name)->getMessages() as $error): ?> +
    • + +
    + +
    + + +getSubForm('his_item_template') as $index=>$el): ?> + getName(); ?> + +
    + +
    +
    + + hasErrors()): ?> +
      + getMessages() as $error): ?> +
    • + +
    + +
    + + +
    + +getElement($name); ?> + +
    + +
    + +
    diff --git a/airtime_mvc/application/views/scripts/playouthistory/dialog.phtml b/airtime_mvc/application/views/scripts/playouthistory/dialog.phtml new file mode 100644 index 000000000..2e55e706a --- /dev/null +++ b/airtime_mvc/application/views/scripts/playouthistory/dialog.phtml @@ -0,0 +1 @@ +form; ?> \ No newline at end of file diff --git a/airtime_mvc/public/css/bootstrap-datetimepicker.min.css b/airtime_mvc/public/css/bootstrap-datetimepicker.min.css new file mode 100644 index 000000000..36394e276 --- /dev/null +++ b/airtime_mvc/public/css/bootstrap-datetimepicker.min.css @@ -0,0 +1,8 @@ +/*! + * Datepicker for Bootstrap + * + * Copyright 2012 Stefan Petre + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:3000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute;top:-7px;left:6px}.bootstrap-datetimepicker-widget:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:100%;font-weight:bold;font-size:1.2em}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#999}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td.active:hover,.bootstrap-datetimepicker-widget td.active:hover:hover,.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active:hover.active,.bootstrap-datetimepicker-widget td.active.disabled,.bootstrap-datetimepicker-widget td.active:hover.disabled,.bootstrap-datetimepicker-widget td.active[disabled],.bootstrap-datetimepicker-widget td.active:hover[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.bootstrap-datetimepicker-widget td.active:active,.bootstrap-datetimepicker-widget td.active:hover:active,.bootstrap-datetimepicker-widget td.active.active,.bootstrap-datetimepicker-widget td.active:hover.active{background-color:#039 \9}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:block;width:47px;height:54px;line-height:54px;float:left;margin:2px;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget td span.active:hover,.bootstrap-datetimepicker-widget td span.active:active,.bootstrap-datetimepicker-widget td span.active.active,.bootstrap-datetimepicker-widget td span.active.disabled,.bootstrap-datetimepicker-widget td span.active[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.bootstrap-datetimepicker-widget td span.active:active,.bootstrap-datetimepicker-widget td span.active.active{background-color:#039 \9}.bootstrap-datetimepicker-widget td span.old{color:#999}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget th.switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:0;color:#999;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-append.date .add-on i,.input-prepend.date .add-on i{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px} \ No newline at end of file diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 5f5650e44..c57e8cba5 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -201,10 +201,13 @@ var AIRTIME = (function(AIRTIME) { function makeHistoryDialog(html) { $hisDialogEl = $(html); - + $hisDialogEl.dialog({ title: $.i18n._("Edit History Record"), modal: true, + open: function( event, ui ) { + $hisDialogEl.find('.date').datetimepicker(); + }, close: function() { removeHistoryDialog(); } diff --git a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js new file mode 100644 index 000000000..a30f77645 --- /dev/null +++ b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js @@ -0,0 +1,26 @@ +/** + * @license + * ========================================================= + * bootstrap-datetimepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * Contributions: + * - Andrew Rowls + * - Thiago de Arruda + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= + */ +(function($){var smartPhone=window.orientation!=undefined;var DateTimePicker=function(element,options){this.id=dpgId++;this.init(element,options)};var dateToDate=function(dt){if(typeof dt==="string"){return new Date(dt)}return dt};DateTimePicker.prototype={constructor:DateTimePicker,init:function(element,options){var icon;if(!(options.pickTime||options.pickDate))throw new Error("Must choose at least one picker");this.options=options;this.$element=$(element);this.language=options.language in dates?options.language:"en";this.pickDate=options.pickDate;this.pickTime=options.pickTime;this.isInput=this.$element.is("input");this.component=false;if(this.$element.find(".input-append")||this.$element.find(".input-prepend"))this.component=this.$element.find(".add-on");this.format=options.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"}this._compileFormat();if(this.component){icon=this.component.find("i")}if(this.pickTime){if(icon&&icon.length)this.timeIcon=icon.data("time-icon");if(!this.timeIcon)this.timeIcon="icon-time";icon.addClass(this.timeIcon)}if(this.pickDate){if(icon&&icon.length)this.dateIcon=icon.data("date-icon");if(!this.dateIcon)this.dateIcon="icon-calendar";icon.removeClass(this.timeIcon);icon.addClass(this.dateIcon)}this.widget=$(getTemplate(this.timeIcon,options.pickDate,options.pickTime,options.pick12HourFormat,options.pickSeconds,options.collapse)).appendTo("body");this.minViewMode=options.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=options.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=options.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(options.startDate||this.$element.data("date-startdate"));this.setEndDate(options.endDate||this.$element.data("date-enddate"));this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e){e.stopPropagation();e.preventDefault()}},disable:function(){this.$element.find("input").prop("disabled",true);this._detachDatePickerEvents()},enable:function(){this.$element.find("input").prop("disabled",false);this._attachDatePickerEvents()},hide:function(){var collapse=this.widget.find(".collapse");for(var i=0;i");while(dowCnt'+dates[this.language].daysMin[dowCnt++%7]+"")}this.widget.find(".datepicker-days thead").append(html)},fillMonths:function(){var html="";var i=0;while(i<12){html+=''+dates[this.language].monthsShort[i++]+""}this.widget.find(".datepicker-months td").append(html)},fillDate:function(){var year=this.viewDate.getUTCFullYear();var month=this.viewDate.getUTCMonth();var currentDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);var startYear=typeof this.startDate==="object"?this.startDate.getUTCFullYear():-Infinity;var startMonth=typeof this.startDate==="object"?this.startDate.getUTCMonth():-1;var endYear=typeof this.endDate==="object"?this.endDate.getUTCFullYear():Infinity;var endMonth=typeof this.endDate==="object"?this.endDate.getUTCMonth():12;this.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-days th:eq(1)").text(dates[this.language].months[month]+" "+year);var prevMonth=UTCDate(year,month-1,28,0,0,0,0);var day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);if(year==startYear&&month<=startMonth||year=endMonth||year>endYear){this.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var row;var clsName;while(prevMonth.valueOf()");html.push(row)}clsName="";if(prevMonth.getUTCFullYear()year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month){clsName+=" new"}if(prevMonth.valueOf()===currentDate.valueOf()){clsName+=" active"}if(prevMonth.valueOf()+864e5<=this.startDate){clsName+=" disabled"}if(prevMonth.valueOf()>this.endDate){clsName+=" disabled"}row.append(''+prevMonth.getUTCDate()+"");prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(html);var currentYear=this._date.getUTCFullYear();var months=this.widget.find(".datepicker-months").find("th:eq(1)").text(year).end().find("span").removeClass("active");if(currentYear===year){months.eq(this._date.getUTCMonth()).addClass("active")}if(currentYear-1endYear){this.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(var i=0;i<12;i++){if(year==startYear&&startMonth>i||yearendYear){$(months[i]).addClass("disabled")}}html="";year=parseInt(year/10,10)*10;var yearCont=this.widget.find(".datepicker-years").find("th:eq(1)").text(year+"-"+(year+9)).end().find("td");this.widget.find(".datepicker-years").find("th").removeClass("disabled");if(startYear>year){this.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(endYearendYear?" disabled":"")+'">'+year+"";year+=1}yearCont.html(html)},fillHours:function(){var table=this.widget.find(".timepicker .timepicker-hours table");table.parent().hide();var html="";if(this.options.pick12HourFormat){var current=1;for(var i=0;i<3;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}else{var current=0;for(var i=0;i<6;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}table.html(html)},fillMinutes:function(){var table=this.widget.find(".timepicker .timepicker-minutes table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillSeconds:function(){var table=this.widget.find(".timepicker .timepicker-seconds table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillTime:function(){if(!this._date)return;var timeComponents=this.widget.find(".timepicker span[data-time-component]");var table=timeComponents.closest("table");var is12HourFormat=this.options.pick12HourFormat;var hour=this._date.getUTCHours();var period="AM";if(is12HourFormat){if(hour>=12)period="PM";if(hour===0)hour=12;else if(hour!=12)hour=hour%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(period)}hour=padLeft(hour.toString(),2,"0");var minute=padLeft(this._date.getUTCMinutes().toString(),2,"0");var second=padLeft(this._date.getUTCSeconds().toString(),2,"0");timeComponents.filter("[data-time-component=hours]").text(hour);timeComponents.filter("[data-time-component=minutes]").text(minute);timeComponents.filter("[data-time-component=seconds]").text(second)},click:function(e){e.stopPropagation();e.preventDefault();this._unset=false;var target=$(e.target).closest("span, td, th");if(target.length===1){if(!target.is(".disabled")){switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var vd=this.viewDate;var navFnc=DPGlobal.modes[this.viewMode].navFnc;var step=DPGlobal.modes[this.viewMode].navStep;if(target[0].className==="prev")step=step*-1;vd["set"+navFnc](vd["get"+navFnc]()+step);this.fillDate();this.set();break}break;case"span":if(target.is(".month")){var month=target.parent().find("span").index(target);this.viewDate.setUTCMonth(month)}else{var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year)}if(this.viewMode!==0){this._date=UTCDate(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();this.set();break;case"td":if(target.is(".day")){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getUTCMonth();var year=this.viewDate.getUTCFullYear();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}this._date=UTCDate(year,month,day,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=UTCDate(year,month,Math.min(28,day),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}}},actions:{incrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e){var hour=this._date.getUTCHours();if(hour>=12)hour-=12;else hour+=12;this._date.setUTCHours(hour)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);if(this.options.pick12HourFormat){var current=this._date.getUTCHours();if(current>=12){if(value!=12)value=(value+12)%24}else{if(value===12)value=0;else value=value%12}}this._date.setUTCHours(value);this.actions.showPicker.call(this)},selectMinute:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCMinutes(value);this.actions.showPicker.call(this)},selectSecond:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCSeconds(value);this.actions.showPicker.call(this)}},doAction:function(e){e.stopPropagation();e.preventDefault();if(!this._date)this._date=UTCDate(1970,0,0,0,0,0,0);var action=$(e.currentTarget).data("action");var rv=this.actions[action].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return rv},stopEvent:function(e){e.stopPropagation();e.preventDefault()},keydown:function(e){var self=this,k=e.which,input=$(e.target);if(k==8||k==46){setTimeout(function(){self._resetMaskPos(input)})}},keypress:function(e){var k=e.which;if(k==8||k==46){return}var input=$(e.target);var c=String.fromCharCode(k);var val=input.val()||"";val+=c;var mask=this._mask[this._maskPos];if(!mask){return false}if(mask.end!=val.length){return}if(!mask.pattern.test(val.slice(mask.start))){val=val.slice(0,val.length-1);while((mask=this._mask[this._maskPos])&&mask.character){val+=mask.character;this._maskPos++}val+=c;if(mask.end!=val.length){input.val(val);return false}else{if(!mask.pattern.test(val.slice(mask.start))){input.val(val.slice(0,mask.start));return false}else{input.val(val);this._maskPos++;return false}}}else{this._maskPos++}},change:function(e){var input=$(e.target);var val=input.val();if(this._formatPattern.test(val)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(val&&val.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else input.val("")}else{if(this._date){this.setValue(null);this.notifyChange();this._unset=true}}this._resetMaskPos(input)},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+DPGlobal.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(d){return this.format.replace(formatReplacer,function(match){var methodName,property,rv,len=match.length;if(match==="ms")len=1;property=dateFormatComponents[match].property;if(property==="Hours12"){rv=d.getUTCHours();if(rv===0)rv=12;else if(rv!==12)rv=rv%12}else if(property==="Period12"){if(d.getUTCHours()>=12)return"PM";else return"AM"}else{methodName="get"+property;rv=d[methodName]()}if(methodName==="getUTCMonth")rv=rv+1;if(methodName==="getUTCYear")rv=rv+1900-2e3;return padLeft(rv.toString(),len,"0")})},parseDate:function(str){var match,i,property,methodName,value,parsed={};if(!(match=this._formatPattern.exec(str)))return null;for(i=1;ival.length){this._maskPos=i;break}else if(this._mask[i].end===val.length){this._maskPos=i+1;break}}},_finishParsingDate:function(parsed){var year,month,date,hours,minutes,seconds,milliseconds;year=parsed.UTCFullYear;if(parsed.UTCYear)year=2e3+parsed.UTCYear;if(!year)year=1970;if(parsed.UTCMonth)month=parsed.UTCMonth-1;else month=0;date=parsed.UTCDate||1;hours=parsed.UTCHours||0;minutes=parsed.UTCMinutes||0;seconds=parsed.UTCSeconds||0;milliseconds=parsed.UTCMilliseconds||0;if(parsed.Hours12){hours=parsed.Hours12}if(parsed.Period12){if(/pm/i.test(parsed.Period12)){if(hours!=12)hours=(hours+12)%24}else{hours=hours%12}}return UTCDate(year,month,date,hours,minutes,seconds,milliseconds)},_compileFormat:function(){var match,component,components=[],mask=[],str=this.format,propertiesByIndex={},i=0,pos=0;while(match=formatComponent.exec(str)){component=match[0];if(component in dateFormatComponents){i++;propertiesByIndex[i]=dateFormatComponents[component].property;components.push("\\s*"+dateFormatComponents[component].getPattern(this)+"\\s*");mask.push({pattern:new RegExp(dateFormatComponents[component].getPattern(this)),property:dateFormatComponents[component].property,start:pos,end:pos+=component.length})}else{components.push(escapeRegExp(component));mask.push({pattern:new RegExp(escapeRegExp(component)),character:component,start:pos,end:++pos})}str=str.slice(component.length)}this._mask=mask;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+components.join("")+"\\s*$");this._propertiesByIndex=propertiesByIndex},_attachDatePickerEvents:function(){var self=this;this.widget.on("click",".datepicker *",$.proxy(this.click,this));this.widget.on("click","[data-action]",$.proxy(this.doAction,this));this.widget.on("mousedown",$.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(e){e.stopPropagation();var $this=$(this);var $parent=$this.closest("ul");var expanded=$parent.find(".collapse.in");var closed=$parent.find(".collapse:not(.in)");if(expanded&&expanded.length){var collapseData=expanded.data("collapse");if(collapseData&&collapseData.transitioning)return;expanded.collapse("hide");closed.collapse("show");$this.find("i").toggleClass(self.timeIcon+" "+self.dateIcon);self.$element.find(".add-on i").toggleClass(self.timeIcon+" "+self.dateIcon)}})}if(this.isInput){this.$element.on({focus:$.proxy(this.show,this),change:$.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)})}}else{this.$element.on({change:$.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",$.proxy(this.show,this))}else{this.$element.on("click",$.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){$(window).on("resize.datetimepicker"+this.id,$.proxy(this.place,this));if(!this.isInput){$(document).on("mousedown.datetimepicker"+this.id,$.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({focus:this.show,change:this.change});if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress})}}else{this.$element.off({change:this.change},"input");if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){$(window).off("resize.datetimepicker"+this.id);if(!this.isInput){$(document).off("mousedown.datetimepicker"+this.id)}},_isInFixed:function(){if(this.$element){var parents=this.$element.parents();var inFixed=false;for(var i=0;i'+"
    "+"
    "}else if(pickTime){return'"}else{return'"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:""+""+'‹'+''+'›'+""+"",contTemplate:''};DPGlobal.template='
    '+''+DPGlobal.headTemplate+""+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    ";var TPGlobal={hourTemplate:'',minuteTemplate:'',secondTemplate:''};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'
    '+'"+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+""+" "+''+" "+(showSeconds?''+"":"")+(is12Hours?''+"":"")+""+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+"
    "+TPGlobal.hourTemplate+":"+TPGlobal.minuteTemplate+":"+TPGlobal.secondTemplate+""+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+(showSeconds?'
    '+''+"
    "+"
    ":"")}})(window.jQuery); \ No newline at end of file diff --git a/airtime_mvc/public/js/libs/jquery-1.10.2.js b/airtime_mvc/public/js/libs/jquery-1.10.2.js new file mode 100644 index 000000000..c5c648255 --- /dev/null +++ b/airtime_mvc/public/js/libs/jquery-1.10.2.js @@ -0,0 +1,9789 @@ +/*! + * jQuery JavaScript Library v1.10.2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03T13:48Z + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<10 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.10.2", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( jQuery.support.ownLast ) { + for ( key in obj ) { + return core_hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations. + // Note: this method belongs to the css module but it's needed here for the support module. + // If support gets modularized, this method should be moved back to the css module. + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +/*! + * Sizzle CSS Selector Engine v1.10.2 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03 + */ +(function( window, undefined ) { + +var i, + support, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rsibling = new RegExp( whitespace + "*[+~]" ), + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent.attachEvent && parent !== parent.top ) { + parent.attachEvent( "onbeforeunload", function() { + setDocument(); + }); + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + div.innerHTML = "
    "; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Support: Opera 10-12/IE8 + // ^= $= *= and empty values + // Should not select anything + // Support: Windows 8 Native Apps + // The type attribute is restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "t", "" ); + + if ( div.querySelectorAll("[t^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val === undefined ? + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null : + val; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] && match[4] !== undefined ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + elem[ name ] === true ? name.toLowerCase() : null; + } + }); +} + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function( support ) { + + var all, a, input, select, fragment, opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = "
    a"; + + // Finish early in limited (non-browser) environments + all = div.getElementsByTagName("*") || []; + a = div.getElementsByTagName("a")[ 0 ]; + if ( !a || !a.style || !all.length ) { + return support; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + support.getSetAttribute = div.className !== "t"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName("tbody").length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName("link").length; + + // Get the style information from getAttribute + // (IE uses .cssText instead) + support.style = /top/.test( a.getAttribute("style") ); + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + support.hrefNormalized = a.getAttribute("href") === "/a"; + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + support.opacity = /^0.5/.test( a.style.opacity ); + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + support.cssFloat = !!a.style.cssFloat; + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + support.checkOn = !!input.value; + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + support.optSelected = opt.selected; + + // Tests for enctype support on a form (#6743) + support.enctype = !!document.createElement("form").enctype; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>"; + + // Will be defined later + support.inlineBlockNeedsLayout = false; + support.shrinkWrapBlocks = false; + support.pixelPosition = false; + support.deleteExpando = true; + support.noCloneEvent = true; + support.reliableMarginRight = true; + support.boxSizingReliable = true; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Support: IE<9 + // Iteration over object's inherited properties before its own. + for ( i in jQuery( support ) ) { + break; + } + support.ownLast = i !== "0"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "
    t
    "; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior. + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + + // Workaround failing boxSizing test due to offsetWidth returning wrong value + // with some non-1 values of body zoom, ticket #13543 + jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { + support.boxSizing = div.offsetWidth === 4; + }); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "
    "; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})({}); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "applet": true, + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + data = null, + i = 0, + elem = this[0]; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( name.indexOf("data-") === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n\f]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // Use proper attribute retrieval(#6932, #12072) + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { + optionSet = true; + } + } + + // force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( jQuery.expr.match.bool.test( name ) ) { + // Set corresponding property to false + if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + elem[ propName ] = false; + // Support: IE<9 + // Also clear defaultChecked/defaultSelected (if appropriate) + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? + ret : + ( elem[ name ] = value ); + + } else { + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? + ret : + elem[ name ]; + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + return tabindex ? + parseInt( tabindex, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + -1; + } + } + } +}); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; + + jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? + function( elem, name, isXML ) { + var fn = jQuery.expr.attrHandle[ name ], + ret = isXML ? + undefined : + /* jshint eqeqeq: false */ + (jQuery.expr.attrHandle[ name ] = undefined) != + getter( elem, name, isXML ) ? + + name.toLowerCase() : + null; + jQuery.expr.attrHandle[ name ] = fn; + return ret; + } : + function( elem, name, isXML ) { + return isXML ? + undefined : + elem[ jQuery.camelCase( "default-" + name ) ] ? + name.toLowerCase() : + null; + }; +}); + +// fix oldIE attroperties +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = { + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = + // Some attributes are constructed with empty-string values when not defined + function( elem, name, isXML ) { + var ret; + return isXML ? + undefined : + (ret = elem.getAttributeNode( name )) && ret.value !== "" ? + ret.value : + null; + }; + jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ret.specified ? + ret.value : + undefined; + }, + set: nodeHook.set + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }; + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }; +} + +jQuery.each([ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +}); + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !jQuery.support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + // Support: Webkit + // "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +var isSimple = /^.[^:#\[\.,]*$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + cur = ret.push( cur ); + break; + } + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( isSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
    ", "
    " ], + area: [ 1, "", "" ], + param: [ 1, "", "" ], + thead: [ 1, "", "
    " ], + tr: [ 2, "", "
    " ], + col: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
    ", "
    " ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var + // Snapshot the DOM in case .domManip sweeps something relevant into its fragment + args = jQuery.map( this, function( elem ) { + return [ elem.nextSibling, elem.parentNode ]; + }), + i = 0; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + var next = args[ i++ ], + parent = args[ i++ ]; + + if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + // Allow new content to include elements from the context set + }, true ); + + // Force removal if there was no new content (e.g., from empty arguments) + return i ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback, allowIntersection ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback, allowIntersection ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery._evalUrl( node.src ); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted from table fragments + if ( !jQuery.support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
    " && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + }, + + _evalUrl: function( url ) { + return jQuery.ajax({ + url: url, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } +}); +jQuery.fn.extend({ + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each(function() { + if ( isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='
    ',m="";if(f||!i)m+=''+g[b]+"";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='"}k||(l+=m+(f||!i||!j?" ":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+=''+c+"";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?" ":"")+m),l+="
    ",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&bd?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.24",window["DP_jQuery_"+dpuuid]=$}(jQuery),function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||" ",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("
    ")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){d.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("
    ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){return b.close(a),!1}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),l=a("").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);a.isFunction(d.beforeclose)&&!a.isFunction(d.beforeClose)&&(d.beforeClose=d.beforeclose),i.find("*").add(i).disableSelection(),d.draggable&&a.fn.draggable&&b._makeDraggable(),d.resizable&&a.fn.resizable&&b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;return a.overlay&&a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&&a.element.attr("title",a.originalTitle),a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1===c._trigger("beforeClose",b))return;return c.overlay&&c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d),c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;return e.modal&&!b||!e.stack&&!e.modal?d._trigger("focus",c):(e.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=e.zIndex),d.overlay&&(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c),d)},open:function(){if(this._isOpen)return;var b=this,c=b.options,d=b.uiDialog;return b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&&d.bind("keydown.ui-dialog",function(b){if(b.keyCode!==a.ui.keyCode.TAB)return;var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&&!b.shiftKey)return d.focus(1),!1;if(b.target===d[0]&&b.shiftKey)return e.focus(1),!1}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open"),b},_createButtons:function(b){var c=this,d=!1,e=a("
    ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),f=a("
    ").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=!0)}),d&&(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(f);a.each(d,function(a,b){if(a==="click")return;a in e?e[a](b):e.attr(a,b)}),a.fn.button&&e.button()}),e.appendTo(c.uiDialog))},_makeDraggable:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(e),b._trigger("dragStop",g,f(h)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing"),d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),e.height=a(this).height(),e.width=a(this).width(),d._trigger("resizeStop",b,h(c)),a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&&"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var c=this,f={},g=!1;a.each(b,function(a,b){c._setOption(a,b),a in d&&(g=!0),a in e&&(f[a]=b)}),g&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":d?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case"draggable":var g=f.is(":data(draggable)");g&&!d&&f.draggable("destroy"),!g&&d&&e._makeDraggable();break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");h&&!d&&f.resizable("destroy"),h&&typeof d=="string"&&f.resizable("option","handles",d),!h&&d!==!1&&e._makeResizable(d);break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||" "))}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth>b.width&&(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c);if(b.height==="auto")if(a.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();var f=this.element.css("height","auto").height();e||this.uiDialog.hide(),this.element.height(Math.max(f,d))}else this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.24",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");return b||(this.uuid+=1,b=this.uuid),"ui-dialog-title-"+b},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){this.instances.length===0&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return a.fn.bgiframe&&c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&&this.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&&a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;return a.browser.msie&&a.browser.version<7?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),a.curCSS||(a.curCSS=a.css),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()}(jQuery),function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("
    ").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.24"})}(jQuery),function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("
    ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;ic&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c1){this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.24"})}(jQuery),function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
    ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
  • #{label}
  • "},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.24"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a Date: Mon, 12 Aug 2013 15:06:26 -0400 Subject: [PATCH 045/181] subclassing the template types, files summary table is now fully configurable form wise. --- .../controllers/PlayouthistoryController.php | 12 +- airtime_mvc/application/forms/EditHistory.php | 211 +++++++++++++++++ .../application/forms/EditHistoryFile.php | 89 +------- .../application/forms/EditHistoryItem.php | 212 +----------------- .../application/services/HistoryService.php | 97 +++++--- .../scripts/form/edit-history-file.phtml | 40 +++- .../js/airtime/playouthistory/historytable.js | 8 +- 7 files changed, 345 insertions(+), 324 deletions(-) create mode 100644 airtime_mvc/application/forms/EditHistory.php diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index f9435e740..aa3e3c38e 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -6,14 +6,14 @@ class PlayouthistoryController extends Zend_Controller_Action { $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext - ->addActionContext('aggregate-history-feed', 'json') + ->addActionContext('file-history-feed', 'json') ->addActionContext('item-history-feed', 'json') - ->addActionContext('edit-aggregate-item', 'json') + ->addActionContext('edit-file-item', 'json') ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') ->addActionContext('delete-list-item', 'json') ->addActionContext('update-list-item', 'json') - ->addActionContext('update-aggregate-item', 'json') + ->addActionContext('update-file-item', 'json') ->addActionContext('create-template', 'json') ->addActionContext('update-template', 'json') ->addActionContext('delete-template', 'json') @@ -79,7 +79,7 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendScript($script); } - public function aggregateHistoryFeedAction() + public function fileHistoryFeedAction() { try { $request = $this->getRequest(); @@ -136,7 +136,7 @@ class PlayouthistoryController extends Zend_Controller_Action } } - public function editAggregateItemAction() + public function editFileItemAction() { $file_id = $this->_getParam('id'); @@ -209,7 +209,7 @@ class PlayouthistoryController extends Zend_Controller_Action } } - public function updateAggregateItemAction() + public function updateFileItemAction() { $request = $this->getRequest(); $params = $request->getPost(); diff --git a/airtime_mvc/application/forms/EditHistory.php b/airtime_mvc/application/forms/EditHistory.php new file mode 100644 index 000000000..5c61a1125 --- /dev/null +++ b/airtime_mvc/application/forms/EditHistory.php @@ -0,0 +1,211 @@ + array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => self::TEXT_INPUT_CLASS + ), + "validators" => array( + array( + "class" => "Zend_Validate_Date", + "params" => array( + "format" => self::VALIDATE_DATE_FORMAT + ) + ) + ), + "filters" => array( + "StringTrim" + ) + ), + TEMPLATE_TIME => array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => self::TEXT_INPUT_CLASS + ), + "validators" => array( + array( + "class" => "Zend_Validate_Date", + "params" => array( + "format" => self::VALIDATE_TIME_FORMAT + ) + ) + ), + "filters" => array( + "StringTrim" + ) + ), + TEMPLATE_DATETIME => array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => self::TEXT_INPUT_CLASS + ), + "validators" => array( + array( + "class" => "Zend_Validate_Date", + "params" => array( + "format" => self::VALIDATE_DATETIME_FORMAT + ) + ) + ), + "filters" => array( + "StringTrim" + ) + ), + TEMPLATE_STRING => array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => self::TEXT_INPUT_CLASS + ), + "filters" => array( + "StringTrim" + ) + ), + TEMPLATE_BOOLEAN => array( + "class" => "Zend_Form_Element_Checkbox", + "validators" => array( + array( + "class" => "Zend_Validate_InArray", + "options" => array( + "haystack" => array(0,1) + ) + ) + ) + ), + TEMPLATE_INT => array( + "class" => "Zend_Form_Element_Text", + "validators" => array( + array( + "class" => "Zend_Validate_Int", + ) + ), + "attrs" => array( + "class" => self::TEXT_INPUT_CLASS + ) + ), + TEMPLATE_FLOAT => array( + "class" => "Zend_Form_Element_Text", + "attrs" => array( + "class" => self::TEXT_INPUT_CLASS + ), + "validators" => array( + array( + "class" => "Zend_Validate_Float", + ) + ) + ), + ); + + public function init() { + + $history_id = new Zend_Form_Element_Hidden($this::ID_PREFIX.'id'); + $history_id->setValidators(array( + new Zend_Validate_Int() + )); + $history_id->setDecorators(array('ViewHelper')); + $this->addElement($history_id); + + $dynamic_attrs = new Zend_Form_SubForm(); + $this->addSubForm($dynamic_attrs, $this::ID_PREFIX.'template'); + + // Add the submit button + $this->addElement('button', $this::ID_PREFIX.'save', array( + 'ignore' => true, + 'class' => 'btn '.$this::ID_PREFIX.'save', + 'label' => _('Save'), + 'decorators' => array( + 'ViewHelper' + ) + )); + + // Add the cancel button + $this->addElement('button', $this::ID_PREFIX.'cancel', array( + 'ignore' => true, + 'class' => 'btn '.$this::ID_PREFIX.'cancel', + 'label' => _('Cancel'), + 'decorators' => array( + 'ViewHelper' + ) + )); + } + + public function createFromTemplate($template, $required) { + + $templateSubForm = $this->getSubForm($this::ID_PREFIX.'template'); + + for ($i = 0, $len = count($template); $i < $len; $i++) { + + $item = $template[$i]; + //don't dynamically add this as it should be included in the + //init() function already if it should show up in the UI.. + if (in_array($item["name"], $required)) { + continue; + } + + $formElType = $this->formElTypes[$item[self::ITEM_TYPE]]; + + $label = $item[self::ITEM_ID_SUFFIX]; + $id = $this::ID_PREFIX.$label; + $el = new $formElType[self::ITEM_CLASS]($id); + $el->setLabel($item["label"]); + + if (isset($formElType["attrs"])) { + + $attrs = $formElType["attrs"]; + + foreach ($attrs as $key => $value) { + $el->setAttrib($key, $value); + } + } + + if (isset($formElType["filters"])) { + + $filters = $formElType["filters"]; + + foreach ($filters as $filter) { + $el->addFilter($filter); + } + } + + if (isset($formElType["validators"])) { + + $validators = $formElType["validators"]; + + foreach ($validators as $index => $arr) { + $options = isset($arr[self::ITEM_OPTIONS]) ? $arr[self::ITEM_OPTIONS] : null; + $validator = new $arr[self::ITEM_CLASS]($options); + + //extra validator info + if (isset($arr["params"])) { + + foreach ($arr["params"] as $key => $value) { + $method = "set".ucfirst($key); + $validator->$method($value); + } + } + + $el->addValidator($validator); + } + } + + $el->setDecorators(array('ViewHelper')); + $templateSubForm->addElement($el); + } + } +} \ No newline at end of file diff --git a/airtime_mvc/application/forms/EditHistoryFile.php b/airtime_mvc/application/forms/EditHistoryFile.php index 315033174..22bf1f24d 100644 --- a/airtime_mvc/application/forms/EditHistoryFile.php +++ b/airtime_mvc/application/forms/EditHistoryFile.php @@ -1,91 +1,22 @@ setDecorators( array( array('ViewScript', array('viewScript' => 'form/edit-history-file.phtml')) ) ); - */ - - $this->setMethod('post'); - - - $file_id = new Zend_Form_Element_Hidden('his_file_id'); - $file_id->setValidators(array( - new Zend_Validate_Int() - )); - $this->addElement($file_id); - - - /* Title form element */ - $title = new Zend_Form_Element_Text('his_file_title'); - $title->setLabel(_('Title:')); - $title->setAttrib('class', 'input_text'); - $title->addFilter('StringTrim'); - //$title->setDecorators(array('viewHelper')); - $this->addElement($title); - - /* Creator form element */ - $creator = new Zend_Form_Element_Text('his_file_creator'); - $creator->setLabel(_('Creator:')); - $creator->setAttrib('class', 'input_text'); - $creator->addFilter('StringTrim'); - //$creator->setDecorators(array('viewHelper')); - $this->addElement($creator); - - /* Composer form element */ - $composer = new Zend_Form_Element_Text('his_file_composer'); - $composer->setLabel(_('Composer:')); - $composer->setAttrib('class', 'input_text'); - $composer->addFilter('StringTrim'); - //$composer->setDecorators(array('viewHelper')); - $this->addElement($composer); - - /* Copyright form element */ - $copyright = new Zend_Form_Element_Text('his_file_copyright'); - $copyright->setLabel(_('Copyright:')); - $copyright->setAttrib('class', 'input_text'); - $copyright->addFilter('StringTrim'); - //$copyright->setDecorators(array('viewHelper')); - $this->addElement($copyright); - - // Add the submit button - $this->addElement('button', 'his_file_save', array( - 'ignore' => true, - 'class' => 'btn his_file_save', - 'label' => _('Save'), - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add the cancel button - $this->addElement('button', 'his_file_cancel', array( - 'ignore' => true, - 'class' => 'btn his_file_cancel', - 'label' => _('Cancel'), - 'decorators' => array( - 'ViewHelper' - ) - )); - - $this->addDisplayGroup( - array( - 'his_file_save', - 'his_file_cancel' - ), - 'submitButtons', - array( - 'decorators' => array( - 'FormElements', - 'DtDdWrapper' - ) - ) - ); + } + + public function createFromTemplate($template, $required) { + + parent::createFromTemplate($template, $required); } } \ No newline at end of file diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php index b8ac03257..f0389eb8a 100644 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -1,133 +1,18 @@ array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "validators" => array( - array( - "class" => "Zend_Validate_Date", - "params" => array( - "format" => self::VALIDATE_DATE_FORMAT - ) - ) - ), - "filters" => array( - "StringTrim" - ) - ), - TEMPLATE_TIME => array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "validators" => array( - array( - "class" => "Zend_Validate_Date", - "params" => array( - "format" => self::VALIDATE_TIME_FORMAT - ) - ) - ), - "filters" => array( - "StringTrim" - ) - ), - TEMPLATE_DATETIME => array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "validators" => array( - array( - "class" => "Zend_Validate_Date", - "params" => array( - "format" => self::VALIDATE_DATETIME_FORMAT - ) - ) - ), - "filters" => array( - "StringTrim" - ) - ), - TEMPLATE_STRING => array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "filters" => array( - "StringTrim" - ) - ), - TEMPLATE_BOOLEAN => array( - "class" => "Zend_Form_Element_Checkbox", - "validators" => array( - array( - "class" => "Zend_Validate_InArray", - "options" => array( - "haystack" => array(0,1) - ) - ) - ) - ), - TEMPLATE_INT => array( - "class" => "Zend_Form_Element_Text", - "validators" => array( - array( - "class" => "Zend_Validate_Int", - ) - ), - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ) - ), - TEMPLATE_FLOAT => array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "validators" => array( - array( - "class" => "Zend_Validate_Float", - ) - ) - ), - ); - public function init() { + + parent::init(); $this->setDecorators(array( 'PrepareElements', array('ViewScript', array('viewScript' => 'form/edit-history-item.phtml')) )); - $history_id = new Zend_Form_Element_Hidden(self::ID_PREFIX.'id'); - $history_id->setValidators(array( - new Zend_Validate_Int() - )); - $history_id->setDecorators(array('ViewHelper')); - $this->addElement($history_id); - $starts = new Zend_Form_Element_Text(self::ID_PREFIX.'starts'); $starts->setValidators(array( new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT) @@ -151,95 +36,10 @@ class Application_Form_EditHistoryItem extends Zend_Form $ends->setDecorators(array('ViewHelper')); $ends->setRequired(true); $this->addElement($ends); - - $dynamic_attrs = new Zend_Form_SubForm(); - $this->addSubForm($dynamic_attrs, self::ID_PREFIX.'template'); - - // Add the submit button - $this->addElement('button', 'his_item_save', array( - 'ignore' => true, - 'class' => 'btn his_item_save', - 'label' => _('Save'), - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add the cancel button - $this->addElement('button', 'his_item_cancel', array( - 'ignore' => true, - 'class' => 'btn his_item_cancel', - 'label' => _('Cancel'), - 'decorators' => array( - 'ViewHelper' - ) - )); - } - - public function createFromTemplate($template, $required) { - - $templateSubForm = $this->getSubForm(self::ID_PREFIX.'template'); - - for ($i = 0, $len = count($template); $i < $len; $i++) { - - $item = $template[$i]; - //don't dynamically add this as it should be included in the init() function already. - if (in_array($item["name"], $required)) { - continue; - } - - $formElType = $this->formElTypes[$item[self::ITEM_TYPE]]; - - $label = $item[self::ITEM_ID_SUFFIX]; - $id = self::ID_PREFIX.$label; - $el = new $formElType[self::ITEM_CLASS]($id); - $el->setLabel($item["label"]); - - if (isset($formElType["attrs"])) { - - $attrs = $formElType["attrs"]; - - foreach ($attrs as $key => $value) { - $el->setAttrib($key, $value); - } - } - - if (isset($formElType["filters"])) { - - $filters = $formElType["filters"]; - - foreach ($filters as $filter) { - $el->addFilter($filter); - } - } - - if (isset($formElType["validators"])) { - - $validators = $formElType["validators"]; - - foreach ($validators as $index => $arr) { - $options = isset($arr[self::ITEM_OPTIONS]) ? $arr[self::ITEM_OPTIONS] : null; - $validator = new $arr[self::ITEM_CLASS]($options); - - //extra validator info - if (isset($arr["params"])) { - - foreach ($arr["params"] as $key => $value) { - $method = "set".ucfirst($key); - $validator->$method($value); - } - } - - $el->addValidator($validator); - } - } - - $el->setDecorators(array('ViewHelper')); - $templateSubForm->addElement($el); - } } - public function fillFields() { - + public function createFromTemplate($template, $required) { + + parent::createFromTemplate($template, $required); } } \ No newline at end of file diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index a4e34e6c8..6ddd136f6 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -517,17 +517,30 @@ class Application_Service_HistoryService try { $form = new Application_Form_EditHistoryFile(); + $template = $this->getConfiguredFileTemplate(); + $required = $this->mandatoryFileFields(); + $form->createFromTemplate($template["fields"], $required); $file = Application_Model_StoredFile::RecallById($id, $this->con); $md = $file->getDbColMetadata(); - - $form->populate(array( - 'his_file_id' => $id, - 'his_file_title' => $md[MDATA_KEY_TITLE], - 'his_file_creator' => $md[MDATA_KEY_CREATOR], - 'his_file_composer' => $md[MDATA_KEY_COMPOSER], - 'his_file_copyright' => $md[MDATA_KEY_COPYRIGHT] - )); + + $prefix = Application_Form_EditHistoryFile::ID_PREFIX; + $formValues = array(); + $formValues["{$prefix}id"] = $id; + + foreach($template["fields"] as $index => $field) { + + $key = $field["name"]; + + if (in_array($key, $required)) { + continue; + } + + $value = $md[$key]; + $formValues["$prefix{$key}"] = $value; + } + + $form->populate($formValues); return $form; } @@ -536,6 +549,35 @@ class Application_Service_HistoryService throw $e; } } + + public function populateTemplateFile($values, $id) { + + $this->con->beginTransaction(); + + try { + + $file = Application_Model_StoredFile::RecallById($id, $this->con); + + $prefix = Application_Form_EditHistoryFile::ID_PREFIX; + $prefix_len = strlen($prefix); + $templateValues = $values[$prefix."template"]; + + $md = array(); + + foreach ($templateValues as $index => $value) { + + $key = substr($index, $prefix_len); + $md[$key] = $value; + } + + $file->setDbColMetadata($md); + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + throw $e; + } + } public function populateTemplateItem($values, $id=null) { @@ -627,7 +669,6 @@ class Application_Service_HistoryService $this->con->rollback(); throw $e; } - } public function createPlayedItem($data) { @@ -702,28 +743,32 @@ class Application_Service_HistoryService /* id is an id in cc_files */ public function editPlayedFile($data) { - $this->con->beginTransaction(); - try { - $form = new Application_Form_EditHistoryFile(); + $id = $data["his_file_id"]; + $form = $form = $this->makeHistoryFileForm($id); + $history_id = $form->getElement("his_file_id"); + $history_id->setRequired(true); - $json = $form->processAjax($data); - Logging::info($json); + Logging::info($data); + $json = array(); if ($form->isValid($data)) { + $history_id->setIgnore(true); + $values = $form->getValues(); - $id = $data["his_file_id"]; - $file = Application_Model_StoredFile::RecallById($id, $this->con); - - $md = array( - MDATA_KEY_TITLE => $data['his_file_title'], - MDATA_KEY_CREATOR => $data['his_file_creator'], - MDATA_KEY_COMPOSER => $data['his_file_composer'], - MDATA_KEY_COPYRIGHT => $data['his_file_copyright'] - ); - - $file->setDbColMetadata($md); + Logging::info("edited list item"); + Logging::info($values); + + $this->populateTemplateFile($values, $id); } + else { + $msgs = $form->getMessages(); + Logging::info($msgs); + + $json["error"] = $msgs; + } + + return $json; $this->con->commit(); } @@ -819,7 +864,7 @@ class Application_Service_HistoryService public function mandatoryFileFields() { - $fields = array("played", MDATA_KEY_TITLE, MDATA_KEY_CREATOR); + $fields = array("played"); return $fields; } diff --git a/airtime_mvc/application/views/scripts/form/edit-history-file.phtml b/airtime_mvc/application/views/scripts/form/edit-history-file.phtml index 886790693..83272200c 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-file.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-file.phtml @@ -1,3 +1,37 @@ -
    - form; ?> -
    \ No newline at end of file +
    +element ?> + +
    + + +
    + getElement($name); ?> +
    + +getSubForm('his_file_template') as $index=>$el): ?> + getName(); ?> + +
    + +
    +
    + + hasErrors()): ?> +
      + getMessages() as $error): ?> +
    • + +
    + +
    + + +
    + +getElement($name); ?> + +
    + +
    + + \ No newline at end of file diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 0f35a7005..c3bcce898 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -99,7 +99,7 @@ var AIRTIME = (function(AIRTIME) { fnRowCallback; fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { - var editUrl = baseUrl+"Playouthistory/edit-aggregate-item/format/json/id/"+aData.file_id; + var editUrl = baseUrl+"Playouthistory/edit-file-item/format/json/id/"+aData.file_id; nRow.setAttribute('url-edit', editUrl); }; @@ -112,7 +112,7 @@ var AIRTIME = (function(AIRTIME) { "bProcessing": true, "bServerSide": true, - "sAjaxSource": baseUrl+"playouthistory/aggregate-history-feed", + "sAjaxSource": baseUrl+"playouthistory/file-history-feed", "sAjaxDataProp": "history", "fnServerData": fnServerData, "fnRowCallback": fnRowCallback, @@ -346,12 +346,12 @@ var AIRTIME = (function(AIRTIME) { var $form = $(this).parents("form"); var data = $form.serializeArray(); - var url = baseUrl+"Playouthistory/update-aggregate-item/format/json"; + var url = baseUrl+"Playouthistory/update-file-item/format/json"; $.post(url, data, function(json) { //TODO put errors on form. - if (json.data !== "true") { + if (json.error !== undefined) { //makeHistoryDialog(json.dialog); } else { From b65007868a9dff70a5bc264f386e5ccad1304f7e Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 12 Aug 2013 15:08:09 -0400 Subject: [PATCH 046/181] crlf fix --- airtime_mvc/application/forms/EditHistory.php | 54 +++++++++---------- .../application/forms/EditHistoryFile.php | 6 +-- .../application/services/HistoryService.php | 40 +++++++------- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/airtime_mvc/application/forms/EditHistory.php b/airtime_mvc/application/forms/EditHistory.php index 5c61a1125..ad7ae7a05 100644 --- a/airtime_mvc/application/forms/EditHistory.php +++ b/airtime_mvc/application/forms/EditHistory.php @@ -113,35 +113,35 @@ class Application_Form_EditHistory extends Zend_Form ); public function init() { - - $history_id = new Zend_Form_Element_Hidden($this::ID_PREFIX.'id'); - $history_id->setValidators(array( - new Zend_Validate_Int() - )); - $history_id->setDecorators(array('ViewHelper')); + + $history_id = new Zend_Form_Element_Hidden($this::ID_PREFIX.'id'); + $history_id->setValidators(array( + new Zend_Validate_Int() + )); + $history_id->setDecorators(array('ViewHelper')); $this->addElement($history_id); - $dynamic_attrs = new Zend_Form_SubForm(); - $this->addSubForm($dynamic_attrs, $this::ID_PREFIX.'template'); - - // Add the submit button - $this->addElement('button', $this::ID_PREFIX.'save', array( - 'ignore' => true, - 'class' => 'btn '.$this::ID_PREFIX.'save', - 'label' => _('Save'), - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add the cancel button - $this->addElement('button', $this::ID_PREFIX.'cancel', array( - 'ignore' => true, - 'class' => 'btn '.$this::ID_PREFIX.'cancel', - 'label' => _('Cancel'), - 'decorators' => array( - 'ViewHelper' - ) + $dynamic_attrs = new Zend_Form_SubForm(); + $this->addSubForm($dynamic_attrs, $this::ID_PREFIX.'template'); + + // Add the submit button + $this->addElement('button', $this::ID_PREFIX.'save', array( + 'ignore' => true, + 'class' => 'btn '.$this::ID_PREFIX.'save', + 'label' => _('Save'), + 'decorators' => array( + 'ViewHelper' + ) + )); + + // Add the cancel button + $this->addElement('button', $this::ID_PREFIX.'cancel', array( + 'ignore' => true, + 'class' => 'btn '.$this::ID_PREFIX.'cancel', + 'label' => _('Cancel'), + 'decorators' => array( + 'ViewHelper' + ) )); } diff --git a/airtime_mvc/application/forms/EditHistoryFile.php b/airtime_mvc/application/forms/EditHistoryFile.php index 22bf1f24d..b58db19a1 100644 --- a/airtime_mvc/application/forms/EditHistoryFile.php +++ b/airtime_mvc/application/forms/EditHistoryFile.php @@ -15,8 +15,8 @@ class Application_Form_EditHistoryFile extends Application_Form_EditHistory ); } - public function createFromTemplate($template, $required) { - - parent::createFromTemplate($template, $required); + public function createFromTemplate($template, $required) { + + parent::createFromTemplate($template, $required); } } \ No newline at end of file diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 6ddd136f6..099f3c903 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -525,22 +525,22 @@ class Application_Service_HistoryService $md = $file->getDbColMetadata(); $prefix = Application_Form_EditHistoryFile::ID_PREFIX; - $formValues = array(); - $formValues["{$prefix}id"] = $id; - - foreach($template["fields"] as $index => $field) { - + $formValues = array(); + $formValues["{$prefix}id"] = $id; + + foreach($template["fields"] as $index => $field) { + $key = $field["name"]; if (in_array($key, $required)) { continue; } - - $value = $md[$key]; - $formValues["$prefix{$key}"] = $value; - } - - $form->populate($formValues); + + $value = $md[$key]; + $formValues["$prefix{$key}"] = $value; + } + + $form->populate($formValues); return $form; } @@ -563,7 +563,7 @@ class Application_Service_HistoryService $templateValues = $values[$prefix."template"]; $md = array(); - + foreach ($templateValues as $index => $value) { $key = substr($index, $prefix_len); @@ -746,25 +746,25 @@ class Application_Service_HistoryService try { $id = $data["his_file_id"]; $form = $form = $this->makeHistoryFileForm($id); - $history_id = $form->getElement("his_file_id"); + $history_id = $form->getElement("his_file_id"); $history_id->setRequired(true); Logging::info($data); $json = array(); if ($form->isValid($data)) { - $history_id->setIgnore(true); + $history_id->setIgnore(true); $values = $form->getValues(); - Logging::info("edited list item"); - Logging::info($values); - + Logging::info("edited list item"); + Logging::info($values); + $this->populateTemplateFile($values, $id); } else { - $msgs = $form->getMessages(); - Logging::info($msgs); - + $msgs = $form->getMessages(); + Logging::info($msgs); + $json["error"] = $msgs; } From 6501d563be68d91b793932bac0ef5d88e0cad490 Mon Sep 17 00:00:00 2001 From: denise Date: Mon, 12 Aug 2013 16:01:55 -0400 Subject: [PATCH 047/181] CC-5276: Adding watched folder throws exception sometimes Fixed by only converting length format if it is not already in the correct format --- .../media-monitor2/media/monitor/pure.py | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/pure.py b/python_apps/media-monitor2/media/monitor/pure.py index 7b505ef6c..3e0f3069d 100644 --- a/python_apps/media-monitor2/media/monitor/pure.py +++ b/python_apps/media-monitor2/media/monitor/pure.py @@ -474,20 +474,28 @@ def truncate_to_value(item, value): return str(item) def format_length(mutagen_length): - """ Convert mutagen length to airtime length """ - t = float(mutagen_length) - h = int(math.floor(t / 3600)) - t = t % 3600 - m = int(math.floor(t / 60)) - s = t % 60 - # will be ss.uuu - s = str('{0:f}'.format(s)) - seconds = s.split(".") - s = seconds[0] - # have a maximum of 6 subseconds. - if len(seconds[1]) >= 6: ss = seconds[1][0:6] - else: ss = seconds[1][0:] - return "%s:%s:%s.%s" % (h, m, s, ss) + if convert_format(mutagen_length): + """ Convert mutagen length to airtime length """ + t = float(mutagen_length) + h = int(math.floor(t / 3600)) + t = t % 3600 + m = int(math.floor(t / 60)) + s = t % 60 + # will be ss.uuu + s = str('{0:f}'.format(s)) + seconds = s.split(".") + s = seconds[0] + # have a maximum of 6 subseconds. + if len(seconds[1]) >= 6: ss = seconds[1][0:6] + else: ss = seconds[1][0:] + return "%s:%s:%s.%s" % (h, m, s, ss) + +def convert_format(value): + regCompiled = re.compile("^[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\.\d+)?$") + if re.search(regCompiled, str(value)) is None: + return True + else: + return False if __name__ == '__main__': import doctest From 9cbdd06af24c6224fa55f113cb245cb393f1a54b Mon Sep 17 00:00:00 2001 From: denise Date: Mon, 12 Aug 2013 16:05:44 -0400 Subject: [PATCH 048/181] Removed ugly comment --- python_apps/media-monitor2/media/monitor/metadata.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python_apps/media-monitor2/media/monitor/metadata.py b/python_apps/media-monitor2/media/monitor/metadata.py index bf5eb7333..de70b0a99 100644 --- a/python_apps/media-monitor2/media/monitor/metadata.py +++ b/python_apps/media-monitor2/media/monitor/metadata.py @@ -93,7 +93,6 @@ class Metadata(Loggable): # little bit messy. Some of the handling is in m.m.pure while the rest is # here. Also interface is not very consistent - # TODO : what is this shit? maybe get rid of it? @staticmethod def fix_title(path): # If we have no title in path we will format it From fdf18ec3cef6c344d47c5ae2cbc1478612c0dec5 Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 12 Aug 2013 18:18:33 -0400 Subject: [PATCH 049/181] upgrading table tools to version 2.1.5 --- .../controllers/PlayouthistoryController.php | 6 +- .../application/services/HistoryService.php | 9 + .../js/airtime/playouthistory/historytable.js | 2 +- .../TableTools-2.1.5/as3/ZeroClipboard.as | 221 +++ .../TableTools-2.1.5/as3/ZeroClipboardPdf.as | 310 ++++ .../TableTools-2.1.5/as3/lib/AlivePDF.swc | Bin 0 -> 131230 bytes .../TableTools-2.1.5/css/TableTools.css | 321 ++++ .../TableTools-2.1.5/css/TableTools_JUI.css | 185 ++ .../TableTools-2.1.5/images/background.png | Bin 0 -> 944 bytes .../TableTools-2.1.5/images/collection.png | Bin 0 -> 1166 bytes .../images/collection_hover.png | Bin 0 -> 1194 bytes .../plugin/TableTools-2.1.5/images/copy.png | Bin 0 -> 2184 bytes .../TableTools-2.1.5/images/copy_hover.png | Bin 0 -> 2797 bytes .../plugin/TableTools-2.1.5/images/csv.png | Bin 0 -> 1607 bytes .../TableTools-2.1.5/images/csv_hover.png | Bin 0 -> 1854 bytes .../plugin/TableTools-2.1.5/images/pdf.png | Bin 0 -> 4325 bytes .../TableTools-2.1.5/images/pdf_hover.png | Bin 0 -> 2786 bytes .../plugin/TableTools-2.1.5/images/print.png | Bin 0 -> 2123 bytes .../TableTools-2.1.5/images/print_hover.png | Bin 0 -> 2230 bytes .../images/psd/collection.psd | Bin 0 -> 25792 bytes .../images/psd/copy document.psd | Bin 0 -> 104729 bytes .../images/psd/file_types.psd | Bin 0 -> 1090645 bytes .../TableTools-2.1.5/images/psd/printer.psd | Bin 0 -> 119952 bytes .../plugin/TableTools-2.1.5/images/xls.png | Bin 0 -> 1641 bytes .../TableTools-2.1.5/images/xls_hover.png | Bin 0 -> 2061 bytes .../js/TableTools.js} | 1511 ++++++++--------- .../TableTools-2.1.5/js/TableTools.min.js | 77 + .../TableTools-2.1.5/js/TableTools.min.js.gz | Bin 0 -> 8785 bytes .../js/ZeroClipboard.js} | 42 +- .../TableTools-2.1.5/swf/copy_csv_xls.swf | Bin 0 -> 2165 bytes .../TableTools-2.1.5/swf/copy_csv_xls_pdf.swf | Bin 0 -> 58824 bytes 31 files changed, 1857 insertions(+), 827 deletions(-) create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboard.as create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboardPdf.as create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/lib/AlivePDF.swc create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/css/TableTools.css create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/css/TableTools_JUI.css create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/background.png create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/collection.png create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/collection_hover.png create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/copy.png create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/copy_hover.png create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv.png create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv_hover.png create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/pdf.png create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/pdf_hover.png create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/print.png create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/print_hover.png create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/collection.psd create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/copy document.psd create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/file_types.psd create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/printer.psd create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls.png create mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls_hover.png rename airtime_mvc/public/js/datatables/plugin/{dataTables.TableTools.js => TableTools-2.1.5/js/TableTools.js} (66%) mode change 100644 => 100755 create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js.gz rename airtime_mvc/public/js/datatables/plugin/{dataTables.ZeroClipboard.js => TableTools-2.1.5/js/ZeroClipboard.js} (86%) mode change 100644 => 100755 create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls.swf create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls_pdf.swf diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index aa3e3c38e..5aa78faa9 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -53,8 +53,8 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $offset = date("Z") * -1; @@ -64,7 +64,7 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/historytable.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools/css/TableTools.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools-2.1.5/css/TableTools.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/bootstrap-datetimepicker.min.css?'.$CC_CONFIG['airtime_version']); diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 099f3c903..db6f8cbb3 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -264,6 +264,15 @@ class Application_Service_HistoryService $dateTime = new DateTime($result["ends"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); $result["ends"] = $dateTime->format("Y-m-d H:i:s"); + + if (isset($result[MDATA_KEY_DURATION])) { + $formatter = new LengthFormatter($result[MDATA_KEY_DURATION]); + $result[MDATA_KEY_DURATION] = $formatter->format(); + } + + //$unicodeChar = '\u2612'; + //$result["new"] = json_decode('"'.$unicodeChar.'"'); + //$result["new"] = "U+2612"; } return array( diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index c3bcce898..5719d7d61 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -9,7 +9,7 @@ var AIRTIME = (function(AIRTIME) { var $historyContentDiv; var oTableTools = { - "sSwfPath": baseUrl+"js/datatables/plugin/TableTools/swf/copy_cvs_xls_pdf.swf", + "sSwfPath": baseUrl+"js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls_pdf.swf", "aButtons": [ { "sExtends": "copy", diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboard.as b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboard.as new file mode 100755 index 000000000..d6b9c072d --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboard.as @@ -0,0 +1,221 @@ +/* Compile using: mxmlc --target-player=10.0.0 ZeroClipboard.as */ +package { + import flash.display.Stage; + import flash.display.Sprite; + import flash.display.LoaderInfo; + import flash.display.StageScaleMode; + import flash.events.*; + import flash.display.StageAlign; + import flash.display.StageScaleMode; + import flash.external.ExternalInterface; + import flash.system.Security; + import flash.utils.*; + import flash.system.System; + import flash.net.FileReference; + import flash.net.FileFilter; + + public class ZeroClipboard extends Sprite { + + private var domId:String = ''; + private var button:Sprite; + private var clipText:String = 'blank'; + private var fileName:String = ''; + private var action:String = 'copy'; + private var incBom:Boolean = true; + private var charSet:String = 'utf8'; + + + public function ZeroClipboard() { + // constructor, setup event listeners and external interfaces + stage.scaleMode = StageScaleMode.EXACT_FIT; + flash.system.Security.allowDomain("*"); + + // import flashvars + var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters; + domId = flashvars.id.split("\\").join("\\\\"); + + // invisible button covers entire stage + button = new Sprite(); + button.buttonMode = true; + button.useHandCursor = true; + button.graphics.beginFill(0x00FF00); + button.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight); + button.alpha = 0.0; + addChild(button); + + button.addEventListener(MouseEvent.CLICK, clickHandler); + button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOver', null ); + } ); + button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOut', null ); + } ); + button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseDown', null ); + } ); + button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseUp', null ); + } ); + + // External functions - readd whenever the stage is made active for IE + addCallbacks(); + stage.addEventListener(Event.ACTIVATE, addCallbacks); + + // signal to the browser that we are ready + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'load', null ); + } + + public function addCallbacks (evt:Event = null):void { + ExternalInterface.addCallback("setHandCursor", setHandCursor); + ExternalInterface.addCallback("clearText", clearText); + ExternalInterface.addCallback("setText", setText); + ExternalInterface.addCallback("appendText", appendText); + ExternalInterface.addCallback("setFileName", setFileName); + ExternalInterface.addCallback("setAction", setAction); + ExternalInterface.addCallback("setCharSet", setCharSet); + ExternalInterface.addCallback("setBomInc", setBomInc); + } + + + public function setCharSet(newCharSet:String):void { + if ( newCharSet == 'UTF16LE' ) { + charSet = newCharSet; + } else { + charSet = 'UTF8'; + } + } + + public function setBomInc(newBomInc:Boolean):void { + incBom = newBomInc; + } + + public function clearText():void { + clipText = ''; + } + + public function appendText(newText:String):void { + clipText += newText; + } + + public function setText(newText:String):void { + clipText = newText; + } + + public function setFileName(newFileName:String):void { + fileName = newFileName; + } + + public function setAction(newAction:String):void { + action = newAction; + } + + public function setHandCursor(enabled:Boolean):void { + // control whether the hand cursor is shown on rollover (true) + // or the default arrow cursor (false) + button.useHandCursor = enabled; + } + + + private function clickHandler(event:Event):void { + var fileRef:FileReference = new FileReference(); + fileRef.addEventListener(Event.COMPLETE, saveComplete); + + if ( action == "save" ) { + /* Save as a file */ + if ( charSet == 'UTF16LE' ) { + fileRef.save( strToUTF16LE(clipText), fileName ); + } else { + fileRef.save( strToUTF8(clipText), fileName ); + } + } else if ( action == "pdf" ) { + fileRef.save( "This instance of ZeroClipboard is not configured for PDF export. "+ + "Please use the PDF export version.", fileName+".txt" ); + } else { + /* Copy the text to the clipboard. Note charset and BOM have no effect here */ + System.setClipboard( clipText ); + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText ); + } + } + + + private function saveComplete(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText ); + } + + + private function getProp( prop:String, opts:Array ):String + { + var i:int, iLen:int; + for ( i=0, iLen=opts.length ; i> 8 ); + } + + i++; + } + + return utf16; + } + } +} diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboardPdf.as b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboardPdf.as new file mode 100755 index 000000000..158d5f188 --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboardPdf.as @@ -0,0 +1,310 @@ +/* Compile using: mxmlc --target-player=10.0.0 -static-link-runtime-shared-libraries=true -library-path+=lib ZeroClipboardPdf.as */ +package { + import flash.display.Stage; + import flash.display.Sprite; + import flash.display.LoaderInfo; + import flash.display.StageScaleMode; + import flash.events.*; + import flash.display.StageAlign; + import flash.display.StageScaleMode; + import flash.external.ExternalInterface; + import flash.system.Security; + import flash.utils.*; + import flash.system.System; + import flash.net.FileReference; + import flash.net.FileFilter; + + /* PDF imports */ + import org.alivepdf.pdf.PDF; + import org.alivepdf.data.Grid; + import org.alivepdf.data.GridColumn; + import org.alivepdf.layout.Orientation; + import org.alivepdf.layout.Size; + import org.alivepdf.layout.Unit; + import org.alivepdf.display.Display; + import org.alivepdf.saving.Method; + import org.alivepdf.fonts.FontFamily; + import org.alivepdf.fonts.Style; + import org.alivepdf.fonts.CoreFont; + import org.alivepdf.colors.RGBColor; + + public class ZeroClipboard extends Sprite { + + private var domId:String = ''; + private var button:Sprite; + private var clipText:String = 'blank'; + private var fileName:String = ''; + private var action:String = 'copy'; + private var incBom:Boolean = true; + private var charSet:String = 'utf8'; + + + public function ZeroClipboard() { + // constructor, setup event listeners and external interfaces + stage.scaleMode = StageScaleMode.EXACT_FIT; + flash.system.Security.allowDomain("*"); + + // import flashvars + var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters; + domId = flashvars.id.split("\\").join("\\\\"); + + // invisible button covers entire stage + button = new Sprite(); + button.buttonMode = true; + button.useHandCursor = true; + button.graphics.beginFill(0x00FF00); + button.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight); + button.alpha = 0.0; + addChild(button); + + button.addEventListener(MouseEvent.CLICK, function(event:Event):void { + clickHandler(event); + } ); + button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOver', null ); + } ); + button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOut', null ); + } ); + button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseDown', null ); + } ); + button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseUp', null ); + } ); + + // External functions - readd whenever the stage is made active for IE + addCallbacks(); + stage.addEventListener(Event.ACTIVATE, addCallbacks); + + // signal to the browser that we are ready + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'load', null ); + } + + public function addCallbacks (evt:Event = null):void { + ExternalInterface.addCallback("setHandCursor", setHandCursor); + ExternalInterface.addCallback("clearText", clearText); + ExternalInterface.addCallback("setText", setText); + ExternalInterface.addCallback("appendText", appendText); + ExternalInterface.addCallback("setFileName", setFileName); + ExternalInterface.addCallback("setAction", setAction); + ExternalInterface.addCallback("setCharSet", setCharSet); + ExternalInterface.addCallback("setBomInc", setBomInc); + } + + + public function setCharSet(newCharSet:String):void { + if ( newCharSet == 'UTF16LE' ) { + charSet = newCharSet; + } else { + charSet = 'UTF8'; + } + } + + public function setBomInc(newBomInc:Boolean):void { + incBom = newBomInc; + } + + public function clearText():void { + clipText = ''; + } + + public function appendText(newText:String):void { + clipText += newText; + } + + public function setText(newText:String):void { + clipText = newText; + } + + public function setFileName(newFileName:String):void { + fileName = newFileName; + } + + public function setAction(newAction:String):void { + action = newAction; + } + + public function setHandCursor(enabled:Boolean):void { + // control whether the hand cursor is shown on rollover (true) + // or the default arrow cursor (false) + button.useHandCursor = enabled; + } + + + private function clickHandler(event:Event):void { + var fileRef:FileReference = new FileReference(); + fileRef.addEventListener(Event.COMPLETE, saveComplete); + + if ( action == "save" ) { + /* Save as a file */ + if ( charSet == 'UTF16LE' ) { + fileRef.save( strToUTF16LE(clipText), fileName ); + } else { + fileRef.save( strToUTF8(clipText), fileName ); + } + } else if ( action == "pdf" ) { + /* Save as a PDF */ + var pdf:PDF = configPdf(); + fileRef.save( pdf.save( Method.LOCAL ), fileName ); + } else { + /* Copy the text to the clipboard. Note charset and BOM have no effect here */ + System.setClipboard( clipText ); + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText ); + } + } + + + private function saveComplete(event:Event):void { + ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText ); + } + + + private function getProp( prop:String, opts:Array ):String + { + var i:int, iLen:int; + for ( i=0, iLen=opts.length ; i> 8 ); + } + + i++; + } + + return utf16; + } + } +} diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/lib/AlivePDF.swc b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/lib/AlivePDF.swc new file mode 100644 index 0000000000000000000000000000000000000000..ee0f3f8f4ca49ccea24defe4ac6bd4b9c3e65a05 GIT binary patch literal 131230 zcmV(Ec zCQbD3`^2_w+qP}{i8-++wry)-TNB&1Z6`CC%$(%?oxAQm_n)&?t?p0n+Eumpcdf4O z-7Ti2220}y4)6rI>VYxFmvQ3~{H`z?qqv#$0$kr2%(0z)%E7H$?IN>2TCTOjk=bck zy>ydgW3XN+#$gd?teJlOAcIbT0ELl4ydeuDN4}vG)<$)93=Ry*CKpDnCC3KchraUr zsa5A~p-ZS^`1cAcNvW~Q=r#M|qH?va(y+(-_Bk`)Z>n&?>vCXUsjRWxrg@<7o|e0> zGz|F5irk}5+2}|On_OyT7nBy4pm)Q(_6}NXp5S-y*Ylwp-R~qemQCwc^n|ga9weiT z9xWTxIqMp3b>E)^Rr)dxF)xpgB|9`*%KHZN?Ms~wi-{QI7%;L!8S9qlipEq~F4S`< zerz}vzc}DQq(=Fi*gltvni`pSb*M68mbaf}8r%SDJRe;5Q<`jhRUNTjCG~L5^CUY| zoL-J)TX;rs>$okeOHysOnVelPC-iMJT#fYD;9OsCfc7+<`gN(AQRR#LQK(#PyP^{G zbyFG>H$`f@ZK?t~HMzA>`V92PG%LBH#V51-`)9ARg`M@P+Kw;BNKswct3`34VNKt* zGMi9W_3kqW4t0^8zokTMO4>#Czi(o-SNb0}US3_!tgY6pJ&uEQy&_?q<|}ja`&VMm zD#Q;J2R42Gw*2pA1P^KF`I{8v&J)FZ8rd!G<-g8WF6K(Xx4mEwN%lK&WEmv#B*5GI z>QnBlKf32pfB&mJ9Jpi9&ni=v%ezC%5 zsdi$e*r_&Rr8ub$V&>SX)?x^3Hth(h=IX5osix|+2pj|DiJVK+#gd!KrZKp-V#heC z-^60sY`Q}mGYtU>-s|#A0hm$e=56zn7TzGu&MZAw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z}Nwo2iqz6QPp&Z!xh9#uuD!Bu`C$yM3OmMKd1b_zBXRzL%C zQ%e#RDspr3imfVamB8j&0ofp7eI*63l9Fs&C5WRUd;=7m^NUgyO!W+OlMT!a6wD0u z42@09&CPWbj0_A7^bL&k4UKdS&8>`$tPBhkpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pF zzr4I$uiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMw zS&*t9lv*@h@HZMy-KCDMLv3=(T`#43-c6DYqW3Pgr2MhOXZgKI a;b3?z7BPX}vbz>kLU_9RxvXTWB0r7@k~+Np02*x-GGo?cGn3f0PFOZeyJEo1&YWb&>|8o? z;!dLIHVrnRfXeGyTl_z?OeR>6W|v7Sk@sSmCL!<_%; z`@a8rW-&AJLi?VsJp@6trw>V4{O!PRS8EGFG<1J*vWksPG?Yi9)&wdm4kS{VRe&IE zD3dS?6>a9&4cJEzO{AX7qrCi*pjrl{_!!DFY|JKzzJAYE)G3HS0Z!^>lDzZ91_^X6 zNgj>MjBJars2`ej;OOi~PMw`nd5!FU9`tzv7BC=EfM=9USMZYLwyuEBzMCe&HUv#2 z$p=a0cUGBgvR*+`h>glI%y7_jq@IGUqP2w7=( zClc~T)!X4}^>c~V<RE?eUMhYm1HD#fK)|b_cKZ(9xwQ z@XgwnmQp$Ihr+%4_xqdnGRIrr`~8*HK(KPL^WD=8&B1fm=GLA(9{`n1Y?F9&`Ol?+ zu?_e^SJRQxM8o_u*XP$7e>sAT&W(uRGweuziVH(BgRiGpJ@v|-BM^P?43Ee za<|%etn2#SOttdWt3S0r9$SCv#`^ac7MEfKv2kkbwa{PDm;Jv-dT2yi8yuhe2M6qj A0{{R3 literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/copy.png b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/copy.png new file mode 100755 index 0000000000000000000000000000000000000000..5b01ab165a9d1adeee1142b4ea5a0c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4O$CMNui$s!}09T)eG>)*b9I-#C(_lSSCNpnL(Lv3AM z-Sb|$BTMsaw<*ETb)WIYJ)@VNKdhf;x`diws;|zr9P6~U#hF+;Rwas3=0463(#pk|&l=*k3iIL6 zKvJ(L*D3XpcW>)R^3$r)(uzyPKiKsTC9&qKl_+G;AQS=QW$9O0DF=@qe z3HT$4oH{lhX72GIJ^SPtF z!@&WzM_4}0dTU-Ac6t8x1_<7ioAKO<=tP#1q{e$T@kTg=GZA;c49DmTAclF6j4dIL3 z@3xg~Kh4^-sm2G4S;jpR>QXFps{-EUw91Tc8YMAF$j3`xj{5%k)MGK{=~pGxM`eG} z);6Snc|vQhFe?mM`;9AfS$RaQ`diHNW)k_WsInllH&{OqYX4d4FExHQo-* z4f>q9jvEtf(;EEhqt5dQPXy)h9eUvGx{j~Uhu-Sh62q zcOl8@8_Qb3>h3r6=3g{zRy!-AdQe&z>9WMeW1jD-jWNkV?JqOij=J+3Y@;lSgOVz@ zZtmNDdfwfv#THP>+Ps5RRi)K}k8?BXHb9G=3Hqk4jit@J+X0OoW%<{vH?sN%^z~PW ze&t!IZ?+HbD80Jzcy@GSzIi_c#Sq-Xz~Xkn5Y zY|Y6wejcKU;EXU_^$>-b2dc! z=j5a`1PV{`?s$GFoBzbhwteL1>mx?KdtTd(3_#+$vFFQ@8AyGO|9e^O?X8F#H!Qu_OoeI&Db0GRDHvbeN=k^pBKFB=(qFLm9|EiOTmno1v}DTEWYElynj&H_R|88DtK5t zv}6l`f2MM;U46$7{k^rGTPk%jn_os>V-0*`PwyYcq@yAVpF&%8=EX1Y??S46!MRg& zd-kvBD4IB;a$Wb?O^5jJo#p9uxU5HR_l{H~iJ}$92)Fx&nkM|0^bdK5g5JvvKcGC0 KfL+QIrTrJRQ-Rt5 literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv.png b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv.png new file mode 100755 index 0000000000000000000000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mN^r`oXxdYf;B1rE>;FX0u(7@Cbiqk(TjFEc$wC z^PGLFZ{90;bG1=3-IJrZ)vyUCI0#j&)qp z^9c;B;Bd0qu_K&!QC#yu1rc^#gAITG_Fh&h^(eXg(nLvBi0}3H-#064__p0_wElfP z@#2#fW{W+SUtZbVyT#z=#nAt%8$2wHj~|OztSl~iWLC)5Khgaw9IIwXKELwUQYk?3 whM0}@N5#Gw-!;Gfzopr0IJ)>1ONa4 literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv_hover.png new file mode 100755 index 0000000000000000000000000000000000000000..10b34d3b90b3f7712f6de998fbc98a051b38a661 GIT binary patch literal 1854 zcmb7^X*8RO8pmHk5}FLIomOHgTD6qgsw5%S7FWtxW=dWXk+CEqYO5ru-L{LcVyq_Une002l| zA3Q-8^$r{k1pv7P|4U)ALV<$w#{t0X+)QAYt*q8%dWJF2(_)!vAcG9xNVI4&+BXrT zkO^dvl#x6}J|kOlI#|M;3l0V;00!+3lE`RU5*n0cF@{Lb^q7Ry6zWAXI+n&jpHBo+ z;;2a!*^B~aQj^Gr=PIjIWQ>ys3=bMTgF&UlF@aX}--bln+SoXwqchNf2{H}?9V`<= zqNSz8Q+FOxYGubB)Zj2Co}3cHpwgLCT9T{<0GrL+|5uBXYoSPX>2QGiTgw4#=zkPs zanGqA02KRu@wnjh`Dn3Jih8gO>sK4+Nb`6C%ck@wUv)!#--Tv%7{=g8A$LmPjT!_K2#6$%+8d}+) z`>a76*w(X+Y5z1U{gt*TX|w@zwSDRoNveM|W|x&moRD%aeHj`U*Be}V`?gz?q#L&N zx;G8c+S-a>OT^&r{+=UbvXl5qPQFO(wTsPwPB?QNW2bHmK{={>P&#dfdqpVS)zwv< z>kY1wZV$qe8N_KAyXxGqM}i%W8ijal>TwqGqB0mWovs|t;IF_>l<#LhW>Ct_6Y-3ze5|8X zD%szY1~$6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N?d@%>tgK*eZVqAmjADIxc?r++){DjBWFf;a zs*JH_E|&x69Fin~Qi@)$hgPeFL?VG&trk695Cq_yLzZP&mIcrAqM`ezP^Z(Wx~|&{ ze~x%O4$HEzySs~}r6o9ygQKG(^!t4fLZE3Hrl+S-E|+0h7JT22!e^q;U@&Or^Ld!2 ziNnJ~#9}d2Dishy5Rb>fIfoDevMj^*eYmcRSS$wHwh;uu$8YrX^wd;U6(=Vr&@>IH zRO*!x;$uRFVbpGKZ+~X9*{I35`WyY1e+ZP)jfI7U?-PaoNBtQ9bgXLB TzzMz{00000NkvXXu0mjfWhV~A literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/pdf_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/pdf_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..eb06855f4fc6bb57036cf61324149e3f8e27c902 GIT binary patch literal 2786 zcmai0c~nyC7AG~e(y}tevLv+WCNelMBq{<$fC zZasPSWE2Wz%?V_MA@|wFzoj_}HQ^Qa7ap>3fZ04a9EydL06BkM(=5bfh1W>#iVDxcQ#>)^i3gzvqlmUWGAdKOIBC(W??YdEl#fXJ; zY@{cbz?CtSO$UmuLOl7IcoE%*?jB?^*%d<~5D9n!2~Q;9h-8{OiAEq` zMt@jDO)iY3g|PxgwU8AZ8wbNO8XljNl;oD=?gq(4cp{ZbHFA(hIK%^|*dm1iB~Gev z9%EpE3V~cKgT;^(V`K#QP$EpnB9V@y5HAZ8i{fC#IJs0YS}de&cqJgi6Ws`S`LK^M zzcCb-`(s3W{J6IQ4gb~z zFeHFtV?oeOI0EEyX)H*PXw>1b=vaixO(+)9Sneb;l}ZU9Bb!7dvH}1n3WPFAvq=j znFT^9NwG=njW;&BM2t`lTO;iF??n+?FjBiw-Ec5rJOZEp%Q)g~WcNO^LRjVbT_mx>}oOG39_ zU$b7HTJePJghrWIx*iPOI$#i;z?E)wC%AUlfW?Zo?7TB)K5SOyV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Yl>D(p8}Ab_1Y zoQZA@U8mxATW-kK-biHO)7pKD62mVupU4tv$n9s|MQw-{!*GrJzKn6V!lj*!T591$ z_sLlQNR%eU3G%dd9}Ku`(EO1D3s^?g71e)h?()MDfggqJ-l z0u_Iu(E!4hV2ta%=`V}|IJI`v3FZl-N=4Jnuivc+>ozNLM1QB7YI$Ob4PFyU!{@Fl zu?vfIJ6>guyXJ3x_`F&yku#|Dwb7ckL7=X##~u5bXrdytE2(n_~Yd}GCdAOs$Z*}8&&#&W-Cvkv&!vvT%(7SLNW@|U! z8#kCSmF%?4_)+D&#hkji{BVqNztDPGu&OebDS+;WJ-KyLFljC=G&H&8oN@BTWtUS! nZxQz02DMr}4VqD(1~^j0)(M-(8))srZ_wVx+4`BKf5v|SY5L1j literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/print_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/print_hover.png new file mode 100755 index 0000000000000000000000000000000000000000..9808a9cc9c59c3968494faea0399864448fdb3f4 GIT binary patch literal 2230 zcmb7_c|6p67sr3r1~ZnfWk?xIiiEL+$`}SCOJWGwh8bgQ6DC_@D_e+>r9_Ik;r5_h zYf9sy!DSlRsf!{dvZjfVdB$J&-{(26*Li)nNZ3TTM{wuWE4IsAd+~MOeBT#MgXuzqyN8NjL&DVc}k-L+`nE9U|s*Cp;J$c zUje`&BU=;_6Fcp{$K@gf^!)gxVpfy(xZBH@pMhPlaS#C|_QiB1M4~QErcg6QNXNIG z{9RO1U}_NH>&XlicISTFW+7F&a##-$To#kbT;JTjp80)j;BKC&iHSTQC^_GqA@LW# zg~bgnm&+Mg|GuOzY!oeSO@*qyph{a(Q0wzKg(!JzYinWZj-sL>SlG=mM=RY_0qht( zu4iRs1@@&U1o#Euv1nUc{LmN%&JTiFlh-;QY=3#HnjX-b3#a_rUE;PreaO}EYFq!> zah(l?nw!2#;?6WvwxVELy zUsQfeZmyv@0N3_zmtO6mC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h-aDqVncHKxafW|` zp~%yudm`%UeWrImCQw9nRJ+H;GE)7ZnCxES)7HI5mB##_Nc3V#^6fOVnlt*u<H}ZllwAh0Ka*zPT7YdQLphI{Gzo#AU?boT6~eD$@wCGGnbK!#yhz zNg&x3Mu?|;y{KFJfJ^1f>dR|u6qf>T3j@W7!{WP7AtLcp8qccR+U~WtzZeM%`!?~h o;Us;q!HUvr$byH37?TLU_*S9#_)UUT%E868wQ@w&Tln4hFFz3kD*ylh literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/collection.psd b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/collection.psd new file mode 100644 index 0000000000000000000000000000000000000000..7eb7caf2cc5c98e1d9ac04de50b2009b344bbe85 GIT binary patch literal 25792 zcmeHP34Bw<)}MQ`Hcj`1vWHSATic|2OZRk1fkJ7^Dhg?Gn}%lNCTR;UEFvnP2m+Qx zWfKH^peT!|$fmgPkVQa2eFemV0v44;DC9eHliVhyN?hLez3=yO(>wRfnKNf*{&QyT z+?md#=9QKs0@*JvJUYQ0goKD=XN`F(HLtjY+l%o9+Ig)m6BdR2X`3^$>rF~k4P}v3 zQW~uxGxEoG-j9@M)tQl_l1ii{COK8DRZO9&@+m_rR8wkHY3j)AEKx>%dcEGHrz}cI zy)BC|w5Wzg!X^s@XyM{?lHjI6d;OzClPb#-;I zbqTRXS`#NrOH0FQ;^SjLBE~$~U{Th`7|cEGN}PJ~DYJ^!nk-tQL4x%vD~(o5W@IEz zh`k);(wo?X4CYv-jIk=CKCWJAij&1k<5mwtsRrK%9HJb>Vc{lT6gYPvWHYi69j&mWB)!;RwkQoMsyIIjvJgTOqsofy&Y@O~)yh0m>k{=IwZmvF^u9`+ ziww^7A5q_qihGh#XwA?!O?Ea#duPWq$Z~3uJJ;D#by}u@nv}Ge!pLVvI-z&%`s|u; z9Hs`-l`7omvQ)S;q|_O4Zrs*vwT-52r_%0=u3fiF)Zf-$S4|myu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V?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/copy document.psd b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/copy document.psd new file mode 100755 index 0000000000000000000000000000000000000000..ca207adc608751b51eb5265bda2b7392889305a3 GIT binary patch literal 104729 zcmeFa34C1DdGLMZeT6_E%bPS&Ac>R4izHi?<$%E}&|)CiCLwK_%93nUWXX}_u;fdj z?c4Tie_c|Nrh5nwXMqqBb}+^Zwk%mAjb^zscfWIIWU~Yt?`E^-{Xb`Bw0L*GG|P-M zbMHO(+_OCA*`IUInKkc*C0dD=`;6dFroLme;kl$QyfkaxHH$~c9ZmbuM~7+JFm2dJ zhuyA~?s)xAHyLZZrL$Ch)^N;Pk*jo0( z_iGoad!LkhAN&2wuDE@5P3^7qZKccWS2i?VKIye}8zz-D)LlO5iuT2eN|&q>+IVvpHx%Vyu5xk=aM{a zQmM+)cI)MnzO?v;(zfR2##UY-U>C9Z(}U!LVxJzG6<@{IBs+?8Ki%Wp2FN}bP=-)h>)ugX(h$$1rHEWg$A zJDrx7S5v0^%Cpt8A)zXrRvhtae%O;a! za^>WildC4rnp`~@(3F=?F0YteK7DfejLGGdlgU(GHMxA&>^@%Bcb>a3P%Ii;? zea-y&H?%abXlSgTGgsJE>5W&-EBy=zHtVyOO*>&W8IOS*YG@ZX*VWINJ~;nC^3d#8 zH?+1jx7;yjaNa`NdjqYuh7~8_PI6}ujO21CcdDp_SSq2GO30|P8rp%7svsk{Nd=ss z61uLOUd}n`@P`WMb9xyZ1+tr7UOl-I>aUy*Zz&U^gAS|6TP4?U7id(tR>kMb=T%o$ zRLottu&k`SV*XrM(!A;!ixyQ^E}T_SK7YZ&%cdRQG6Awmy|KQvxp9p!@nua7ZF4H} znU6{C&wlg3jX6~n)1Yuw%HZVwyk9zT-oeTJd9QD2s7De>JLVJ$9h~;w4E60bCm{)L z3>s*zW-mrU*VVMuEU0O#pCdZNl(Lyq%Bq%@PoG^`HoLO&b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!AKbKv27jny5H0>-W{Kp$pYk&Y{@`au{K3vH{<`?dHq+&-EWf7Eqp4*XG9HJJ&2 zlmdTnGBf_*XFmKXNA>uFpF;=So?waRT|Ik5Wh&{`8}d5jTbTEXKB1l5I;%lm4WzC znrjFrQYHVxr)d|l47+R>OXcB_(XsJ~$*Gyyx%q{~rR9~?_-T1{WqE0FVSa9QW@>U` Td~9@NxLhjQ$40|Q%*gl&pqPNb literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/file_types.psd b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/file_types.psd new file mode 100755 index 0000000000000000000000000000000000000000..0f280ad520ae61fc8bf3f6d0781d878c28e62a73 GIT binary patch literal 1090645 zcmeFa3w#|{buPXo*|DV9j*~c$gd|L!PJ*p7dRlTEM=#4(EXhKWUwITp=ZvJWMl**w zb8N{#lNKoVmXufN{ZpVVAs2Fam3K>DBm_!Z=xu2WEwts{lvjWo5}+jX$0O&z*4ne@ zaURl{nXYIYd{jJX4(Q#2D+BsIUWYM4 zJa|Q|5VfNAirRV6`~z*+$e5bzXa?-1uimtGK5gf7)(KOaay@N)&dAMJ&NReL8>cMC zy!wjTQE}lx8xnZh#7V=;xF>V7))lpviS<_6b#l13DVxh^o|((Jc`t2Z$c8D~H~~jj z)cRuEd$nlUq_yaJmo~YemE!g^K;ob(>JvFIorwYn!k0Mk#Q%@U9gYAscjl1@n>({c64}D^Ig}TwS29$N#D`Z zxm}y`j5+h9>&*Ar9CU_ zTk!Dk(#E8l_ix>n&s&*YdP`e-OIP#cj`p^x%#P;fjJd<;*x9)w-PH;|qiwRYy>(lo z7F^Ptx1zEpE{ZYgvYNIV4|k0iK0N(?Yue2Dds;g>JKDCl>0KQC!X8YiD|kzF-=z&rRi#>eax+ka_j2CD|S(yU09M9y}4t%z8z9* zZ{OaredqSh?OoeJG|kQ1n_IRww{CB4+uq#19TGL~+}_-|y#>;?Y;S4Z-qNot^Dne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bM5{=9eWXu NIbZ(A+IS-N{{g?^6wUwu literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/printer.psd b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/printer.psd new file mode 100755 index 0000000000000000000000000000000000000000..8c33f7aaadcb2e4932ec714f29a6717f05de2bd6 GIT binary patch literal 119952 zcmeF434B!Lx&O~(VFyJ;Ld9!}3!*@FAgJshwxUt6ReP(3BtSGIGzpviw6(om^!E0) zSG`?s|GmXlTWj6-9Yl6QmdPw<=FFU#$pkDaitIu%^Z!2YnMo!gED`Y9Hj|t)=e*}# zpZE8y?>jRSrWMT9Y?}2-;Vn}geY9jN>6=eXn0DQq6nUa)e;%HsX-Qhr@T3)5*6#E< zg~cW573JxLTorwJ;LH_8WlO6{mzAV1sHjYzyST7wQEB-?o-HiAx3s+E%fpijw81x) zk)bku-txlA;)>-}_mmD#8m6U|7FCp2$<@FmRmJI*B~?`wODl^?B&GL)vchHD4Nt1p zM*bze{WUN>J2Nvseg4Yyqw3UDpD$H?KKu7$au0m?>{T!97~;Lgqsb`nSvr&J! zdh&`Tg+=$2RHx4`Sy)zso0 z>WYf8drGU*bH-+l$(}GeeL-d6;*#YRmG`7)jU6|V3M-2jOuTud2&ZfsqyMOVRTMT zZVoA&Ny(j%m#NO#>YS&}<0zXmo~NA2&pBVt6UfO~+RB+ge$LWL&ID@XOj*vVZ2q{> zxmme9l{3BNY^97>*AwKNPd_=UJo$NCk7thMoG<4bdY+X}opP44`4gmU{shUBKSA>3 z=c_#VS?XG9%U8AK=Sz$Es?L1rNp@z|xY3!T$uT-_^tjREM^6}?KN`|xWsT0t9-Wml zIxBZ{R^DhbWsM)5HDPo%d9z1n=ZwzI9i5#wI(yvc?D3=NTu$ay6Y{6d7&kR{THb{0 z>yXP(gnwmPVyvyMsnLx zI%VgN%Hd5&z! z6sCg@$CG!w+#_A!QIT5NSLNow=~HLsPo17WJuf?V>eRex+0*jI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 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls.png b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls.png new file mode 100755 index 0000000000000000000000000000000000000000..5aaf40d0e3ebe984398903d89d11cf9bc21385c0 GIT binary patch literal 1641 zcmb7^dpy&77{`BDv)GzzO&$7?vb|XDW#u*@w{hBBMyY<7SuS&#>*Tr#-4H5`LnI;B zmXcUmvE)c3Md*H+qC*m8Xa4HnbDr1hd3~Sf`~5uc*XQ;9`zng}=m$V`xusnP~UCz6N&FfuyqK{b)~8Y~AYi^2?M#Y53FfEdIKpn=Ze5S>P* zK|zU8BATUCWU(qDx_Np+bif8AK|wT-8397lDo`8ckPsLa8^egBfx*mZkP;5XgfJrL z(lKf!;{Lgr^N(DGa^|GW`y(#0A?z?{;wAct7G4#lRH*%zrC!&?*2zZ`n49F z(qH`OY)|w|cpmUmBC(M(IV`I@_pX0g@=ffMjdZ%#l`2`8dDi;gCc9r&x@m$Kii^XSXk@g6-y6x-KkUF zbLSB7;04aKx$6gPD&s^rMghVurr7Th$sz&8W)1WGRRKBmw#0N87Nz1OT*2n5ZD>fo zKI1RhHK{VOjK3u0ss2qE_N(A`YT+*FeIz2H8a-V!bvbF|2M0sLFD_tSTRvjHw^a)4 zz?rN#^jP1=TpP)YvF^D!SZ7$0Vk&Z`hJIB}Bbi)J$8aiYn1CG@TcECk$#^GRUuaNd z{H5KjPz`CTN|Q?xLay4oaK$y#rzNSjac$w1xInk=`&{)>tsWVx#aqWaOCKH`ODyXr z?3F9UIpMT9zy#Z+oWCN(!Jyq*PCan>jeqE)Y~BB7JwX6|iRpO(%I@ zkF-km@8*tO|4b>VmX8Gx$m}d=vFv>!8uaq|m3yPk&>-QB5qZe$O`;aQ&yMEn5+3&L zl<4Tm*NcMhHe4-idY-twO1z5;VVlnwzpUEooS`;N$nr>C7`YY7Zd1$j7ds7&an|si znfQVsH7qje%!P?!_DuXr@+2Xw_l0kHjTHwz zR?o4<+V%Qfedn*ZcA5`_^8JQl#N2G+($cR^D-oiF0(Imq$2%8{f0!PN%gRmbyI5v1 zNZFcQiEWQ)8zaG5s0K*jSHRn3>o(abPNv>;-BWS0Vo|xzRU6ho->Ie<)dke-xckbW4_P(#*&2PUn=OE667#nV zY!G0)S;B%Z2!_{(Q&u-?^{XR2w$)DMb+J9Ls@;=EZ{xpcf-nL66T0|S5v3@$q#8bc zgm2KX45yF!jC_Y{%=Q{Cd>k=8+jr@$!NA;MORWuE-R*-RY7c`=6)&@W-aZ-B7V}1; z{@4S}og<@`0ivkXU2k@KN{FW{l+PB?R17uEL(DdM%gXTFws}|0`}CxN1)F@{?xRWO zgvIEJ&6X9*vW{N!C0y8Ir(qa79T2!|*I8&nHFnTc-(Yt*<6piT&6xlI literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls_hover.png new file mode 100755 index 0000000000000000000000000000000000000000..5b1930afd86e7ef439026ee89e75520c086471f5 GIT binary patch literal 2061 zcmb7_dpHvcAIFzDGtT5v)~3lUrG?ta>SWj$DJBfDl-bNoW0{#vB)8o1qI#?0xK-YC zKaNWzm-M2@r94F{&E!&N?+A^#?47^Pzwi5dp5ODkf1dAuzie->Bf2`qIsgDb_ozF` zR~?Nv91H>gHhm^12C5597LiN@0NxD`9S^io*KodTAfLhw=f{Wgm;hoJm(D~UjS6Kk zeVL(QqL`OVyn5--#uCxf&o7h(a6*zp!pfU z1Us6gp0Pp`*wIWg&w@fdH3PfBaN(X6@z|^gKA;-;x9K8nFqq$vbP@76N6q0O{nTQ@ zxbd-P*gxx7#p+`hwqGEh#EfO|*k}1{ZnU}u0LX8){=ZrdIboA@B@8SrE&t=&@>EgKRCFayrwil0e$CWJqi^?abQ*Jk03(ocH9G} z-QDG&0DwN>Qg`@c*txQxZ}L~BM$@ZlDd;{~!~&~Wc#%8Sf_;p^VzDJQo$#TtwViT8te0B1+9Jb!J|Fq^wJ;9f! z@p9Pt)undKn!9z!&6WMImgJSq^(M#*u)$|Q;HANTH>}U|Y;9MUmh(e-b$dFVDoo)M z6B96TDPH*`?Yhi94JM2-xb*4;-%mN>oH9({g2%9rIpgH|ALF=P`y{P@2Zkh1YB`WZ9?#;XSZLD;`7zeHM zI((Revkmpq0i`XFKmJ+SrA1EwPjk=&R28G#-ZZnz09P<28kPx2D1%?I?{pgFG*|4d zMtGAq_m)NDgNL2eXDz!bZlX<{H}@}8-f;Cve;K9>%b&nA=^9&H8XT|Ri^&nNXxaa~ zbBFE0bQoIyxqaw_Tei~enm$i+^4bY&F?wl7aN&$$yu$EPaV@Yp*LD`X<#46FU$%+BHgE%rP0%o7sbuXs#96$LL;&$VRPm19mTT6Vp7QSdeg1;$H z{{H=I=T-Z*_rqfcitVo6V-_x<|cPN6Mw=sJBxECJf& za>b7@n-TK&IOV~Un&`!ukio)a3+t6EA4cHljj{p8=y%lmjmqxvsrzj^1%RF;n?93! z<^Gk#?hXtjqNsj!YQC;ZI``)gsb3frumEhGiEW&$uI9u>2L|TEJfjhe${O_Gp9}QHtn)HN8wODZZQdRWnTydB|GGYF~xTqhZ_G0w}$z2b?CL>1nN{iSl2 zDy(-{W4{z>uM!u`Q)zDW+km){p|7&gydO(55GHq@q1{a$(v{B-z^+N0Fru0oRBW2{_7|YRA zd#MbS;H9Tm^}Rg`znr+OmHa#3ojTK6gtKz8D`^5AQIu$`1mx9-sfmMQDKtl%aWg2H+sFotDXNROl$ ax&mAY+hYDES`WPO$d0;tksdnJQvVCjG_(i+ literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.TableTools.js b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.js old mode 100644 new mode 100755 similarity index 66% rename from airtime_mvc/public/js/datatables/plugin/dataTables.TableTools.js rename to airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.js index 3e02c2c08..3c3ae9115 --- a/airtime_mvc/public/js/datatables/plugin/dataTables.TableTools.js +++ b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.js @@ -1,13 +1,13 @@ /* * File: TableTools.js - * Version: 2.0.2 + * Version: 2.1.5 * Description: Tools and buttons for DataTables * Author: Allan Jardine (www.sprymedia.co.uk) * Language: Javascript * License: GPL v2 or BSD 3 point style * Project: DataTables * - * Copyright 2009-2012 Allan Jardine, all rights reserved. + * Copyright 2009-2013 Allan Jardine, all rights reserved. * * This source file is free software, under either the GPL v2 license or a * BSD style license, available at: @@ -36,7 +36,7 @@ var TableTools; TableTools = function( oDT, oOpts ) { /* Santiy check that we are a new instance */ - if ( !this.CLASS || this.CLASS != "TableTools" ) + if ( ! this instanceof TableTools ) { alert( "Warning: TableTools must be initialised with the keyword 'new'" ); } @@ -51,7 +51,7 @@ TableTools = function( oDT, oOpts ) */ this.s = { /** - * Store 'this' so the instance can be retreieved from the settings object + * Store 'this' so the instance can be retrieved from the settings object * @property that * @type object * @default this @@ -62,9 +62,9 @@ TableTools = function( oDT, oOpts ) * DataTables settings objects * @property dt * @type object - * @default null + * @default From the oDT init option */ - "dt": null, + "dt": oDT.fnSettings(), /** * @namespace Print specific information @@ -204,7 +204,13 @@ TableTools = function( oDT, oOpts ) * @type boolean * @default false */ - "master": false + "master": false, + + /** + * Tag names that are used for creating collections and buttons + * @namesapce + */ + "tags": {} }; @@ -241,7 +247,7 @@ TableTools = function( oDT, oOpts ) "hidden": [], /** - * The information display saying tellng the user about the print display + * The information display saying telling the user about the print display * @property message * @type node * @default null @@ -270,7 +276,16 @@ TableTools = function( oDT, oOpts ) "background": null } }; - + + /** + * @namespace Name space for the classes that this TableTools instance will use + * @extends TableTools.classes + */ + this.classes = $.extend( true, {}, TableTools.classes ); + if ( this.s.dt.bJUI ) + { + $.extend( true, this.classes, TableTools.classes_themeroller ); + } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -293,7 +308,6 @@ TableTools = function( oDT, oOpts ) oOpts = {}; } - this.s.dt = oDT.fnSettings(); this._fnConstruct( oOpts ); return this; @@ -308,31 +322,64 @@ TableTools.prototype = { /** * Retreieve the settings object from an instance - * @method fnGetSelected * @returns {array} List of TR nodes which are currently selected + * @param {boolean} [filtered=false] Get only selected rows which are + * available given the filtering applied to the table. By default + * this is false - i.e. all rows, regardless of filtering are + selected. */ - "fnGetSelected": function () + "fnGetSelected": function ( filtered ) { - var masterS = this._fnGetMasterSettings(); - return masterS.select.selected; + var + out = [], + data = this.s.dt.aoData, + displayed = this.s.dt.aiDisplay, + i, iLen; + + if ( filtered ) + { + // Only consider filtered rows + for ( i=0, iLen=displayed.length ; i

    Copied '+len+' row'+plural+' to the clipboard.

    ', + 1500 + ); + } + } ), + + "pdf": $.extend( {}, TableTools.buttonBase, { "sAction": "flash_pdf", - "sFieldBoundary": "", - "sFieldSeperator": "\t", "sNewLine": "\n", "sFileName": "*.pdf", - "sToolTip": "", - "sTitle": "", "sButtonClass": "DTTT_button_pdf", - "sButtonClassHover": "DTTT_button_pdf_hover", "sButtonText": "PDF", - "mColumns": "all", - "bHeader": true, - "bFooter": false, - "bSelectedOnly": false, - "fnMouseover": null, - "fnMouseout": null, "sPdfOrientation": "portrait", "sPdfSize": "A4", "sPdfMessage": "", @@ -2275,167 +2221,87 @@ TableTools.BUTTONS = { "--/TableToolsOpts--\n" + this.fnGetTableData(oConfig) ); - }, - "fnSelect": null, - "fnComplete": null, - "fnInit": null, - "fnCellRender": null - }, - "print": { - "sAction": "print", + } + } ), + + "print": $.extend( {}, TableTools.buttonBase, { "sInfo": "
    Print view

    Please use your browser's print function to "+ "print this table. Press escape when finished.", - "sMessage": "", + "sMessage": null, "bShowAll": true, "sToolTip": "View print view", "sButtonClass": "DTTT_button_print", - "sButtonClassHover": "DTTT_button_print_hover", "sButtonText": "Print", - "fnMouseover": null, - "fnMouseout": null, - "fnClick": null, - "fnSelect": null, - "fnComplete": null, - "fnInit": null, - "fnCellRender": null - }, - "text": { - "sAction": "text", - "sToolTip": "", - "sButtonClass": "DTTT_button_text", - "sButtonClassHover": "DTTT_button_text_hover", - "sButtonText": "Text button", - "mColumns": "all", - "bHeader": true, - "bFooter": true, - "bSelectedOnly": false, - "fnMouseover": null, - "fnMouseout": null, - "fnClick": null, - "fnSelect": null, - "fnComplete": null, - "fnInit": null, - "fnCellRender": null - }, - "select": { - "sAction": "text", - "sToolTip": "", - "sButtonClass": "DTTT_button_text", - "sButtonClassHover": "DTTT_button_text_hover", + "fnClick": function ( nButton, oConfig ) { + this.fnPrint( true, oConfig ); + } + } ), + + "text": $.extend( {}, TableTools.buttonBase ), + + "select": $.extend( {}, TableTools.buttonBase, { "sButtonText": "Select button", - "mColumns": "all", - "bHeader": true, - "bFooter": true, - "fnMouseover": null, - "fnMouseout": null, - "fnClick": null, "fnSelect": function( nButton, oConfig ) { if ( this.fnGetSelected().length !== 0 ) { - $(nButton).removeClass('DTTT_disabled'); + $(nButton).removeClass( this.classes.buttons.disabled ); } else { - $(nButton).addClass('DTTT_disabled'); + $(nButton).addClass( this.classes.buttons.disabled ); } }, - "fnComplete": null, "fnInit": function( nButton, oConfig ) { - $(nButton).addClass('DTTT_disabled'); - }, - "fnCellRender": null - }, - "select_single": { - "sAction": "text", - "sToolTip": "", - "sButtonClass": "DTTT_button_text", - "sButtonClassHover": "DTTT_button_text_hover", + $(nButton).addClass( this.classes.buttons.disabled ); + } + } ), + + "select_single": $.extend( {}, TableTools.buttonBase, { "sButtonText": "Select button", - "mColumns": "all", - "bHeader": true, - "bFooter": true, - "fnMouseover": null, - "fnMouseout": null, - "fnClick": null, "fnSelect": function( nButton, oConfig ) { var iSelected = this.fnGetSelected().length; if ( iSelected == 1 ) { - $(nButton).removeClass('DTTT_disabled'); + $(nButton).removeClass( this.classes.buttons.disabled ); } else { - $(nButton).addClass('DTTT_disabled'); + $(nButton).addClass( this.classes.buttons.disabled ); } }, - "fnComplete": null, "fnInit": function( nButton, oConfig ) { - $(nButton).addClass('DTTT_disabled'); - }, - "fnCellRender": null - }, - "select_all": { - "sAction": "text", - "sToolTip": "", - "sButtonClass": "DTTT_button_text", - "sButtonClassHover": "DTTT_button_text_hover", + $(nButton).addClass( this.classes.buttons.disabled ); + } + } ), + + "select_all": $.extend( {}, TableTools.buttonBase, { "sButtonText": "Select all", - "mColumns": "all", - "bHeader": true, - "bFooter": true, - "fnMouseover": null, - "fnMouseout": null, "fnClick": function( nButton, oConfig ) { this.fnSelectAll(); }, "fnSelect": function( nButton, oConfig ) { if ( this.fnGetSelected().length == this.s.dt.fnRecordsDisplay() ) { - $(nButton).addClass('DTTT_disabled'); + $(nButton).addClass( this.classes.buttons.disabled ); } else { - $(nButton).removeClass('DTTT_disabled'); + $(nButton).removeClass( this.classes.buttons.disabled ); } - }, - "fnComplete": null, - "fnInit": null, - "fnCellRender": null - }, - "select_none": { - "sAction": "text", - "sToolTip": "", - "sButtonClass": "DTTT_button_text", - "sButtonClassHover": "DTTT_button_text_hover", + } + } ), + + "select_none": $.extend( {}, TableTools.buttonBase, { "sButtonText": "Deselect all", - "mColumns": "all", - "bHeader": true, - "bFooter": true, - "fnMouseover": null, - "fnMouseout": null, "fnClick": function( nButton, oConfig ) { this.fnSelectNone(); }, "fnSelect": function( nButton, oConfig ) { if ( this.fnGetSelected().length !== 0 ) { - $(nButton).removeClass('DTTT_disabled'); + $(nButton).removeClass( this.classes.buttons.disabled ); } else { - $(nButton).addClass('DTTT_disabled'); + $(nButton).addClass( this.classes.buttons.disabled ); } }, - "fnComplete": null, "fnInit": function( nButton, oConfig ) { - $(nButton).addClass('DTTT_disabled'); - }, - "fnCellRender": null - }, - "ajax": { - "sAction": "text", - "sFieldBoundary": "", - "sFieldSeperator": "\t", - "sNewLine": "\n", + $(nButton).addClass( this.classes.buttons.disabled ); + } + } ), + + "ajax": $.extend( {}, TableTools.buttonBase, { "sAjaxUrl": "/xhr.php", - "sToolTip": "", - "sButtonClass": "DTTT_button_text", - "sButtonClassHover": "DTTT_button_text_hover", "sButtonText": "Ajax button", - "mColumns": "all", - "bHeader": true, - "bFooter": true, - "bSelectedOnly": false, - "fnMouseover": null, - "fnMouseout": null, "fnClick": function( nButton, oConfig ) { var sData = this.fnGetTableData(oConfig); $.ajax( { @@ -2452,45 +2318,26 @@ TableTools.BUTTONS = { } } ); }, - "fnSelect": null, - "fnComplete": null, - "fnInit": null, "fnAjaxComplete": function( json ) { alert( 'Ajax complete' ); - }, - "fnCellRender": null - }, - "div": { + } + } ), + + "div": $.extend( {}, TableTools.buttonBase, { "sAction": "div", - "sToolTip": "", + "sTag": "div", "sButtonClass": "DTTT_nonbutton", - "sButtonClassHover": "", - "sButtonText": "Text button", - "fnMouseover": null, - "fnMouseout": null, - "fnClick": null, - "fnSelect": null, - "fnComplete": null, - "fnInit": null, - "nContent": null, - "fnCellRender": null - }, - "collection": { + "sButtonText": "Text button" + } ), + + "collection": $.extend( {}, TableTools.buttonBase, { "sAction": "collection", - "sToolTip": "", "sButtonClass": "DTTT_button_collection", - "sButtonClassHover": "DTTT_button_collection_hover", "sButtonText": "Collection", - "fnMouseover": null, - "fnMouseout": null, "fnClick": function( nButton, oConfig ) { this._fnCollectionShow(nButton, oConfig); - }, - "fnSelect": null, - "fnComplete": null, - "fnInit": null, - "fnCellRender": null - } + } + } ) }; /* * on* callback parameters: @@ -2501,17 +2348,75 @@ TableTools.BUTTONS = { */ + +/** + * @namespace Classes used by TableTools - allows the styles to be override easily. + * Note that when TableTools initialises it will take a copy of the classes object + * and will use its internal copy for the remainder of its run time. + */ +TableTools.classes = { + "container": "DTTT_container", + "buttons": { + "normal": "DTTT_button", + "disabled": "DTTT_disabled" + }, + "collection": { + "container": "DTTT_collection", + "background": "DTTT_collection_background", + "buttons": { + "normal": "DTTT_button", + "disabled": "DTTT_disabled" + } + }, + "select": { + "table": "DTTT_selectable", + "row": "DTTT_selected" + }, + "print": { + "body": "DTTT_Print", + "info": "DTTT_print_info", + "message": "DTTT_PrintMessage" + } +}; + + +/** + * @namespace ThemeRoller classes - built in for compatibility with DataTables' + * bJQueryUI option. + */ +TableTools.classes_themeroller = { + "container": "DTTT_container ui-buttonset ui-buttonset-multi", + "buttons": { + "normal": "DTTT_button ui-button ui-state-default" + }, + "collection": { + "container": "DTTT_collection ui-buttonset ui-buttonset-multi" + } +}; + + /** * @namespace TableTools default settings for initialisation */ TableTools.DEFAULTS = { - "sSwfPath": "media/swf/copy_cvs_xls_pdf.swf", - "sRowSelect": "none", - "sSelectedClass": "DTTT_selected", - "fnPreRowSelect": null, - "fnRowSelected": null, - "fnRowDeselected": null, - "aButtons": [ "copy", "csv", "xls", "pdf", "print" ] + "sSwfPath": "media/swf/copy_csv_xls_pdf.swf", + "sRowSelect": "none", + "sSelectedClass": null, + "fnPreRowSelect": null, + "fnRowSelected": null, + "fnRowDeselected": null, + "aButtons": [ "copy", "csv", "xls", "pdf", "print" ], + "oTags": { + "container": "div", + "button": "a", // We really want to use buttons here, but Firefox and IE ignore the + // click on the Flash element in the button (but not mouse[in|out]). + "liner": "span", + "collection": { + "container": "div", + "button": "a", + "liner": "span" + } + } }; @@ -2528,9 +2433,9 @@ TableTools.prototype.CLASS = "TableTools"; * TableTools version * @constant VERSION * @type String - * @default 2.0.2 + * @default See code */ -TableTools.VERSION = "2.0.2"; +TableTools.VERSION = "2.1.5"; TableTools.prototype.VERSION = TableTools.VERSION; @@ -2545,7 +2450,7 @@ TableTools.prototype.VERSION = TableTools.VERSION; */ if ( typeof $.fn.dataTable == "function" && typeof $.fn.dataTableExt.fnVersionCheck == "function" && - $.fn.dataTableExt.fnVersionCheck('1.8.2') ) + $.fn.dataTableExt.fnVersionCheck('1.9.0') ) { $.fn.dataTableExt.aoFeatures.push( { "fnInit": function( oDTSettings ) { @@ -2563,7 +2468,9 @@ if ( typeof $.fn.dataTable == "function" && } else { - alert( "Warning: TableTools 2 requires DataTables 1.8.2 or newer - www.datatables.net/download"); + alert( "Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download"); } +$.fn.DataTable.TableTools = TableTools; + })(jQuery, window, document); diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js new file mode 100644 index 000000000..e580c9936 --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js @@ -0,0 +1,77 @@ +// Simple Set Clipboard System +// Author: Joseph Huckaby +var ZeroClipboard_TableTools={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=document.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){this.className=this.className.replace(RegExp("\\s*"+a+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(a){return!!this.className.match(RegExp("\\s*"+ +a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){(a=this.clients[a])&&a.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a){var b={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};""!=a.style.width&&(b.width=a.style.width.replace("px",""));""!=a.style.height&&(b.height=a.style.height.replace("px",""));for(;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;return b}, +Client:function(a){this.handlers={};this.id=ZeroClipboard_TableTools.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;ZeroClipboard_TableTools.register(this.id,this);a&&this.glue(a)}}; +ZeroClipboard_TableTools.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"",action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,glue:function(a,b){this.domElement=ZeroClipboard_TableTools.$(a);var c=99;this.domElement.style.zIndex&&(c=parseInt(this.domElement.style.zIndex)+1);var d=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);this.div=document.createElement("div");var e=this.div.style;e.position="absolute";e.left="0px";e.top="0px";e.width=d.width+ +"px";e.height=d.height+"px";e.zIndex=c;"undefined"!=typeof b&&""!=b&&(this.div.title=b);0!=d.width&&0!=d.height&&(this.sized=!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(d.width,d.height))},positionElement:function(){var a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.width=a.width+"px";b.height=a.height+"px";0!=a.width&&0!=a.height&&(this.sized=!0,b=this.div.childNodes[0],b.width=a.width,b.height= +a.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var e=location.href.match(/^https/i)?"https://":"http://",c=c+('');else c+='';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.div=this.domElement=null}},reposition:function(a){a&&((this.domElement=ZeroClipboard_TableTools.$(a))||this.hide());if(this.domElement&&this.div){var a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement), +b=this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+=a;this.ready&&this.movie.appendText(a)},setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},setCharSet:function(a){this.charSet=a;this.ready&&this.movie.setCharSet(a)},setBomInc:function(a){this.incBom=a;this.ready&&this.movie.setBomInc(a)},setFileName:function(a){this.fileName=a;this.ready&&this.movie.setFileName(a)}, +setAction:function(a){this.action=a;this.ready&&this.movie.setAction(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=document.getElementById(this.movieId); +if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;this.movie.clearText();this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setCharSet(this.charSet);this.movie.setBomInc(this.incBom);this.movie.setHandCursor(this.handCursorEnabled); +break;case "mouseover":this.domElement&&this.cssEffects&&this.recoverActive&&this.domElement.addClass("active");break;case "mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0));break;case "mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var d= +0,e=this.handlers[a].length;d"\u00a1".toString().length?b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""):b.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"")},fnCalcColRatios:function(a){var b=this.s.dt.aoColumns, +a=this._fnColumnTargets(a.mColumns),c=[],d=0,f=0,e,g;e=0;for(g=a.length;eh?m:h)+"px";l.style.width=(k>o?k:o)+"px";l.className=this.classes.collection.background;e(l).css("opacity",0);g.body.appendChild(l);g.body.appendChild(f);m=e(f).outerWidth();k=e(f).outerHeight(); +j+m>o&&(f.style.left=o-m+"px");d+k>h&&(f.style.top=d-k-e(a).outerHeight()+"px");this.dom.collection.collection=f;this.dom.collection.background=l;setTimeout(function(){e(f).animate({opacity:1},500);e(l).animate({opacity:0.25},500)},10);this.fnResizeButtons();e(l).click(function(){c._fnCollectionHide.call(c,null,null)})},_fnCollectionHide:function(a,b){!(null!==b&&"collection"==b.sExtends)&&null!==this.dom.collection.collection&&(e(this.dom.collection.collection).animate({opacity:0},500,function(){this.style.display= +"none"}),e(this.dom.collection.background).animate({opacity:0},500,function(){this.parentNode.removeChild(this)}),this.dom.collection.collection=null,this.dom.collection.background=null)},_fnRowSelectConfig:function(){if(this.s.master){var a=this,b=this.s.dt;e(b.nTable).addClass(this.classes.select.table);e(b.nTBody).on("click.DTTT_Select","tr",function(c){this.parentNode==b.nTBody&&null!==b.oInstance.fnGetData(this)&&(a.fnIsSelected(this)?a._fnRowDeselect(this,c):"single"==a.s.select.type?(a.fnSelectNone(), +a._fnRowSelect(this,c)):"multi"==a.s.select.type&&a._fnRowSelect(this,c))});b.oApi._fnCallbackReg(b,"aoRowCreatedCallback",function(c,d,f){b.aoData[f]._DTTT_selected&&e(c).addClass(a.classes.select.row)},"TableTools-SelectAll")}},_fnRowSelect:function(a,b){var c=this._fnSelectData(a),d=[],f,j;f=0;for(j=c.length;f/g, +"").replace(/^\s+|\s+$/g,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));g.push(j.join(a.sFieldSeperator))}var p=k.aiDisplay;f=this.fnGetSelected();if("none"!==this.s.select.type&&d&&0!==f.length){p=[];b=0;for(c=f.length;b]+)).*?>/gi,"$1$2$3"),h=h.replace(/<.*?>/g,"")):h+="",h=h.replace(/^\s+/,"").replace(/\s+$/,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));g.push(j.join(a.sFieldSeperator));a.bOpenRows&&(b=e.grep(k.aoOpenRows,function(a){return a.nParent===o}),1===b.length&&(h=this._fnBoundData(e("td",b[0].nTr).html(),a.sFieldBoundary,l),g.push(h)))}if(a.bFooter&&null!==k.nTFoot){j=[];b=0;for(c=k.aoColumns.length;b< +c;b++)n[b]&&null!==k.aoColumns[b].nTf&&(h=k.aoColumns[b].nTf.innerHTML.replace(/\n/g," ").replace(/<.*?>/g,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));g.push(j.join(a.sFieldSeperator))}return _sLastData=g.join(this._fnNewline(a))},_fnBoundData:function(a,b,c){return""===b?a:b+a.replace(c,b+b)+b},_fnChunkData:function(a,b){for(var c=[],d=a.length,f=0;fTable copied

    Copied "+a+" row"+(1==a?"":"s")+ +" to the clipboard.

    ",1500)}}),pdf:e.extend({},TableTools.buttonBase,{sAction:"flash_pdf",sNewLine:"\n",sFileName:"*.pdf",sButtonClass:"DTTT_button_pdf",sButtonText:"PDF",sPdfOrientation:"portrait",sPdfSize:"A4",sPdfMessage:"",fnClick:function(a,b,c){this.fnSetText(c,"title:"+this.fnGetTitle(b)+"\nmessage:"+b.sPdfMessage+"\ncolWidth:"+this.fnCalcColRatios(b)+"\norientation:"+b.sPdfOrientation+"\nsize:"+b.sPdfSize+"\n--/TableToolsOpts--\n"+this.fnGetTableData(b))}}),print:e.extend({},TableTools.buttonBase, +{sInfo:"
    Print view

    Please use your browser's print function to print this table. Press escape when finished.",sMessage:null,bShowAll:!0,sToolTip:"View print view",sButtonClass:"DTTT_button_print",sButtonText:"Print",fnClick:function(a,b){this.fnPrint(!0,b)}}),text:e.extend({},TableTools.buttonBase),select:e.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)}, +fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),select_single:e.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(a){1==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),select_all:e.extend({},TableTools.buttonBase,{sButtonText:"Select all",fnClick:function(){this.fnSelectAll()},fnSelect:function(a){this.fnGetSelected().length== +this.s.dt.fnRecordsDisplay()?e(a).addClass(this.classes.buttons.disabled):e(a).removeClass(this.classes.buttons.disabled)}}),select_none:e.extend({},TableTools.buttonBase,{sButtonText:"Deselect all",fnClick:function(){this.fnSelectNone()},fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),ajax:e.extend({},TableTools.buttonBase,{sAjaxUrl:"/xhr.php", +sButtonText:"Ajax button",fnClick:function(a,b){var c=this.fnGetTableData(b);e.ajax({url:b.sAjaxUrl,data:[{name:"tableData",value:c}],success:b.fnAjaxComplete,dataType:"json",type:"POST",cache:!1,error:function(){alert("Error detected when sending table data to server")}})},fnAjaxComplete:function(){alert("Ajax complete")}}),div:e.extend({},TableTools.buttonBase,{sAction:"div",sTag:"div",sButtonClass:"DTTT_nonbutton",sButtonText:"Text button"}),collection:e.extend({},TableTools.buttonBase,{sAction:"collection", +sButtonClass:"DTTT_button_collection",sButtonText:"Collection",fnClick:function(a,b){this._fnCollectionShow(a,b)}})};TableTools.classes={container:"DTTT_container",buttons:{normal:"DTTT_button",disabled:"DTTT_disabled"},collection:{container:"DTTT_collection",background:"DTTT_collection_background",buttons:{normal:"DTTT_button",disabled:"DTTT_disabled"}},select:{table:"DTTT_selectable",row:"DTTT_selected"},print:{body:"DTTT_Print",info:"DTTT_print_info",message:"DTTT_PrintMessage"}};TableTools.classes_themeroller= +{container:"DTTT_container ui-buttonset ui-buttonset-multi",buttons:{normal:"DTTT_button ui-button ui-state-default"},collection:{container:"DTTT_collection ui-buttonset ui-buttonset-multi"}};TableTools.DEFAULTS={sSwfPath:"media/swf/copy_csv_xls_pdf.swf",sRowSelect:"none",sSelectedClass:null,fnPreRowSelect:null,fnRowSelected:null,fnRowDeselected:null,aButtons:["copy","csv","xls","pdf","print"],oTags:{container:"div",button:"a",liner:"span",collection:{container:"div",button:"a",liner:"span"}}};TableTools.prototype.CLASS= +"TableTools";TableTools.VERSION="2.1.5";TableTools.prototype.VERSION=TableTools.VERSION;"function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.9.0")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(a){a=new TableTools(a.oInstance,"undefined"!=typeof a.oInit.oTableTools?a.oInit.oTableTools:{});TableTools._aInstances.push(a);return a.dom.container},cFeature:"T",sFeature:"TableTools"}):alert("Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download"); +e.fn.DataTable.TableTools=TableTools})(jQuery,window,document); diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js.gz b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..01ce7c041bcdb1df5cec281dd4dc639362beda8d GIT binary patch literal 8785 zcmV-XBCg#ZiwFqdO*Byg15{yRY-Ln$Z)|feZE0>UYI6Y8JZW>=MzY`eD?zq7*^?Wtdx9|B(EzgDXIZ5AYp+37XT$IGXMMQo&y*hq!cH$RjX7iV$jpm(|7j_ zH5_VZ(R>k8?Ti-MK^!f-lw^T+cApn?-Wv|Jy=5^=vx)X=n$yKhd%N^+hvQ78^gK=D+X~l&aYU0MpFFIrd3qbskEEDQblpnm z*Wx&sjIAFg;WF_Hm~RmCLC=dUN~XH&7WWI9h8pSj4dMo=znlXedrFI=nBvF%`{Mv+ zm=3W?5FErL&%b>$h&_t}>XsC$@zjwuN zcuvC*_W2o~tQn1_vjPVBhh6!h1bfRKSB|c4xkP9bLj>yV@lW;fQeyhztB&$AYjZhz zHkp5Hyy=)8rkUXo$MkI6-oTZloxqdj*|6Da>^xmqqHthnY!fxFI6*xcj?1Em0=nk36OMu)aIhn=7k3!|8#vEXOII5W}x zbaAg+$e4p=mZ#ZKg3APxt&!#D`B4~xF6Q_odB@S_(H{sjwvgN|%?{GJ@O>FAX!e2!LBwznu9UNxk0jB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BS(K@re|j7W0v&%Es6IS|k7c!2No%*;DI zPg;nSW+ndLTyRk2GE2eYkrP(}xkf literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.ZeroClipboard.js b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js old mode 100644 new mode 100755 similarity index 86% rename from airtime_mvc/public/js/datatables/plugin/dataTables.ZeroClipboard.js rename to airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js index 73707f024..de0f6b67b --- a/airtime_mvc/public/js/datatables/plugin/dataTables.ZeroClipboard.js +++ b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js @@ -1,7 +1,7 @@ // Simple Set Clipboard System // Author: Joseph Huckaby -var ZeroClipboard = { +var ZeroClipboard_TableTools = { version: "1.0.4-TableTools2", clients: {}, // registered upload clients on page, indexed by id @@ -73,18 +73,18 @@ var ZeroClipboard = { this.handlers = {}; // unique ID - this.id = ZeroClipboard.nextId++; - this.movieId = 'ZeroClipboardMovie_' + this.id; + this.id = ZeroClipboard_TableTools.nextId++; + this.movieId = 'ZeroClipboard_TableToolsMovie_' + this.id; // register client with singleton to receive flash events - ZeroClipboard.register(this.id, this); + ZeroClipboard_TableTools.register(this.id, this); // create movie if (elem) this.glue(elem); } }; -ZeroClipboard.Client.prototype = { +ZeroClipboard_TableTools.Client.prototype = { id: 0, // unique ID for us ready: false, // whether movie is ready to receive events or not @@ -100,7 +100,7 @@ ZeroClipboard.Client.prototype = { glue: function(elem, title) { // glue to DOM element // elem can be ID or actual DOM element object - this.domElement = ZeroClipboard.$(elem); + this.domElement = ZeroClipboard_TableTools.$(elem); // float just above object, or zIndex 99 if dom element isn't set var zIndex = 99; @@ -109,19 +109,18 @@ ZeroClipboard.Client.prototype = { } // find X/Y position of domElement - var box = ZeroClipboard.getDOMObjectPosition(this.domElement); + var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); // create floating DIV above element this.div = document.createElement('div'); var style = this.div.style; style.position = 'absolute'; - style.left = (this.domElement.offsetLeft)+'px'; - //style.left = (this.domElement.offsetLeft+2)+'px'; - style.top = this.domElement.offsetTop+'px'; + style.left = '0px'; + style.top = '0px'; style.width = (box.width) + 'px'; - //style.width = (box.width-4) + 'px'; style.height = box.height + 'px'; style.zIndex = zIndex; + if ( typeof title != "undefined" && title != "" ) { this.div.title = title; } @@ -130,18 +129,19 @@ ZeroClipboard.Client.prototype = { } // style.backgroundColor = '#f00'; // debug - this.domElement.parentNode.appendChild(this.div); - - this.div.innerHTML = this.getHTML( box.width, box.height ); + if ( this.domElement ) { + this.domElement.appendChild(this.div); + this.div.innerHTML = this.getHTML( box.width, box.height ); + } }, positionElement: function() { - var box = ZeroClipboard.getDOMObjectPosition(this.domElement); + var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); var style = this.div.style; style.position = 'absolute'; - style.left = (this.domElement.offsetLeft)+'px'; - style.top = this.domElement.offsetTop+'px'; + //style.left = (this.domElement.offsetLeft)+'px'; + //style.top = this.domElement.offsetTop+'px'; style.width = box.width + 'px'; style.height = box.height + 'px'; @@ -166,11 +166,11 @@ ZeroClipboard.Client.prototype = { if (navigator.userAgent.match(/MSIE/)) { // IE gets an OBJECT tag var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; - html += ''; + html += ''; } else { // all other browsers get an EMBED tag - html += ''; + html += ''; } return html; }, @@ -205,12 +205,12 @@ ZeroClipboard.Client.prototype = { // reposition our floating div, optionally to new container // warning: container CANNOT change size, only position if (elem) { - this.domElement = ZeroClipboard.$(elem); + this.domElement = ZeroClipboard_TableTools.$(elem); if (!this.domElement) this.hide(); } if (this.domElement && this.div) { - var box = ZeroClipboard.getDOMObjectPosition(this.domElement); + var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); var style = this.div.style; style.left = '' + box.left + 'px'; style.top = '' + box.top + 'px'; diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls.swf b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls.swf new file mode 100644 index 0000000000000000000000000000000000000000..082c7acbfd0e1368e3a1ef4b10a218bb1dbe7d60 GIT binary patch literal 2165 zcmV-*2#WVZS5pdG4FCXm+I?2tcGE}_?y_aIB-@Ge4+#tg0-4F!v6C=BGLVVm#3Yd5 zEJ=W6VX!QV85z_S|A(wzG_FN`}{LuF|Amo9o8?(~WqY%zJsfNJervW+ z*xTEi*qfek-0i~T%*;%oI8~UM%A-f#JFtCqKW}?C$L7KSi_Ftpv*nwPo#nb(ciR5L zv9V56T{{ihYP(h#Qr8O1VohfIUSV=#5(DYltl_v#)t^&aEz8tY9ufbLZOjj_vG4Q=FmPM{}9#I~P4pFmAV0d%LY}v$>_Gq3u); zb5wmcSG<#7Q{DVjadJA!f`bnVpB1}<;Qq~##mv9s4@fz7e0=;$iQ@)~_!mg^9toe@ z3+s0t;)efSdBt3(Y?-aPqq;izxql={2pWjts!cXYGGv0p-v1gWG17VdNQ7O-)Kg*k zC)h6Ev&0hb#0}py?QOc?I2KdwM9Fp4gJk5__D#!^7Y=+DqUj6MrXwHS^jemBAa1l= z(`O0YX|CvEz3uysEotbx$@cw39jmh=8K%XaVuGTo@s$gj(>f4MTU&6NRBNd22J?ls zZ`@C*x?WZ-tFCH0p5igT92sR4(RanxWDRq5d1wWR#%!I76wSO(VqfV@#fOx_+0rO2 ztF~TlyPo5wFg0z5>lSlU9x}7+G+P$)8Qo_7y6d!L&v!SStPk!H#K9GKVzvH`X@1PquXhgD*}*DpOc$n##k+-i+q8Vs z?!Ul**@yw77s17-kD`_xymU;Pxz{c_g~j8f*kzI9$o~m)xg&0EcEH8z zi>Fc~ZmmnWp)1czn@a-U6FFSquIhTpa|eNT2qe=vzlWY=62g^iBxGNTpVyP{lGZs@qQ&fOzX7wHQsr7>x-O5)?!Vl*VNW z3KddROjEIoirrM~p<*u;`>8lUVTi&d3YRGiQy8Ieg~C+|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y(emG zor90}fx>C;IDYW2XzVl7YIH9!Cx&1-rPC(1TXmDF2R3_;4KK= zQV@J%=irmP;7@i5{+9?o5y4vvf=})oe2N!*NSEOM9l<9d_|$^n(>e!#%?tiim*77` z@Kyw$UJ!gn=ioEF;6u9vzYoDDBlxU>;IlgipW_7|)+P8~A@~#opIZ=oUgzMid%>UX z68wGypNin~DToxbgWp*;kUFfQfFAhuZ-4o<`d|IcqYwV(fz;Phzy3cDH-7C0zkcAs zpVa^I!C(B~Ctttqo3{l*U+wAZ0rAzIz7bHr+SBcU;1xanu;$)x|11#xYDWD7+E+6A yX+ZgEM&As`U+wAJ0qLtfeJcM`kUV*e_j9E2Ldz<4*XwpXInCMli1M! literal 0 HcmV?d00001 From c3c64e6fb1b092295e12b6f15b383d4832876d6a Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 12 Aug 2013 18:18:58 -0400 Subject: [PATCH 050/181] crlf --- airtime_mvc/application/services/HistoryService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index db6f8cbb3..5b6e4f7d9 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -270,7 +270,7 @@ class Application_Service_HistoryService $result[MDATA_KEY_DURATION] = $formatter->format(); } - //$unicodeChar = '\u2612'; + //$unicodeChar = '\u2612'; //$result["new"] = json_decode('"'.$unicodeChar.'"'); //$result["new"] = "U+2612"; } From 033693721e2477d05b03dbd1aedd587c7035cd39 Mon Sep 17 00:00:00 2001 From: drigato Date: Tue, 13 Aug 2013 16:36:04 -0400 Subject: [PATCH 051/181] CC-5302: Undefined variable in zend log --- airtime_mvc/application/views/scripts/playlist/update.phtml | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/application/views/scripts/playlist/update.phtml b/airtime_mvc/application/views/scripts/playlist/update.phtml index 38558d760..e1c11f406 100644 --- a/airtime_mvc/application/views/scripts/playlist/update.phtml +++ b/airtime_mvc/application/views/scripts/playlist/update.phtml @@ -8,6 +8,7 @@ $nextFileUrl = null; if ($item['type'] == 2) { $bl= new Application_Model_Block($item['item_id']); $staticBlock = $bl->isStatic(); + $fileUrl = null; } else if ($item['type'] == 0) { $audiofile = Application_Model_StoredFile::RecallById($item['item_id']); From c48f556b7db820b61971edc7f5f0a5d1f5d45761 Mon Sep 17 00:00:00 2001 From: drigato Date: Tue, 13 Aug 2013 16:41:32 -0400 Subject: [PATCH 052/181] CC-5303: Interface freezes sometimes when using smart blocks --- airtime_mvc/application/models/Playlist.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/models/Playlist.php b/airtime_mvc/application/models/Playlist.php index 7011a501f..7eaad0a64 100644 --- a/airtime_mvc/application/models/Playlist.php +++ b/airtime_mvc/application/models/Playlist.php @@ -505,11 +505,12 @@ SQL; foreach ($p_items as $ac) { $res = $this->insertPlaylistElement($this->buildEntry($ac, $pos)); - // update is_playlist flag in cc_files to indicate the // file belongs to a playlist or block (in this case a playlist) - $db_file = CcFilesQuery::create()->findPk($ac[0], $this->con); - $db_file->setDbIsPlaylist(true)->save($this->con); + if ($ac[1] == "audioclip") { + $db_file = CcFilesQuery::create()->findPk($ac[0], $this->con); + $db_file->setDbIsPlaylist(true)->save($this->con); + } $pos = $pos + 1; } From 5f588afdd5221085cc72cf1e4ead443fd75e860d Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 14 Aug 2013 13:07:06 -0400 Subject: [PATCH 053/181] CC-5293: Calendar page cannot be loaded sometimes --- .../controllers/ScheduleController.php | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index b610063af..c57ef5e49 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -46,6 +46,17 @@ class ScheduleController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); + $this->view->headScript()->appendScript( + "var calendarPref = {};\n". + "calendarPref.weekStart = ".Application_Model_Preference::GetWeekStartDay().";\n". + "calendarPref.timestamp = ".time().";\n". + "calendarPref.timezoneOffset = ".date("Z").";\n". + "calendarPref.timeScale = '".Application_Model_Preference::GetCalendarTimeScale()."';\n". + "calendarPref.timeInterval = ".Application_Model_Preference::GetCalendarTimeInterval().";\n". + "calendarPref.weekStartDay = ".Application_Model_Preference::GetWeekStartDay().";\n". + "var calendarEvents = null;" + ); + $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); //full-calendar-functions.js requires this variable, so that datePicker widget can be offset to server time instead of client time @@ -98,16 +109,6 @@ class ScheduleController extends Zend_Controller_Action } $this->view->addNewShow = true; - $this->view->headScript()->appendScript( - "var calendarPref = {};\n". - "calendarPref.weekStart = ".Application_Model_Preference::GetWeekStartDay().";\n". - "calendarPref.timestamp = ".time().";\n". - "calendarPref.timezoneOffset = ".date("Z").";\n". - "calendarPref.timeScale = '".Application_Model_Preference::GetCalendarTimeScale()."';\n". - "calendarPref.timeInterval = ".Application_Model_Preference::GetCalendarTimeInterval().";\n". - "calendarPref.weekStartDay = ".Application_Model_Preference::GetWeekStartDay().";\n". - "var calendarEvents = null;" - ); } public function eventFeedAction() From 673c422015ce5562c8e001806ddef01807d71ef6 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 14 Aug 2013 16:38:59 -0400 Subject: [PATCH 054/181] replacing booleans in table with checkbox + column title --- .../application/services/HistoryService.php | 15 +++++++- .../js/airtime/playouthistory/historytable.js | 35 ++++++++++++++++--- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 5b6e4f7d9..37a81f5f6 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -254,8 +254,20 @@ class Application_Service_HistoryService $timezoneUTC = new DateTimeZone("UTC"); $timezoneLocal = new DateTimeZone($this->timezone); + $boolCast = array(); + foreach ($fields as $index=>$field) { + + if ($field["type"] == TEMPLATE_BOOLEAN) { + $boolCast[] = $field["name"]; + } + } + //need to display the results in the station's timezone. foreach ($rows as $index => &$result) { + + foreach ($boolCast as $name) { + $result[$name] = (bool) $result[$name]; + } $dateTime = new DateTime($result["starts"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); @@ -1019,7 +1031,8 @@ class Application_Service_HistoryService $columns[] = array( "sTitle"=> $label, "mDataProp"=> $key, - "sClass"=> "his_{$key}" + "sClass"=> "his_{$key}", + "sDataType"=> $field["type"] ); } diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 5719d7d61..f4daa185b 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -96,6 +96,7 @@ var AIRTIME = (function(AIRTIME) { function aggregateHistoryTable() { var oTable, $historyTableDiv = $historyContentDiv.find("#history_table_aggregate"), + columns, fnRowCallback; fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { @@ -104,7 +105,7 @@ var AIRTIME = (function(AIRTIME) { nRow.setAttribute('url-edit', editUrl); }; - var columns = JSON.parse(localStorage.getItem('datatables-historyfile-aoColumns')); + columns = JSON.parse(localStorage.getItem('datatables-historyfile-aoColumns')); oTable = $historyTableDiv.dataTable( { @@ -133,18 +134,42 @@ var AIRTIME = (function(AIRTIME) { function itemHistoryTable() { var oTable, $historyTableDiv = $historyContentDiv.find("#history_table_list"), - fnRowCallback; + columns, + fnRowCallback, + booleans = {}, + i, c; - var columns = JSON.parse(localStorage.getItem('datatables-historyitem-aoColumns')); + columns = JSON.parse(localStorage.getItem('datatables-historyitem-aoColumns')); + + for (i in columns) { + + c = columns[i]; + if (c["sDataType"] === "boolean") { + booleans[c["mDataProp"]] = c["sTitle"]; + } + } fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { var editUrl = baseUrl+"playouthistory/edit-list-item/format/json/id/"+aData.history_id, - deleteUrl = baseUrl+"playouthistory/delete-list-item/format/json/id/"+aData.history_id; + deleteUrl = baseUrl+"playouthistory/delete-list-item/format/json/id/"+aData.history_id, + emptyCheckBox = String.fromCharCode(parseInt(2610, 16)), + checkedCheckBox = String.fromCharCode(parseInt(2612, 16)), + b, + text, + $nRow = $(nRow); nRow.setAttribute('url-edit', editUrl); nRow.setAttribute('url-delete', deleteUrl); + + for (b in booleans) { + + text = aData[b] ? checkedCheckBox : emptyCheckBox; + text = text + " " + booleans[b]; + + $nRow.find(".his_"+b).html(text); + } }; - + oTable = $historyTableDiv.dataTable( { "aoColumns": columns, From 7cf654551de340d2c384a5365dadce4f2a9804b2 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 14 Aug 2013 16:39:50 -0400 Subject: [PATCH 055/181] crlf --- airtime_mvc/application/services/HistoryService.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 37a81f5f6..d2f46954e 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -255,18 +255,18 @@ class Application_Service_HistoryService $timezoneLocal = new DateTimeZone($this->timezone); $boolCast = array(); - foreach ($fields as $index=>$field) { - + foreach ($fields as $index=>$field) { + if ($field["type"] == TEMPLATE_BOOLEAN) { - $boolCast[] = $field["name"]; - } + $boolCast[] = $field["name"]; + } } //need to display the results in the station's timezone. foreach ($rows as $index => &$result) { - foreach ($boolCast as $name) { - $result[$name] = (bool) $result[$name]; + foreach ($boolCast as $name) { + $result[$name] = (bool) $result[$name]; } $dateTime = new DateTime($result["starts"], $timezoneUTC); From 50d5685199866487de4148d1a56fb8d67ea26674 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 14 Aug 2013 17:43:14 -0400 Subject: [PATCH 056/181] CC-5270: looping on InvalidContentType --- .../application/controllers/ApiController.php | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 6c16dc07a..4136a1980 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -1006,23 +1006,30 @@ class ApiController extends Zend_Controller_Action //calculated with silan by actually scanning the entire file. This //process takes a really long time, and so we only do it in the background //after the file has already been imported -MK - $length = $file->getDbLength(); - if (isset($info['length'])) { - $length = $info['length']; - //length decimal number in seconds. Need to convert it to format - //HH:mm:ss to get around silly PHP limitations. - $length = Application_Common_DateHelper::secondsToPlaylistTime($length); + try { + $length = $file->getDbLength(); + if (isset($info['length'])) { + $length = $info['length']; + //length decimal number in seconds. Need to convert it to format + //HH:mm:ss to get around silly PHP limitations. + $length = Application_Common_DateHelper::secondsToPlaylistTime($length); + $file->setDbLength($length); + } - $file->setDbLength($length); + $cuein = isset($info['cuein']) ? $info['cuein'] : 0; + $cueout = isset($info['cueout']) ? $info['cueout'] : $length; + + $file->setDbCuein($cuein); + $file->setDbCueout($cueout); + $file->setDbSilanCheck(true); + $file->save(); + } catch (Exception $e) { + Logging::info("Failed to update silan values for ".$file->getDbTrackTitle()); + Logging::info("File length analyzed by Silan is: ".$length); + //set silan_check to true so we don't attempt to re-anaylze again + $file->setDbSilanCheck(true); + $file->save(); } - - $cuein = isset($info['cuein']) ? $info['cuein'] : 0; - $cueout = isset($info['cueout']) ? $info['cueout'] : $length; - - $file->setDbCuein($cuein); - $file->setDbCueout($cueout); - $file->setDbSilanCheck(true); - $file->save(); } $this->_helper->json->sendJson(array()); From 7230b3ef581e2ae014c09daa20db7914e73a7f94 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 16 Aug 2013 12:57:04 -0400 Subject: [PATCH 057/181] removing tabletools from schedule page. --- airtime_mvc/application/controllers/ScheduleController.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index b610063af..42ecbf6c4 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -74,7 +74,6 @@ class ScheduleController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColReorder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); @@ -86,7 +85,6 @@ class ScheduleController extends Zend_Controller_Action $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/TableTools.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']); //End Show builder JS/CSS requirements From 9b45b9dc72ccd99f3fd5a60cc3d78d59cf401344 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 16 Aug 2013 15:12:00 -0400 Subject: [PATCH 058/181] converting to a jquery UI based datepicker. --- .../controllers/PlayouthistoryController.php | 85 +- .../application/forms/EditHistoryItem.php | 10 +- .../scripts/form/edit-history-item.phtml | 15 +- .../public/css/jquery-ui-timepicker-addon.css | 10 + airtime_mvc/public/css/styles.css | 3 - .../js/airtime/playouthistory/historytable.js | 10 +- .../timepicker/jquery-ui-timepicker-addon.js | 2128 +++++++++++++++++ 7 files changed, 2197 insertions(+), 64 deletions(-) create mode 100644 airtime_mvc/public/css/jquery-ui-timepicker-addon.css create mode 100644 airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 5aa78faa9..0c399aa99 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -55,7 +55,7 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery-ui-timepicker-addon.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); @@ -67,13 +67,14 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools-2.1.5/css/TableTools.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/bootstrap-datetimepicker.min.css?'.$CC_CONFIG['airtime_version']); - + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery-ui-timepicker-addon.css?'.$CC_CONFIG['airtime_version']); + + //set datatables columns for display of data. $historyService = new Application_Service_HistoryService(); $columns = json_encode($historyService->getDatatablesLogSheetColumns()); $script = "localStorage.setItem( 'datatables-historyitem-aoColumns', JSON.stringify($columns) ); "; - + $columns = json_encode($historyService->getDatatablesFileSummaryColumns()); $script.= "localStorage.setItem( 'datatables-historyfile-aoColumns', JSON.stringify($columns) );"; $this->view->headScript()->appendScript($script); @@ -84,18 +85,18 @@ class PlayouthistoryController extends Zend_Controller_Action try { $request = $this->getRequest(); $current_time = time(); - + $params = $request->getParams(); - + $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); $ends_epoch = $request->getParam("end", $current_time); - + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - + $historyService = new Application_Service_HistoryService(); $r = $historyService->getFileSummaryData($startsDT, $endsDT, $params); - + $this->view->sEcho = $r["sEcho"]; $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; $this->view->iTotalRecords = $r["iTotalRecords"]; @@ -112,19 +113,19 @@ class PlayouthistoryController extends Zend_Controller_Action try { $request = $this->getRequest(); $current_time = time(); - + $params = $request->getParams(); - + $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); $ends_epoch = $request->getParam("end", $current_time); - + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - + $historyService = new Application_Service_HistoryService(); //$r = $historyService->getListView($startsDT, $endsDT, $params); $r = $historyService->getPlayedItemData($startsDT, $endsDT, $params); - + $this->view->sEcho = $r["sEcho"]; $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; $this->view->iTotalRecords = $r["iTotalRecords"]; @@ -155,10 +156,10 @@ class PlayouthistoryController extends Zend_Controller_Action $request = $this->getRequest(); $params = $request->getPost(); Logging::info($params); - + $historyService = new Application_Service_HistoryService(); $json = $historyService->createPlayedItem($params); - + $this->_helper->json->sendJson($json); } catch (Exception $e) { @@ -171,7 +172,7 @@ class PlayouthistoryController extends Zend_Controller_Action { $id = $this->_getParam('id', null); Logging::info("Id is: $id"); - + $populate = isset($id) ? true : false; $historyService = new Application_Service_HistoryService(); @@ -197,10 +198,10 @@ class PlayouthistoryController extends Zend_Controller_Action $request = $this->getRequest(); $params = $request->getPost(); Logging::info($params); - + $historyService = new Application_Service_HistoryService(); $json = $historyService->editPlayedItem($params); - + $this->_helper->json->sendJson($json); } catch (Exception $e) { @@ -225,7 +226,7 @@ class PlayouthistoryController extends Zend_Controller_Action { $CC_CONFIG = Config::getConfig(); $baseUrl = Application_Common_OsPath::getBaseDir(); - + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $historyService = new Application_Service_HistoryService(); @@ -235,29 +236,29 @@ class PlayouthistoryController extends Zend_Controller_Action } public function configureTemplateAction() { - + $CC_CONFIG = Config::getConfig(); $baseUrl = Application_Common_OsPath::getBaseDir(); - + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - + try { - + $templateId = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); + + $historyService = new Application_Service_HistoryService(); $template = $historyService->loadTemplate($templateId); - + $templateType = $template["type"]; $supportedTypes = $historyService->getSupportedTemplateTypes(); - + if (!in_array($templateType, $supportedTypes)) { throw new Exception("Error: $templateType is not supported."); } - + $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; $mandatoryFields = $historyService->$getMandatoryFields(); - + $this->view->template_id = $templateId; $this->view->template_name = $template["name"]; $this->view->template_fields = $template["fields"]; @@ -271,7 +272,7 @@ class PlayouthistoryController extends Zend_Controller_Action Logging::info("Error?"); Logging::info($e); Logging::info($e->getMessage()); - + $this->_forward('template', 'playouthistory'); } } @@ -279,34 +280,34 @@ class PlayouthistoryController extends Zend_Controller_Action public function createTemplateAction() { $templateType = $this->_getParam('type', null); - + $request = $this->getRequest(); $params = $request->getPost(); - + try { $historyService = new Application_Service_HistoryService(); $supportedTypes = $historyService->getSupportedTemplateTypes(); - + if (!in_array($templateType, $supportedTypes)) { throw new Exception("Error: $templateType is not supported."); } - + $id = $historyService->createTemplate($params); - + $this->view->url = $this->view->baseUrl("Playouthistory/configure-template/id/{$id}"); } catch (Exception $e) { Logging::info($e); Logging::info($e->getMessage()); - + $this->view->error = $e->getMessage(); } } - + public function setTemplateDefaultAction() { $templateId = $this->_getParam('id', null); - + try { $historyService = new Application_Service_HistoryService(); $historyService->setConfiguredTemplate($templateId); @@ -318,11 +319,11 @@ class PlayouthistoryController extends Zend_Controller_Action } public function updateTemplateAction() - { + { $templateId = $this->_getParam('id', null); $name = $this->_getParam('name', null); $fields = $this->_getParam('fields', array()); - + try { $historyService = new Application_Service_HistoryService(); $historyService->updateItemTemplate($templateId, $name, $fields); @@ -336,7 +337,7 @@ class PlayouthistoryController extends Zend_Controller_Action public function deleteTemplateAction() { $templateId = $this->_getParam('id'); - + try { $historyService = new Application_Service_HistoryService(); $historyService->deleteTemplate($templateId); diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php index f0389eb8a..cb9868e49 100644 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -5,7 +5,7 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory const ID_PREFIX = "his_item_"; public function init() { - + parent::init(); $this->setDecorators(array( @@ -17,7 +17,7 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory $starts->setValidators(array( new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT) )); - $starts->setAttrib('class', self::TEXT_INPUT_CLASS); + $starts->setAttrib('class', self::TEXT_INPUT_CLASS." datepicker"); $starts->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT); $starts->addFilter('StringTrim'); $starts->setLabel(_('Start Time')); @@ -29,7 +29,7 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory $ends->setValidators(array( new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT) )); - $ends->setAttrib('class', self::TEXT_INPUT_CLASS); + $ends->setAttrib('class', self::TEXT_INPUT_CLASS." datepicker"); $ends->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT); $ends->addFilter('StringTrim'); $ends->setLabel(_('End Time')); @@ -37,9 +37,9 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory $ends->setRequired(true); $this->addElement($ends); } - + public function createFromTemplate($template, $required) { - + parent::createFromTemplate($template, $required); } } \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml index 7f87f20d6..f36660c59 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml @@ -13,21 +13,16 @@

    -
    -
    - getElement($name) ?> - - - -
    -
    + + getElement($name) ?> + getElement($name)->hasErrors()) : ?>
      getElement($name)->getMessages() as $error): ?>
    - +
    @@ -45,7 +40,7 @@
  • - + diff --git a/airtime_mvc/public/css/jquery-ui-timepicker-addon.css b/airtime_mvc/public/css/jquery-ui-timepicker-addon.css new file mode 100644 index 000000000..b93a85f62 --- /dev/null +++ b/airtime_mvc/public/css/jquery-ui-timepicker-addon.css @@ -0,0 +1,10 @@ +.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } +.ui-timepicker-div dl { text-align: left; } +.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; } +.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; } +.ui-timepicker-div td { font-size: 90%; } +.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } + +.ui-timepicker-rtl{ direction: rtl; } +.ui-timepicker-rtl dl { text-align: right; } +.ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; } \ No newline at end of file diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 837c08d1c..318030923 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -1552,9 +1552,6 @@ button, input { background-image:url(redmond/images/ui-icons_ff5d1a_256x240.png); } - -#ui-datepicker-div { z-index: 10 !important } - .button-bar-top { text-align:right; height:38px; diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index f4daa185b..d988cdafb 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -220,11 +220,13 @@ var AIRTIME = (function(AIRTIME) { $hisDialogEl.dialog({ title: $.i18n._("Edit History Record"), - modal: true, + modal: false, open: function( event, ui ) { - $hisDialogEl.find('.date').datetimepicker({ - "pick12HourFormat": false - }); + $hisDialogEl.find('.datepicker').datetimepicker({ + dateFormat: 'yy-mm-dd', + timeFormat: 'HH:mm:ss' + }) + .blur(); }, close: function() { removeHistoryDialog(); diff --git a/airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js b/airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js new file mode 100644 index 000000000..6f35ee532 --- /dev/null +++ b/airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js @@ -0,0 +1,2128 @@ +/* + * jQuery timepicker addon + * By: Trent Richardson [http://trentrichardson.com] + * Version 1.3.1 + * Last Modified: 07/07/2013 + * + * Copyright 2013 Trent Richardson + * You may use this project under MIT or GPL licenses. + * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt + * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt + */ + +/*jslint evil: true, white: false, undef: false, nomen: false */ + +(function($) { + + /* + * Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded" + */ + $.ui.datetimepicker = $.ui.datetimepicker || {}; + if ($.ui.datetimepicker.version) { + return; + } + + /* + * Extend jQueryUI, get it started with our version number + */ + $.extend($.ui, { + datetimepicker: { + version: "1.3.1" + } + }); + + /* + * Timepicker manager. + * Use the singleton instance of this class, $.datetimepicker, to interact with the time picker. + * Settings for (groups of) time pickers are maintained in an instance object, + * allowing multiple different settings on the same page. + */ + var Timepicker = function() { + this.regional = []; // Available regional settings, indexed by language code + this.regional[''] = { // Default regional settings + currentText: 'Now', + closeText: 'Done', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + timeFormat: 'HH:mm', + timeSuffix: '', + timeOnlyTitle: 'Choose Time', + timeText: 'Time', + hourText: 'Hour', + minuteText: 'Minute', + secondText: 'Second', + millisecText: 'Millisecond', + microsecText: 'Microsecond', + timezoneText: 'Time Zone', + isRTL: false + }; + this._defaults = { // Global defaults for all the datetime picker instances + showButtonPanel: true, + timeOnly: false, + showHour: null, + showMinute: null, + showSecond: null, + showMillisec: null, + showMicrosec: null, + showTimezone: null, + showTime: true, + stepHour: 1, + stepMinute: 1, + stepSecond: 1, + stepMillisec: 1, + stepMicrosec: 1, + hour: 0, + minute: 0, + second: 0, + millisec: 0, + microsec: 0, + timezone: null, + hourMin: 0, + minuteMin: 0, + secondMin: 0, + millisecMin: 0, + microsecMin: 0, + hourMax: 23, + minuteMax: 59, + secondMax: 59, + millisecMax: 999, + microsecMax: 999, + minDateTime: null, + maxDateTime: null, + onSelect: null, + hourGrid: 0, + minuteGrid: 0, + secondGrid: 0, + millisecGrid: 0, + microsecGrid: 0, + alwaysSetTime: true, + separator: ' ', + altFieldTimeOnly: true, + altTimeFormat: null, + altSeparator: null, + altTimeSuffix: null, + pickerTimeFormat: null, + pickerTimeSuffix: null, + showTimepicker: true, + timezoneList: null, + addSliderAccess: false, + sliderAccessArgs: null, + controlType: 'slider', + defaultValue: null, + parse: 'strict' + }; + $.extend(this._defaults, this.regional['']); + }; + + $.extend(Timepicker.prototype, { + $input: null, + $altInput: null, + $timeObj: null, + inst: null, + hour_slider: null, + minute_slider: null, + second_slider: null, + millisec_slider: null, + microsec_slider: null, + timezone_select: null, + hour: 0, + minute: 0, + second: 0, + millisec: 0, + microsec: 0, + timezone: null, + hourMinOriginal: null, + minuteMinOriginal: null, + secondMinOriginal: null, + millisecMinOriginal: null, + microsecMinOriginal: null, + hourMaxOriginal: null, + minuteMaxOriginal: null, + secondMaxOriginal: null, + millisecMaxOriginal: null, + microsecMaxOriginal: null, + ampm: '', + formattedDate: '', + formattedTime: '', + formattedDateTime: '', + timezoneList: null, + units: ['hour','minute','second','millisec', 'microsec'], + support: {}, + control: null, + + /* + * Override the default settings for all instances of the time picker. + * @param settings object - the new settings to use as defaults (anonymous object) + * @return the manager object + */ + setDefaults: function(settings) { + extendRemove(this._defaults, settings || {}); + return this; + }, + + /* + * Create a new Timepicker instance + */ + _newInst: function($input, opts) { + var tp_inst = new Timepicker(), + inlineSettings = {}, + fns = {}, + overrides, i; + + for (var attrName in this._defaults) { + if(this._defaults.hasOwnProperty(attrName)){ + var attrValue = $input.attr('time:' + attrName); + if (attrValue) { + try { + inlineSettings[attrName] = eval(attrValue); + } catch (err) { + inlineSettings[attrName] = attrValue; + } + } + } + } + + overrides = { + beforeShow: function (input, dp_inst) { + if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) { + return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst); + } + }, + onChangeMonthYear: function (year, month, dp_inst) { + // Update the time as well : this prevents the time from disappearing from the $input field. + tp_inst._updateDateTime(dp_inst); + if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) { + tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst); + } + }, + onClose: function (dateText, dp_inst) { + if (tp_inst.timeDefined === true && $input.val() !== '') { + tp_inst._updateDateTime(dp_inst); + } + if ($.isFunction(tp_inst._defaults.evnts.onClose)) { + tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst); + } + } + }; + for (i in overrides) { + if (overrides.hasOwnProperty(i)) { + fns[i] = opts[i] || null; + } + } + + tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, { + evnts:fns, + timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker'); + }); + tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) { + return val.toUpperCase(); + }); + tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) { + return val.toUpperCase(); + }); + + // detect which units are supported + tp_inst.support = detectSupport( + tp_inst._defaults.timeFormat + + (tp_inst._defaults.pickerTimeFormat? tp_inst._defaults.pickerTimeFormat:'') + + (tp_inst._defaults.altTimeFormat? tp_inst._defaults.altTimeFormat:'')); + + // controlType is string - key to our this._controls + if(typeof(tp_inst._defaults.controlType) === 'string'){ + if(tp_inst._defaults.controlType == 'slider' && typeof(jQuery.ui.slider) === 'undefined'){ + tp_inst._defaults.controlType = 'select'; + } + tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType]; + } + // controlType is an object and must implement create, options, value methods + else{ + tp_inst.control = tp_inst._defaults.controlType; + } + + // prep the timezone options + var timezoneList = [-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60, + 0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840]; + if (tp_inst._defaults.timezoneList !== null) { + timezoneList = tp_inst._defaults.timezoneList; + } + var tzl=timezoneList.length,tzi=0,tzv=null; + if (tzl > 0 && typeof timezoneList[0] !== 'object') { + for(; tzi tp_inst._defaults.hourMax? tp_inst._defaults.hourMax : tp_inst._defaults.hour; + tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin? tp_inst._defaults.minuteMin : + tp_inst._defaults.minute > tp_inst._defaults.minuteMax? tp_inst._defaults.minuteMax : tp_inst._defaults.minute; + tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin? tp_inst._defaults.secondMin : + tp_inst._defaults.second > tp_inst._defaults.secondMax? tp_inst._defaults.secondMax : tp_inst._defaults.second; + tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin? tp_inst._defaults.millisecMin : + tp_inst._defaults.millisec > tp_inst._defaults.millisecMax? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec; + tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin? tp_inst._defaults.microsecMin : + tp_inst._defaults.microsec > tp_inst._defaults.microsecMax? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec; + tp_inst.ampm = ''; + tp_inst.$input = $input; + + if (tp_inst._defaults.altField) { + tp_inst.$altInput = $(tp_inst._defaults.altField).css({ + cursor: 'pointer' + }).focus(function() { + $input.trigger("focus"); + }); + } + + if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) { + tp_inst._defaults.minDate = new Date(); + } + if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) { + tp_inst._defaults.maxDate = new Date(); + } + + // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime.. + if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) { + tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime()); + } + if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) { + tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime()); + } + if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) { + tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime()); + } + if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) { + tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime()); + } + tp_inst.$input.bind('focus', function() { + tp_inst._onFocus(); + }); + + return tp_inst; + }, + + /* + * add our sliders to the calendar + */ + _addTimePicker: function(dp_inst) { + var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val(); + + this.timeDefined = this._parseTime(currDT); + this._limitMinMaxDateTime(dp_inst, false); + this._injectTimePicker(); + }, + + /* + * parse the time string from input value or _setTime + */ + _parseTime: function(timeString, withDate) { + if (!this.inst) { + this.inst = $.datepicker._getInst(this.$input[0]); + } + + if (withDate || !this._defaults.timeOnly) { + var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat'); + try { + var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults); + if (!parseRes.timeObj) { + return false; + } + $.extend(this, parseRes.timeObj); + } catch (err) { + $.datetimepicker.log("Error parsing the date/time string: " + err + + "\ndate/time string = " + timeString + + "\ntimeFormat = " + this._defaults.timeFormat + + "\ndateFormat = " + dp_dateFormat); + return false; + } + return true; + } else { + var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults); + if (!timeObj) { + return false; + } + $.extend(this, timeObj); + return true; + } + }, + + /* + * generate and inject html for timepicker into ui datepicker + */ + _injectTimePicker: function() { + var $dp = this.inst.dpDiv, + o = this.inst.settings, + tp_inst = this, + litem = '', + uitem = '', + show = null, + max = {}, + gridSize = {}, + size = null, + i=0, + l=0; + + // Prevent displaying twice + if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) { + var noDisplay = ' style="display:none;"', + html = '
    ' + '
    ' + o.timeText + '
    ' + + '
    '; + + // Create the markup + for(i=0,l=this.units.length; i' + o[litem +'Text'] + '' + + '
    '; + + if (show && o[litem+'Grid'] > 0) { + html += '
    '; + + if(litem == 'hour'){ + for (var h = o[litem+'Min']; h <= max[litem]; h += parseInt(o[litem+'Grid'], 10)) { + gridSize[litem]++; + var tmph = $.datepicker.formatTime(this.support.ampm? 'hht':'HH', {hour:h}, o); + html += ''; + } + } + else{ + for (var m = o[litem+'Min']; m <= max[litem]; m += parseInt(o[litem+'Grid'], 10)) { + gridSize[litem]++; + html += ''; + } + } + + html += '
    ' + tmph + '' + ((m < 10) ? '0' : '') + m + '
    '; + } + html += ''; + } + + // Timezone + var showTz = o.showTimezone !== null? o.showTimezone : this.support.timezone; + html += '
    ' + o.timezoneText + '
    '; + html += '
    '; + + // Create the elements from string + html += ''; + var $tp = $(html); + + // if we only want time picker... + if (o.timeOnly === true) { + $tp.prepend('
    ' + '
    ' + o.timeOnlyTitle + '
    ' + '
    '); + $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); + } + + // add sliders, adjust grids, add events + for(i=0,l=tp_inst.units.length; i 0) { + size = 100 * gridSize[litem] * o[litem+'Grid'] / (max[litem] - o[litem+'Min']); + $tp.find('.ui_tpicker_'+litem+' table').css({ + width: size + "%", + marginLeft: o.isRTL? '0' : ((size / (-2 * gridSize[litem])) + "%"), + marginRight: o.isRTL? ((size / (-2 * gridSize[litem])) + "%") : '0', + borderCollapse: 'collapse' + }).find("td").click(function(e){ + var $t = $(this), + h = $t.html(), + n = parseInt(h.replace(/[^0-9]/g),10), + ap = h.replace(/[^apm]/ig), + f = $t.data('for'); // loses scope, so we use data-for + + if(f == 'hour'){ + if(ap.indexOf('p') !== -1 && n < 12){ + n += 12; + } + else{ + if(ap.indexOf('a') !== -1 && n === 12){ + n = 0; + } + } + } + + tp_inst.control.value(tp_inst, tp_inst[f+'_slider'], litem, n); + + tp_inst._onTimeChange(); + tp_inst._onSelectHandler(); + }).css({ + cursor: 'pointer', + width: (100 / gridSize[litem]) + '%', + textAlign: 'center', + overflow: 'hidden' + }); + } // end if grid > 0 + } // end for loop + + // Add timezone options + this.timezone_select = $tp.find('.ui_tpicker_timezone').append('').find("select"); + $.fn.append.apply(this.timezone_select, + $.map(o.timezoneList, function(val, idx) { + return $("
    +
    render('playouthistory/template-contents.phtml'); ?>
    \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index 3979bd3b6..e899d8651 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -7,7 +7,6 @@
  • -
    diff --git a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml index 20f1fb75f..8400933df 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml @@ -1,57 +1,70 @@ -
    - template_id, $this->configured)): ?> - - - -
    +template_type == Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?> +

    Creating File Summary Template

    + +

    Creating Log Sheet Template

    + -
    +
    + +
      template_fields as $field): ?> - -
    • " - data-id="" + +
    • " + data-id="" data-name="" - data-label="" - data-type="" + data-label="" + data-type="" data-filemd=""> required_fields)): ?> - Remove + + +
    • - +
    +

    Add more elements:

    +
      fileMD as $md): ?> - -
    • " - data-name="" + +
    • " + data-name="" data-type="" data-label=""> +
    template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?>
    -
    Add New Field
    -
    - - - -
    + + + +
    + +
    + template_id, $this->configured)): ?> + + +
    \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/template.phtml b/airtime_mvc/application/views/scripts/playouthistory/template.phtml index 44dd48bae..aa23f0162 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/template.phtml @@ -1,7 +1,7 @@ -
    +
    -
    Edit Log Sheet Template
    +

    Log Sheet Templates

    +
    +

    -
    Edit File Summary Template
    +

    File Summary Templates

    +
    - -
    \ No newline at end of file diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css new file mode 100644 index 000000000..b833ff94e --- /dev/null +++ b/airtime_mvc/public/css/history_styles.css @@ -0,0 +1,120 @@ +#history_template h4, #configure_item_template h4 { font-size: 14px; margin-top: 0px; } + +#history_template ul, #configure_item_template ul { list-style: none; padding-left: 0px; } + +#history_template li, #configure_item_template li { + clear: both; + background: #AAAAAA; + margin: 2px 0 4px 0; + padding: 4px 8px 4px 8px; + position: relative; + border-radius: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border: 1px solid #9F9F9F; + min-height: 15px; +} + +#history_template li a, #configure_item_template li a { + text-decoration: none; +} + +#history_template li a:hover, #configure_item_template li a:hover { + text-decoration: underline; +} + +#history_template li .template_name { + float: left; +} + +#history_template li.template_configured { + background: #9A9A9A; + border: 1px solid #858585; +} + +#history_template .template_remove, #history_template .template_default { + float: right; + margin-left: 10px; +} + +#history_template .template_default { + margin-left: 20px; +} + +#history_template .icon-ok { + right: 10px; + margin-left: 10px; + position: absolute; +} + +#configure_item_template li span { + cursor: move; + padding-left: 6px; +} + +#configure_item_template li .template_item_remove, #configure_item_template li .field_add { + cursor: pointer; + float: right; + margin-left: 20px; +} + +#configure_item_template li .template_item_remove:hover, #configure_item_template li .field_add:hover { + opacity:0.7; + filter:alpha(opacity=70); +} + +#configure_item_template #template_name { + min-width: 230px; + float: right; +} + +#configure_item_template .template_name_wrap { + display: inline-block; +} + +#configure_item_template label { + vertical-align: middle; +} + +#configure_item_template .template_item_add { + margin-bottom: 10px; +} + +#configure_item_template .template_item_add .btn { + padding: 2px 14px 1px; +} + +#configure_item_template .template_item_list li { + background-image: url('../css/images/drag.png'); + background-repeat: no-repeat; + background-position: 4px 5px; +} + +/* Bootstrap calendar + +.bootstrap-datetimepicker-widget ul { + padding-left: 0px !important; +} + +.bootstrap-datetimepicker-widget td, .bootstrap-datetimepicker-widget th { + -webkit-border-radius: 2px !important; + -moz-border-radius: 2px !important; + border-radius: 2px !important; +} + +*/ + +/* Edit History Record */ + +.ui-dialog form.ui-widget-content dd { + margin-left: 0px; + margin-bottom: 10px; +} + +.ui-dialog form.ui-widget-content dt { + margin-bottom: 2px; +} + +.ui-dialog form.ui-widget-content dd input { + width: 190px; +} \ No newline at end of file diff --git a/airtime_mvc/public/css/images/drag.png b/airtime_mvc/public/css/images/drag.png new file mode 100644 index 0000000000000000000000000000000000000000..435c5e5515d50539056c8a44ee625538cbf53482 GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)J!3HGPO;3=*#Y$WwN}P*Q6H7Al^Atidb5j`%Ec6Y{^bL)-YVV%_R3QUW5uBe^ zQl40p%HWuipOmWLmRXcqo?nz*tl%7MTDbMG8Bm?2r;B5V#MGxf8#xa+2po2~_T!t` zzC@dO`-)ER8LkjuT0F^RYLI&8bD8q%ZB|;mOaC#P;km!}-{jlen;6zD;P3eM3}^_0 Mr>mdKI;Vst0D%5SRR910 literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index f755c47b7..8f54c9879 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -32,7 +32,7 @@ var AIRTIME = (function(AIRTIME) { ">" + "<%= label %>" + "<%= type %>" + - "Remove" + + "" + ""; var template = (config.required) === true ? templateRequired : templateOptional; @@ -65,9 +65,9 @@ var AIRTIME = (function(AIRTIME) { $templateList = $(".template_item_list"); $fileMDList = $(".template_file_md"); - $fileMDList.on("dblclick", "li", function(){ + $fileMDList.on("click", "i.icon-plus", function(){ - var $li = $(this); + var $li = $(this).parents("li"); var config = { name: $li.data("name"), type: $li.data("type"), diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index d988cdafb..f5e0c3687 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -93,6 +93,36 @@ var AIRTIME = (function(AIRTIME) { } ); } + function createToolbarButtons ($el) { + var $menu = $("
    "); + + $menu.append("
    " + + "" + + "" + + "
    "); + + $menu.append("
    " + + "" + + "
    "); + + $menu.append("
    " + + "" + + "
    "); + + $el.append($menu); + } + function aggregateHistoryTable() { var oTable, $historyTableDiv = $historyContentDiv.find("#history_table_aggregate"), @@ -134,6 +164,7 @@ var AIRTIME = (function(AIRTIME) { function itemHistoryTable() { var oTable, $historyTableDiv = $historyContentDiv.find("#history_table_list"), + $toolbar, columns, fnRowCallback, booleans = {}, @@ -157,9 +188,13 @@ var AIRTIME = (function(AIRTIME) { b, text, $nRow = $(nRow); + + // add checkbox + $nRow.find('td.his_checkbox').html(""); - nRow.setAttribute('url-edit', editUrl); - nRow.setAttribute('url-delete', deleteUrl); + nRow.setAttribute('his-id', aData.history_id); + //nRow.setAttribute('url-edit', editUrl); + //nRow.setAttribute('url-delete', deleteUrl); for (b in booleans) { @@ -189,6 +224,9 @@ var AIRTIME = (function(AIRTIME) { "oTableTools": oTableTools }); oTable.fnSetFilteringDelay(350); + + $toolbar = $historyTableDiv.parents(".dataTables_wrapper").find(".fg-toolbar:first"); + createToolbarButtons($toolbar); return oTable; } @@ -313,6 +351,7 @@ var AIRTIME = (function(AIRTIME) { } } + /* $historyContentDiv.on("click", "#history_table_list tr", function(ev) { openRow(oTableItem, this); }); @@ -320,6 +359,7 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.on("click", "#history_table_aggregate tr", function(ev) { openRow(oTableAgg, this); }); + */ $("#his_create").click(function(e) { var url = baseUrl+"playouthistory/edit-list-item/format/json" ; @@ -434,6 +474,72 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.find("#his-tabs").tabs(); + // begin context menu initialization. + $.contextMenu({ + selector: '#history_table_list td:not(.library_checkbox)', + trigger: "left", + ignoreRightClick: true, + + build: function($el, e) { + var items, + callback, + $tr, + id; + + $tr = $el.parents("tr"); + id = $tr.get(0).getAttribute("his-id"); + + function processMenuItems(oItems) { + + // define an edit callback. + if (oItems.edit !== undefined) { + + callback = function() { + $.post(oItems.edit.url, {format: "json"}, function(json) { + + makeHistoryDialog(json.dialog); + + }, "json"); + }; + + oItems.edit.callback = callback; + } + + // define a delete callback. + if (oItems.del !== undefined) { + + callback = function() { + var c = confirm("Delete this entry?"); + + if (c) { + $.post(oItems.del.url, {format: "json"}, function(json) { + oTableItem.fnDraw(); + }); + } + }; + + oItems.del.callback = callback; + } + + items = oItems; + } + + request = $.ajax({ + url: baseUrl+"playouthistory/context-menu", + type: "GET", + data: {id : id, format: "json"}, + dataType: "json", + async: false, + success: function(json){ + processMenuItems(json.items); + } + }); + + return { + items: items + }; + } + }); }; return AIRTIME; From 3ea2b920a61508fee4efc163f3e605d44c4261cc Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Mon, 19 Aug 2013 23:20:26 -0400 Subject: [PATCH 060/181] crlf --- .../controllers/PlayouthistoryController.php | 14 +- .../application/services/HistoryService.php | 2 +- airtime_mvc/public/css/history_styles.css | 238 +++++++++--------- 3 files changed, 127 insertions(+), 127 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 05d8d841d..0c04481f2 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -83,24 +83,24 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendScript($script); } - public function contextMenuAction() + public function contextMenuAction() { - $baseUrl = Application_Common_OsPath::getBaseDir(); + $baseUrl = Application_Common_OsPath::getBaseDir(); $id = $this->_getParam('id'); $menu = array(); - $menu["edit"] = array( - "name"=> _("Edit"), - "icon" => "edit", - "url" => $baseUrl."playouthistory/edit-list-item/id/{$id}" + $menu["edit"] = array( + "name"=> _("Edit"), + "icon" => "edit", + "url" => $baseUrl."playouthistory/edit-list-item/id/{$id}" ); $menu["del"] = array( "name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."playouthistory/delete-list-item/id/{$id}" - ); + ); $this->view->items = $menu; } diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 4890053e3..a2ae5b6b6 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -1054,7 +1054,7 @@ class Application_Service_HistoryService try { $template = $this->getConfiguredItemTemplate(); - $fields = $template["fields"]; + $fields = $template["fields"]; $columns = $this->datatablesColumns($fields); array_unshift($columns, $checkbox); diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index b833ff94e..4e6a5ede8 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -1,120 +1,120 @@ -#history_template h4, #configure_item_template h4 { font-size: 14px; margin-top: 0px; } - -#history_template ul, #configure_item_template ul { list-style: none; padding-left: 0px; } - -#history_template li, #configure_item_template li { - clear: both; - background: #AAAAAA; - margin: 2px 0 4px 0; - padding: 4px 8px 4px 8px; - position: relative; - border-radius: 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border: 1px solid #9F9F9F; - min-height: 15px; -} - -#history_template li a, #configure_item_template li a { - text-decoration: none; -} - -#history_template li a:hover, #configure_item_template li a:hover { - text-decoration: underline; -} - -#history_template li .template_name { - float: left; -} - -#history_template li.template_configured { - background: #9A9A9A; - border: 1px solid #858585; -} - -#history_template .template_remove, #history_template .template_default { - float: right; - margin-left: 10px; -} - -#history_template .template_default { - margin-left: 20px; -} - -#history_template .icon-ok { - right: 10px; - margin-left: 10px; - position: absolute; -} - -#configure_item_template li span { - cursor: move; - padding-left: 6px; -} - -#configure_item_template li .template_item_remove, #configure_item_template li .field_add { - cursor: pointer; - float: right; - margin-left: 20px; -} - -#configure_item_template li .template_item_remove:hover, #configure_item_template li .field_add:hover { - opacity:0.7; - filter:alpha(opacity=70); -} - -#configure_item_template #template_name { - min-width: 230px; - float: right; -} - -#configure_item_template .template_name_wrap { - display: inline-block; -} - -#configure_item_template label { - vertical-align: middle; -} - -#configure_item_template .template_item_add { - margin-bottom: 10px; -} - -#configure_item_template .template_item_add .btn { - padding: 2px 14px 1px; -} - -#configure_item_template .template_item_list li { - background-image: url('../css/images/drag.png'); - background-repeat: no-repeat; - background-position: 4px 5px; -} - -/* Bootstrap calendar - -.bootstrap-datetimepicker-widget ul { - padding-left: 0px !important; -} - -.bootstrap-datetimepicker-widget td, .bootstrap-datetimepicker-widget th { - -webkit-border-radius: 2px !important; - -moz-border-radius: 2px !important; - border-radius: 2px !important; -} - -*/ - -/* Edit History Record */ - -.ui-dialog form.ui-widget-content dd { - margin-left: 0px; - margin-bottom: 10px; -} - -.ui-dialog form.ui-widget-content dt { - margin-bottom: 2px; -} - -.ui-dialog form.ui-widget-content dd input { - width: 190px; +#history_template h4, #configure_item_template h4 { font-size: 14px; margin-top: 0px; } + +#history_template ul, #configure_item_template ul { list-style: none; padding-left: 0px; } + +#history_template li, #configure_item_template li { + clear: both; + background: #AAAAAA; + margin: 2px 0 4px 0; + padding: 4px 8px 4px 8px; + position: relative; + border-radius: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border: 1px solid #9F9F9F; + min-height: 15px; +} + +#history_template li a, #configure_item_template li a { + text-decoration: none; +} + +#history_template li a:hover, #configure_item_template li a:hover { + text-decoration: underline; +} + +#history_template li .template_name { + float: left; +} + +#history_template li.template_configured { + background: #9A9A9A; + border: 1px solid #858585; +} + +#history_template .template_remove, #history_template .template_default { + float: right; + margin-left: 10px; +} + +#history_template .template_default { + margin-left: 20px; +} + +#history_template .icon-ok { + right: 10px; + margin-left: 10px; + position: absolute; +} + +#configure_item_template li span { + cursor: move; + padding-left: 6px; +} + +#configure_item_template li .template_item_remove, #configure_item_template li .field_add { + cursor: pointer; + float: right; + margin-left: 20px; +} + +#configure_item_template li .template_item_remove:hover, #configure_item_template li .field_add:hover { + opacity:0.7; + filter:alpha(opacity=70); +} + +#configure_item_template #template_name { + min-width: 230px; + float: right; +} + +#configure_item_template .template_name_wrap { + display: inline-block; +} + +#configure_item_template label { + vertical-align: middle; +} + +#configure_item_template .template_item_add { + margin-bottom: 10px; +} + +#configure_item_template .template_item_add .btn { + padding: 2px 14px 1px; +} + +#configure_item_template .template_item_list li { + background-image: url('../css/images/drag.png'); + background-repeat: no-repeat; + background-position: 4px 5px; +} + +/* Bootstrap calendar + +.bootstrap-datetimepicker-widget ul { + padding-left: 0px !important; +} + +.bootstrap-datetimepicker-widget td, .bootstrap-datetimepicker-widget th { + -webkit-border-radius: 2px !important; + -moz-border-radius: 2px !important; + border-radius: 2px !important; +} + +*/ + +/* Edit History Record */ + +.ui-dialog form.ui-widget-content dd { + margin-left: 0px; + margin-bottom: 10px; +} + +.ui-dialog form.ui-widget-content dt { + margin-bottom: 2px; +} + +.ui-dialog form.ui-widget-content dd input { + width: 190px; } \ No newline at end of file From 10ef55b08368f1ac494c1019f67d9145f21a1197 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 14:58:22 -0400 Subject: [PATCH 061/181] context menu just in the client now. works for both tables. --- .../controllers/PlayouthistoryController.php | 23 ---- .../js/airtime/playouthistory/historytable.js | 105 ++++++++---------- 2 files changed, 49 insertions(+), 79 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 0c04481f2..7f3bc0f6d 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -8,7 +8,6 @@ class PlayouthistoryController extends Zend_Controller_Action $ajaxContext ->addActionContext('file-history-feed', 'json') ->addActionContext('item-history-feed', 'json') - ->addActionContext('context-menu', 'json') ->addActionContext('edit-file-item', 'json') ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') @@ -83,28 +82,6 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendScript($script); } - public function contextMenuAction() - { - $baseUrl = Application_Common_OsPath::getBaseDir(); - $id = $this->_getParam('id'); - - $menu = array(); - - $menu["edit"] = array( - "name"=> _("Edit"), - "icon" => "edit", - "url" => $baseUrl."playouthistory/edit-list-item/id/{$id}" - ); - - $menu["del"] = array( - "name"=> _("Delete"), - "icon" => "delete", - "url" => $baseUrl."playouthistory/delete-list-item/id/{$id}" - ); - - $this->view->items = $menu; - } - public function fileHistoryFeedAction() { try { diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index f5e0c3687..f8bf2cb9b 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -130,9 +130,10 @@ var AIRTIME = (function(AIRTIME) { fnRowCallback; fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { - var editUrl = baseUrl+"Playouthistory/edit-file-item/format/json/id/"+aData.file_id; + var editUrl = baseUrl+"playouthistory/edit-file-item/id/"+aData.file_id, + $nRow = $(nRow); - nRow.setAttribute('url-edit', editUrl); + $nRow.data('url-edit', editUrl); }; columns = JSON.parse(localStorage.getItem('datatables-historyfile-aoColumns')); @@ -181,8 +182,8 @@ var AIRTIME = (function(AIRTIME) { } fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { - var editUrl = baseUrl+"playouthistory/edit-list-item/format/json/id/"+aData.history_id, - deleteUrl = baseUrl+"playouthistory/delete-list-item/format/json/id/"+aData.history_id, + var editUrl = baseUrl+"playouthistory/edit-list-item/id/"+aData.history_id, + deleteUrl = baseUrl+"playouthistory/delete-list-item/id/"+aData.history_id, emptyCheckBox = String.fromCharCode(parseInt(2610, 16)), checkedCheckBox = String.fromCharCode(parseInt(2612, 16)), b, @@ -192,9 +193,9 @@ var AIRTIME = (function(AIRTIME) { // add checkbox $nRow.find('td.his_checkbox').html(""); - nRow.setAttribute('his-id', aData.history_id); - //nRow.setAttribute('url-edit', editUrl); - //nRow.setAttribute('url-delete', deleteUrl); + $nRow.data('his-id', aData.history_id); + $nRow.data('url-edit', editUrl); + $nRow.data('url-delete', deleteUrl); for (b in booleans) { @@ -355,6 +356,7 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.on("click", "#history_table_list tr", function(ev) { openRow(oTableItem, this); }); + $historyContentDiv.on("click", "#history_table_aggregate tr", function(ev) { openRow(oTableAgg, this); @@ -476,65 +478,56 @@ var AIRTIME = (function(AIRTIME) { // begin context menu initialization. $.contextMenu({ - selector: '#history_table_list td:not(.library_checkbox)', + selector: '#history_content td:not(.his_checkbox)', trigger: "left", ignoreRightClick: true, build: function($el, e) { - var items, + var items = {}, callback, - $tr, - id; + $tr; $tr = $el.parents("tr"); - id = $tr.get(0).getAttribute("his-id"); - - function processMenuItems(oItems) { + + var editUrl = $tr.data("url-edit"); + var deleteUrl = $tr.data("url-delete"); + + if (editUrl !== undefined) { + + callback = function() { + $.post(editUrl, {format: "json"}, function(json) { + + makeHistoryDialog(json.dialog); + + }, "json"); + }; - // define an edit callback. - if (oItems.edit !== undefined) { - - callback = function() { - $.post(oItems.edit.url, {format: "json"}, function(json) { - - makeHistoryDialog(json.dialog); - - }, "json"); - }; - - oItems.edit.callback = callback; - } - - // define a delete callback. - if (oItems.del !== undefined) { - - callback = function() { - var c = confirm("Delete this entry?"); - - if (c) { - $.post(oItems.del.url, {format: "json"}, function(json) { - oTableItem.fnDraw(); - }); - } - }; - - oItems.del.callback = callback; - } - - items = oItems; + items["edit"] = { + "name": $.i18n._("Edit"), + "icon": "edit", + "callback": callback + }; + } + + if (deleteUrl !== undefined) { + + callback = function() { + var c = confirm("Delete this entry?"); + + if (c) { + $.post(deleteUrl, {format: "json"}, function(json) { + oTableItem.fnDraw(); + }); + } + }; + + items["del"] = { + "name": $.i18n._("Delete"), + "icon": "delete", + "callback": callback + }; } - request = $.ajax({ - url: baseUrl+"playouthistory/context-menu", - type: "GET", - data: {id : id, format: "json"}, - dataType: "json", - async: false, - success: function(json){ - processMenuItems(json.items); - } - }); - return { items: items }; From 6d5febe4f708df836513d9feadd198b173e9398c Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 15:18:05 -0400 Subject: [PATCH 062/181] getting rid of characters from a field name that may cause problems. --- .../application/controllers/PlayouthistoryController.php | 1 - .../js/airtime/playouthistory/configuretemplate.js | 3 +-- .../public/js/airtime/playouthistory/historytable.js | 9 +++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 7f3bc0f6d..6427b9acc 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -125,7 +125,6 @@ class PlayouthistoryController extends Zend_Controller_Action $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); $historyService = new Application_Service_HistoryService(); - //$r = $historyService->getListView($startsDT, $endsDT, $params); $r = $historyService->getPlayedItemData($startsDT, $endsDT, $params); $this->view->sEcho = $r["sEcho"]; diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 8f54c9879..50223732f 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -90,8 +90,7 @@ var AIRTIME = (function(AIRTIME) { label = $div.find("input").val(), name; - name = label.replace(" ", ""); - name = name.toLowerCase(); + name = label.toLowerCase().replace(/[^a-z0-9]+/g, ""); var config = { name: name, diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index f8bf2cb9b..ea209976e 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -485,12 +485,13 @@ var AIRTIME = (function(AIRTIME) { build: function($el, e) { var items = {}, callback, - $tr; + $tr, + editUrl, + deleteUrl; $tr = $el.parents("tr"); - - var editUrl = $tr.data("url-edit"); - var deleteUrl = $tr.data("url-delete"); + editUrl = $tr.data("url-edit"); + deleteUrl = $tr.data("url-delete"); if (editUrl !== undefined) { From 2e572c652c7c3439f8e9d3a7499c9213b134435c Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 15:31:13 -0400 Subject: [PATCH 063/181] creating a random string for field names to work for all languages. --- airtime_mvc/application/services/HistoryService.php | 1 + .../public/js/airtime/playouthistory/configuretemplate.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index a2ae5b6b6..c55a2c5df 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -498,6 +498,7 @@ class Application_Service_HistoryService foreach($template["fields"] as $index => $field) { $key = $field["name"]; + $value = ""; if (in_array($key, $required)) { diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 50223732f..26fad4a30 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -90,7 +90,8 @@ var AIRTIME = (function(AIRTIME) { label = $div.find("input").val(), name; - name = label.toLowerCase().replace(/[^a-z0-9]+/g, ""); + //create a string name that will work for all languages. + name = Math.random().toString(36).substring(7); var config = { name: name, From 007a7ee7efc3341647a208f76e356402ff54f441 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 17:23:15 -0400 Subject: [PATCH 064/181] casting non mandatory types from "", to avoid database query problems. --- .../controllers/PlayouthistoryController.php | 9 ++ .../application/services/HistoryService.php | 41 +++++- .../js/airtime/playouthistory/historytable.js | 135 +++++++----------- 3 files changed, 100 insertions(+), 85 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 6427b9acc..e331db127 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -12,6 +12,7 @@ class PlayouthistoryController extends Zend_Controller_Action ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') ->addActionContext('delete-list-item', 'json') + ->addActionContext('delete-list-items', 'json') ->addActionContext('update-list-item', 'json') ->addActionContext('update-file-item', 'json') ->addActionContext('create-template', 'json') @@ -192,6 +193,14 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $historyService->deletePlayedItem($history_id); } + + public function deleteListItemsAction() + { + $history_ids = $this->_getParam('ids'); + + $historyService = new Application_Service_HistoryService(); + $historyService->deletePlayedItems($history_ids); + } public function updateListItemAction() { diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index c55a2c5df..3eb3ca6a8 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -638,6 +638,7 @@ class Application_Service_HistoryService $metadata = array(); $fields = $template["fields"]; $required = $this->mandatoryItemFields(); + $phpCasts = $this->getPhpCasts(); for ($i = 0, $len = count($fields); $i < $len; $i++) { @@ -650,14 +651,14 @@ class Application_Service_HistoryService } $isFileMd = $field["isFileMd"]; - $entry = $templateValues[$prefix.$key]; + $entry = $phpCasts[$field["type"]]($templateValues[$prefix.$key]); if ($isFileMd && isset($file)) { - Logging::info("adding metadata associated to a file for {$key}"); + Logging::info("adding metadata associated to a file for {$key} = {$entry}"); $md[$key] = $entry; } else { - Logging::info("adding metadata for {$key}"); + Logging::info("adding metadata for {$key} = {$entry}"); $metadata[$key] = $entry; } } @@ -824,6 +825,25 @@ class Application_Service_HistoryService throw $e; } } + + /* id is an id in cc_playout_history */ + public function deletePlayedItems($ids) { + + $this->con->beginTransaction(); + + try { + + $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); + $records->delete($this->con); + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + Logging::info($e); + throw $e; + } + } //---------------- Following code is for History Templates --------------------------// @@ -842,6 +862,21 @@ class Application_Service_HistoryService return $fields; } + + private function getPhpCasts() { + + $fields = array( + TEMPLATE_DATE => "strval", + TEMPLATE_TIME => "strval", + TEMPLATE_DATETIME => "strval", + TEMPLATE_STRING => "strval", + TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? + TEMPLATE_INT => "intval", + TEMPLATE_FLOAT => "floatval", + ); + + return $fields; + } private function getSqlTypes() { diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index ea209976e..86daa7abe 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -39,6 +39,26 @@ var AIRTIME = (function(AIRTIME) { var sDom = 'l<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>'; + var selectedLogItems = {}; + + function getSelectedLogItems() { + var items = Object.keys(selectedLogItems); + + return items; + } + + function addSelectedLogItem(id) { + selectedLogItems[id] = ""; + } + + function removeSelectedLogItem(id) { + delete selectedLogItems[id]; + } + + function emptySelectedLogItems() { + selectedLogItems = {}; + } + function getFileName(ext){ var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m"; filename = filename.replace(/:/g,"h"); @@ -249,6 +269,11 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv = $("#history_content"); + function redrawTables() { + oTableAgg.fnDraw(); + oTableItem.fnDraw(); + } + function removeHistoryDialog() { $hisDialogEl.dialog("destroy"); $hisDialogEl.remove(); @@ -315,54 +340,6 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.find(dateEndId).datepicker(oBaseDatePickerSettings); $historyContentDiv.find(timeEndId).timepicker(oBaseTimePickerSettings); - // 'open' an information row when a row is clicked on - //for create/edit/delete - function openRow(oTable, tr) { - var links = ['url-edit', 'url-delete'], - i, len, - attr, - name, - $link, - $div; - - $div = $("
    "); - - for (i = 0, len = links.length; i < len; i++) { - - attr = links[i]; - - if (tr.hasAttribute(attr)) { - name = attr.split("-")[1]; - - $link = $("", { - "href": tr.getAttribute(attr), - "text": $.i18n._(name), - "class": "his_"+name - }); - - $div.append($link); - } - } - - if (oTable.fnIsOpen(tr)) { - oTable.fnClose(tr); - } - else { - oTable.fnOpen(tr, $div, "his_update"); - } - } - - /* - $historyContentDiv.on("click", "#history_table_list tr", function(ev) { - openRow(oTableItem, this); - }); - - - $historyContentDiv.on("click", "#history_table_aggregate tr", function(ev) { - openRow(oTableAgg, this); - }); - */ - $("#his_create").click(function(e) { var url = baseUrl+"playouthistory/edit-list-item/format/json" ; @@ -374,35 +351,6 @@ var AIRTIME = (function(AIRTIME) { }, "json"); }); - - $historyContentDiv.on("click", "a.his_edit", function(e) { - var url = e.target.href; - - e.preventDefault(); - - $.get(url, function(json) { - - makeHistoryDialog(json.dialog); - - }, "json"); - }); - - $historyContentDiv.on("click", "a.his_delete", function(e) { - var url = e.target.href, - doDelete; - - e.preventDefault(); - - doDelete = confirm($.i18n._("Delete this history record?")); - - if (doDelete) { - $.post(url, function(json) { - oTableAgg.fnDraw(); - oTableItem.fnDraw(); - - }, "json"); - } - }); $('body').on("click", ".his_file_cancel, .his_item_cancel", function(e) { removeHistoryDialog(); @@ -425,7 +373,7 @@ var AIRTIME = (function(AIRTIME) { } else { removeHistoryDialog(); - oTableAgg.fnDraw(); + redrawTables(); } }, "json"); @@ -453,12 +401,26 @@ var AIRTIME = (function(AIRTIME) { } else { removeHistoryDialog(); - oTableItem.fnDraw(); + redrawTables(); } }, "json"); - }); + }); + + + $historyContentDiv.on("click", ".his_checkbox input", function(e) { + var checked = e.currentTarget.checked, + $tr = $(e.currentTarget).parents("tr"), + id = $tr.data("his-id"); + + if (checked) { + addSelectedLogItem(id); + } + else { + removeSelectedLogItem(id); + } + }); $historyContentDiv.find("#his_submit").click(function(ev){ var fn, @@ -470,8 +432,16 @@ var AIRTIME = (function(AIRTIME) { fn.start = oRange.start; fn.end = oRange.end; - oTableAgg.fnDraw(); - oTableItem.fnDraw(); + redrawTables(); + }); + + $historyContentDiv.find("#his_trash").click(function(ev){ + var items = getSelectedLogItems(), + url = baseUrl+"playouthistory/delete-list-items"; + + $.post(url, {ids: items, format: "json"}, function(){ + redrawTables(); + }); }); $historyContentDiv.find("#his-tabs").tabs(); @@ -518,6 +488,7 @@ var AIRTIME = (function(AIRTIME) { if (c) { $.post(deleteUrl, {format: "json"}, function(json) { oTableItem.fnDraw(); + oTableAgg.fnDraw(); }); } }; From 84efdfd64a45c92d64d8cea891792d5c7950b82c Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 17:23:48 -0400 Subject: [PATCH 065/181] crlf --- .../controllers/PlayouthistoryController.php | 12 ++-- .../application/services/HistoryService.php | 60 +++++++++---------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index e331db127..7bf911837 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -194,12 +194,12 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService->deletePlayedItem($history_id); } - public function deleteListItemsAction() - { - $history_ids = $this->_getParam('ids'); - - $historyService = new Application_Service_HistoryService(); - $historyService->deletePlayedItems($history_ids); + public function deleteListItemsAction() + { + $history_ids = $this->_getParam('ids'); + + $historyService = new Application_Service_HistoryService(); + $historyService->deletePlayedItems($history_ids); } public function updateListItemAction() diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 3eb3ca6a8..db36b2856 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -826,23 +826,23 @@ class Application_Service_HistoryService } } - /* id is an id in cc_playout_history */ - public function deletePlayedItems($ids) { - - $this->con->beginTransaction(); - - try { - - $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); - $records->delete($this->con); - - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - Logging::info($e); - throw $e; - } + /* id is an id in cc_playout_history */ + public function deletePlayedItems($ids) { + + $this->con->beginTransaction(); + + try { + + $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); + $records->delete($this->con); + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + Logging::info($e); + throw $e; + } } @@ -863,19 +863,19 @@ class Application_Service_HistoryService return $fields; } - private function getPhpCasts() { - - $fields = array( - TEMPLATE_DATE => "strval", - TEMPLATE_TIME => "strval", - TEMPLATE_DATETIME => "strval", - TEMPLATE_STRING => "strval", - TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? - TEMPLATE_INT => "intval", - TEMPLATE_FLOAT => "floatval", - ); - - return $fields; + private function getPhpCasts() { + + $fields = array( + TEMPLATE_DATE => "strval", + TEMPLATE_TIME => "strval", + TEMPLATE_DATETIME => "strval", + TEMPLATE_STRING => "strval", + TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? + TEMPLATE_INT => "intval", + TEMPLATE_FLOAT => "floatval", + ); + + return $fields; } private function getSqlTypes() { From 17abb4ad9a7421c6a8ea9b01a17d542c0bbe8bd8 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Wed, 21 Aug 2013 21:44:52 -0400 Subject: [PATCH 066/181] need a better random field name generator to avoid problems --- .../airtime/playouthistory/configuretemplate.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 26fad4a30..0fc00acd9 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -43,6 +43,19 @@ var AIRTIME = (function(AIRTIME) { return $li; } + //taken from + //http://stackoverflow.com/questions/1349404/generate-a-string-of-5-random-characters-in-javascript + function randomString(len, charSet) { + //can only use small letters to avoid DB query problems. + charSet = charSet || 'abcdefghijklmnopqrstuvwxyz'; + var randomString = ''; + for (var i = 0; i < len; i++) { + var randomPoz = Math.floor(Math.random() * charSet.length); + randomString += charSet.substring(randomPoz,randomPoz+1); + } + return randomString; + } + function addField(config) { $templateList.append(createTemplateLi(config)); @@ -91,7 +104,7 @@ var AIRTIME = (function(AIRTIME) { name; //create a string name that will work for all languages. - name = Math.random().toString(36).substring(7); + name = randomString(10); var config = { name: name, From fa6de28bcf8a77c1c1ef6b71261bcff8a6fd62b7 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 22 Aug 2013 14:15:40 -0400 Subject: [PATCH 067/181] not allowing double file metadata to be added to avoid query problems. --- .../scripts/playouthistory/template-contents.phtml | 12 +++++++++++- .../js/airtime/playouthistory/configuretemplate.js | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml index 8400933df..3beb495dd 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml @@ -11,11 +11,17 @@
    - +
    "}else if(pickTime){return'"}else{return'"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:""+""+'‹'+''+'›'+""+"",contTemplate:''};DPGlobal.template='
    '+''+DPGlobal.headTemplate+""+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    ";var TPGlobal={hourTemplate:'',minuteTemplate:'',secondTemplate:''};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'
    '+'"+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+""+" "+''+" "+(showSeconds?''+"":"")+(is12Hours?''+"":"")+""+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+"
    "+TPGlobal.hourTemplate+":"+TPGlobal.minuteTemplate+":"+TPGlobal.secondTemplate+""+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+(showSeconds?'
    '+''+"
    "+"
    ":"")}})(window.jQuery); \ No newline at end of file From dd0115f573d47875a1e18342e7edebe795ff2396 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 11:53:31 -0400 Subject: [PATCH 079/181] proper showTimeFirst file --- .../bootstrap-datetimepicker.js | 1281 ++++++++++++++++- 1 file changed, 1280 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js index a30f77645..7e600784a 100644 --- a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js +++ b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js @@ -23,4 +23,1283 @@ * limitations under the License. * ========================================================= */ -(function($){var smartPhone=window.orientation!=undefined;var DateTimePicker=function(element,options){this.id=dpgId++;this.init(element,options)};var dateToDate=function(dt){if(typeof dt==="string"){return new Date(dt)}return dt};DateTimePicker.prototype={constructor:DateTimePicker,init:function(element,options){var icon;if(!(options.pickTime||options.pickDate))throw new Error("Must choose at least one picker");this.options=options;this.$element=$(element);this.language=options.language in dates?options.language:"en";this.pickDate=options.pickDate;this.pickTime=options.pickTime;this.isInput=this.$element.is("input");this.component=false;if(this.$element.find(".input-append")||this.$element.find(".input-prepend"))this.component=this.$element.find(".add-on");this.format=options.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"}this._compileFormat();if(this.component){icon=this.component.find("i")}if(this.pickTime){if(icon&&icon.length)this.timeIcon=icon.data("time-icon");if(!this.timeIcon)this.timeIcon="icon-time";icon.addClass(this.timeIcon)}if(this.pickDate){if(icon&&icon.length)this.dateIcon=icon.data("date-icon");if(!this.dateIcon)this.dateIcon="icon-calendar";icon.removeClass(this.timeIcon);icon.addClass(this.dateIcon)}this.widget=$(getTemplate(this.timeIcon,options.pickDate,options.pickTime,options.pick12HourFormat,options.pickSeconds,options.collapse)).appendTo("body");this.minViewMode=options.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=options.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=options.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(options.startDate||this.$element.data("date-startdate"));this.setEndDate(options.endDate||this.$element.data("date-enddate"));this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e){e.stopPropagation();e.preventDefault()}},disable:function(){this.$element.find("input").prop("disabled",true);this._detachDatePickerEvents()},enable:function(){this.$element.find("input").prop("disabled",false);this._attachDatePickerEvents()},hide:function(){var collapse=this.widget.find(".collapse");for(var i=0;i");while(dowCnt'+dates[this.language].daysMin[dowCnt++%7]+"")}this.widget.find(".datepicker-days thead").append(html)},fillMonths:function(){var html="";var i=0;while(i<12){html+=''+dates[this.language].monthsShort[i++]+""}this.widget.find(".datepicker-months td").append(html)},fillDate:function(){var year=this.viewDate.getUTCFullYear();var month=this.viewDate.getUTCMonth();var currentDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);var startYear=typeof this.startDate==="object"?this.startDate.getUTCFullYear():-Infinity;var startMonth=typeof this.startDate==="object"?this.startDate.getUTCMonth():-1;var endYear=typeof this.endDate==="object"?this.endDate.getUTCFullYear():Infinity;var endMonth=typeof this.endDate==="object"?this.endDate.getUTCMonth():12;this.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-days th:eq(1)").text(dates[this.language].months[month]+" "+year);var prevMonth=UTCDate(year,month-1,28,0,0,0,0);var day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);if(year==startYear&&month<=startMonth||year=endMonth||year>endYear){this.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var row;var clsName;while(prevMonth.valueOf()");html.push(row)}clsName="";if(prevMonth.getUTCFullYear()year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month){clsName+=" new"}if(prevMonth.valueOf()===currentDate.valueOf()){clsName+=" active"}if(prevMonth.valueOf()+864e5<=this.startDate){clsName+=" disabled"}if(prevMonth.valueOf()>this.endDate){clsName+=" disabled"}row.append(''+prevMonth.getUTCDate()+"");prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(html);var currentYear=this._date.getUTCFullYear();var months=this.widget.find(".datepicker-months").find("th:eq(1)").text(year).end().find("span").removeClass("active");if(currentYear===year){months.eq(this._date.getUTCMonth()).addClass("active")}if(currentYear-1endYear){this.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(var i=0;i<12;i++){if(year==startYear&&startMonth>i||yearendYear){$(months[i]).addClass("disabled")}}html="";year=parseInt(year/10,10)*10;var yearCont=this.widget.find(".datepicker-years").find("th:eq(1)").text(year+"-"+(year+9)).end().find("td");this.widget.find(".datepicker-years").find("th").removeClass("disabled");if(startYear>year){this.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(endYearendYear?" disabled":"")+'">'+year+"";year+=1}yearCont.html(html)},fillHours:function(){var table=this.widget.find(".timepicker .timepicker-hours table");table.parent().hide();var html="";if(this.options.pick12HourFormat){var current=1;for(var i=0;i<3;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}else{var current=0;for(var i=0;i<6;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}table.html(html)},fillMinutes:function(){var table=this.widget.find(".timepicker .timepicker-minutes table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillSeconds:function(){var table=this.widget.find(".timepicker .timepicker-seconds table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillTime:function(){if(!this._date)return;var timeComponents=this.widget.find(".timepicker span[data-time-component]");var table=timeComponents.closest("table");var is12HourFormat=this.options.pick12HourFormat;var hour=this._date.getUTCHours();var period="AM";if(is12HourFormat){if(hour>=12)period="PM";if(hour===0)hour=12;else if(hour!=12)hour=hour%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(period)}hour=padLeft(hour.toString(),2,"0");var minute=padLeft(this._date.getUTCMinutes().toString(),2,"0");var second=padLeft(this._date.getUTCSeconds().toString(),2,"0");timeComponents.filter("[data-time-component=hours]").text(hour);timeComponents.filter("[data-time-component=minutes]").text(minute);timeComponents.filter("[data-time-component=seconds]").text(second)},click:function(e){e.stopPropagation();e.preventDefault();this._unset=false;var target=$(e.target).closest("span, td, th");if(target.length===1){if(!target.is(".disabled")){switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var vd=this.viewDate;var navFnc=DPGlobal.modes[this.viewMode].navFnc;var step=DPGlobal.modes[this.viewMode].navStep;if(target[0].className==="prev")step=step*-1;vd["set"+navFnc](vd["get"+navFnc]()+step);this.fillDate();this.set();break}break;case"span":if(target.is(".month")){var month=target.parent().find("span").index(target);this.viewDate.setUTCMonth(month)}else{var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year)}if(this.viewMode!==0){this._date=UTCDate(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();this.set();break;case"td":if(target.is(".day")){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getUTCMonth();var year=this.viewDate.getUTCFullYear();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}this._date=UTCDate(year,month,day,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=UTCDate(year,month,Math.min(28,day),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}}},actions:{incrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e){var hour=this._date.getUTCHours();if(hour>=12)hour-=12;else hour+=12;this._date.setUTCHours(hour)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);if(this.options.pick12HourFormat){var current=this._date.getUTCHours();if(current>=12){if(value!=12)value=(value+12)%24}else{if(value===12)value=0;else value=value%12}}this._date.setUTCHours(value);this.actions.showPicker.call(this)},selectMinute:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCMinutes(value);this.actions.showPicker.call(this)},selectSecond:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCSeconds(value);this.actions.showPicker.call(this)}},doAction:function(e){e.stopPropagation();e.preventDefault();if(!this._date)this._date=UTCDate(1970,0,0,0,0,0,0);var action=$(e.currentTarget).data("action");var rv=this.actions[action].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return rv},stopEvent:function(e){e.stopPropagation();e.preventDefault()},keydown:function(e){var self=this,k=e.which,input=$(e.target);if(k==8||k==46){setTimeout(function(){self._resetMaskPos(input)})}},keypress:function(e){var k=e.which;if(k==8||k==46){return}var input=$(e.target);var c=String.fromCharCode(k);var val=input.val()||"";val+=c;var mask=this._mask[this._maskPos];if(!mask){return false}if(mask.end!=val.length){return}if(!mask.pattern.test(val.slice(mask.start))){val=val.slice(0,val.length-1);while((mask=this._mask[this._maskPos])&&mask.character){val+=mask.character;this._maskPos++}val+=c;if(mask.end!=val.length){input.val(val);return false}else{if(!mask.pattern.test(val.slice(mask.start))){input.val(val.slice(0,mask.start));return false}else{input.val(val);this._maskPos++;return false}}}else{this._maskPos++}},change:function(e){var input=$(e.target);var val=input.val();if(this._formatPattern.test(val)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(val&&val.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else input.val("")}else{if(this._date){this.setValue(null);this.notifyChange();this._unset=true}}this._resetMaskPos(input)},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+DPGlobal.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(d){return this.format.replace(formatReplacer,function(match){var methodName,property,rv,len=match.length;if(match==="ms")len=1;property=dateFormatComponents[match].property;if(property==="Hours12"){rv=d.getUTCHours();if(rv===0)rv=12;else if(rv!==12)rv=rv%12}else if(property==="Period12"){if(d.getUTCHours()>=12)return"PM";else return"AM"}else{methodName="get"+property;rv=d[methodName]()}if(methodName==="getUTCMonth")rv=rv+1;if(methodName==="getUTCYear")rv=rv+1900-2e3;return padLeft(rv.toString(),len,"0")})},parseDate:function(str){var match,i,property,methodName,value,parsed={};if(!(match=this._formatPattern.exec(str)))return null;for(i=1;ival.length){this._maskPos=i;break}else if(this._mask[i].end===val.length){this._maskPos=i+1;break}}},_finishParsingDate:function(parsed){var year,month,date,hours,minutes,seconds,milliseconds;year=parsed.UTCFullYear;if(parsed.UTCYear)year=2e3+parsed.UTCYear;if(!year)year=1970;if(parsed.UTCMonth)month=parsed.UTCMonth-1;else month=0;date=parsed.UTCDate||1;hours=parsed.UTCHours||0;minutes=parsed.UTCMinutes||0;seconds=parsed.UTCSeconds||0;milliseconds=parsed.UTCMilliseconds||0;if(parsed.Hours12){hours=parsed.Hours12}if(parsed.Period12){if(/pm/i.test(parsed.Period12)){if(hours!=12)hours=(hours+12)%24}else{hours=hours%12}}return UTCDate(year,month,date,hours,minutes,seconds,milliseconds)},_compileFormat:function(){var match,component,components=[],mask=[],str=this.format,propertiesByIndex={},i=0,pos=0;while(match=formatComponent.exec(str)){component=match[0];if(component in dateFormatComponents){i++;propertiesByIndex[i]=dateFormatComponents[component].property;components.push("\\s*"+dateFormatComponents[component].getPattern(this)+"\\s*");mask.push({pattern:new RegExp(dateFormatComponents[component].getPattern(this)),property:dateFormatComponents[component].property,start:pos,end:pos+=component.length})}else{components.push(escapeRegExp(component));mask.push({pattern:new RegExp(escapeRegExp(component)),character:component,start:pos,end:++pos})}str=str.slice(component.length)}this._mask=mask;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+components.join("")+"\\s*$");this._propertiesByIndex=propertiesByIndex},_attachDatePickerEvents:function(){var self=this;this.widget.on("click",".datepicker *",$.proxy(this.click,this));this.widget.on("click","[data-action]",$.proxy(this.doAction,this));this.widget.on("mousedown",$.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(e){e.stopPropagation();var $this=$(this);var $parent=$this.closest("ul");var expanded=$parent.find(".collapse.in");var closed=$parent.find(".collapse:not(.in)");if(expanded&&expanded.length){var collapseData=expanded.data("collapse");if(collapseData&&collapseData.transitioning)return;expanded.collapse("hide");closed.collapse("show");$this.find("i").toggleClass(self.timeIcon+" "+self.dateIcon);self.$element.find(".add-on i").toggleClass(self.timeIcon+" "+self.dateIcon)}})}if(this.isInput){this.$element.on({focus:$.proxy(this.show,this),change:$.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)})}}else{this.$element.on({change:$.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",$.proxy(this.show,this))}else{this.$element.on("click",$.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){$(window).on("resize.datetimepicker"+this.id,$.proxy(this.place,this));if(!this.isInput){$(document).on("mousedown.datetimepicker"+this.id,$.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({focus:this.show,change:this.change});if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress})}}else{this.$element.off({change:this.change},"input");if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){$(window).off("resize.datetimepicker"+this.id);if(!this.isInput){$(document).off("mousedown.datetimepicker"+this.id)}},_isInFixed:function(){if(this.$element){var parents=this.$element.parents();var inFixed=false;for(var i=0;i'+"
      "+""+'
      '+DPGlobal.template+"
      "+""+'
    • '+""+'
      '+TPGlobal.getTemplate(is12Hours,showSeconds)+"
      "+""+"
    "+"
    "}else if(pickTime){return'"}else{return'"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:""+""+'‹'+''+'›'+""+"",contTemplate:''};DPGlobal.template='
    '+''+DPGlobal.headTemplate+""+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    ";var TPGlobal={hourTemplate:'',minuteTemplate:'',secondTemplate:''};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'
    '+'"+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+""+" "+''+" "+(showSeconds?''+"":"")+(is12Hours?''+"":"")+""+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+"
    "+TPGlobal.hourTemplate+":"+TPGlobal.minuteTemplate+":"+TPGlobal.secondTemplate+""+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+(showSeconds?'
    '+''+"
    "+"
    ":"")}})(window.jQuery); \ No newline at end of file + +(function($) { + + // Picker object + var smartPhone = (window.orientation != undefined); + var DateTimePicker = function(element, options) { + this.id = dpgId++; + this.init(element, options); + }; + + var dateToDate = function(dt) { + if (typeof dt === 'string') { + return new Date(dt); + } + return dt; + }; + + DateTimePicker.prototype = { + constructor: DateTimePicker, + + init: function(element, options) { + var icon; + if (!(options.pickTime || options.pickDate)) + throw new Error('Must choose at least one picker'); + this.options = options; + this.$element = $(element); + this.language = options.language in dates ? options.language : 'en' + this.pickDate = options.pickDate; + this.pickTime = options.pickTime; + this.isInput = this.$element.is('input'); + this.component = false; + this.showTimeFirst = options.showTimeFirst; + if (this.$element.find('.input-append') || this.$element.find('.input-prepend')) + this.component = this.$element.find('.add-on'); + this.format = options.format; + if (!this.format) { + if (this.isInput) this.format = this.$element.data('format'); + else this.format = this.$element.find('input').data('format'); + if (!this.format) this.format = 'MM/dd/yyyy'; + } + this._compileFormat(); + if (this.component) { + icon = this.component.find('i'); + } + if (this.pickTime) { + if (icon && icon.length) this.timeIcon = icon.data('time-icon'); + if (!this.timeIcon) this.timeIcon = 'icon-time'; + if (!this.dateIcon) this.dateIcon = 'icon-calendar'; + icon.addClass(this.timeIcon); + } + if (this.pickDate && (!this.showTimeFirst)) { + if (icon && icon.length) this.dateIcon = icon.data('date-icon'); + if (!this.dateIcon) this.dateIcon = 'icon-calendar'; + icon.removeClass(this.timeIcon); + icon.addClass(this.dateIcon); + } + this.widget = $(getTemplate(this.timeIcon, this.dateIcon, options.pickDate, options.pickTime, options.pick12HourFormat, options.pickSeconds, options.collapse, options.showTimeFirst)).appendTo('body'); + this.minViewMode = options.minViewMode||this.$element.data('date-minviewmode')||0; + if (typeof this.minViewMode === 'string') { + switch (this.minViewMode) { + case 'months': + this.minViewMode = 1; + break; + case 'years': + this.minViewMode = 2; + break; + default: + this.minViewMode = 0; + break; + } + } + this.viewMode = options.viewMode||this.$element.data('date-viewmode')||0; + if (typeof this.viewMode === 'string') { + switch (this.viewMode) { + case 'months': + this.viewMode = 1; + break; + case 'years': + this.viewMode = 2; + break; + default: + this.viewMode = 0; + break; + } + } + this.startViewMode = this.viewMode; + this.weekStart = options.weekStart||this.$element.data('date-weekstart')||0; + this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1; + this.setStartDate(options.startDate || this.$element.data('date-startdate')); + this.setEndDate(options.endDate || this.$element.data('date-enddate')); + this.fillDow(); + this.fillMonths(); + this.fillHours(); + this.fillMinutes(); + this.fillSeconds(); + this.update(); + this.showMode(); + this._attachDatePickerEvents(); + }, + + show: function(e) { + this.widget.show(); + this.height = this.component ? this.component.outerHeight() : this.$element.outerHeight(); + this.place(); + this.$element.trigger({ + type: 'show', + date: this._date + }); + this._attachDatePickerGlobalEvents(); + if (e) { + e.stopPropagation(); + e.preventDefault(); + } + }, + + disable: function(){ + this.$element.find('input').prop('disabled',true); + this._detachDatePickerEvents(); + }, + enable: function(){ + this.$element.find('input').prop('disabled',false); + this._attachDatePickerEvents(); + }, + + hide: function() { + // Ignore event if in the middle of a picker transition + var collapse = this.widget.find('.collapse') + for (var i = 0; i < collapse.length; i++) { + var collapseData = collapse.eq(i).data('collapse'); + if (collapseData && collapseData.transitioning) + return; + } + this.widget.hide(); + this.viewMode = this.startViewMode; + this.showMode(); + this.set(); + this.$element.trigger({ + type: 'hide', + date: this._date + }); + this._detachDatePickerGlobalEvents(); + }, + + set: function() { + var formatted = ''; + if (!this._unset) formatted = this.formatDate(this._date); + if (!this.isInput) { + if (this.component){ + var input = this.$element.find('input'); + input.val(formatted); + this._resetMaskPos(input); + } + this.$element.data('date', formatted); + } else { + this.$element.val(formatted); + this._resetMaskPos(this.$element); + } + }, + + setValue: function(newDate) { + if (!newDate) { + this._unset = true; + } else { + this._unset = false; + } + if (typeof newDate === 'string') { + this._date = this.parseDate(newDate); + } else if(newDate) { + this._date = new Date(newDate); + } + this.set(); + this.viewDate = UTCDate(this._date.getUTCFullYear(), this._date.getUTCMonth(), 1, 0, 0, 0, 0); + this.fillDate(); + this.fillTime(); + }, + + getDate: function() { + if (this._unset) return null; + return new Date(this._date.valueOf()); + }, + + setDate: function(date) { + if (!date) this.setValue(null); + else this.setValue(date.valueOf()); + }, + + setStartDate: function(date) { + if (date instanceof Date) { + this.startDate = date; + } else if (typeof date === 'string') { + this.startDate = new UTCDate(date); + if (! this.startDate.getUTCFullYear()) { + this.startDate = -Infinity; + } + } else { + this.startDate = -Infinity; + } + if (this.viewDate) { + this.update(); + } + }, + + setEndDate: function(date) { + if (date instanceof Date) { + this.endDate = date; + } else if (typeof date === 'string') { + this.endDate = new UTCDate(date); + if (! this.endDate.getUTCFullYear()) { + this.endDate = Infinity; + } + } else { + this.endDate = Infinity; + } + if (this.viewDate) { + this.update(); + } + }, + + getLocalDate: function() { + if (this._unset) return null; + var d = this._date; + return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), + d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds()); + }, + + setLocalDate: function(localDate) { + if (!localDate) this.setValue(null); + else + this.setValue(Date.UTC( + localDate.getFullYear(), + localDate.getMonth(), + localDate.getDate(), + localDate.getHours(), + localDate.getMinutes(), + localDate.getSeconds(), + localDate.getMilliseconds())); + }, + + place: function(){ + var position = 'absolute'; + var offset = this.component ? this.component.offset() : this.$element.offset(); + this.width = this.component ? this.component.outerWidth() : this.$element.outerWidth(); + offset.top = offset.top + this.height; + + var $window = $(window); + + if ( this.options.width != undefined ) { + this.widget.width( this.options.width ); + } + + if ( this.options.orientation == 'left' ) { + this.widget.addClass( 'left-oriented' ); + offset.left = offset.left - this.widget.width() + 20; + } + + if (this._isInFixed()) { + position = 'fixed'; + offset.top -= $window.scrollTop(); + offset.left -= $window.scrollLeft(); + } + + if ($window.width() < offset.left + this.widget.outerWidth()) { + offset.right = $window.width() - offset.left - this.width; + offset.left = 'auto'; + this.widget.addClass('pull-right'); + } else { + offset.right = 'auto'; + this.widget.removeClass('pull-right'); + } + + this.widget.css({ + position: position, + top: offset.top, + left: offset.left, + right: offset.right + }); + }, + + notifyChange: function(){ + this.$element.trigger({ + type: 'changeDate', + date: this.getDate(), + localDate: this.getLocalDate() + }); + }, + + update: function(newDate){ + var dateStr = newDate; + if (!dateStr) { + if (this.isInput) { + dateStr = this.$element.val(); + } else { + dateStr = this.$element.find('input').val(); + } + if (dateStr) { + this._date = this.parseDate(dateStr); + } + if (!this._date) { + var tmp = new Date() + this._date = UTCDate(tmp.getFullYear(), + tmp.getMonth(), + tmp.getDate(), + tmp.getHours(), + tmp.getMinutes(), + tmp.getSeconds(), + tmp.getMilliseconds()) + } + } + this.viewDate = UTCDate(this._date.getUTCFullYear(), this._date.getUTCMonth(), 1, 0, 0, 0, 0); + this.fillDate(); + this.fillTime(); + }, + + fillDow: function() { + var dowCnt = this.weekStart; + var html = $(''); + while (dowCnt < this.weekStart + 7) { + html.append('' + dates[this.language].daysMin[(dowCnt++) % 7] + ''); + } + this.widget.find('.datepicker-days thead').append(html); + }, + + fillMonths: function() { + var html = ''; + var i = 0 + while (i < 12) { + html += '' + dates[this.language].monthsShort[i++] + ''; + } + this.widget.find('.datepicker-months td').append(html); + }, + + fillDate: function() { + var year = this.viewDate.getUTCFullYear(); + var month = this.viewDate.getUTCMonth(); + var currentDate = UTCDate( + this._date.getUTCFullYear(), + this._date.getUTCMonth(), + this._date.getUTCDate(), + 0, 0, 0, 0 + ); + var startYear = typeof this.startDate === 'object' ? this.startDate.getUTCFullYear() : -Infinity; + var startMonth = typeof this.startDate === 'object' ? this.startDate.getUTCMonth() : -1; + var endYear = typeof this.endDate === 'object' ? this.endDate.getUTCFullYear() : Infinity; + var endMonth = typeof this.endDate === 'object' ? this.endDate.getUTCMonth() : 12; + + this.widget.find('.datepicker-days').find('.disabled').removeClass('disabled'); + this.widget.find('.datepicker-months').find('.disabled').removeClass('disabled'); + this.widget.find('.datepicker-years').find('.disabled').removeClass('disabled'); + + this.widget.find('.datepicker-days th:eq(1)').text( + dates[this.language].months[month] + ' ' + year); + + var prevMonth = UTCDate(year, month-1, 28, 0, 0, 0, 0); + var day = DPGlobal.getDaysInMonth( + prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); + prevMonth.setUTCDate(day); + prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.weekStart + 7) % 7); + if ((year == startYear && month <= startMonth) || year < startYear) { + this.widget.find('.datepicker-days th:eq(0)').addClass('disabled'); + } + if ((year == endYear && month >= endMonth) || year > endYear) { + this.widget.find('.datepicker-days th:eq(2)').addClass('disabled'); + } + + var nextMonth = new Date(prevMonth.valueOf()); + nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); + nextMonth = nextMonth.valueOf(); + var html = []; + var row; + var clsName; + while (prevMonth.valueOf() < nextMonth) { + if (prevMonth.getUTCDay() === this.weekStart) { + row = $(''); + html.push(row); + } + clsName = ''; + if (prevMonth.getUTCFullYear() < year || + (prevMonth.getUTCFullYear() == year && + prevMonth.getUTCMonth() < month)) { + clsName += ' old'; + } else if (prevMonth.getUTCFullYear() > year || + (prevMonth.getUTCFullYear() == year && + prevMonth.getUTCMonth() > month)) { + clsName += ' new'; + } + if (prevMonth.valueOf() === currentDate.valueOf()) { + clsName += ' active'; + } + if ((prevMonth.valueOf() + 86400000) <= this.startDate) { + clsName += ' disabled'; + } + if (prevMonth.valueOf() > this.endDate) { + clsName += ' disabled'; + } + row.append('' + prevMonth.getUTCDate() + ''); + prevMonth.setUTCDate(prevMonth.getUTCDate() + 1); + } + this.widget.find('.datepicker-days tbody').empty().append(html); + var currentYear = this._date.getUTCFullYear(); + + var months = this.widget.find('.datepicker-months').find( + 'th:eq(1)').text(year).end().find('span').removeClass('active'); + if (currentYear === year) { + months.eq(this._date.getUTCMonth()).addClass('active'); + } + if (currentYear - 1 < startYear) { + this.widget.find('.datepicker-months th:eq(0)').addClass('disabled'); + } + if (currentYear + 1 > endYear) { + this.widget.find('.datepicker-months th:eq(2)').addClass('disabled'); + } + for (var i = 0; i < 12; i++) { + if ((year == startYear && startMonth > i) || (year < startYear)) { + $(months[i]).addClass('disabled'); + } else if ((year == endYear && endMonth < i) || (year > endYear)) { + $(months[i]).addClass('disabled'); + } + } + + html = ''; + year = parseInt(year/10, 10) * 10; + var yearCont = this.widget.find('.datepicker-years').find( + 'th:eq(1)').text(year + '-' + (year + 9)).end().find('td'); + this.widget.find('.datepicker-years').find('th').removeClass('disabled'); + if (startYear > year) { + this.widget.find('.datepicker-years').find('th:eq(0)').addClass('disabled'); + } + if (endYear < year+9) { + this.widget.find('.datepicker-years').find('th:eq(2)').addClass('disabled'); + } + year -= 1; + for (var i = -1; i < 11; i++) { + html += '' + year + ''; + year += 1; + } + yearCont.html(html); + }, + + fillHours: function() { + var table = this.widget.find( + '.timepicker .timepicker-hours table'); + table.parent().hide(); + var html = ''; + if (this.options.pick12HourFormat) { + var current = 1; + for (var i = 0; i < 3; i += 1) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current++; + } + html += '' + } + } else { + var current = 0; + for (var i = 0; i < 6; i += 1) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current++; + } + html += '' + } + } + table.html(html); + }, + + fillMinutes: function() { + var table = this.widget.find( + '.timepicker .timepicker-minutes table'); + table.parent().hide(); + var html = ''; + var current = 0; + for (var i = 0; i < 5; i++) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current += 3; + } + html += ''; + } + table.html(html); + }, + + fillSeconds: function() { + var table = this.widget.find( + '.timepicker .timepicker-seconds table'); + table.parent().hide(); + var html = ''; + var current = 0; + for (var i = 0; i < 5; i++) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current += 3; + } + html += ''; + } + table.html(html); + }, + + fillTime: function() { + if (!this._date) + return; + var timeComponents = this.widget.find('.timepicker span[data-time-component]'); + var table = timeComponents.closest('table'); + var is12HourFormat = this.options.pick12HourFormat; + var hour = this._date.getUTCHours(); + var period = 'AM'; + if (is12HourFormat) { + if (hour >= 12) period = 'PM'; + if (hour === 0) hour = 12; + else if (hour != 12) hour = hour % 12; + this.widget.find( + '.timepicker [data-action=togglePeriod]').text(period); + } + hour = padLeft(hour.toString(), 2, '0'); + var minute = padLeft(this._date.getUTCMinutes().toString(), 2, '0'); + var second = padLeft(this._date.getUTCSeconds().toString(), 2, '0'); + timeComponents.filter('[data-time-component=hours]').text(hour); + timeComponents.filter('[data-time-component=minutes]').text(minute); + timeComponents.filter('[data-time-component=seconds]').text(second); + }, + + click: function(e) { + e.stopPropagation(); + e.preventDefault(); + this._unset = false; + var target = $(e.target).closest('span, td, th'); + if (target.length === 1) { + if (! target.is('.disabled')) { + switch(target[0].nodeName.toLowerCase()) { + case 'th': + switch(target[0].className) { + case 'switch': + this.showMode(1); + break; + case 'prev': + case 'next': + var vd = this.viewDate; + var navFnc = DPGlobal.modes[this.viewMode].navFnc; + var step = DPGlobal.modes[this.viewMode].navStep; + if (target[0].className === 'prev') step = step * -1; + vd['set' + navFnc](vd['get' + navFnc]() + step); + this.fillDate(); + this.set(); + break; + } + break; + case 'span': + if (target.is('.month')) { + var month = target.parent().find('span').index(target); + this.viewDate.setUTCMonth(month); + } else { + var year = parseInt(target.text(), 10) || 0; + this.viewDate.setUTCFullYear(year); + } + if (this.viewMode !== 0) { + this._date = UTCDate( + this.viewDate.getUTCFullYear(), + this.viewDate.getUTCMonth(), + this.viewDate.getUTCDate(), + this._date.getUTCHours(), + this._date.getUTCMinutes(), + this._date.getUTCSeconds(), + this._date.getUTCMilliseconds() + ); + this.notifyChange(); + } + this.showMode(-1); + this.fillDate(); + this.set(); + break; + case 'td': + if (target.is('.day')) { + var day = parseInt(target.text(), 10) || 1; + var month = this.viewDate.getUTCMonth(); + var year = this.viewDate.getUTCFullYear(); + if (target.is('.old')) { + if (month === 0) { + month = 11; + year -= 1; + } else { + month -= 1; + } + } else if (target.is('.new')) { + if (month == 11) { + month = 0; + year += 1; + } else { + month += 1; + } + } + this._date = UTCDate( + year, month, day, + this._date.getUTCHours(), + this._date.getUTCMinutes(), + this._date.getUTCSeconds(), + this._date.getUTCMilliseconds() + ); + this.viewDate = UTCDate( + year, month, Math.min(28, day) , 0, 0, 0, 0); + this.fillDate(); + this.set(); + this.notifyChange(); + } + break; + } + } + } + }, + + actions: { + incrementHours: function(e) { + this._date.setUTCHours(this._date.getUTCHours() + 1); + }, + + incrementMinutes: function(e) { + this._date.setUTCMinutes(this._date.getUTCMinutes() + 1); + }, + + incrementSeconds: function(e) { + this._date.setUTCSeconds(this._date.getUTCSeconds() + 1); + }, + + decrementHours: function(e) { + this._date.setUTCHours(this._date.getUTCHours() - 1); + }, + + decrementMinutes: function(e) { + this._date.setUTCMinutes(this._date.getUTCMinutes() - 1); + }, + + decrementSeconds: function(e) { + this._date.setUTCSeconds(this._date.getUTCSeconds() - 1); + }, + + togglePeriod: function(e) { + var hour = this._date.getUTCHours(); + if (hour >= 12) hour -= 12; + else hour += 12; + this._date.setUTCHours(hour); + }, + + showPicker: function() { + this.widget.find('.timepicker > div:not(.timepicker-picker)').hide(); + this.widget.find('.timepicker .timepicker-picker').show(); + }, + + showHours: function() { + this.widget.find('.timepicker .timepicker-picker').hide(); + this.widget.find('.timepicker .timepicker-hours').show(); + }, + + showMinutes: function() { + this.widget.find('.timepicker .timepicker-picker').hide(); + this.widget.find('.timepicker .timepicker-minutes').show(); + }, + + showSeconds: function() { + this.widget.find('.timepicker .timepicker-picker').hide(); + this.widget.find('.timepicker .timepicker-seconds').show(); + }, + + selectHour: function(e) { + var tgt = $(e.target); + var value = parseInt(tgt.text(), 10); + if (this.options.pick12HourFormat) { + var current = this._date.getUTCHours(); + if (current >= 12) { + if (value != 12) value = (value + 12) % 24; + } else { + if (value === 12) value = 0; + else value = value % 12; + } + } + this._date.setUTCHours(value); + this.actions.showPicker.call(this); + }, + + selectMinute: function(e) { + var tgt = $(e.target); + var value = parseInt(tgt.text(), 10); + this._date.setUTCMinutes(value); + this.actions.showPicker.call(this); + }, + + selectSecond: function(e) { + var tgt = $(e.target); + var value = parseInt(tgt.text(), 10); + this._date.setUTCSeconds(value); + this.actions.showPicker.call(this); + } + }, + + doAction: function(e) { + e.stopPropagation(); + e.preventDefault(); + if (!this._date) this._date = UTCDate(1970, 0, 0, 0, 0, 0, 0); + var action = $(e.currentTarget).data('action'); + var rv = this.actions[action].apply(this, arguments); + this.set(); + this.fillTime(); + this.notifyChange(); + return rv; + }, + + stopEvent: function(e) { + e.stopPropagation(); + e.preventDefault(); + }, + + // part of the following code was taken from + // http://cloud.github.com/downloads/digitalBush/jquery.maskedinput/jquery.maskedinput-1.3.js + keydown: function(e) { + var self = this, k = e.which, input = $(e.target); + if (k == 8 || k == 46) { + // backspace and delete cause the maskPosition + // to be recalculated + setTimeout(function() { + self._resetMaskPos(input); + }); + } + }, + + keypress: function(e) { + var k = e.which; + if (k == 8 || k == 46) { + // For those browsers which will trigger + // keypress on backspace/delete + return; + } + var input = $(e.target); + var c = String.fromCharCode(k); + var val = input.val() || ''; + val += c; + var mask = this._mask[this._maskPos]; + if (!mask) { + return false; + } + if (mask.end != val.length) { + return; + } + if (!mask.pattern.test(val.slice(mask.start))) { + val = val.slice(0, val.length - 1); + while ((mask = this._mask[this._maskPos]) && mask.character) { + val += mask.character; + // advance mask position past static + // part + this._maskPos++; + } + val += c; + if (mask.end != val.length) { + input.val(val); + return false; + } else { + if (!mask.pattern.test(val.slice(mask.start))) { + input.val(val.slice(0, mask.start)); + return false; + } else { + input.val(val); + this._maskPos++; + return false; + } + } + } else { + this._maskPos++; + } + }, + + change: function(e) { + var input = $(e.target); + var val = input.val(); + if (this._formatPattern.test(val)) { + this.update(); + this.setValue(this._date.getTime()); + this.notifyChange(); + this.set(); + } else if (val && val.trim()) { + this.setValue(this._date.getTime()); + if (this._date) this.set(); + else input.val(''); + } else { + if (this._date) { + this.setValue(null); + // unset the date when the input is + // erased + this.notifyChange(); + this._unset = true; + } + } + this._resetMaskPos(input); + }, + + showMode: function(dir) { + if (dir) { + this.viewMode = Math.max(this.minViewMode, Math.min( + 2, this.viewMode + dir)); + } + this.widget.find('.datepicker > div').hide().filter( + '.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); + }, + + destroy: function() { + this._detachDatePickerEvents(); + this._detachDatePickerGlobalEvents(); + this.widget.remove(); + this.$element.removeData('datetimepicker'); + this.component.removeData('datetimepicker'); + }, + + formatDate: function(d) { + return this.format.replace(formatReplacer, function(match) { + var methodName, property, rv, len = match.length; + if (match === 'ms') + len = 1; + property = dateFormatComponents[match].property + if (property === 'Hours12') { + rv = d.getUTCHours(); + if (rv === 0) rv = 12; + else if (rv !== 12) rv = rv % 12; + } else if (property === 'Period12') { + if (d.getUTCHours() >= 12) return 'PM'; + else return 'AM'; + } else { + methodName = 'get' + property; + rv = d[methodName](); + } + if (methodName === 'getUTCMonth') rv = rv + 1; + if (methodName === 'getUTCYear') rv = rv + 1900 - 2000; + return padLeft(rv.toString(), len, '0'); + }); + }, + + parseDate: function(str) { + var match, i, property, methodName, value, parsed = {}; + if (!(match = this._formatPattern.exec(str))) + return null; + for (i = 1; i < match.length; i++) { + property = this._propertiesByIndex[i]; + if (!property) + continue; + value = match[i]; + if (/^\d+$/.test(value)) + value = parseInt(value, 10); + parsed[property] = value; + } + return this._finishParsingDate(parsed); + }, + + _resetMaskPos: function(input) { + var val = input.val(); + for (var i = 0; i < this._mask.length; i++) { + if (this._mask[i].end > val.length) { + // If the mask has ended then jump to + // the next + this._maskPos = i; + break; + } else if (this._mask[i].end === val.length) { + this._maskPos = i + 1; + break; + } + } + }, + + _finishParsingDate: function(parsed) { + var year, month, date, hours, minutes, seconds, milliseconds; + year = parsed.UTCFullYear; + if (parsed.UTCYear) year = 2000 + parsed.UTCYear; + if (!year) year = 1970; + if (parsed.UTCMonth) month = parsed.UTCMonth - 1; + else month = 0; + date = parsed.UTCDate || 1; + hours = parsed.UTCHours || 0; + minutes = parsed.UTCMinutes || 0; + seconds = parsed.UTCSeconds || 0; + milliseconds = parsed.UTCMilliseconds || 0; + if (parsed.Hours12) { + hours = parsed.Hours12; + } + if (parsed.Period12) { + if (/pm/i.test(parsed.Period12)) { + if (hours != 12) hours = (hours + 12) % 24; + } else { + hours = hours % 12; + } + } + return UTCDate(year, month, date, hours, minutes, seconds, milliseconds); + }, + + _compileFormat: function () { + var match, component, components = [], mask = [], + str = this.format, propertiesByIndex = {}, i = 0, pos = 0; + while (match = formatComponent.exec(str)) { + component = match[0]; + if (component in dateFormatComponents) { + i++; + propertiesByIndex[i] = dateFormatComponents[component].property; + components.push('\\s*' + dateFormatComponents[component].getPattern( + this) + '\\s*'); + mask.push({ + pattern: new RegExp(dateFormatComponents[component].getPattern( + this)), + property: dateFormatComponents[component].property, + start: pos, + end: pos += component.length + }); + } + else { + components.push(escapeRegExp(component)); + mask.push({ + pattern: new RegExp(escapeRegExp(component)), + character: component, + start: pos, + end: ++pos + }); + } + str = str.slice(component.length); + } + this._mask = mask; + this._maskPos = 0; + this._formatPattern = new RegExp( + '^\\s*' + components.join('') + '\\s*$'); + this._propertiesByIndex = propertiesByIndex; + }, + + _attachDatePickerEvents: function() { + var self = this; + // this handles date picker clicks + this.widget.on('click', '.datepicker *', $.proxy(this.click, this)); + // this handles time picker clicks + this.widget.on('click', '[data-action]', $.proxy(this.doAction, this)); + this.widget.on('mousedown', $.proxy(this.stopEvent, this)); + if (this.pickDate && this.pickTime) { + this.widget.on('click.togglePicker', '.accordion-toggle', function(e) { + e.stopPropagation(); + var $this = $(this); + var $parent = $this.closest('ul'); + var expanded = $parent.find('.collapse.in'); + var closed = $parent.find('.collapse:not(.in)'); + + if (expanded && expanded.length) { + var collapseData = expanded.data('collapse'); + if (collapseData && collapseData.transitioning) return; + expanded.collapse('hide'); + closed.collapse('show') + $this.find('i').toggleClass(self.timeIcon + ' ' + self.dateIcon); + self.$element.find('.add-on i').toggleClass(self.timeIcon + ' ' + self.dateIcon); + } + }); + } + if (this.isInput) { + this.$element.on({ + 'focus': $.proxy(this.show, this), + 'change': $.proxy(this.change, this) + }); + if (this.options.maskInput) { + this.$element.on({ + 'keydown': $.proxy(this.keydown, this), + 'keypress': $.proxy(this.keypress, this) + }); + } + } else { + this.$element.on({ + 'change': $.proxy(this.change, this) + }, 'input'); + if (this.options.maskInput) { + this.$element.on({ + 'keydown': $.proxy(this.keydown, this), + 'keypress': $.proxy(this.keypress, this) + }, 'input'); + } + if (this.component){ + this.component.on('click', $.proxy(this.show, this)); + } else { + this.$element.on('click', $.proxy(this.show, this)); + } + } + }, + + _attachDatePickerGlobalEvents: function() { + $(window).on( + 'resize.datetimepicker' + this.id, $.proxy(this.place, this)); + if (!this.isInput) { + $(document).on( + 'mousedown.datetimepicker' + this.id, $.proxy(this.hide, this)); + } + }, + + _detachDatePickerEvents: function() { + this.widget.off('click', '.datepicker *', this.click); + this.widget.off('click', '[data-action]'); + this.widget.off('mousedown', this.stopEvent); + if (this.pickDate && this.pickTime) { + this.widget.off('click.togglePicker'); + } + if (this.isInput) { + this.$element.off({ + 'focus': this.show, + 'change': this.change + }); + if (this.options.maskInput) { + this.$element.off({ + 'keydown': this.keydown, + 'keypress': this.keypress + }); + } + } else { + this.$element.off({ + 'change': this.change + }, 'input'); + if (this.options.maskInput) { + this.$element.off({ + 'keydown': this.keydown, + 'keypress': this.keypress + }, 'input'); + } + if (this.component){ + this.component.off('click', this.show); + } else { + this.$element.off('click', this.show); + } + } + }, + + _detachDatePickerGlobalEvents: function () { + $(window).off('resize.datetimepicker' + this.id); + if (!this.isInput) { + $(document).off('mousedown.datetimepicker' + this.id); + } + }, + + _isInFixed: function() { + if (this.$element) { + var parents = this.$element.parents(); + var inFixed = false; + for (var i=0; i' + + '
      ' + + '' + + '
      ' + + DPGlobal.template + + '
      ' + + '' + + '
    • ' + + '' + + '
      ' + + TPGlobal.getTemplate(is12Hours, showSeconds) + + '
      ' + + '' + + '
    ' + + '
    ' + ); + } else if (pickTime) { + return ( + '' + ); + } else { + return ( + '' + ); + } + } + + function UTCDate() { + return new Date(Date.UTC.apply(Date, arguments)); + } + + var DPGlobal = { + modes: [ + { + clsName: 'days', + navFnc: 'UTCMonth', + navStep: 1 + }, + { + clsName: 'months', + navFnc: 'UTCFullYear', + navStep: 1 + }, + { + clsName: 'years', + navFnc: 'UTCFullYear', + navStep: 10 + }], + isLeapYear: function (year) { + return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)) + }, + getDaysInMonth: function (year, month) { + return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] + }, + headTemplate: + '' + + '' + + '‹' + + '' + + '›' + + '' + + '', + contTemplate: '' + }; + DPGlobal.template = + '
    ' + + '' + + DPGlobal.headTemplate + + '' + + '
    ' + + '
    ' + + '
    ' + + '' + + DPGlobal.headTemplate + + DPGlobal.contTemplate+ + '
    '+ + '
    '+ + '
    '+ + ''+ + DPGlobal.headTemplate+ + DPGlobal.contTemplate+ + '
    '+ + '
    '; + var TPGlobal = { + hourTemplate: '', + minuteTemplate: '', + secondTemplate: '' + }; + TPGlobal.getTemplate = function(is12Hours, showSeconds) { + return ( + '
    ' + + '' + + '' + + '' + + '' + + '' + + (showSeconds ? + '' + + '': '')+ + (is12Hours ? '' : '') + + '' + + '' + + ' ' + + '' + + ' ' + + (showSeconds ? + '' + + '' : '') + + (is12Hours ? + '' + + '' : '') + + '' + + '' + + '' + + '' + + '' + + (showSeconds ? + '' + + '': '') + + (is12Hours ? '' : '') + + '' + + '
    ' + TPGlobal.hourTemplate + ':' + TPGlobal.minuteTemplate + ':' + TPGlobal.secondTemplate + '' + + '' + + '
    ' + + '
    ' + + '
    ' + + '' + + '
    '+ + '
    '+ + '
    ' + + '' + + '
    '+ + '
    '+ + (showSeconds ? + '
    ' + + '' + + '
    '+ + '
    ': '') + ); + } + + +})(window.jQuery) \ No newline at end of file From 63ce35b38dc9a6858af89a7329b4b9525f7e2755 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 12:28:37 -0400 Subject: [PATCH 080/181] initializing only when viewed. fixes flash buttons, saves load time. --- .../js/airtime/playouthistory/historytable.js | 41 ++++++++++++++----- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 978750ea0..4004d4e13 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -270,13 +270,29 @@ var AIRTIME = (function(AIRTIME) { timeStartId = "#his_time_start", dateEndId = "#his_date_end", timeEndId = "#his_time_end", - $hisDialogEl; + $hisDialogEl, + + tabsInit = [ + { + initialized: false, + initialize: function() { + oTableItem = itemHistoryTable(); + } + }, + { + initialized: false, + initialize: function() { + oTableAgg = aggregateHistoryTable(); + } + } + ]; + $historyContentDiv = $("#history_content"); function redrawTables() { - oTableAgg.fnDraw(); - oTableItem.fnDraw(); + oTableAgg && oTableAgg.fnDraw(); + oTableItem && oTableItem.fnDraw(); } function removeHistoryDialog() { @@ -340,10 +356,7 @@ var AIRTIME = (function(AIRTIME) { hourText: $.i18n._("Hour"), minuteText: $.i18n._("Minute") }; - - oTableItem = itemHistoryTable(); - oTableAgg = aggregateHistoryTable(); - + $historyContentDiv.find(dateStartId).datepicker(oBaseDatePickerSettings); $historyContentDiv.find(timeStartId).timepicker(oBaseTimePickerSettings); $historyContentDiv.find(dateEndId).datepicker(oBaseDatePickerSettings); @@ -453,7 +466,16 @@ var AIRTIME = (function(AIRTIME) { }); }); - $historyContentDiv.find("#his-tabs").tabs(); + $historyContentDiv.find("#his-tabs").tabs({ + show: function( event, ui ) { + var tab = tabsInit[ui.index]; + + if (!tab.initialized) { + tab.initialize(); + tab.initialized = true; + } + } + }); // begin context menu initialization. $.contextMenu({ @@ -496,8 +518,7 @@ var AIRTIME = (function(AIRTIME) { if (c) { $.post(deleteUrl, {format: "json"}, function(json) { - oTableItem.fnDraw(); - oTableAgg.fnDraw(); + redrawTables(); }); } }; From 59ba938334fceca287981223811fa0cd1fca5e2d Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 13:18:17 -0400 Subject: [PATCH 081/181] implementing select all/none etc --- .../js/airtime/playouthistory/historytable.js | 47 +++++++++++++++++-- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 4004d4e13..72687a9de 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -65,9 +65,42 @@ var AIRTIME = (function(AIRTIME) { } function emptySelectedLogItems() { + var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + id, $tr, $input; + + $.each($inputs, function(index, input) { + $input = $(input); + $input.prop('checked', false); + }); selectedLogItems = {}; } + function selectCurrentPage() { + var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + id, $tr, $input; + + $.each($inputs, function(index, input) { + $input = $(input); + $input.prop('checked', true); + $tr = $input.parents("tr"); + id = $tr.data("his-id"); + addSelectedLogItem(id); + }); + } + + function deselectCurrentPage() { + var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + id, $tr, $input; + + $.each($inputs, function(index, input) { + $input = $(input); + $input.prop('checked', false); + $tr = $input.parents("tr"); + id = $tr.data("his-id"); + removeSelectedLogItem(id); + }); + } + function getFileName(ext){ var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m"; filename = filename.replace(/:/g,"h"); @@ -129,9 +162,9 @@ var AIRTIME = (function(AIRTIME) { $.i18n._("Select")+" " + "" + "" + "
    "); @@ -256,7 +289,11 @@ var AIRTIME = (function(AIRTIME) { $toolbar = $historyTableDiv.parents(".dataTables_wrapper").find(".fg-toolbar:first"); createToolbarButtons($toolbar); - + + $("#his-select-page").click(selectCurrentPage); + $("#his-dselect-page").click(deselectCurrentPage); + $("#his-dselect-all").click(emptySelectedLogItems); + return oTable; } @@ -457,7 +494,7 @@ var AIRTIME = (function(AIRTIME) { redrawTables(); }); - $historyContentDiv.find("#his_trash").click(function(ev){ + $historyContentDiv.on("click", "#his_trash", function(ev){ var items = getSelectedLogItems(), url = baseUrl+"playouthistory/delete-list-items"; From f1b1352077d839f6938a4c05f4dfd7033694157f Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 13:31:37 -0400 Subject: [PATCH 082/181] matching selected row colours to the library table. --- airtime_mvc/public/css/playouthistory.css | 7 ++++ .../js/airtime/playouthistory/historytable.js | 32 +++++++++++-------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/airtime_mvc/public/css/playouthistory.css b/airtime_mvc/public/css/playouthistory.css index 5156add35..8082d97ba 100644 --- a/airtime_mvc/public/css/playouthistory.css +++ b/airtime_mvc/public/css/playouthistory.css @@ -34,3 +34,10 @@ div.his-timerange div { table.dataTable tbody tr { cursor: auto; } + +.his-selected.even { + background-color: rgba(240, 109, 53, 1); +} +.his-selected.odd { + background-color: rgba(255, 136, 56, 1); +} diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 72687a9de..edc35c3d2 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -56,22 +56,29 @@ var AIRTIME = (function(AIRTIME) { return items; } - function addSelectedLogItem(id) { + function addSelectedLogItem($el) { + var id; + + $el.addClass("his-selected"); + id = $el.data("his-id"); selectedLogItems[id] = ""; } - function removeSelectedLogItem(id) { + function removeSelectedLogItem($el) { + var id; + + $el.removeClass("his-selected"); + id = $el.data("his-id"); delete selectedLogItems[id]; } function emptySelectedLogItems() { var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), id, $tr, $input; + + $inputs.prop('checked', false); + $inputs.parents("tr").removeClass("his-selected"); - $.each($inputs, function(index, input) { - $input = $(input); - $input.prop('checked', false); - }); selectedLogItems = {}; } @@ -83,8 +90,7 @@ var AIRTIME = (function(AIRTIME) { $input = $(input); $input.prop('checked', true); $tr = $input.parents("tr"); - id = $tr.data("his-id"); - addSelectedLogItem(id); + addSelectedLogItem($tr); }); } @@ -96,8 +102,7 @@ var AIRTIME = (function(AIRTIME) { $input = $(input); $input.prop('checked', false); $tr = $input.parents("tr"); - id = $tr.data("his-id"); - removeSelectedLogItem(id); + removeSelectedLogItem($tr); }); } @@ -470,14 +475,13 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.on("click", ".his_checkbox input", function(e) { var checked = e.currentTarget.checked, - $tr = $(e.currentTarget).parents("tr"), - id = $tr.data("his-id"); + $tr = $(e.currentTarget).parents("tr"); if (checked) { - addSelectedLogItem(id); + addSelectedLogItem($tr); } else { - removeSelectedLogItem(id); + removeSelectedLogItem($tr); } }); From b2828d466dfc8d8cd4064abb6d4c1af20040e067 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 13:38:20 -0400 Subject: [PATCH 083/181] need delegation with delayed initialization. --- airtime_mvc/public/js/airtime/playouthistory/historytable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index edc35c3d2..26be956f6 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -404,7 +404,7 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.find(dateEndId).datepicker(oBaseDatePickerSettings); $historyContentDiv.find(timeEndId).timepicker(oBaseTimePickerSettings); - $("#his_create").click(function(e) { + $historyContentDiv.on("click", "#his_create", function(e) { var url = baseUrl+"playouthistory/edit-list-item/format/json" ; e.preventDefault(); From 12a62a38279bfaf4020daf7345ae07812b28c80a Mon Sep 17 00:00:00 2001 From: "cliff.wang" Date: Fri, 23 Aug 2013 14:23:47 -0400 Subject: [PATCH 084/181] CC-5309:Calendar-> Recording Show: Fail to open context menu Better error msg, also add more information in show-record.log --- .../application/services/CalendarService.php | 15 ++++++++++----- airtime_mvc/public/css/jquery.contextMenu.css | 1 + python_apps/pypo/recorder.py | 10 ++++++++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/services/CalendarService.php b/airtime_mvc/application/services/CalendarService.php index d0091d589..b0e1ad865 100644 --- a/airtime_mvc/application/services/CalendarService.php +++ b/airtime_mvc/application/services/CalendarService.php @@ -45,11 +45,16 @@ class Application_Service_CalendarService if ($this->ccShowInstance->isRecorded()) { $ccFile = $this->ccShowInstance->getCcFiles(); - - $menu["view_recorded"] = array( - "name" => _("View Recorded File Metadata"), - "icon" => "overview", - "url" => $baseUrl."library/edit-file-md/id/".$ccFile->getDbId()); + if (!isset($ccFile)) { + $menu["error when recording"] = array ( + "name" => _("Record file doesn't exist"), + "icon" => "error"); + }else { + $menu["view_recorded"] = array( + "name" => _("View Recorded File Metadata"), + "icon" => "overview", + "url" => $baseUrl."library/edit-file-md/id/".$ccFile->getDbId()); + } //recorded show can be uploaded to soundcloud if (Application_Model_Preference::GetUploadToSoundcloudOption()) { diff --git a/airtime_mvc/public/css/jquery.contextMenu.css b/airtime_mvc/public/css/jquery.contextMenu.css index 1119feb8f..61634b34d 100644 --- a/airtime_mvc/public/css/jquery.contextMenu.css +++ b/airtime_mvc/public/css/jquery.contextMenu.css @@ -108,6 +108,7 @@ .context-menu-item.icon-add-playlist { background-image: url(images/icon_add_playlist_cm.png); } .context-menu-item.icon-add-remove-content { background-image: url(images/icon_add_content_cm.png); } .context-menu-item.icon-remove-all-content { background-image: url(images/icon_remove_all_content_cm.png); } +.context-menu-item.icon-error { background-image: url(images/icon_alert_cal_alt.png); } /* vertically align inside labels */ .context-menu-input > label > * { vertical-align: top; } diff --git a/python_apps/pypo/recorder.py b/python_apps/pypo/recorder.py index b3818f32d..e61083738 100644 --- a/python_apps/pypo/recorder.py +++ b/python_apps/pypo/recorder.py @@ -10,6 +10,7 @@ import pytz import signal import math import traceback +import re from configobj import ConfigObj @@ -17,6 +18,7 @@ from poster.encode import multipart_encode from poster.streaminghttp import register_openers from subprocess import Popen +from subprocess import PIPE from threading import Thread import mutagen @@ -93,12 +95,16 @@ class ShowRecorder(Thread): self.logger.info("starting record") self.logger.info("command " + command) - self.p = Popen(args) + self.p = Popen(args,stdout=PIPE) #blocks at the following line until the child process #quits self.p.wait() - + outmsgs = self.p.stdout.readlines() + for msg in outmsgs: + m = re.search('^ERROR',msg) + if not m == None: + self.logger.info('Recording error is found: %s', msg) self.logger.info("finishing record, return code %s", self.p.returncode) code = self.p.returncode From dbe160c5d9cf8e2298239deea1094065c6fd9e74 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 15:52:49 -0400 Subject: [PATCH 085/181] beginning of displaying form errors, need to keep working on this. --- .../controllers/PlayouthistoryController.php | 14 ++++++++++++++ .../application/services/HistoryService.php | 2 ++ .../js/airtime/playouthistory/historytable.js | 5 +++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 83bedc3dd..39dbebd98 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -163,6 +163,13 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->createPlayedItem($params); + + if (isset($json["form"])) { + $this->view->form = $json["form"]; + $json["form"] = $this->view->render('playouthistory/dialog.phtml'); + + unset($this->view->form); + } $this->_helper->json->sendJson($json); } @@ -213,6 +220,13 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->editPlayedItem($params); + + if (isset($json["form"])) { + $this->view->form = $json["form"]; + $json["form"] = $this->view->render('playouthistory/dialog.phtml'); + + unset($this->view->form); + } $this->_helper->json->sendJson($json); } diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index db36b2856..6a8d3bda5 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -719,6 +719,7 @@ class Application_Service_HistoryService $msgs = $form->getMessages(); Logging::info($msgs); + $json["form"] = $form; $json["error"] = $msgs; } @@ -756,6 +757,7 @@ class Application_Service_HistoryService $msgs = $form->getMessages(); Logging::info($msgs); + $json["form"] = $form; $json["error"] = $msgs; } diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 26be956f6..1d2ed7384 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -460,8 +460,9 @@ var AIRTIME = (function(AIRTIME) { $.post(url, data, function(json) { //TODO put errors on form. - if (json.error !== undefined) { - + if (json.form !== undefined) { + var $newForm = $(json.form); + $hisDialogEl.html($newForm.html()); } else { removeHistoryDialog(); From c2b9bb01ac1692d9b0f8b0d0b6e7a8b79b535a3f Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 15:53:18 -0400 Subject: [PATCH 086/181] crlf --- .../controllers/PlayouthistoryController.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 39dbebd98..f5becc485 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -164,11 +164,11 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->createPlayedItem($params); - if (isset($json["form"])) { - $this->view->form = $json["form"]; - $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - - unset($this->view->form); + if (isset($json["form"])) { + $this->view->form = $json["form"]; + $json["form"] = $this->view->render('playouthistory/dialog.phtml'); + + unset($this->view->form); } $this->_helper->json->sendJson($json); @@ -222,9 +222,9 @@ class PlayouthistoryController extends Zend_Controller_Action $json = $historyService->editPlayedItem($params); if (isset($json["form"])) { - $this->view->form = $json["form"]; - $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - + $this->view->form = $json["form"]; + $json["form"] = $this->view->render('playouthistory/dialog.phtml'); + unset($this->view->form); } From 6d5531f341cc53e9c85997fb6b0b228a02b8a09c Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 27 Aug 2013 19:30:17 -0400 Subject: [PATCH 087/181] CC-5310 : Playlist -> Crash happens on draging a song after a webstream into a playlist --- .../views/scripts/playlist/update.phtml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/views/scripts/playlist/update.phtml b/airtime_mvc/application/views/scripts/playlist/update.phtml index e1c11f406..0171efafa 100644 --- a/airtime_mvc/application/views/scripts/playlist/update.phtml +++ b/airtime_mvc/application/views/scripts/playlist/update.phtml @@ -10,6 +10,9 @@ if ($item['type'] == 2) { $staticBlock = $bl->isStatic(); $fileUrl = null; } +else if ($item['type'] == 1) { + $fileUrl = null; +} else if ($item['type'] == 0) { $audiofile = Application_Model_StoredFile::RecallById($item['item_id']); $fileUrl = $audiofile->getFileUrl(); @@ -17,12 +20,12 @@ else if ($item['type'] == 0) { if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) { $nextAudiofile = Application_Model_StoredFile::RecallById($items[$i+1]['item_id']); - $nextFileUrl = $nextAudiofile->getFileUrl(); + $nextFileUrl = $nextAudiofile->getFileUrl(); } ?>
  • " unqid="">
    - +
    " data-mime-type=""> @@ -89,8 +92,8 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) { if(($i < count($items) -1) && !($items[$i]['type'] == 2 && $items[$i+1]['type'])): ?> From 186e438ccb061cee8f9b7d573a067d0d19344c92 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 11:54:34 -0400 Subject: [PATCH 088/181] adding upgrades to 2.4.1 for version. --- CREDITS | 4 +--- VERSION | 2 +- changelog | 7 ++++++ install_minimal/include/airtime-constants.php | 2 +- .../upgrades/airtime-2.4.1/DbUpgrade.php | 24 +++++++++++++++++++ .../airtime-2.4.1/airtime-upgrade.php | 8 +++++++ .../upgrades/airtime-2.4.1/data/upgrade.sql | 3 +++ python_apps/api_clients/api_client.py | 2 +- 8 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 install_minimal/upgrades/airtime-2.4.1/DbUpgrade.php create mode 100644 install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php create mode 100644 install_minimal/upgrades/airtime-2.4.1/data/upgrade.sql diff --git a/CREDITS b/CREDITS index 83b80fcc6..4f377ea52 100644 --- a/CREDITS +++ b/CREDITS @@ -2,10 +2,8 @@ CREDITS ======= -Version 2.4.0 +Version 2.4.1 ------------- -Martin Konecny (martin.konecny@sourcefabric.org) - Role: Developer Team Lead Denise Rigato (denise.rigato@sourcefabric.org) Role: Software Developer diff --git a/VERSION b/VERSION index 42fde3a5e..e7467e459 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ PRODUCT_ID=Airtime -PRODUCT_RELEASE=2.4.0 +PRODUCT_RELEASE=2.4.1 diff --git a/changelog b/changelog index 7945e9b98..d5eb9175c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,10 @@ +2.4.1 - August 28th, 2013 + * Bug Fixes + * Playout Engine locking issue + * Liquidsoap input harbor blocking scheduled contents + * Mono file playout problems + * Adding watched folder sometimes causes an exception based on length format + 2.4.0 - June 18th, 2013 * New features * Show linking diff --git a/install_minimal/include/airtime-constants.php b/install_minimal/include/airtime-constants.php index c3f6aaaaa..74af70dff 100644 --- a/install_minimal/include/airtime-constants.php +++ b/install_minimal/include/airtime-constants.php @@ -1,3 +1,3 @@ &1 | grep -v \"will create implicit index\""); + } +} diff --git a/install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php new file mode 100644 index 000000000..042b92d05 --- /dev/null +++ b/install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php @@ -0,0 +1,8 @@ + Date: Wed, 28 Aug 2013 12:13:24 -0400 Subject: [PATCH 089/181] need to actually call this function --- install_minimal/include/airtime-upgrade.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install_minimal/include/airtime-upgrade.php b/install_minimal/include/airtime-upgrade.php index 07db3f1e9..25204f16e 100644 --- a/install_minimal/include/airtime-upgrade.php +++ b/install_minimal/include/airtime-upgrade.php @@ -84,4 +84,8 @@ if (strcmp($version, "2.4.0") < 0) { passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.0/airtime-upgrade.php"); pause(); } +if (strcmp($version, "2.4.1") < 0) { + passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.1/airtime-upgrade.php"); + pause(); +} echo "******************************* Upgrade Complete *******************************".PHP_EOL; From 465da24ce0bc7cfb56feff2de4d8bca466a322a0 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 12:14:27 -0400 Subject: [PATCH 090/181] crlf --- install_minimal/include/airtime-upgrade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install_minimal/include/airtime-upgrade.php b/install_minimal/include/airtime-upgrade.php index 25204f16e..66ba70838 100644 --- a/install_minimal/include/airtime-upgrade.php +++ b/install_minimal/include/airtime-upgrade.php @@ -84,8 +84,8 @@ if (strcmp($version, "2.4.0") < 0) { passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.0/airtime-upgrade.php"); pause(); } -if (strcmp($version, "2.4.1") < 0) { - passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.1/airtime-upgrade.php"); - pause(); +if (strcmp($version, "2.4.1") < 0) { + passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.1/airtime-upgrade.php"); + pause(); } echo "******************************* Upgrade Complete *******************************".PHP_EOL; From 969889859b78795cb852ef824c26da0ea82dc34d Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 13:07:55 -0400 Subject: [PATCH 091/181] improper naming of propel tables in php caused cc_mount_name to not get any generated files, double declaration of some variables for cc_timestamp. --- .../configs/classmap-airtime-conf.php | 7 + .../models/airtime/CcMountName.php | 18 + .../models/airtime/CcMountNamePeer.php | 18 + .../models/airtime/CcMountNameQuery.php | 18 + .../airtime/map/CcListenerCountTableMap.php | 2 +- .../airtime/map/CcMountNameTableMap.php | 54 ++ .../models/airtime/om/BaseCcListenerCount.php | 58 +- .../airtime/om/BaseCcListenerCountPeer.php | 104 +- .../airtime/om/BaseCcListenerCountQuery.php | 32 +- .../models/airtime/om/BaseCcMountName.php | 893 ++++++++++++++++++ .../models/airtime/om/BaseCcMountNamePeer.php | 742 +++++++++++++++ .../airtime/om/BaseCcMountNameQuery.php | 259 +++++ .../models/airtime/om/BaseCcTimestamp.php | 25 + airtime_mvc/build/schema.xml | 2 +- 14 files changed, 2159 insertions(+), 73 deletions(-) create mode 100644 airtime_mvc/application/models/airtime/CcMountName.php create mode 100644 airtime_mvc/application/models/airtime/CcMountNamePeer.php create mode 100644 airtime_mvc/application/models/airtime/CcMountNameQuery.php create mode 100644 airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcMountName.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php diff --git a/airtime_mvc/application/configs/classmap-airtime-conf.php b/airtime_mvc/application/configs/classmap-airtime-conf.php index ef0357425..9311a8ff0 100644 --- a/airtime_mvc/application/configs/classmap-airtime-conf.php +++ b/airtime_mvc/application/configs/classmap-airtime-conf.php @@ -183,6 +183,13 @@ return array ( 'BaseCcWebstreamMetadataPeer' => 'airtime/om/BaseCcWebstreamMetadataPeer.php', 'BaseCcWebstreamMetadata' => 'airtime/om/BaseCcWebstreamMetadata.php', 'BaseCcWebstreamMetadataQuery' => 'airtime/om/BaseCcWebstreamMetadataQuery.php', + 'CcMountNameTableMap' => 'airtime/map/CcMountNameTableMap.php', + 'CcMountNamePeer' => 'airtime/CcMountNamePeer.php', + 'CcMountName' => 'airtime/CcMountName.php', + 'CcMountNameQuery' => 'airtime/CcMountNameQuery.php', + 'BaseCcMountNamePeer' => 'airtime/om/BaseCcMountNamePeer.php', + 'BaseCcMountName' => 'airtime/om/BaseCcMountName.php', + 'BaseCcMountNameQuery' => 'airtime/om/BaseCcMountNameQuery.php', 'CcTimestampTableMap' => 'airtime/map/CcTimestampTableMap.php', 'CcTimestampPeer' => 'airtime/CcTimestampPeer.php', 'CcTimestamp' => 'airtime/CcTimestamp.php', diff --git a/airtime_mvc/application/models/airtime/CcMountName.php b/airtime_mvc/application/models/airtime/CcMountName.php new file mode 100644 index 000000000..3036dbdcd --- /dev/null +++ b/airtime_mvc/application/models/airtime/CcMountName.php @@ -0,0 +1,18 @@ +addRelation('CcTimestamp', 'CcTimestamp', RelationMap::MANY_TO_ONE, array('timestamp_id' => 'id', ), 'CASCADE', null); - $this->addRelation('CcTimestamp', 'CcTimestamp', RelationMap::MANY_TO_ONE, array('mount_name_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcMountName', 'CcMountName', RelationMap::MANY_TO_ONE, array('mount_name_id' => 'id', ), 'CASCADE', null); } // buildRelations() } // CcListenerCountTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php b/airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php new file mode 100644 index 000000000..f07bc5403 --- /dev/null +++ b/airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php @@ -0,0 +1,54 @@ +setName('cc_mount_name'); + $this->setPhpName('CcMountName'); + $this->setClassname('CcMountName'); + $this->setPackage('airtime'); + $this->setUseIdGenerator(true); + $this->setPrimaryKeyMethodInfo('cc_mount_name_id_seq'); + // columns + $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); + $this->addColumn('MOUNT_NAME', 'DbMountName', 'VARCHAR', true, 255, null); + // validators + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CcListenerCount', 'CcListenerCount', RelationMap::ONE_TO_MANY, array('id' => 'mount_name_id', ), 'CASCADE', null); + } // buildRelations() + +} // CcMountNameTableMap diff --git a/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php b/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php index 04d4b60f3..42c435123 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php @@ -54,9 +54,9 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent protected $aCcTimestamp; /** - * @var CcTimestamp + * @var CcMountName */ - protected $aCcTimestamp; + protected $aCcMountName; /** * Flag to prevent endless save loop, if this object is referenced @@ -173,8 +173,8 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent $this->modifiedColumns[] = CcListenerCountPeer::MOUNT_NAME_ID; } - if ($this->aCcTimestamp !== null && $this->aCcTimestamp->getDbId() !== $v) { - $this->aCcTimestamp = null; + if ($this->aCcMountName !== null && $this->aCcMountName->getDbId() !== $v) { + $this->aCcMountName = null; } return $this; @@ -270,8 +270,8 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent if ($this->aCcTimestamp !== null && $this->timestamp_id !== $this->aCcTimestamp->getDbId()) { $this->aCcTimestamp = null; } - if ($this->aCcTimestamp !== null && $this->mount_name_id !== $this->aCcTimestamp->getDbId()) { - $this->aCcTimestamp = null; + if ($this->aCcMountName !== null && $this->mount_name_id !== $this->aCcMountName->getDbId()) { + $this->aCcMountName = null; } } // ensureConsistency @@ -313,7 +313,7 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent if ($deep) { // also de-associate any related objects? $this->aCcTimestamp = null; - $this->aCcTimestamp = null; + $this->aCcMountName = null; } // if (deep) } @@ -436,11 +436,11 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent $this->setCcTimestamp($this->aCcTimestamp); } - if ($this->aCcTimestamp !== null) { - if ($this->aCcTimestamp->isModified() || $this->aCcTimestamp->isNew()) { - $affectedRows += $this->aCcTimestamp->save($con); + if ($this->aCcMountName !== null) { + if ($this->aCcMountName->isModified() || $this->aCcMountName->isNew()) { + $affectedRows += $this->aCcMountName->save($con); } - $this->setCcTimestamp($this->aCcTimestamp); + $this->setCcMountName($this->aCcMountName); } if ($this->isNew() ) { @@ -543,9 +543,9 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent } } - if ($this->aCcTimestamp !== null) { - if (!$this->aCcTimestamp->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcTimestamp->getValidationFailures()); + if ($this->aCcMountName !== null) { + if (!$this->aCcMountName->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcMountName->getValidationFailures()); } } @@ -633,8 +633,8 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent if (null !== $this->aCcTimestamp) { $result['CcTimestamp'] = $this->aCcTimestamp->toArray($keyType, $includeLazyLoadColumns, true); } - if (null !== $this->aCcTimestamp) { - $result['CcTimestamp'] = $this->aCcTimestamp->toArray($keyType, $includeLazyLoadColumns, true); + if (null !== $this->aCcMountName) { + $result['CcMountName'] = $this->aCcMountName->toArray($keyType, $includeLazyLoadColumns, true); } } return $result; @@ -879,13 +879,13 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent } /** - * Declares an association between this object and a CcTimestamp object. + * Declares an association between this object and a CcMountName object. * - * @param CcTimestamp $v + * @param CcMountName $v * @return CcListenerCount The current object (for fluent API support) * @throws PropelException */ - public function setCcTimestamp(CcTimestamp $v = null) + public function setCcMountName(CcMountName $v = null) { if ($v === null) { $this->setDbMountNameId(NULL); @@ -893,10 +893,10 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent $this->setDbMountNameId($v->getDbId()); } - $this->aCcTimestamp = $v; + $this->aCcMountName = $v; // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcTimestamp object, it will not be re-added. + // If this object has already been added to the CcMountName object, it will not be re-added. if ($v !== null) { $v->addCcListenerCount($this); } @@ -906,25 +906,25 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent /** - * Get the associated CcTimestamp object + * Get the associated CcMountName object * * @param PropelPDO Optional Connection object. - * @return CcTimestamp The associated CcTimestamp object. + * @return CcMountName The associated CcMountName object. * @throws PropelException */ - public function getCcTimestamp(PropelPDO $con = null) + public function getCcMountName(PropelPDO $con = null) { - if ($this->aCcTimestamp === null && ($this->mount_name_id !== null)) { - $this->aCcTimestamp = CcTimestampQuery::create()->findPk($this->mount_name_id, $con); + if ($this->aCcMountName === null && ($this->mount_name_id !== null)) { + $this->aCcMountName = CcMountNameQuery::create()->findPk($this->mount_name_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. - $this->aCcTimestamp->addCcListenerCounts($this); + $this->aCcMountName->addCcListenerCounts($this); */ } - return $this->aCcTimestamp; + return $this->aCcMountName; } /** @@ -959,7 +959,7 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent } // if ($deep) $this->aCcTimestamp = null; - $this->aCcTimestamp = null; + $this->aCcMountName = null; } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php index 9e3a7cb87..dad3a53b9 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php @@ -496,7 +496,7 @@ abstract class BaseCcListenerCountPeer { /** - * Returns the number of rows matching criteria, joining the related CcTimestamp table + * Returns the number of rows matching criteria, joining the related CcMountName table * * @param Criteria $criteria * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. @@ -504,7 +504,7 @@ abstract class BaseCcListenerCountPeer { * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @return int Number of matching rows. */ - public static function doCountJoinCcTimestamp(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doCountJoinCcMountName(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; @@ -531,7 +531,7 @@ abstract class BaseCcListenerCountPeer { $con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -612,7 +612,7 @@ abstract class BaseCcListenerCountPeer { /** - * Selects a collection of CcListenerCount objects pre-filled with their CcTimestamp objects. + * Selects a collection of CcListenerCount objects pre-filled with their CcMountName objects. * @param Criteria $criteria * @param PropelPDO $con * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN @@ -620,7 +620,7 @@ abstract class BaseCcListenerCountPeer { * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - public static function doSelectJoinCcTimestamp(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doSelectJoinCcMountName(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; @@ -631,9 +631,9 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addSelectColumns($criteria); $startcol = (CcListenerCountPeer::NUM_COLUMNS - CcListenerCountPeer::NUM_LAZY_LOAD_COLUMNS); - CcTimestampPeer::addSelectColumns($criteria); + CcMountNamePeer::addSelectColumns($criteria); - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -653,19 +653,19 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addInstanceToPool($obj1, $key1); } // if $obj1 already loaded - $key2 = CcTimestampPeer::getPrimaryKeyHashFromRow($row, $startcol); + $key2 = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol); if ($key2 !== null) { - $obj2 = CcTimestampPeer::getInstanceFromPool($key2); + $obj2 = CcMountNamePeer::getInstanceFromPool($key2); if (!$obj2) { - $cls = CcTimestampPeer::getOMClass(false); + $cls = CcMountNamePeer::getOMClass(false); $obj2 = new $cls(); $obj2->hydrate($row, $startcol); - CcTimestampPeer::addInstanceToPool($obj2, $key2); + CcMountNamePeer::addInstanceToPool($obj2, $key2); } // if obj2 already loaded - // Add the $obj1 (CcListenerCount) to $obj2 (CcTimestamp) + // Add the $obj1 (CcListenerCount) to $obj2 (CcMountName) $obj2->addCcListenerCount($obj1); } // if joined row was not null @@ -715,7 +715,7 @@ abstract class BaseCcListenerCountPeer { $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -753,12 +753,12 @@ abstract class BaseCcListenerCountPeer { CcTimestampPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + (CcTimestampPeer::NUM_COLUMNS - CcTimestampPeer::NUM_LAZY_LOAD_COLUMNS); - CcTimestampPeer::addSelectColumns($criteria); - $startcol4 = $startcol3 + (CcTimestampPeer::NUM_COLUMNS - CcTimestampPeer::NUM_LAZY_LOAD_COLUMNS); + CcMountNamePeer::addSelectColumns($criteria); + $startcol4 = $startcol3 + (CcMountNamePeer::NUM_COLUMNS - CcMountNamePeer::NUM_LAZY_LOAD_COLUMNS); $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -795,21 +795,21 @@ abstract class BaseCcListenerCountPeer { $obj2->addCcListenerCount($obj1); } // if joined row not null - // Add objects for joined CcTimestamp rows + // Add objects for joined CcMountName rows - $key3 = CcTimestampPeer::getPrimaryKeyHashFromRow($row, $startcol3); + $key3 = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol3); if ($key3 !== null) { - $obj3 = CcTimestampPeer::getInstanceFromPool($key3); + $obj3 = CcMountNamePeer::getInstanceFromPool($key3); if (!$obj3) { - $cls = CcTimestampPeer::getOMClass(false); + $cls = CcMountNamePeer::getOMClass(false); $obj3 = new $cls(); $obj3->hydrate($row, $startcol3); - CcTimestampPeer::addInstanceToPool($obj3, $key3); + CcMountNamePeer::addInstanceToPool($obj3, $key3); } // if obj3 loaded - // Add the $obj1 (CcListenerCount) to the collection in $obj3 (CcTimestamp) + // Add the $obj1 (CcListenerCount) to the collection in $obj3 (CcMountName) $obj3->addCcListenerCount($obj1); } // if joined row not null @@ -856,6 +856,8 @@ abstract class BaseCcListenerCountPeer { $con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ); } + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); + $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { @@ -869,7 +871,7 @@ abstract class BaseCcListenerCountPeer { /** - * Returns the number of rows matching criteria, joining the related CcTimestamp table + * Returns the number of rows matching criteria, joining the related CcMountName table * * @param Criteria $criteria * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. @@ -877,7 +879,7 @@ abstract class BaseCcListenerCountPeer { * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @return int Number of matching rows. */ - public static function doCountJoinAllExceptCcTimestamp(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doCountJoinAllExceptCcMountName(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; @@ -904,6 +906,8 @@ abstract class BaseCcListenerCountPeer { $con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ); } + $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); + $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { @@ -940,6 +944,11 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addSelectColumns($criteria); $startcol2 = (CcListenerCountPeer::NUM_COLUMNS - CcListenerCountPeer::NUM_LAZY_LOAD_COLUMNS); + CcMountNamePeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcMountNamePeer::NUM_COLUMNS - CcMountNamePeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); + $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -958,6 +967,25 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded + // Add objects for joined CcMountName rows + + $key2 = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcMountNamePeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcMountNamePeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcMountNamePeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcListenerCount) to the collection in $obj2 (CcMountName) + $obj2->addCcListenerCount($obj1); + + } // if joined row is not null + $results[] = $obj1; } $stmt->closeCursor(); @@ -966,7 +994,7 @@ abstract class BaseCcListenerCountPeer { /** - * Selects a collection of CcListenerCount objects pre-filled with all related objects except CcTimestamp. + * Selects a collection of CcListenerCount objects pre-filled with all related objects except CcMountName. * * @param Criteria $criteria * @param PropelPDO $con @@ -975,7 +1003,7 @@ abstract class BaseCcListenerCountPeer { * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - public static function doSelectJoinAllExceptCcTimestamp(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doSelectJoinAllExceptCcMountName(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; @@ -989,6 +1017,11 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addSelectColumns($criteria); $startcol2 = (CcListenerCountPeer::NUM_COLUMNS - CcListenerCountPeer::NUM_LAZY_LOAD_COLUMNS); + CcTimestampPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcTimestampPeer::NUM_COLUMNS - CcTimestampPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); + $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -1007,6 +1040,25 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded + // Add objects for joined CcTimestamp rows + + $key2 = CcTimestampPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcTimestampPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcTimestampPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcTimestampPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcListenerCount) to the collection in $obj2 (CcTimestamp) + $obj2->addCcListenerCount($obj1); + + } // if joined row is not null + $results[] = $obj1; } $stmt->closeCursor(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php index ed04cd146..30c702e6e 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php @@ -24,9 +24,9 @@ * @method CcListenerCountQuery rightJoinCcTimestamp($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTimestamp relation * @method CcListenerCountQuery innerJoinCcTimestamp($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTimestamp relation * - * @method CcListenerCountQuery leftJoinCcTimestamp($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcTimestamp relation - * @method CcListenerCountQuery rightJoinCcTimestamp($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTimestamp relation - * @method CcListenerCountQuery innerJoinCcTimestamp($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTimestamp relation + * @method CcListenerCountQuery leftJoinCcMountName($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcMountName relation + * @method CcListenerCountQuery rightJoinCcMountName($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcMountName relation + * @method CcListenerCountQuery innerJoinCcMountName($relationAlias = '') Adds a INNER JOIN clause to the query using the CcMountName relation * * @method CcListenerCount findOne(PropelPDO $con = null) Return the first CcListenerCount matching the query * @method CcListenerCount findOneOrCreate(PropelPDO $con = null) Return the first CcListenerCount matching the query, or a new CcListenerCount object populated from the query conditions when no match is found @@ -324,31 +324,31 @@ abstract class BaseCcListenerCountQuery extends ModelCriteria } /** - * Filter the query by a related CcTimestamp object + * Filter the query by a related CcMountName object * - * @param CcTimestamp $ccTimestamp the related object to use as filter + * @param CcMountName $ccMountName the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcListenerCountQuery The current query, for fluid interface */ - public function filterByCcTimestamp($ccTimestamp, $comparison = null) + public function filterByCcMountName($ccMountName, $comparison = null) { return $this - ->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $ccTimestamp->getDbId(), $comparison); + ->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $ccMountName->getDbId(), $comparison); } /** - * Adds a JOIN clause to the query using the CcTimestamp relation + * Adds a JOIN clause to the query using the CcMountName relation * * @param string $relationAlias optional alias for the relation * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return CcListenerCountQuery The current query, for fluid interface */ - public function joinCcTimestamp($relationAlias = '', $joinType = Criteria::INNER_JOIN) + public function joinCcMountName($relationAlias = '', $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcTimestamp'); + $relationMap = $tableMap->getRelation('CcMountName'); // create a ModelJoin object for this join $join = new ModelJoin(); @@ -363,14 +363,14 @@ abstract class BaseCcListenerCountQuery extends ModelCriteria $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { - $this->addJoinObject($join, 'CcTimestamp'); + $this->addJoinObject($join, 'CcMountName'); } return $this; } /** - * Use the CcTimestamp relation CcTimestamp object + * Use the CcMountName relation CcMountName object * * @see useQuery() * @@ -378,13 +378,13 @@ abstract class BaseCcListenerCountQuery extends ModelCriteria * to be used as main alias in the secondary query * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return CcTimestampQuery A secondary query class using the current class as primary query + * @return CcMountNameQuery A secondary query class using the current class as primary query */ - public function useCcTimestampQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + public function useCcMountNameQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) { return $this - ->joinCcTimestamp($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcTimestamp', 'CcTimestampQuery'); + ->joinCcMountName($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcMountName', 'CcMountNameQuery'); } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMountName.php b/airtime_mvc/application/models/airtime/om/BaseCcMountName.php new file mode 100644 index 000000000..b476f05a8 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcMountName.php @@ -0,0 +1,893 @@ +id; + } + + /** + * Get the [mount_name] column value. + * + * @return string + */ + public function getDbMountName() + { + return $this->mount_name; + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return CcMountName The current object (for fluent API support) + */ + public function setDbId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[] = CcMountNamePeer::ID; + } + + return $this; + } // setDbId() + + /** + * Set the value of [mount_name] column. + * + * @param string $v new value + * @return CcMountName The current object (for fluent API support) + */ + public function setDbMountName($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->mount_name !== $v) { + $this->mount_name = $v; + $this->modifiedColumns[] = CcMountNamePeer::MOUNT_NAME; + } + + return $this; + } // setDbMountName() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false) + { + try { + + $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; + $this->mount_name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 2; // 2 = CcMountNamePeer::NUM_COLUMNS - CcMountNamePeer::NUM_LAZY_LOAD_COLUMNS). + + } catch (Exception $e) { + throw new PropelException("Error populating CcMountName object", $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param PropelPDO $con (optional) The PropelPDO connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $stmt = CcMountNamePeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $row = $stmt->fetch(PDO::FETCH_NUM); + $stmt->closeCursor(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->collCcListenerCounts = null; + + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param PropelPDO $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() + */ + public function delete(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + try { + $ret = $this->preDelete($con); + if ($ret) { + CcMountNameQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()) + ->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CcMountNamePeer::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(PropelPDO $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + if ($this->isNew() ) { + $this->modifiedColumns[] = CcMountNamePeer::ID; + } + + // If this object has been modified, then save it to the database. + if ($this->isModified()) { + if ($this->isNew()) { + $criteria = $this->buildCriteria(); + if ($criteria->keyContainsValue(CcMountNamePeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcMountNamePeer::ID.')'); + } + + $pk = BasePeer::doInsert($criteria, $con); + $affectedRows = 1; + $this->setDbId($pk); //[IMV] update autoincrement primary key + $this->setNew(false); + } else { + $affectedRows = CcMountNamePeer::doUpdate($this, $con); + } + + $this->resetModified(); // [HL] After being saved an object is no longer 'modified' + } + + if ($this->collCcListenerCounts !== null) { + foreach ($this->collCcListenerCounts as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + + $this->alreadyInSave = false; + + } + return $affectedRows; + } // doSave() + + /** + * Array of ValidationFailed objects. + * @var array ValidationFailed[] + */ + protected $validationFailures = array(); + + /** + * Gets any ValidationFailed objects that resulted from last call to validate(). + * + * + * @return array ValidationFailed[] + * @see validate() + */ + public function getValidationFailures() + { + return $this->validationFailures; + } + + /** + * Validates the objects modified field values and all objects related to this table. + * + * If $columns is either a column name or an array of column names + * only those columns are validated. + * + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() + */ + public function validate($columns = null) + { + $res = $this->doValidate($columns); + if ($res === true) { + $this->validationFailures = array(); + return true; + } else { + $this->validationFailures = $res; + return false; + } + } + + /** + * This function performs the validation work for complex object models. + * + * In addition to checking the current object, all related objects will + * also be validated. If all pass then true is returned; otherwise + * an aggreagated array of ValidationFailed objects will be returned. + * + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. + */ + protected function doValidate($columns = null) + { + if (!$this->alreadyInValidation) { + $this->alreadyInValidation = true; + $retval = null; + + $failureMap = array(); + + + if (($retval = CcMountNamePeer::doValidate($this, $columns)) !== true) { + $failureMap = array_merge($failureMap, $retval); + } + + + if ($this->collCcListenerCounts !== null) { + foreach ($this->collCcListenerCounts as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + + + $this->alreadyInValidation = false; + } + + return (!empty($failureMap) ? $failureMap : true); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return mixed Value of field. + */ + public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcMountNamePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $field = $this->getByPosition($pos); + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch($pos) { + case 0: + return $this->getDbId(); + break; + case 1: + return $this->getDbMountName(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * Defaults to BasePeer::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true) + { + $keys = CcMountNamePeer::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getDbId(), + $keys[1] => $this->getDbMountName(), + ); + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return void + */ + public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcMountNamePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch($pos) { + case 0: + $this->setDbId($value); + break; + case 1: + $this->setDbMountName($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * The default key type is the column's phpname (e.g. 'AuthorId') + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + { + $keys = CcMountNamePeer::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setDbMountName($arr[$keys[1]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); + + if ($this->isColumnModified(CcMountNamePeer::ID)) $criteria->add(CcMountNamePeer::ID, $this->id); + if ($this->isColumnModified(CcMountNamePeer::MOUNT_NAME)) $criteria->add(CcMountNamePeer::MOUNT_NAME, $this->mount_name); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); + $criteria->add(CcMountNamePeer::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getDbId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setDbId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + return null === $this->getDbId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of CcMountName (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false) + { + $copyObj->setDbMountName($this->mount_name); + + if ($deepCopy) { + // important: temporarily setNew(false) because this affects the behavior of + // the getter/setter methods for fkey referrer objects. + $copyObj->setNew(false); + + foreach ($this->getCcListenerCounts() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcListenerCount($relObj->copy($deepCopy)); + } + } + + } // if ($deepCopy) + + + $copyObj->setNew(true); + $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return CcMountName Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + return $copyObj; + } + + /** + * Returns a peer instance associated with this om. + * + * Since Peer classes are not to have any instance attributes, this method returns the + * same instance for all member of this class. The method could therefore + * be static, but this would prevent one from overriding the behavior. + * + * @return CcMountNamePeer + */ + public function getPeer() + { + if (self::$peer === null) { + self::$peer = new CcMountNamePeer(); + } + return self::$peer; + } + + /** + * Clears out the collCcListenerCounts collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcListenerCounts() + */ + public function clearCcListenerCounts() + { + $this->collCcListenerCounts = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcListenerCounts collection. + * + * By default this just sets the collCcListenerCounts collection to an empty array (like clearcollCcListenerCounts()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcListenerCounts() + { + $this->collCcListenerCounts = new PropelObjectCollection(); + $this->collCcListenerCounts->setModel('CcListenerCount'); + } + + /** + * Gets an array of CcListenerCount objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcMountName is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcListenerCount[] List of CcListenerCount objects + * @throws PropelException + */ + public function getCcListenerCounts($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcListenerCounts || null !== $criteria) { + if ($this->isNew() && null === $this->collCcListenerCounts) { + // return empty collection + $this->initCcListenerCounts(); + } else { + $collCcListenerCounts = CcListenerCountQuery::create(null, $criteria) + ->filterByCcMountName($this) + ->find($con); + if (null !== $criteria) { + return $collCcListenerCounts; + } + $this->collCcListenerCounts = $collCcListenerCounts; + } + } + return $this->collCcListenerCounts; + } + + /** + * Returns the number of related CcListenerCount objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcListenerCount objects. + * @throws PropelException + */ + public function countCcListenerCounts(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcListenerCounts || null !== $criteria) { + if ($this->isNew() && null === $this->collCcListenerCounts) { + return 0; + } else { + $query = CcListenerCountQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcMountName($this) + ->count($con); + } + } else { + return count($this->collCcListenerCounts); + } + } + + /** + * Method called to associate a CcListenerCount object to this object + * through the CcListenerCount foreign key attribute. + * + * @param CcListenerCount $l CcListenerCount + * @return void + * @throws PropelException + */ + public function addCcListenerCount(CcListenerCount $l) + { + if ($this->collCcListenerCounts === null) { + $this->initCcListenerCounts(); + } + if (!$this->collCcListenerCounts->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcListenerCounts[]= $l; + $l->setCcMountName($this); + } + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcMountName is new, it will return + * an empty collection; or if this CcMountName has previously + * been saved, it will retrieve related CcListenerCounts from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcMountName. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcListenerCount[] List of CcListenerCount objects + */ + public function getCcListenerCountsJoinCcTimestamp($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcListenerCountQuery::create(null, $criteria); + $query->joinWith('CcTimestamp', $join_behavior); + + return $this->getCcListenerCounts($query, $con); + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->mount_name = null; + $this->alreadyInSave = false; + $this->alreadyInValidation = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all collections of referencing foreign keys. + * + * This method is a user-space workaround for PHP's inability to garbage collect objects + * with circular references. This is currently necessary when using Propel in certain + * daemon or large-volumne/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all associated objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + if ($this->collCcListenerCounts) { + foreach ((array) $this->collCcListenerCounts as $o) { + $o->clearAllReferences($deep); + } + } + } // if ($deep) + + $this->collCcListenerCounts = null; + } + + /** + * Catches calls to virtual methods + */ + public function __call($name, $params) + { + if (preg_match('/get(\w+)/', $name, $matches)) { + $virtualColumn = $matches[1]; + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + // no lcfirst in php<5.3... + $virtualColumn[0] = strtolower($virtualColumn[0]); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + throw new PropelException('Call to undefined method: ' . $name); + } + +} // BaseCcMountName diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php b/airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php new file mode 100644 index 000000000..af2e416b1 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php @@ -0,0 +1,742 @@ + array ('DbId', 'DbMountName', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbMountName', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::MOUNT_NAME, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'MOUNT_NAME', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'mount_name', ), + BasePeer::TYPE_NUM => array (0, 1, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + */ + private static $fieldKeys = array ( + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbMountName' => 1, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbMountName' => 1, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::MOUNT_NAME => 1, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'MOUNT_NAME' => 1, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'mount_name' => 1, ), + BasePeer::TYPE_NUM => array (0, 1, ) + ); + + /** + * Translates a fieldname to another type + * + * @param string $name field name + * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. + * @throws PropelException - if the specified name could not be found in the fieldname mappings. + */ + static public function translateFieldName($name, $fromType, $toType) + { + $toNames = self::getFieldNames($toType); + $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + if ($key === null) { + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + } + return $toNames[$key]; + } + + /** + * Returns an array of field names. + * + * @param string $type The type of fieldnames to return: + * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return array A list of field names + */ + + static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + { + if (!array_key_exists($type, self::$fieldNames)) { + throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); + } + return self::$fieldNames[$type]; + } + + /** + * Convenience method which changes table.column to alias.column. + * + * Using this method you can maintain SQL abstraction while using column aliases. + * + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. CcMountNamePeer::COLUMN_NAME). + * @return string + */ + public static function alias($alias, $column) + { + return str_replace(CcMountNamePeer::TABLE_NAME.'.', $alias.'.', $column); + } + + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CcMountNamePeer::ID); + $criteria->addSelectColumn(CcMountNamePeer::MOUNT_NAME); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.MOUNT_NAME'); + } + } + + /** + * Returns the number of rows matching criteria. + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @return int Number of matching rows. + */ + public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) + { + // we may modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcMountNamePeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcMountNamePeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + // BasePeer returns a PDOStatement + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + /** + * Method to select one object from the DB. + * + * @param Criteria $criteria object used to create the SELECT statement. + * @param PropelPDO $con + * @return CcMountName + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) + { + $critcopy = clone $criteria; + $critcopy->setLimit(1); + $objects = CcMountNamePeer::doSelect($critcopy, $con); + if ($objects) { + return $objects[0]; + } + return null; + } + /** + * Method to do selects. + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelect(Criteria $criteria, PropelPDO $con = null) + { + return CcMountNamePeer::populateObjects(CcMountNamePeer::doSelectStmt($criteria, $con)); + } + /** + * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. + * + * Use this method directly if you want to work with an executed statement durirectly (for example + * to perform your own object hydration). + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con The connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return PDOStatement The executed PDOStatement object. + * @see BasePeer::doSelect() + */ + public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + if (!$criteria->hasSelectClause()) { + $criteria = clone $criteria; + CcMountNamePeer::addSelectColumns($criteria); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + // BasePeer returns a PDOStatement + return BasePeer::doSelect($criteria, $con); + } + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doSelect*() + * methods in your stub classes -- you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by doSelect*() + * and retrieveByPK*() calls. + * + * @param CcMountName $value A CcMountName object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool(CcMountName $obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if ($key === null) { + $key = (string) $obj->getDbId(); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A CcMountName object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && $value !== null) { + if (is_object($value) && $value instanceof CcMountName) { + $key = (string) $value->getDbId(); + } elseif (is_scalar($value)) { + // assume we've been passed a primary key + $key = (string) $value; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcMountName object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } // removeInstanceFromPool() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param string $key The key (@see getPrimaryKeyHash()) for this instance. + * @return CcMountName Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @see getPrimaryKeyHash() + */ + public static function getInstanceFromPool($key) + { + if (Propel::isInstancePoolingEnabled()) { + if (isset(self::$instances[$key])) { + return self::$instances[$key]; + } + } + return null; // just to be explicit + } + + /** + * Clear the instance pool. + * + * @return void + */ + public static function clearInstancePool() + { + self::$instances = array(); + } + + /** + * Method to invalidate the instance pool of all tables related to cc_mount_name + * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in CcListenerCountPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcListenerCountPeer::clearInstancePool(); + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return string A string version of PK or NULL if the components of primary key in result array are all null. + */ + public static function getPrimaryKeyHashFromRow($row, $startcol = 0) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[$startcol] === null) { + return null; + } + return (string) $row[$startcol]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $startcol = 0) + { + return (int) $row[$startcol]; + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(PDOStatement $stmt) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = CcMountNamePeer::getOMClass(false); + // populate the object(s) + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key = CcMountNamePeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = CcMountNamePeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CcMountNamePeer::addInstanceToPool($obj, $key); + } // if key exists + } + $stmt->closeCursor(); + return $results; + } + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CcMountName object, last column rank) + */ + public static function populateObject($row, $startcol = 0) + { + $key = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = CcMountNamePeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $startcol, true); // rehydrate + $col = $startcol + CcMountNamePeer::NUM_COLUMNS; + } else { + $cls = CcMountNamePeer::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $startcol); + CcMountNamePeer::addInstanceToPool($obj, $key); + } + return array($obj, $col); + } + /** + * Returns the TableMap related to this peer. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this peer class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getDatabaseMap(BaseCcMountNamePeer::DATABASE_NAME); + if (!$dbMap->hasTable(BaseCcMountNamePeer::TABLE_NAME)) + { + $dbMap->addTableObject(new CcMountNameTableMap()); + } + } + + /** + * The class that the Peer will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is tranalted into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CcMountNamePeer::CLASS_DEFAULT : CcMountNamePeer::OM_CLASS; + } + + /** + * Method perform an INSERT on the database, given a CcMountName or Criteria object. + * + * @param mixed $values Criteria or CcMountName object containing data that is used to create the INSERT statement. + * @param PropelPDO $con the PropelPDO connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } else { + $criteria = $values->buildCriteria(); // build Criteria from CcMountName object + } + + if ($criteria->containsKey(CcMountNamePeer::ID) && $criteria->keyContainsValue(CcMountNamePeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcMountNamePeer::ID.')'); + } + + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = BasePeer::doInsert($criteria, $con); + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + + /** + * Method perform an UPDATE on the database, given a CcMountName or Criteria object. + * + * @param mixed $values Criteria or CcMountName object containing data that is used to create the UPDATE statement. + * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). + * @return int The number of affected rows (if supported by underlying database driver). + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doUpdate($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $selectCriteria = new Criteria(self::DATABASE_NAME); + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + + $comparison = $criteria->getComparison(CcMountNamePeer::ID); + $value = $criteria->remove(CcMountNamePeer::ID); + if ($value) { + $selectCriteria->add(CcMountNamePeer::ID, $value, $comparison); + } else { + $selectCriteria->setPrimaryTableName(CcMountNamePeer::TABLE_NAME); + } + + } else { // $values is CcMountName object + $criteria = $values->buildCriteria(); // gets full criteria + $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) + } + + // set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + return BasePeer::doUpdate($selectCriteria, $criteria, $con); + } + + /** + * Method to DELETE all rows from the cc_mount_name table. + * + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll($con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += BasePeer::doDeleteAll(CcMountNamePeer::TABLE_NAME, $con, CcMountNamePeer::DATABASE_NAME); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CcMountNamePeer::clearInstancePool(); + CcMountNamePeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Method perform a DELETE on the database, given a CcMountName or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CcMountName object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param PropelPDO $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + // invalidate the cache for all objects of this type, since we have no + // way of knowing (without running a query) what objects should be invalidated + // from the cache based on this Criteria. + CcMountNamePeer::clearInstancePool(); + // rename for clarity + $criteria = clone $values; + } elseif ($values instanceof CcMountName) { // it's a model object + // invalidate the cache for this single object + CcMountNamePeer::removeInstanceFromPool($values); + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(self::DATABASE_NAME); + $criteria->add(CcMountNamePeer::ID, (array) $values, Criteria::IN); + // invalidate the cache for this object(s) + foreach ((array) $values as $singleval) { + CcMountNamePeer::removeInstanceFromPool($singleval); + } + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + $affectedRows += BasePeer::doDelete($criteria, $con); + CcMountNamePeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Validates all modified columns of given CcMountName object. + * If parameter $columns is either a single column name or an array of column names + * than only those columns are validated. + * + * NOTICE: This does not apply to primary or foreign keys for now. + * + * @param CcMountName $obj The object to validate. + * @param mixed $cols Column name or array of column names. + * + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. + */ + public static function doValidate(CcMountName $obj, $cols = null) + { + $columns = array(); + + if ($cols) { + $dbMap = Propel::getDatabaseMap(CcMountNamePeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(CcMountNamePeer::TABLE_NAME); + + if (! is_array($cols)) { + $cols = array($cols); + } + + foreach ($cols as $colName) { + if ($tableMap->containsColumn($colName)) { + $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + $columns[$colName] = $obj->$get(); + } + } + } else { + + } + + return BasePeer::doValidate(CcMountNamePeer::DATABASE_NAME, CcMountNamePeer::TABLE_NAME, $columns); + } + + /** + * Retrieve a single object by pkey. + * + * @param int $pk the primary key. + * @param PropelPDO $con the connection to use + * @return CcMountName + */ + public static function retrieveByPK($pk, PropelPDO $con = null) + { + + if (null !== ($obj = CcMountNamePeer::getInstanceFromPool((string) $pk))) { + return $obj; + } + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); + $criteria->add(CcMountNamePeer::ID, $pk); + + $v = CcMountNamePeer::doSelect($criteria, $con); + + return !empty($v) > 0 ? $v[0] : null; + } + + /** + * Retrieve multiple objects by pkey. + * + * @param array $pks List of primary keys + * @param PropelPDO $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function retrieveByPKs($pks, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $objs = null; + if (empty($pks)) { + $objs = array(); + } else { + $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); + $criteria->add(CcMountNamePeer::ID, $pks, Criteria::IN); + $objs = CcMountNamePeer::doSelect($criteria, $con); + } + return $objs; + } + +} // BaseCcMountNamePeer + +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +BaseCcMountNamePeer::buildTableMap(); + diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php new file mode 100644 index 000000000..52af75f38 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php @@ -0,0 +1,259 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + return $query; + } + + /** + * Find object by primary key + * Use instance pooling to avoid a database query if the object exists + * + * $obj = $c->findPk(12, $con); + * + * @param mixed $key Primary key to use for the query + * @param PropelPDO $con an optional connection object + * + * @return CcMountName|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ((null !== ($obj = CcMountNamePeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { + // the object is alredy in the instance pool + return $obj; + } else { + // the object has not been requested yet, or the formatter is not an object formatter + $criteria = $this->isKeepQuery() ? clone $this : $this; + $stmt = $criteria + ->filterByPrimaryKey($key) + ->getSelectStatement($con); + return $criteria->getFormatter()->init($criteria)->formatOne($stmt); + } + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param PropelPDO $con an optional connection object + * + * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + $criteria = $this->isKeepQuery() ? clone $this : $this; + return $this + ->filterByPrimaryKeys($keys) + ->find($con); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + return $this->addUsingAlias(CcMountNamePeer::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + return $this->addUsingAlias(CcMountNamePeer::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * @param int|array $dbId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByDbId($dbId = null, $comparison = null) + { + if (is_array($dbId) && null === $comparison) { + $comparison = Criteria::IN; + } + return $this->addUsingAlias(CcMountNamePeer::ID, $dbId, $comparison); + } + + /** + * Filter the query on the mount_name column + * + * @param string $dbMountName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByDbMountName($dbMountName = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbMountName)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbMountName)) { + $dbMountName = str_replace('*', '%', $dbMountName); + $comparison = Criteria::LIKE; + } + } + return $this->addUsingAlias(CcMountNamePeer::MOUNT_NAME, $dbMountName, $comparison); + } + + /** + * Filter the query by a related CcListenerCount object + * + * @param CcListenerCount $ccListenerCount the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByCcListenerCount($ccListenerCount, $comparison = null) + { + return $this + ->addUsingAlias(CcMountNamePeer::ID, $ccListenerCount->getDbMountNameId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcListenerCount relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function joinCcListenerCount($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcListenerCount'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcListenerCount'); + } + + return $this; + } + + /** + * Use the CcListenerCount relation CcListenerCount object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcListenerCountQuery A secondary query class using the current class as primary query + */ + public function useCcListenerCountQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcListenerCount($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcListenerCount', 'CcListenerCountQuery'); + } + + /** + * Exclude object from result + * + * @param CcMountName $ccMountName Object to remove from the list of results + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function prune($ccMountName = null) + { + if ($ccMountName) { + $this->addUsingAlias(CcMountNamePeer::ID, $ccMountName->getDbId(), Criteria::NOT_EQUAL); + } + + return $this; + } + +} // BaseCcMountNameQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php b/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php index 5ede5b73c..d61b8e513 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php @@ -861,6 +861,31 @@ abstract class BaseCcTimestamp extends BaseObject implements Persistent } } + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcTimestamp is new, it will return + * an empty collection; or if this CcTimestamp has previously + * been saved, it will retrieve related CcListenerCounts from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcTimestamp. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcListenerCount[] List of CcListenerCount objects + */ + public function getCcListenerCountsJoinCcMountName($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcListenerCountQuery::create(null, $criteria); + $query->joinWith('CcMountName', $join_behavior); + + return $this->getCcListenerCounts($query, $con); + } + /** * Clears the current object and sets all attributes to their default values */ diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 2c24d3c71..e22662836 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -454,7 +454,7 @@ - +
    From f08a732c11b5dd5a9230276d74b75b30cd3af5ae Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 13:42:33 -0400 Subject: [PATCH 092/181] reinitialize form after error check. --- .../js/airtime/playouthistory/historytable.js | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 1d2ed7384..8a25cc7a3 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -73,8 +73,7 @@ var AIRTIME = (function(AIRTIME) { } function emptySelectedLogItems() { - var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), - id, $tr, $input; + var $inputs = $historyContentDiv.find(".his_checkbox").find("input"); $inputs.prop('checked', false); $inputs.parents("tr").removeClass("his-selected"); @@ -84,7 +83,8 @@ var AIRTIME = (function(AIRTIME) { function selectCurrentPage() { var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), - id, $tr, $input; + $tr, + $input; $.each($inputs, function(index, input) { $input = $(input); @@ -96,7 +96,8 @@ var AIRTIME = (function(AIRTIME) { function deselectCurrentPage() { var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), - id, $tr, $input; + $tr, + $input; $.each($inputs, function(index, input) { $input = $(input); @@ -342,6 +343,21 @@ var AIRTIME = (function(AIRTIME) { $hisDialogEl.remove(); } + function initializeDialog() { + var $startPicker = $hisDialogEl.find('#his_item_starts_datetimepicker'), + $endPicker = $hisDialogEl.find('#his_item_ends_datetimepicker'); + + $startPicker.datetimepicker(); + + $endPicker.datetimepicker({ + showTimeFirst: true + }); + + $startPicker.on('changeDate', function(e) { + $endPicker.data('datetimepicker').setLocalDate(e.localDate); + }); + } + function makeHistoryDialog(html) { $hisDialogEl = $(html); @@ -349,19 +365,7 @@ var AIRTIME = (function(AIRTIME) { title: $.i18n._("Edit History Record"), modal: false, open: function( event, ui ) { - - var $startPicker = $hisDialogEl.find('#his_item_starts_datetimepicker'); - $startPicker.datetimepicker(); - - var $endPicker = $hisDialogEl.find('#his_item_ends_datetimepicker'); - $endPicker.datetimepicker({ - showTimeFirst: true - }); - - $startPicker.on('changeDate', function(e) { - - $endPicker.data('datetimepicker').setLocalDate(e.localDate); - }); + initializeDialog(); }, close: function() { removeHistoryDialog(); @@ -459,10 +463,10 @@ var AIRTIME = (function(AIRTIME) { $.post(url, data, function(json) { - //TODO put errors on form. if (json.form !== undefined) { var $newForm = $(json.form); $hisDialogEl.html($newForm.html()); + initializeDialog(); } else { removeHistoryDialog(); From 05054fa823bb3ccf2448be702f99fd09b4d3813c Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 14:48:35 -0400 Subject: [PATCH 093/181] IM-931 : Icon Overlap --- airtime_mvc/public/css/history_styles.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index 16ab35049..73716addb 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -42,9 +42,8 @@ } #history_template .icon-ok { - right: 10px; + float: right; margin-left: 10px; - position: absolute; } #configure_item_template li span { From 3769f5e5db63a7b9cd8f6e8a76e30f7844a779a8 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 14:54:44 -0400 Subject: [PATCH 094/181] IM-933 : datepicker switch/design --- airtime_mvc/public/css/history_styles.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index 73716addb..e9c43ca18 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -113,3 +113,25 @@ -moz-border-radius: 2px !important; border-radius: 2px !important; } + +.ui-dialog .ui-dialog-content .well .date .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 3px 3px 0px 6px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; + float: left; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.bootstrap-datetimepicker-widget thead tr:first-child th:hover { + background: #5C5C5C !important; +} From e6b09308a525f3bb23860ec9dd048bd73aae183a Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 15:40:10 -0400 Subject: [PATCH 095/181] IM-932 : File Metadata Distinction/Template Design --- .../playouthistory/template-contents.phtml | 123 +++++++++--------- airtime_mvc/public/css/history_styles.css | 46 +++++++ .../playouthistory/configuretemplate.js | 2 + 3 files changed, 111 insertions(+), 60 deletions(-) diff --git a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml index 3beb495dd..0209e5e06 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml @@ -9,68 +9,71 @@ Name + + + +
      + template_fields as $field): ?> + + + +
    • " + data-id="" + data-name="" + data-label="" + data-type="" + data-filemd="" + class=""> + + + required_fields)): ?> + + + + +
    • + + + +
    +
    - - -
      - template_fields as $field): ?> - - - -
    • " - data-id="" - data-name="" - data-label="" - data-type="" - data-filemd=""> - - - required_fields)): ?> - - - - -
    • - - - -
    - -

    Add more elements:

    - -
      - fileMD as $md): ?> - - - -
    • " - data-name="" - data-type="" - data-label=""> - - -
    • - -
    - - template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?> -
    - - - -
    - +

    Add more elements:

    + +
      + fileMD as $md): ?> + + + +
    • " + data-name="" + data-type="" + data-label=""> + + +
    • + +
    + + template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?> +
    + + + +
    + +
    template_id, $this->configured)): ?> diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index e9c43ca18..01b4293f6 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -135,3 +135,49 @@ .bootstrap-datetimepicker-widget thead tr:first-child th:hover { background: #5C5C5C !important; } + +#configure_item_template { + width: 100%; + max-width: 620px; +} + +.add_more { + float: right; +} + +#configure_item_template #template_name { + margin-bottom: 14px; +} + +#configure_item_template .template_item_list li { + width: 270px; +} + +#configure_item_template li { + width: 270px; +} + +#configure_item_template .template_item_list li.field_other { + background-color: #CACACA; +} + +.ui-widget-content { + background: #C0C0C0 !important; +} + +#history_content .btn-toolbar { + margin: 10px; +} + +#history_content div.DTTT_container { + margin-top: 8px; +} + +#history_content .dataTables_length { + margin-top: 9px; + margin-right: 10px; +} + +.btn [class^="icon-"] { + margin-top: 0; +} diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index e54b7aee7..0d1c631ff 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -18,6 +18,7 @@ var AIRTIME = (function(AIRTIME) { "data-type='<%= type %>' " + "data-filemd='<%= filemd %>'" + "data-label='<%= label %>'" + + "class='<%= (filemd) ? 'field_filemd' : 'field_other' %>'" + ">" + "<%= label %>" + "<%= type %>" + @@ -29,6 +30,7 @@ var AIRTIME = (function(AIRTIME) { "data-type='<%= type %>' " + "data-filemd='<%= filemd %>'" + "data-label='<%= label %>'" + + "class='<%= (filemd) ? 'field_filemd' : 'field_other' %>'" + ">" + "<%= label %>" + "<%= type %>" + From 5fbc3867f86f59c007da55a423ce3607ae917b8e Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 15:57:29 -0400 Subject: [PATCH 096/181] removing default button after pressing. --- .../js/airtime/playouthistory/configuretemplate.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 0d1c631ff..5087805c6 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -149,13 +149,13 @@ var AIRTIME = (function(AIRTIME) { updateTemplate(template_id, false); }); - $templateDiv.on("click", "#template_set_default", function(){ - var template_id = $(this).data("template"); - var url = baseUrl+"Playouthistory/set-template-default/format/json"; + $templateDiv.on("click", "#template_set_default", function() { + var $btn = $(this), + template_id = $btn.data("template"), + url = baseUrl+"Playouthistory/set-template-default/format/json"; - $.post(url, {id: template_id}, function(json) { - var x; - }); + $btn.remove(); + $.post(url, {id: template_id}); }); }; From 5aa983be36a71128c50629bdb8c3fc2966fce688 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 17:15:36 -0400 Subject: [PATCH 097/181] adding an instance id to the playout history table. --- .../airtime/map/CcPlayoutHistoryTableMap.php | 2 + .../airtime/map/CcShowInstancesTableMap.php | 1 + .../models/airtime/om/BaseCcFiles.php | 25 ++ .../airtime/om/BaseCcPlayoutHistory.php | 129 +++++- .../airtime/om/BaseCcPlayoutHistoryPeer.php | 418 +++++++++++++++++- .../airtime/om/BaseCcPlayoutHistoryQuery.php | 103 +++++ .../models/airtime/om/BaseCcShowInstances.php | 169 +++++++ .../airtime/om/BaseCcShowInstancesPeer.php | 3 + .../airtime/om/BaseCcShowInstancesQuery.php | 68 +++ .../application/services/HistoryService.php | 6 + airtime_mvc/build/schema.xml | 4 + airtime_mvc/build/sql/schema.sql | 3 + 12 files changed, 917 insertions(+), 14 deletions(-) diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php index 87a005168..00e9099a8 100644 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php @@ -42,6 +42,7 @@ class CcPlayoutHistoryTableMap extends TableMap { $this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null); $this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null); $this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null); + $this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', false, null, null); // validators } // initialize() @@ -51,6 +52,7 @@ class CcPlayoutHistoryTableMap extends TableMap { public function buildRelations() { $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null); $this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', null); } // buildRelations() diff --git a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php index e6a7b87a0..894592f79 100644 --- a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php @@ -63,6 +63,7 @@ class CcShowInstancesTableMap extends TableMap { $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); $this->addRelation('CcShowInstancesRelatedByDbId', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); + $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); } // buildRelations() } // CcShowInstancesTableMap diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php index d3fecbc5f..38d147c07 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php @@ -5292,6 +5292,31 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcFiles is new, it will return + * an empty collection; or if this CcFiles has previously + * been saved, it will retrieve related CcPlayoutHistorys from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcFiles. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects + */ + public function getCcPlayoutHistorysJoinCcShowInstances($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcPlayoutHistoryQuery::create(null, $criteria); + $query->joinWith('CcShowInstances', $join_behavior); + + return $this->getCcPlayoutHistorys($query, $con); + } + /** * Clears the current object and sets all attributes to their default values */ diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php index bdae214d1..2e55a484f 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php @@ -48,11 +48,22 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent */ protected $ends; + /** + * The value for the instance_id field. + * @var int + */ + protected $instance_id; + /** * @var CcFiles */ protected $aCcFiles; + /** + * @var CcShowInstances + */ + protected $aCcShowInstances; + /** * @var array CcPlayoutHistoryMetaData[] Collection to store aggregation of CcPlayoutHistoryMetaData objects. */ @@ -158,6 +169,16 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent } } + /** + * Get the [instance_id] column value. + * + * @return int + */ + public function getDbInstanceId() + { + return $this->instance_id; + } + /** * Set the value of [id] column. * @@ -300,6 +321,30 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent return $this; } // setDbEnds() + /** + * Set the value of [instance_id] column. + * + * @param int $v new value + * @return CcPlayoutHistory The current object (for fluent API support) + */ + public function setDbInstanceId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->instance_id !== $v) { + $this->instance_id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryPeer::INSTANCE_ID; + } + + if ($this->aCcShowInstances !== null && $this->aCcShowInstances->getDbId() !== $v) { + $this->aCcShowInstances = null; + } + + return $this; + } // setDbInstanceId() + /** * Indicates whether the columns in this object are only set to default values. * @@ -336,6 +381,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->file_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; $this->starts = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; $this->ends = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; + $this->instance_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null; $this->resetModified(); $this->setNew(false); @@ -344,7 +390,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->ensureConsistency(); } - return $startcol + 4; // 4 = CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 5; // 5 = CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating CcPlayoutHistory object", $e); @@ -370,6 +416,9 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) { $this->aCcFiles = null; } + if ($this->aCcShowInstances !== null && $this->instance_id !== $this->aCcShowInstances->getDbId()) { + $this->aCcShowInstances = null; + } } // ensureConsistency /** @@ -410,6 +459,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent if ($deep) { // also de-associate any related objects? $this->aCcFiles = null; + $this->aCcShowInstances = null; $this->collCcPlayoutHistoryMetaDatas = null; } // if (deep) @@ -534,6 +584,13 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->setCcFiles($this->aCcFiles); } + if ($this->aCcShowInstances !== null) { + if ($this->aCcShowInstances->isModified() || $this->aCcShowInstances->isNew()) { + $affectedRows += $this->aCcShowInstances->save($con); + } + $this->setCcShowInstances($this->aCcShowInstances); + } + if ($this->isNew() ) { $this->modifiedColumns[] = CcPlayoutHistoryPeer::ID; } @@ -642,6 +699,12 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent } } + if ($this->aCcShowInstances !== null) { + if (!$this->aCcShowInstances->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcShowInstances->getValidationFailures()); + } + } + if (($retval = CcPlayoutHistoryPeer::doValidate($this, $columns)) !== true) { $failureMap = array_merge($failureMap, $retval); @@ -701,6 +764,9 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent case 3: return $this->getDbEnds(); break; + case 4: + return $this->getDbInstanceId(); + break; default: return null; break; @@ -729,11 +795,15 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $keys[1] => $this->getDbFileId(), $keys[2] => $this->getDbStarts(), $keys[3] => $this->getDbEnds(), + $keys[4] => $this->getDbInstanceId(), ); if ($includeForeignObjects) { if (null !== $this->aCcFiles) { $result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true); } + if (null !== $this->aCcShowInstances) { + $result['CcShowInstances'] = $this->aCcShowInstances->toArray($keyType, $includeLazyLoadColumns, true); + } } return $result; } @@ -777,6 +847,9 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent case 3: $this->setDbEnds($value); break; + case 4: + $this->setDbInstanceId($value); + break; } // switch() } @@ -805,6 +878,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent if (array_key_exists($keys[1], $arr)) $this->setDbFileId($arr[$keys[1]]); if (array_key_exists($keys[2], $arr)) $this->setDbStarts($arr[$keys[2]]); if (array_key_exists($keys[3], $arr)) $this->setDbEnds($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setDbInstanceId($arr[$keys[4]]); } /** @@ -820,6 +894,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent if ($this->isColumnModified(CcPlayoutHistoryPeer::FILE_ID)) $criteria->add(CcPlayoutHistoryPeer::FILE_ID, $this->file_id); if ($this->isColumnModified(CcPlayoutHistoryPeer::STARTS)) $criteria->add(CcPlayoutHistoryPeer::STARTS, $this->starts); if ($this->isColumnModified(CcPlayoutHistoryPeer::ENDS)) $criteria->add(CcPlayoutHistoryPeer::ENDS, $this->ends); + if ($this->isColumnModified(CcPlayoutHistoryPeer::INSTANCE_ID)) $criteria->add(CcPlayoutHistoryPeer::INSTANCE_ID, $this->instance_id); return $criteria; } @@ -884,6 +959,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $copyObj->setDbFileId($this->file_id); $copyObj->setDbStarts($this->starts); $copyObj->setDbEnds($this->ends); + $copyObj->setDbInstanceId($this->instance_id); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of @@ -990,6 +1066,55 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent return $this->aCcFiles; } + /** + * Declares an association between this object and a CcShowInstances object. + * + * @param CcShowInstances $v + * @return CcPlayoutHistory The current object (for fluent API support) + * @throws PropelException + */ + public function setCcShowInstances(CcShowInstances $v = null) + { + if ($v === null) { + $this->setDbInstanceId(NULL); + } else { + $this->setDbInstanceId($v->getDbId()); + } + + $this->aCcShowInstances = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the CcShowInstances object, it will not be re-added. + if ($v !== null) { + $v->addCcPlayoutHistory($this); + } + + return $this; + } + + + /** + * Get the associated CcShowInstances object + * + * @param PropelPDO Optional Connection object. + * @return CcShowInstances The associated CcShowInstances object. + * @throws PropelException + */ + public function getCcShowInstances(PropelPDO $con = null) + { + if ($this->aCcShowInstances === null && ($this->instance_id !== null)) { + $this->aCcShowInstances = CcShowInstancesQuery::create()->findPk($this->instance_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCcShowInstances->addCcPlayoutHistorys($this); + */ + } + return $this->aCcShowInstances; + } + /** * Clears out the collCcPlayoutHistoryMetaDatas collection * @@ -1108,6 +1233,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->file_id = null; $this->starts = null; $this->ends = null; + $this->instance_id = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->clearAllReferences(); @@ -1137,6 +1263,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->collCcPlayoutHistoryMetaDatas = null; $this->aCcFiles = null; + $this->aCcShowInstances = null; } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php index 91fda6a6b..01b944a65 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php @@ -26,7 +26,7 @@ abstract class BaseCcPlayoutHistoryPeer { const TM_CLASS = 'CcPlayoutHistoryTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 4; + const NUM_COLUMNS = 5; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -43,6 +43,9 @@ abstract class BaseCcPlayoutHistoryPeer { /** the column name for the ENDS field */ const ENDS = 'cc_playout_history.ENDS'; + /** the column name for the INSTANCE_ID field */ + const INSTANCE_ID = 'cc_playout_history.INSTANCE_ID'; + /** * An identiy map to hold any loaded instances of CcPlayoutHistory objects. * This must be public so that other peer classes can access this when hydrating from JOIN @@ -59,12 +62,12 @@ abstract class BaseCcPlayoutHistoryPeer { * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFileId', 'DbStarts', 'DbEnds', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbStarts', 'dbEnds', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::FILE_ID, self::STARTS, self::ENDS, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'STARTS', 'ENDS', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'starts', 'ends', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFileId', 'DbStarts', 'DbEnds', 'DbInstanceId', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbStarts', 'dbEnds', 'dbInstanceId', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::FILE_ID, self::STARTS, self::ENDS, self::INSTANCE_ID, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'STARTS', 'ENDS', 'INSTANCE_ID', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'starts', 'ends', 'instance_id', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) ); /** @@ -74,12 +77,12 @@ abstract class BaseCcPlayoutHistoryPeer { * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbStarts' => 2, 'DbEnds' => 3, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbStarts' => 2, 'dbEnds' => 3, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FILE_ID => 1, self::STARTS => 2, self::ENDS => 3, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'STARTS' => 2, 'ENDS' => 3, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'starts' => 2, 'ends' => 3, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbStarts' => 2, 'DbEnds' => 3, 'DbInstanceId' => 4, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbStarts' => 2, 'dbEnds' => 3, 'dbInstanceId' => 4, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FILE_ID => 1, self::STARTS => 2, self::ENDS => 3, self::INSTANCE_ID => 4, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'STARTS' => 2, 'ENDS' => 3, 'INSTANCE_ID' => 4, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'starts' => 2, 'ends' => 3, 'instance_id' => 4, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) ); /** @@ -155,11 +158,13 @@ abstract class BaseCcPlayoutHistoryPeer { $criteria->addSelectColumn(CcPlayoutHistoryPeer::FILE_ID); $criteria->addSelectColumn(CcPlayoutHistoryPeer::STARTS); $criteria->addSelectColumn(CcPlayoutHistoryPeer::ENDS); + $criteria->addSelectColumn(CcPlayoutHistoryPeer::INSTANCE_ID); } else { $criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.FILE_ID'); $criteria->addSelectColumn($alias . '.STARTS'); $criteria->addSelectColumn($alias . '.ENDS'); + $criteria->addSelectColumn($alias . '.INSTANCE_ID'); } } @@ -498,6 +503,56 @@ abstract class BaseCcPlayoutHistoryPeer { } + /** + * Returns the number of rows matching criteria, joining the related CcShowInstances table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinCcShowInstances(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + /** * Selects a collection of CcPlayoutHistory objects pre-filled with their CcFiles objects. * @param Criteria $criteria @@ -564,6 +619,72 @@ abstract class BaseCcPlayoutHistoryPeer { } + /** + * Selects a collection of CcPlayoutHistory objects pre-filled with their CcShowInstances objects. + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistory objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinCcShowInstances(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + CcShowInstancesPeer::addSelectColumns($criteria); + + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); + } // if $obj1 already loaded + + $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol); + if ($key2 !== null) { + $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcShowInstancesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol); + CcShowInstancesPeer::addInstanceToPool($obj2, $key2); + } // if obj2 already loaded + + // Add the $obj1 (CcPlayoutHistory) to $obj2 (CcShowInstances) + $obj2->addCcPlayoutHistory($obj1); + + } // if joined row was not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + /** * Returns the number of rows matching criteria, joining all related tables * @@ -602,6 +723,8 @@ abstract class BaseCcPlayoutHistoryPeer { $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { @@ -638,8 +761,13 @@ abstract class BaseCcPlayoutHistoryPeer { CcFilesPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); + CcShowInstancesPeer::addSelectColumns($criteria); + $startcol4 = $startcol3 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS); + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -675,6 +803,270 @@ abstract class BaseCcPlayoutHistoryPeer { $obj2->addCcPlayoutHistory($obj1); } // if joined row not null + // Add objects for joined CcShowInstances rows + + $key3 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol3); + if ($key3 !== null) { + $obj3 = CcShowInstancesPeer::getInstanceFromPool($key3); + if (!$obj3) { + + $cls = CcShowInstancesPeer::getOMClass(false); + + $obj3 = new $cls(); + $obj3->hydrate($row, $startcol3); + CcShowInstancesPeer::addInstanceToPool($obj3, $key3); + } // if obj3 loaded + + // Add the $obj1 (CcPlayoutHistory) to the collection in $obj3 (CcShowInstances) + $obj3->addCcPlayoutHistory($obj1); + } // if joined row not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcFiles table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcShowInstances table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcShowInstances(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Selects a collection of CcPlayoutHistory objects pre-filled with all related objects except CcFiles. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistory objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + + CcShowInstancesPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcShowInstances rows + + $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcShowInstancesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcShowInstancesPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcPlayoutHistory) to the collection in $obj2 (CcShowInstances) + $obj2->addCcPlayoutHistory($obj1); + + } // if joined row is not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Selects a collection of CcPlayoutHistory objects pre-filled with all related objects except CcShowInstances. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistory objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcShowInstances(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + + CcFilesPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcFiles rows + + $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcFilesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcFilesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcFilesPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcPlayoutHistory) to the collection in $obj2 (CcFiles) + $obj2->addCcPlayoutHistory($obj1); + + } // if joined row is not null + $results[] = $obj1; } $stmt->closeCursor(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php index 370238102..b772a0d7a 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php @@ -10,11 +10,13 @@ * @method CcPlayoutHistoryQuery orderByDbFileId($order = Criteria::ASC) Order by the file_id column * @method CcPlayoutHistoryQuery orderByDbStarts($order = Criteria::ASC) Order by the starts column * @method CcPlayoutHistoryQuery orderByDbEnds($order = Criteria::ASC) Order by the ends column + * @method CcPlayoutHistoryQuery orderByDbInstanceId($order = Criteria::ASC) Order by the instance_id column * * @method CcPlayoutHistoryQuery groupByDbId() Group by the id column * @method CcPlayoutHistoryQuery groupByDbFileId() Group by the file_id column * @method CcPlayoutHistoryQuery groupByDbStarts() Group by the starts column * @method CcPlayoutHistoryQuery groupByDbEnds() Group by the ends column + * @method CcPlayoutHistoryQuery groupByDbInstanceId() Group by the instance_id column * * @method CcPlayoutHistoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method CcPlayoutHistoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query @@ -24,6 +26,10 @@ * @method CcPlayoutHistoryQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation * @method CcPlayoutHistoryQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation * + * @method CcPlayoutHistoryQuery leftJoinCcShowInstances($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShowInstances relation + * @method CcPlayoutHistoryQuery rightJoinCcShowInstances($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShowInstances relation + * @method CcPlayoutHistoryQuery innerJoinCcShowInstances($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShowInstances relation + * * @method CcPlayoutHistoryQuery leftJoinCcPlayoutHistoryMetaData($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistoryMetaData relation * @method CcPlayoutHistoryQuery rightJoinCcPlayoutHistoryMetaData($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryMetaData relation * @method CcPlayoutHistoryQuery innerJoinCcPlayoutHistoryMetaData($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistoryMetaData relation @@ -35,11 +41,13 @@ * @method CcPlayoutHistory findOneByDbFileId(int $file_id) Return the first CcPlayoutHistory filtered by the file_id column * @method CcPlayoutHistory findOneByDbStarts(string $starts) Return the first CcPlayoutHistory filtered by the starts column * @method CcPlayoutHistory findOneByDbEnds(string $ends) Return the first CcPlayoutHistory filtered by the ends column + * @method CcPlayoutHistory findOneByDbInstanceId(int $instance_id) Return the first CcPlayoutHistory filtered by the instance_id column * * @method array findByDbId(int $id) Return CcPlayoutHistory objects filtered by the id column * @method array findByDbFileId(int $file_id) Return CcPlayoutHistory objects filtered by the file_id column * @method array findByDbStarts(string $starts) Return CcPlayoutHistory objects filtered by the starts column * @method array findByDbEnds(string $ends) Return CcPlayoutHistory objects filtered by the ends column + * @method array findByDbInstanceId(int $instance_id) Return CcPlayoutHistory objects filtered by the instance_id column * * @package propel.generator.airtime.om */ @@ -259,6 +267,37 @@ abstract class BaseCcPlayoutHistoryQuery extends ModelCriteria return $this->addUsingAlias(CcPlayoutHistoryPeer::ENDS, $dbEnds, $comparison); } + /** + * Filter the query on the instance_id column + * + * @param int|array $dbInstanceId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByDbInstanceId($dbInstanceId = null, $comparison = null) + { + if (is_array($dbInstanceId)) { + $useMinMax = false; + if (isset($dbInstanceId['min'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $dbInstanceId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbInstanceId['max'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $dbInstanceId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $dbInstanceId, $comparison); + } + /** * Filter the query by a related CcFiles object * @@ -323,6 +362,70 @@ abstract class BaseCcPlayoutHistoryQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery'); } + /** + * Filter the query by a related CcShowInstances object + * + * @param CcShowInstances $ccShowInstances the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByCcShowInstances($ccShowInstances, $comparison = null) + { + return $this + ->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $ccShowInstances->getDbId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcShowInstances relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function joinCcShowInstances($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcShowInstances'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcShowInstances'); + } + + return $this; + } + + /** + * Use the CcShowInstances relation CcShowInstances object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcShowInstancesQuery A secondary query class using the current class as primary query + */ + public function useCcShowInstancesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinCcShowInstances($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcShowInstances', 'CcShowInstancesQuery'); + } + /** * Filter the query by a related CcPlayoutHistoryMetaData object * diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php index 1caf7df62..a783a8e20 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php @@ -125,6 +125,11 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent */ protected $collCcSchedules; + /** + * @var array CcPlayoutHistory[] Collection to store aggregation of CcPlayoutHistory objects. + */ + protected $collCcPlayoutHistorys; + /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. @@ -889,6 +894,8 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent $this->collCcSchedules = null; + $this->collCcPlayoutHistorys = null; + } // if (deep) } @@ -1064,6 +1071,14 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent } } + if ($this->collCcPlayoutHistorys !== null) { + foreach ($this->collCcPlayoutHistorys as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + $this->alreadyInSave = false; } @@ -1175,6 +1190,14 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent } } + if ($this->collCcPlayoutHistorys !== null) { + foreach ($this->collCcPlayoutHistorys as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + $this->alreadyInValidation = false; } @@ -1507,6 +1530,12 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent } } + foreach ($this->getCcPlayoutHistorys() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcPlayoutHistory($relObj->copy($deepCopy)); + } + } + } // if ($deepCopy) @@ -2017,6 +2046,140 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent return $this->getCcSchedules($query, $con); } + /** + * Clears out the collCcPlayoutHistorys collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcPlayoutHistorys() + */ + public function clearCcPlayoutHistorys() + { + $this->collCcPlayoutHistorys = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcPlayoutHistorys collection. + * + * By default this just sets the collCcPlayoutHistorys collection to an empty array (like clearcollCcPlayoutHistorys()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcPlayoutHistorys() + { + $this->collCcPlayoutHistorys = new PropelObjectCollection(); + $this->collCcPlayoutHistorys->setModel('CcPlayoutHistory'); + } + + /** + * Gets an array of CcPlayoutHistory objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcShowInstances is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects + * @throws PropelException + */ + public function getCcPlayoutHistorys($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistorys || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistorys) { + // return empty collection + $this->initCcPlayoutHistorys(); + } else { + $collCcPlayoutHistorys = CcPlayoutHistoryQuery::create(null, $criteria) + ->filterByCcShowInstances($this) + ->find($con); + if (null !== $criteria) { + return $collCcPlayoutHistorys; + } + $this->collCcPlayoutHistorys = $collCcPlayoutHistorys; + } + } + return $this->collCcPlayoutHistorys; + } + + /** + * Returns the number of related CcPlayoutHistory objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcPlayoutHistory objects. + * @throws PropelException + */ + public function countCcPlayoutHistorys(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistorys || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistorys) { + return 0; + } else { + $query = CcPlayoutHistoryQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcShowInstances($this) + ->count($con); + } + } else { + return count($this->collCcPlayoutHistorys); + } + } + + /** + * Method called to associate a CcPlayoutHistory object to this object + * through the CcPlayoutHistory foreign key attribute. + * + * @param CcPlayoutHistory $l CcPlayoutHistory + * @return void + * @throws PropelException + */ + public function addCcPlayoutHistory(CcPlayoutHistory $l) + { + if ($this->collCcPlayoutHistorys === null) { + $this->initCcPlayoutHistorys(); + } + if (!$this->collCcPlayoutHistorys->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcPlayoutHistorys[]= $l; + $l->setCcShowInstances($this); + } + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcShowInstances is new, it will return + * an empty collection; or if this CcShowInstances has previously + * been saved, it will retrieve related CcPlayoutHistorys from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcShowInstances. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects + */ + public function getCcPlayoutHistorysJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcPlayoutHistoryQuery::create(null, $criteria); + $query->joinWith('CcFiles', $join_behavior); + + return $this->getCcPlayoutHistorys($query, $con); + } + /** * Clears the current object and sets all attributes to their default values */ @@ -2065,10 +2228,16 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent $o->clearAllReferences($deep); } } + if ($this->collCcPlayoutHistorys) { + foreach ((array) $this->collCcPlayoutHistorys as $o) { + $o->clearAllReferences($deep); + } + } } // if ($deep) $this->collCcShowInstancessRelatedByDbId = null; $this->collCcSchedules = null; + $this->collCcPlayoutHistorys = null; $this->aCcShow = null; $this->aCcShowInstancesRelatedByDbOriginalShow = null; $this->aCcFiles = null; diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php index 076f2182c..ad91f182c 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php @@ -399,6 +399,9 @@ abstract class BaseCcShowInstancesPeer { // Invalidate objects in CcSchedulePeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. CcSchedulePeer::clearInstancePool(); + // Invalidate objects in CcPlayoutHistoryPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcPlayoutHistoryPeer::clearInstancePool(); } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php index 08a245d2e..871b907ae 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php @@ -56,6 +56,10 @@ * @method CcShowInstancesQuery rightJoinCcSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSchedule relation * @method CcShowInstancesQuery innerJoinCcSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSchedule relation * + * @method CcShowInstancesQuery leftJoinCcPlayoutHistory($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistory relation + * @method CcShowInstancesQuery rightJoinCcPlayoutHistory($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation + * @method CcShowInstancesQuery innerJoinCcPlayoutHistory($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation + * * @method CcShowInstances findOne(PropelPDO $con = null) Return the first CcShowInstances matching the query * @method CcShowInstances findOneOrCreate(PropelPDO $con = null) Return the first CcShowInstances matching the query, or a new CcShowInstances object populated from the query conditions when no match is found * @@ -848,6 +852,70 @@ abstract class BaseCcShowInstancesQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery'); } + /** + * Filter the query by a related CcPlayoutHistory object + * + * @param CcPlayoutHistory $ccPlayoutHistory the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcShowInstancesQuery The current query, for fluid interface + */ + public function filterByCcPlayoutHistory($ccPlayoutHistory, $comparison = null) + { + return $this + ->addUsingAlias(CcShowInstancesPeer::ID, $ccPlayoutHistory->getDbInstanceId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcPlayoutHistory relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcShowInstancesQuery The current query, for fluid interface + */ + public function joinCcPlayoutHistory($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcPlayoutHistory'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcPlayoutHistory'); + } + + return $this; + } + + /** + * Use the CcPlayoutHistory relation CcPlayoutHistory object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryQuery A secondary query class using the current class as primary query + */ + public function useCcPlayoutHistoryQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinCcPlayoutHistory($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery'); + } + /** * Exclude object from result * diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 6a8d3bda5..2307c5a67 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -422,6 +422,11 @@ class Application_Service_HistoryService "history" => $rows ); } + + public function getShowList($startDT, $endDT, $opts) + { + + } public function insertPlayedItem($schedId) { @@ -447,6 +452,7 @@ class Application_Service_HistoryService $history->setDbFileId($fileId); $history->setDbStarts($item->getDbStarts(null)); $history->setDbEnds($item->getDbEnds(null)); + $history->setDbInstanceId($item->getDbInstanceId()); foreach ($metadata as $key => $val) { $meta = new CcPlayoutHistoryMetaData(); diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 151795315..bc8944ab0 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -484,9 +484,13 @@ + + + + diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index 3baee1847..1ea9dd4f6 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -766,6 +766,7 @@ CREATE TABLE "cc_playout_history" "file_id" INTEGER, "starts" TIMESTAMP NOT NULL, "ends" TIMESTAMP NOT NULL, + "instance_id" INTEGER, PRIMARY KEY ("id") ); @@ -893,6 +894,8 @@ ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_mount_name_inst_fkey" FOREIGN ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_playout_history_file_tag_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE; +ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_his_item_inst_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE CASCADE; + ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "cc_playout_history_metadata_entry_fkey" FOREIGN KEY ("history_id") REFERENCES "cc_playout_history" ("id") ON DELETE CASCADE; ALTER TABLE "cc_playout_history_template_field" ADD CONSTRAINT "cc_playout_history_template_template_fkey" FOREIGN KEY ("template_id") REFERENCES "cc_playout_history_template" ("id") ON DELETE CASCADE; From 653a6384b9aaa607e13ed700a49b53a947fc28eb Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 18:25:46 -0400 Subject: [PATCH 098/181] creating a separate controller for playouthistory templates. --- airtime_mvc/application/configs/ACL.php | 4 +- airtime_mvc/application/configs/constants.php | 6 + .../application/configs/navigation.php | 8 +- .../controllers/PlayouthistoryController.php | 162 +++--------------- .../PlayouthistorytemplateController.php | 143 ++++++++++++++++ airtime_mvc/application/models/User.php | 5 - .../application/services/HistoryService.php | 11 +- .../application/views/scripts/menu.phtml | 2 + .../views/scripts/playouthistory/index.phtml | 8 + .../configure-template.phtml | 2 +- .../index.phtml} | 16 +- .../template-contents.phtml | 0 .../playouthistory/configuretemplate.js | 4 +- .../js/airtime/playouthistory/template.js | 8 +- 14 files changed, 217 insertions(+), 162 deletions(-) create mode 100644 airtime_mvc/application/controllers/PlayouthistorytemplateController.php rename airtime_mvc/application/views/scripts/{playouthistory => playouthistorytemplate}/configure-template.phtml (55%) rename airtime_mvc/application/views/scripts/{playouthistory/template.phtml => playouthistorytemplate/index.phtml} (83%) rename airtime_mvc/application/views/scripts/{playouthistory => playouthistorytemplate}/template-contents.phtml (100%) diff --git a/airtime_mvc/application/configs/ACL.php b/airtime_mvc/application/configs/ACL.php index a23846a99..83cba4b08 100644 --- a/airtime_mvc/application/configs/ACL.php +++ b/airtime_mvc/application/configs/ACL.php @@ -23,6 +23,7 @@ $ccAcl->add(new Zend_Acl_Resource('library')) ->add(new Zend_Acl_Resource('preference')) ->add(new Zend_Acl_Resource('showbuilder')) ->add(new Zend_Acl_Resource('playouthistory')) + ->add(new Zend_Acl_Resource('playouthistorytemplate')) ->add(new Zend_Acl_Resource('listenerstat')) ->add(new Zend_Acl_Resource('usersettings')) ->add(new Zend_Acl_Resource('audiopreview')) @@ -46,7 +47,8 @@ $ccAcl->allow('G', 'index') ->allow('H', 'plupload') ->allow('H', 'library') ->allow('H', 'playlist') - ->allow('A', 'playouthistory') + ->allow('H', 'playouthistory') + ->allow('A', 'playouthistorytemplate') ->allow('A', 'listenerstat') ->allow('A', 'user') ->allow('A', 'systemstatus') diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 6020c0983..4b4d9634a 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -38,6 +38,12 @@ define('MDATA_KEY_CUE_OUT' , 'cueout'); define('UI_MDATA_VALUE_FORMAT_FILE' , 'File'); define('UI_MDATA_VALUE_FORMAT_STREAM' , 'live stream'); +//User types +define('UTYPE_HOST' , 'H'); +define('UTYPE_ADMIN' , 'A'); +define('UTYPE_GUEST' , 'G'); +define('UTYPE_PROGRAM_MANAGER' , 'P'); + //Constants for playout history template fields define('TEMPLATE_DATE', 'date'); define('TEMPLATE_TIME', 'time'); diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index ebbe7b12a..f3149f146 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -20,7 +20,7 @@ $pages = array( 'module' => 'default', 'controller' => 'Plupload', 'action' => 'index', - 'resource' => 'plupload' + 'resource' => 'plupload' ), array( 'label' => _('Library'), @@ -103,9 +103,9 @@ $pages = array( array( 'label' => _('History Templates'), 'module' => 'default', - 'controller' => 'playouthistory', - 'action' => 'template', - 'resource' => 'playouthistory' + 'controller' => 'playouthistorytemplate', + 'action' => 'index', + 'resource' => 'playouthistorytemplate' ), ) ), diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index f5becc485..29997e17e 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -8,6 +8,7 @@ class PlayouthistoryController extends Zend_Controller_Action $ajaxContext ->addActionContext('file-history-feed', 'json') ->addActionContext('item-history-feed', 'json') + ->addActionContext('show-history-feed', 'json') ->addActionContext('edit-file-item', 'json') ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') @@ -15,10 +16,6 @@ class PlayouthistoryController extends Zend_Controller_Action ->addActionContext('delete-list-items', 'json') ->addActionContext('update-list-item', 'json') ->addActionContext('update-file-item', 'json') - ->addActionContext('create-template', 'json') - ->addActionContext('update-template', 'json') - ->addActionContext('delete-template', 'json') - ->addActionContext('set-template-default', 'json') ->initContext(); } @@ -56,13 +53,11 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - //$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery-ui-timepicker-addon.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - + $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - //$this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/historytable.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); @@ -72,7 +67,6 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - //$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery-ui-timepicker-addon.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); //set datatables columns for display of data. @@ -83,6 +77,9 @@ class PlayouthistoryController extends Zend_Controller_Action $columns = json_encode($historyService->getDatatablesFileSummaryColumns()); $script.= "localStorage.setItem( 'datatables-historyfile-aoColumns', JSON.stringify($columns) );"; $this->view->headScript()->appendScript($script); + + $user = Application_Model_User::getCurrentUser(); + $this->view->userType = $user->getType(); } public function fileHistoryFeedAction() @@ -140,6 +137,27 @@ class PlayouthistoryController extends Zend_Controller_Action Logging::info($e->getMessage()); } } + + public function showHistoryFeedAction() + { + try { + $request = $this->getRequest(); + $current_time = time(); + $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); + $ends_epoch = $request->getParam("end", $current_time); + + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); + $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); + + $historyService = new Application_Service_HistoryService(); + $r = $historyService->getShowList($startsDT, $endsDT); + + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } public function editFileItemAction() { @@ -247,132 +265,4 @@ class PlayouthistoryController extends Zend_Controller_Action $this->_helper->json->sendJson($json); } - - public function templateAction() - { - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - $historyService = new Application_Service_HistoryService(); - $this->view->template_list = $historyService->getListItemTemplates(); - $this->view->template_file = $historyService->getFileTemplates(); - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - - public function configureTemplateAction() { - - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - try { - - $templateId = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); - $template = $historyService->loadTemplate($templateId); - - $templateType = $template["type"]; - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; - $mandatoryFields = $historyService->$getMandatoryFields(); - - $this->view->template_id = $templateId; - $this->view->template_name = $template["name"]; - $this->view->template_fields = $template["fields"]; - $this->view->template_type = $templateType; - $this->view->fileMD = $historyService->getFileMetadataTypes(); - $this->view->fields = $historyService->getFieldTypes(); - $this->view->required_fields = $mandatoryFields; - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - catch (Exception $e) { - Logging::info("Error?"); - Logging::info($e); - Logging::info($e->getMessage()); - - $this->_forward('template', 'playouthistory'); - } - } - - public function createTemplateAction() - { - $templateType = $this->_getParam('type', null); - - $request = $this->getRequest(); - $params = $request->getPost(); - - try { - $historyService = new Application_Service_HistoryService(); - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $id = $historyService->createTemplate($params); - - $this->view->url = $this->view->baseUrl("Playouthistory/configure-template/id/{$id}"); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - - $this->view->error = $e->getMessage(); - } - } - - public function setTemplateDefaultAction() - { - $templateId = $this->_getParam('id', null); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->setConfiguredTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function updateTemplateAction() - { - $templateId = $this->_getParam('id', null); - $name = $this->_getParam('name', null); - $fields = $this->_getParam('fields', array()); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->updateItemTemplate($templateId, $name, $fields); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function deleteTemplateAction() - { - $templateId = $this->_getParam('id'); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->deleteTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } } diff --git a/airtime_mvc/application/controllers/PlayouthistorytemplateController.php b/airtime_mvc/application/controllers/PlayouthistorytemplateController.php new file mode 100644 index 000000000..00f4cbedc --- /dev/null +++ b/airtime_mvc/application/controllers/PlayouthistorytemplateController.php @@ -0,0 +1,143 @@ +_helper->getHelper('AjaxContext'); + $ajaxContext + ->addActionContext('create-template', 'json') + ->addActionContext('update-template', 'json') + ->addActionContext('delete-template', 'json') + ->addActionContext('set-template-default', 'json') + ->initContext(); + } + + public function indexAction() + { + $CC_CONFIG = Config::getConfig(); + $baseUrl = Application_Common_OsPath::getBaseDir(); + + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); + + $historyService = new Application_Service_HistoryService(); + $this->view->template_list = $historyService->getListItemTemplates(); + $this->view->template_file = $historyService->getFileTemplates(); + $this->view->configured = $historyService->getConfiguredTemplateIds(); + } + + public function configureTemplateAction() { + + $CC_CONFIG = Config::getConfig(); + $baseUrl = Application_Common_OsPath::getBaseDir(); + + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); + + try { + + $templateId = $this->_getParam('id'); + + $historyService = new Application_Service_HistoryService(); + $template = $historyService->loadTemplate($templateId); + + $templateType = $template["type"]; + $supportedTypes = $historyService->getSupportedTemplateTypes(); + + if (!in_array($templateType, $supportedTypes)) { + throw new Exception("Error: $templateType is not supported."); + } + + $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; + $mandatoryFields = $historyService->$getMandatoryFields(); + + $this->view->template_id = $templateId; + $this->view->template_name = $template["name"]; + $this->view->template_fields = $template["fields"]; + $this->view->template_type = $templateType; + $this->view->fileMD = $historyService->getFileMetadataTypes(); + $this->view->fields = $historyService->getFieldTypes(); + $this->view->required_fields = $mandatoryFields; + $this->view->configured = $historyService->getConfiguredTemplateIds(); + } + catch (Exception $e) { + Logging::info("Error?"); + Logging::info($e); + Logging::info($e->getMessage()); + + $this->_forward('index', 'playouthistorytemplate'); + } + } + + public function createTemplateAction() + { + $templateType = $this->_getParam('type', null); + + $request = $this->getRequest(); + $params = $request->getPost(); + + try { + $historyService = new Application_Service_HistoryService(); + $supportedTypes = $historyService->getSupportedTemplateTypes(); + + if (!in_array($templateType, $supportedTypes)) { + throw new Exception("Error: $templateType is not supported."); + } + + $id = $historyService->createTemplate($params); + + $this->view->url = $this->view->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + + $this->view->error = $e->getMessage(); + } + } + + public function setTemplateDefaultAction() + { + $templateId = $this->_getParam('id', null); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->setConfiguredTemplate($templateId); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } + + public function updateTemplateAction() + { + $templateId = $this->_getParam('id', null); + $name = $this->_getParam('name', null); + $fields = $this->_getParam('fields', array()); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->updateItemTemplate($templateId, $name, $fields); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } + + public function deleteTemplateAction() + { + $templateId = $this->_getParam('id'); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->deleteTemplate($templateId); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } +} \ No newline at end of file diff --git a/airtime_mvc/application/models/User.php b/airtime_mvc/application/models/User.php index a3b2c5d3d..8a1008577 100644 --- a/airtime_mvc/application/models/User.php +++ b/airtime_mvc/application/models/User.php @@ -1,10 +1,5 @@ isHost()) { + + } } public function insertPlayedItem($schedId) { diff --git a/airtime_mvc/application/views/scripts/menu.phtml b/airtime_mvc/application/views/scripts/menu.phtml index 009b937bd..7523b5332 100644 --- a/airtime_mvc/application/views/scripts/menu.phtml +++ b/airtime_mvc/application/views/scripts/menu.phtml @@ -8,9 +8,11 @@ diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index e899d8651..0a27df62f 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -3,15 +3,23 @@
      + userType != UTYPE_HOST): ?>
    • + +
    + userType != UTYPE_HOST): ?>
    + +
    + Show Summary +
    \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/configure-template.phtml b/airtime_mvc/application/views/scripts/playouthistorytemplate/configure-template.phtml similarity index 55% rename from airtime_mvc/application/views/scripts/playouthistory/configure-template.phtml rename to airtime_mvc/application/views/scripts/playouthistorytemplate/configure-template.phtml index 7a77b1afd..67da19bd4 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/configure-template.phtml +++ b/airtime_mvc/application/views/scripts/playouthistorytemplate/configure-template.phtml @@ -1,3 +1,3 @@
    - render('playouthistory/template-contents.phtml'); ?> + render('playouthistorytemplate/template-contents.phtml'); ?>
    \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/template.phtml b/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml similarity index 83% rename from airtime_mvc/application/views/scripts/playouthistory/template.phtml rename to airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml index aa23f0162..0e16acee8 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template.phtml +++ b/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml @@ -12,19 +12,19 @@ configured)): ?>
  • - "> + ">
  • - "> + "> - "> + "> - "> + "> Set Default @@ -43,19 +43,19 @@ template_file as $id=>$name): ?> configured)): ?>
  • - "> + ">
  • - "> + "> - "> + "> - "> + "> Set Default diff --git a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml b/airtime_mvc/application/views/scripts/playouthistorytemplate/template-contents.phtml similarity index 100% rename from airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml rename to airtime_mvc/application/views/scripts/playouthistorytemplate/template-contents.phtml diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 5087805c6..65c9a8316 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -123,7 +123,7 @@ var AIRTIME = (function(AIRTIME) { }); function updateTemplate(template_id, isDefault) { - var url = baseUrl+"Playouthistory/update-template/format/json"; + var url = baseUrl+"Playouthistorytemplate/update-template/format/json"; var data = {}; var $lis, $li; var i, len; @@ -152,7 +152,7 @@ var AIRTIME = (function(AIRTIME) { $templateDiv.on("click", "#template_set_default", function() { var $btn = $(this), template_id = $btn.data("template"), - url = baseUrl+"Playouthistory/set-template-default/format/json"; + url = baseUrl+"Playouthistorytemplate/set-template-default/format/json"; $btn.remove(); $.post(url, {id: template_id}); diff --git a/airtime_mvc/public/js/airtime/playouthistory/template.js b/airtime_mvc/public/js/airtime/playouthistory/template.js index c452d15aa..6216cfc93 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/template.js +++ b/airtime_mvc/public/js/airtime/playouthistory/template.js @@ -9,9 +9,9 @@ var AIRTIME = (function(AIRTIME) { function createItemLi(id, name, configured) { - var editUrl = baseUrl+"Playouthistory/configure-template/id/"+id; - var defaultUrl = baseUrl+"Playouthistory/set-template-default/format/json/id/"+id; - var removeUrl = baseUrl+"Playouthistory/delete-template/format/json/id/"+id; + var editUrl = baseUrl+"Playouthistorytemplate/configure-template/id/"+id; + var defaultUrl = baseUrl+"Playouthistorytemplate/set-template-default/format/json/id/"+id; + var removeUrl = baseUrl+"Playouthistorytemplate/delete-template/format/json/id/"+id; var itemConfigured = "
  • " + @@ -72,7 +72,7 @@ var AIRTIME = (function(AIRTIME) { function createTemplate(type) { - var createUrl = baseUrl+"Playouthistory/create-template"; + var createUrl = baseUrl+"Playouthistorytemplate/create-template"; $.post(createUrl, {format: "json", type: type}, function(json) { From 429cdeeffbb181cb88567147014769d309f721ce Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 19:37:46 -0400 Subject: [PATCH 099/181] filtering by a host's show so they can edit their own playout history. --- airtime_mvc/application/configs/constants.php | 6 +- .../controllers/PlayouthistoryController.php | 39 +-- .../PlayouthistorytemplateController.php | 252 +++++++++--------- .../application/services/HistoryService.php | 40 ++- .../views/scripts/playouthistory/index.phtml | 4 +- .../js/airtime/playouthistory/historytable.js | 33 ++- 6 files changed, 218 insertions(+), 156 deletions(-) diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 4b4d9634a..34f8cab41 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -39,9 +39,9 @@ define('UI_MDATA_VALUE_FORMAT_FILE' , 'File'); define('UI_MDATA_VALUE_FORMAT_STREAM' , 'live stream'); //User types -define('UTYPE_HOST' , 'H'); -define('UTYPE_ADMIN' , 'A'); -define('UTYPE_GUEST' , 'G'); +define('UTYPE_HOST' , 'H'); +define('UTYPE_ADMIN' , 'A'); +define('UTYPE_GUEST' , 'G'); define('UTYPE_PROGRAM_MANAGER' , 'P'); //Constants for playout history template fields diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 29997e17e..89a2e2f4a 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -138,25 +138,26 @@ class PlayouthistoryController extends Zend_Controller_Action } } - public function showHistoryFeedAction() - { - try { - $request = $this->getRequest(); - $current_time = time(); - $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); - $ends_epoch = $request->getParam("end", $current_time); - - $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); - $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - - $historyService = new Application_Service_HistoryService(); - $r = $historyService->getShowList($startsDT, $endsDT); - - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } + public function showHistoryFeedAction() + { + try { + $request = $this->getRequest(); + $current_time = time(); + $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); + $ends_epoch = $request->getParam("end", $current_time); + + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); + $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); + + $historyService = new Application_Service_HistoryService(); + $shows = $historyService->getShowList($startsDT, $endsDT); + + $this->_helper->json->sendJson($shows); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } } public function editFileItemAction() diff --git a/airtime_mvc/application/controllers/PlayouthistorytemplateController.php b/airtime_mvc/application/controllers/PlayouthistorytemplateController.php index 00f4cbedc..c6651d8eb 100644 --- a/airtime_mvc/application/controllers/PlayouthistorytemplateController.php +++ b/airtime_mvc/application/controllers/PlayouthistorytemplateController.php @@ -13,131 +13,131 @@ class PlayouthistorytemplateController extends Zend_Controller_Action ->initContext(); } - public function indexAction() - { - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - $historyService = new Application_Service_HistoryService(); - $this->view->template_list = $historyService->getListItemTemplates(); - $this->view->template_file = $historyService->getFileTemplates(); - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - - public function configureTemplateAction() { - - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - try { - - $templateId = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); - $template = $historyService->loadTemplate($templateId); - - $templateType = $template["type"]; - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; - $mandatoryFields = $historyService->$getMandatoryFields(); - - $this->view->template_id = $templateId; - $this->view->template_name = $template["name"]; - $this->view->template_fields = $template["fields"]; - $this->view->template_type = $templateType; - $this->view->fileMD = $historyService->getFileMetadataTypes(); - $this->view->fields = $historyService->getFieldTypes(); - $this->view->required_fields = $mandatoryFields; - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - catch (Exception $e) { - Logging::info("Error?"); - Logging::info($e); - Logging::info($e->getMessage()); - - $this->_forward('index', 'playouthistorytemplate'); - } - } - - public function createTemplateAction() - { - $templateType = $this->_getParam('type', null); - - $request = $this->getRequest(); - $params = $request->getPost(); - - try { - $historyService = new Application_Service_HistoryService(); - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $id = $historyService->createTemplate($params); - - $this->view->url = $this->view->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - - $this->view->error = $e->getMessage(); - } - } - - public function setTemplateDefaultAction() - { - $templateId = $this->_getParam('id', null); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->setConfiguredTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function updateTemplateAction() - { - $templateId = $this->_getParam('id', null); - $name = $this->_getParam('name', null); - $fields = $this->_getParam('fields', array()); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->updateItemTemplate($templateId, $name, $fields); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function deleteTemplateAction() - { - $templateId = $this->_getParam('id'); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->deleteTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } + public function indexAction() + { + $CC_CONFIG = Config::getConfig(); + $baseUrl = Application_Common_OsPath::getBaseDir(); + + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); + + $historyService = new Application_Service_HistoryService(); + $this->view->template_list = $historyService->getListItemTemplates(); + $this->view->template_file = $historyService->getFileTemplates(); + $this->view->configured = $historyService->getConfiguredTemplateIds(); + } + + public function configureTemplateAction() { + + $CC_CONFIG = Config::getConfig(); + $baseUrl = Application_Common_OsPath::getBaseDir(); + + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); + + try { + + $templateId = $this->_getParam('id'); + + $historyService = new Application_Service_HistoryService(); + $template = $historyService->loadTemplate($templateId); + + $templateType = $template["type"]; + $supportedTypes = $historyService->getSupportedTemplateTypes(); + + if (!in_array($templateType, $supportedTypes)) { + throw new Exception("Error: $templateType is not supported."); + } + + $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; + $mandatoryFields = $historyService->$getMandatoryFields(); + + $this->view->template_id = $templateId; + $this->view->template_name = $template["name"]; + $this->view->template_fields = $template["fields"]; + $this->view->template_type = $templateType; + $this->view->fileMD = $historyService->getFileMetadataTypes(); + $this->view->fields = $historyService->getFieldTypes(); + $this->view->required_fields = $mandatoryFields; + $this->view->configured = $historyService->getConfiguredTemplateIds(); + } + catch (Exception $e) { + Logging::info("Error?"); + Logging::info($e); + Logging::info($e->getMessage()); + + $this->_forward('index', 'playouthistorytemplate'); + } + } + + public function createTemplateAction() + { + $templateType = $this->_getParam('type', null); + + $request = $this->getRequest(); + $params = $request->getPost(); + + try { + $historyService = new Application_Service_HistoryService(); + $supportedTypes = $historyService->getSupportedTemplateTypes(); + + if (!in_array($templateType, $supportedTypes)) { + throw new Exception("Error: $templateType is not supported."); + } + + $id = $historyService->createTemplate($params); + + $this->view->url = $this->view->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + + $this->view->error = $e->getMessage(); + } + } + + public function setTemplateDefaultAction() + { + $templateId = $this->_getParam('id', null); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->setConfiguredTemplate($templateId); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } + + public function updateTemplateAction() + { + $templateId = $this->_getParam('id', null); + $name = $this->_getParam('name', null); + $fields = $this->_getParam('fields', array()); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->updateItemTemplate($templateId, $name, $fields); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } + + public function deleteTemplateAction() + { + $templateId = $this->_getParam('id'); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->deleteTemplate($templateId); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } } } \ No newline at end of file diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index ea8aef958..848fa0510 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -426,15 +426,51 @@ class Application_Service_HistoryService public function getShowList($startDT, $endDT) { $user = Application_Model_User::getCurrentUser(); - $shows = Application_Model_Show::getShows($startDT, $endDT); - Loggin::info($shows); + Logging::info($startDT->format("Y-m-d H:i:s")); + Logging::info($endDT->format("Y-m-d H:i:s")); + Logging::info($shows); + //need to filter the list to only their shows if ($user->isHost()) { + $showIds = array(); + + foreach ($shows as $show) { + $showIds[] = $show["show_id"]; + } + + $showIds = array_unique($showIds); + Logging::info($showIds); + + $hostRecords = CcShowHostsQuery::create() + ->filterByDbHost($user->getId()) + ->filterByDbShow($showIds) + ->find($this->con); + + $filteredShowIds = array(); + + foreach($hostRecords as $record) { + $filteredShowIds[] = $record->getDbShow(); + } + + Logging::info($filteredShowIds); + + $filteredShows = array(); + + foreach($shows as $show) { + if (in_array($show["show_id"], $filteredShowIds)) { + $filteredShows[] = $show; + } + } } + else { + $filteredShows = $shows; + } + + return $filteredShows; } public function insertPlayedItem($schedId) { diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index 0a27df62f..67436947f 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -18,7 +18,9 @@
    - Show Summary +
      +
    • Show Summary
    • +
    diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 8a25cc7a3..0ad480c1f 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -50,6 +50,11 @@ var AIRTIME = (function(AIRTIME) { var selectedLogItems = {}; + var dateStartId = "#his_date_start", + timeStartId = "#his_time_start", + dateEndId = "#his_date_end", + timeEndId = "#his_time_end"; + function getSelectedLogItems() { var items = Object.keys(selectedLogItems); @@ -303,16 +308,26 @@ var AIRTIME = (function(AIRTIME) { return oTable; } + function showSummaryList() { + var url = baseUrl+"playouthistory/show-history-feed", + oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId), + data = { + format: "json", + start: oRange.start, + end: oRange.end + }; + + $.post(url, data, function() { + var x; + }); + } + mod.onReady = function() { var oBaseDatePickerSettings, oBaseTimePickerSettings, oTableAgg, oTableItem, - dateStartId = "#his_date_start", - timeStartId = "#his_time_start", - dateEndId = "#his_date_end", - timeEndId = "#his_time_end", $hisDialogEl, tabsInit = [ @@ -327,6 +342,12 @@ var AIRTIME = (function(AIRTIME) { initialize: function() { oTableAgg = aggregateHistoryTable(); } + }, + { + initialized: false, + initialize: function() { + showSummaryList(); + } } ]; @@ -514,7 +535,9 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.find("#his-tabs").tabs({ show: function( event, ui ) { - var tab = tabsInit[ui.index]; + var href = $(ui.tab).attr("href"); + var index = href.split('-').pop(); + var tab = tabsInit[index-1]; if (!tab.initialized) { tab.initialize(); From a4c97479b612c93a37ed65afec1baff46c685526 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Wed, 28 Aug 2013 23:30:15 -0400 Subject: [PATCH 100/181] using an accordian to display per show logs. --- .../controllers/PlayouthistoryController.php | 23 ++--- .../application/services/HistoryService.php | 66 ++++++++------ .../views/scripts/playouthistory/index.phtml | 4 +- .../js/airtime/playouthistory/historytable.js | 90 +++++++++++++++++-- 4 files changed, 139 insertions(+), 44 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 89a2e2f4a..b6aadf568 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -53,7 +53,7 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - + $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); @@ -77,7 +77,7 @@ class PlayouthistoryController extends Zend_Controller_Action $columns = json_encode($historyService->getDatatablesFileSummaryColumns()); $script.= "localStorage.setItem( 'datatables-historyfile-aoColumns', JSON.stringify($columns) );"; $this->view->headScript()->appendScript($script); - + $user = Application_Model_User::getCurrentUser(); $this->view->userType = $user->getType(); } @@ -120,12 +120,13 @@ class PlayouthistoryController extends Zend_Controller_Action $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); $ends_epoch = $request->getParam("end", $current_time); + $instance = $request->getParam("instance_id", null); $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); $historyService = new Application_Service_HistoryService(); - $r = $historyService->getPlayedItemData($startsDT, $endsDT, $params); + $r = $historyService->getPlayedItemData($startsDT, $endsDT, $params, $instance); $this->view->sEcho = $r["sEcho"]; $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; @@ -137,7 +138,7 @@ class PlayouthistoryController extends Zend_Controller_Action Logging::info($e->getMessage()); } } - + public function showHistoryFeedAction() { try { @@ -145,13 +146,13 @@ class PlayouthistoryController extends Zend_Controller_Action $current_time = time(); $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); $ends_epoch = $request->getParam("end", $current_time); - + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - + $historyService = new Application_Service_HistoryService(); $shows = $historyService->getShowList($startsDT, $endsDT); - + $this->_helper->json->sendJson($shows); } catch (Exception $e) { @@ -182,11 +183,11 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->createPlayedItem($params); - + if (isset($json["form"])) { $this->view->form = $json["form"]; $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - + unset($this->view->form); } @@ -239,11 +240,11 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->editPlayedItem($params); - + if (isset($json["form"])) { $this->view->form = $json["form"]; $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - + unset($this->view->form); } diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 848fa0510..a7587d2d3 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -22,7 +22,7 @@ class Application_Service_HistoryService } //opts is from datatables. - public function getPlayedItemData($startDT, $endDT, $opts) + public function getPlayedItemData($startDT, $endDT, $opts, $instanceId=null) { $mainSqlQuery = ""; $paramMap = array(); @@ -59,7 +59,7 @@ class Application_Service_HistoryService } $historyRange = "(". - "SELECT history.starts, history.ends, history.id AS history_id". + "SELECT history.starts, history.ends, history.id AS history_id, history.instance_id". " FROM cc_playout_history as history". " WHERE history.starts >= :starts and history.starts < :ends". ") AS history_range"; @@ -71,7 +71,12 @@ class Application_Service_HistoryService " ) AS %KEY%". " ) AS %KEY%_filter"; - $mainSelect = array("history_range.starts", "history_range.ends", "history_range.history_id"); + $mainSelect = array( + "history_range.starts", + "history_range.ends", + "history_range.history_id", + "history_range.instance_id" + ); $mdFilters = array(); $numFileMdFields = count($fields_filemd); @@ -184,6 +189,17 @@ class Application_Service_HistoryService throw new Exception("Error: $msg"); } + //----------------------------------------------------------------------- + //Using the instance_id to filter the data. + + if (isset($instanceId)) { + + $mainSqlQuery.= + " WHERE history_range.instance_id = :instance"; + + $paramMap["instance"] = $instanceId; + } + //------------------------------------------------------------------------ //Using Datatables parameters to sort the data. @@ -422,44 +438,44 @@ class Application_Service_HistoryService "history" => $rows ); } - + public function getShowList($startDT, $endDT) { $user = Application_Model_User::getCurrentUser(); $shows = Application_Model_Show::getShows($startDT, $endDT); - + Logging::info($startDT->format("Y-m-d H:i:s")); Logging::info($endDT->format("Y-m-d H:i:s")); - + Logging::info($shows); - + //need to filter the list to only their shows if ($user->isHost()) { - + $showIds = array(); - + foreach ($shows as $show) { $showIds[] = $show["show_id"]; } - + $showIds = array_unique($showIds); Logging::info($showIds); - + $hostRecords = CcShowHostsQuery::create() ->filterByDbHost($user->getId()) ->filterByDbShow($showIds) ->find($this->con); - + $filteredShowIds = array(); - + foreach($hostRecords as $record) { $filteredShowIds[] = $record->getDbShow(); } - + Logging::info($filteredShowIds); - + $filteredShows = array(); - + foreach($shows as $show) { if (in_array($show["show_id"], $filteredShowIds)) { $filteredShows[] = $show; @@ -469,7 +485,7 @@ class Application_Service_HistoryService else { $filteredShows = $shows; } - + return $filteredShows; } @@ -878,17 +894,17 @@ class Application_Service_HistoryService throw $e; } } - + /* id is an id in cc_playout_history */ public function deletePlayedItems($ids) { - + $this->con->beginTransaction(); - + try { - + $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); $records->delete($this->con); - + $this->con->commit(); } catch (Exception $e) { @@ -915,9 +931,9 @@ class Application_Service_HistoryService return $fields; } - + private function getPhpCasts() { - + $fields = array( TEMPLATE_DATE => "strval", TEMPLATE_TIME => "strval", @@ -927,7 +943,7 @@ class Application_Service_HistoryService TEMPLATE_INT => "intval", TEMPLATE_FLOAT => "floatval", ); - + return $fields; } diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index 67436947f..0dd7d706d 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -18,9 +18,7 @@
    -
      -
    • Show Summary
    • -
    +
    diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 0ad480c1f..6f71bf0a5 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -153,6 +153,9 @@ var AIRTIME = (function(AIRTIME) { if (fnServerData.hasOwnProperty("end")) { aoData.push( { name: "end", value: fnServerData.end} ); } + if (fnServerData.hasOwnProperty("instance")) { + aoData.push( { name: "instance_id", value: fnServerData.instance} ); + } aoData.push( { name: "format", value: "json"} ); @@ -165,6 +168,83 @@ var AIRTIME = (function(AIRTIME) { } ); } + //config: name, type, filemd, required + function createShowAccordSection(config) { + var template, + $el; + + /* + template = + "
  • " + + "<%= name %>" + + "<%= starts %>" + + "<%= ends %>" + + "
  • "; + */ + + template = + "

    " + + "" + + "<%= name %>" + + "<%= starts %>" + + "<%= ends %>" + + "" + + "

    " + + "
    First content panel
    "; + + template = _.template(template); + $el = $(template(config)); + + return $el; + } + + function drawShowList(oShows) { + var $showList = $historyContentDiv.find("#history_show_summary"), + i, + len, + $accordSection, + show; + + $showList.empty(); + + for (i = 0, len = oShows.length; i < len; i++) { + show = oShows[i]; + + $accordSection = createShowAccordSection({ + instance: show.instance_id, + name: show.name, + starts: show.starts, + ends: show.ends + }); + + $showList.append($accordSection); + } + + $showList.accordion({ + create: function( event, ui ) { + var $div = $showList.find(".ui-accordion-content-active"); + }, + change: function( event, ui ) { + var x; + }, + changestart: function( event, ui ) { + var x; + } + }); + } + + function drawShowTable() { + + } + function createToolbarButtons ($el) { var $menu = $("
    "); @@ -234,9 +314,9 @@ var AIRTIME = (function(AIRTIME) { return oTable; } - function itemHistoryTable() { + function itemHistoryTable(id) { var oTable, - $historyTableDiv = $historyContentDiv.find("#history_table_list"), + $historyTableDiv = $historyContentDiv.find("#"+id), $toolbar, columns, fnRowCallback, @@ -317,8 +397,8 @@ var AIRTIME = (function(AIRTIME) { end: oRange.end }; - $.post(url, data, function() { - var x; + $.post(url, data, function(json) { + drawShowList(json); }); } @@ -334,7 +414,7 @@ var AIRTIME = (function(AIRTIME) { { initialized: false, initialize: function() { - oTableItem = itemHistoryTable(); + oTableItem = itemHistoryTable("history_table_list"); } }, { From 803409f151b649a5be76c3154829307e565ff478 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 29 Aug 2013 11:01:03 -0400 Subject: [PATCH 101/181] creating a show table beginning --- .../js/airtime/playouthistory/historytable.js | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 6f71bf0a5..9d9a7c750 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -173,19 +173,6 @@ var AIRTIME = (function(AIRTIME) { var template, $el; - /* - template = - "
  • " + - "<%= name %>" + - "<%= starts %>" + - "<%= ends %>" + - "
  • "; - */ - template = "

    Date: Thu, 29 Aug 2013 15:17:24 -0400 Subject: [PATCH 102/181] show tables filtering by instance id. --- .../application/services/HistoryService.php | 29 +++++----- .../js/airtime/playouthistory/historytable.js | 58 +++++++++++++------ 2 files changed, 55 insertions(+), 32 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index a7587d2d3..003ef41a8 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -174,20 +174,6 @@ class Application_Service_HistoryService " LEFT JOIN {$filter} USING(history_id)"; } - //---------------------------------------------------------------------- - //need to count the total rows to tell Datatables. - $stmt = $this->con->prepare($mainSqlQuery); - foreach ($paramMap as $param => $v) { - $stmt->bindValue($param, $v); - } - - if ($stmt->execute()) { - $totalRows = $stmt->rowCount(); - } - else { - $msg = implode(',', $stmt->errorInfo()); - throw new Exception("Error: $msg"); - } //----------------------------------------------------------------------- //Using the instance_id to filter the data. @@ -199,6 +185,21 @@ class Application_Service_HistoryService $paramMap["instance"] = $instanceId; } + + //---------------------------------------------------------------------- + //need to count the total rows to tell Datatables. + $stmt = $this->con->prepare($mainSqlQuery); + foreach ($paramMap as $param => $v) { + $stmt->bindValue($param, $v); + } + + if ($stmt->execute()) { + $totalRows = $stmt->rowCount(); + } + else { + $msg = implode(',', $stmt->errorInfo()); + throw new Exception("Error: $msg"); + } //------------------------------------------------------------------------ //Using Datatables parameters to sort the data. diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 9d9a7c750..5baeb3f26 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -53,7 +53,11 @@ var AIRTIME = (function(AIRTIME) { var dateStartId = "#his_date_start", timeStartId = "#his_time_start", dateEndId = "#his_date_end", - timeEndId = "#his_time_end"; + timeEndId = "#his_time_end", + + oTableAgg, + oTableItem, + oTableShow; function getSelectedLogItems() { var items = Object.keys(selectedLogItems); @@ -168,24 +172,23 @@ var AIRTIME = (function(AIRTIME) { } ); } - //config: name, type, filemd, required function createShowAccordSection(config) { var template, $el; template = - "

    " + + "

    " + "" + "<%= name %>" + "<%= starts %>" + "<%= ends %>" + "" + "

    " + - "
    First content panel
    "; + "
    "; template = _.template(template); $el = $(template(config)); @@ -196,7 +199,19 @@ var AIRTIME = (function(AIRTIME) { //$el is the div in the accordian we should create the table on. function createShowTable($el) { - oTableShow = itemHistoryTable("history_table_list"); + var instance = $el.data("instance"); + var $table = $("", { + 'cellpadding': "0", + 'cellspacing': "0", + 'class': "datatable", + 'id': "history_table_show" + }); + + //assign the retrieval function the show instance id. + fnServerData.instance = instance; + $el.append($table); + $el.css("height", "auto"); + oTableShow = itemHistoryTable("history_table_show"); } function drawShowList(oShows) { @@ -224,20 +239,18 @@ var AIRTIME = (function(AIRTIME) { $showList.accordion({ create: function( event, ui ) { var $div = $showList.find(".ui-accordion-content-active"); + createShowTable($div); }, change: function( event, ui ) { - var x; + var $div = $(ui.newContent); + createShowTable($div); }, changestart: function( event, ui ) { - var x; + $(ui.oldContent).empty(); } }); } - function drawShowTable() { - - } - function createToolbarButtons ($el) { var $menu = $("
    "); @@ -399,9 +412,6 @@ var AIRTIME = (function(AIRTIME) { var oBaseDatePickerSettings, oBaseTimePickerSettings, - oTableAgg, - oTableItem, - oTableShow, $hisDialogEl, tabsInit = [ @@ -409,18 +419,27 @@ var AIRTIME = (function(AIRTIME) { initialized: false, initialize: function() { oTableItem = itemHistoryTable("history_table_list"); + }, + navigate: function() { + delete fnServerData.instance; } }, { initialized: false, initialize: function() { oTableAgg = aggregateHistoryTable(); + }, + navigate: function() { + delete fnServerData.instance; } }, { initialized: false, initialize: function() { showSummaryList(); + }, + navigate: function() { + showSummaryList(); } } ]; @@ -617,6 +636,9 @@ var AIRTIME = (function(AIRTIME) { tab.initialize(); tab.initialized = true; } + else { + tab.navigate(); + } } }); From ec31fd50c90e028ec9506e8c58ecadfff0ff7004 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 15:34:34 -0400 Subject: [PATCH 103/181] deleteing items from the show table. --- airtime_mvc/public/css/history_styles.css | 16 +++++++++++++++- .../js/airtime/playouthistory/historytable.js | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index 01b4293f6..b846b69d5 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -101,7 +101,8 @@ } .ui-dialog form.ui-widget-content dd input { - width: 190px; + max-width: 210px; + width: 90%; } .bootstrap-datetimepicker-widget ul { @@ -114,7 +115,16 @@ border-radius: 2px !important; } +.ui-dialog-content .well { + max-width: 230px; +} +.ui-dialog-content .well .date { + margin-left: 25px; +} + .ui-dialog .ui-dialog-content .well .date .add-on { + position: absolute; + left: 30px; display: inline-block; width: auto; height: 20px; @@ -181,3 +191,7 @@ .btn [class^="icon-"] { margin-top: 0; } + +#history_content .ui-tabs .ui-tabs-panel { + padding-top: 10px; +} diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 5baeb3f26..1b052b49b 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -450,6 +450,7 @@ var AIRTIME = (function(AIRTIME) { function redrawTables() { oTableAgg && oTableAgg.fnDraw(); oTableItem && oTableItem.fnDraw(); + oTableShow && oTableShow.fnDraw(); } function removeHistoryDialog() { From 8208f8596b7708ae5525061908b5a00530bfc891 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 15:37:33 -0400 Subject: [PATCH 104/181] ordering by show start time --- airtime_mvc/application/models/Show.php | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 2930a7ff3..f5cac2aa0 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -949,6 +949,7 @@ SQL; AND ((si1.starts >= :start1::TIMESTAMP AND si1.starts < :end1::TIMESTAMP) OR (si1.ends > :start2::TIMESTAMP AND si1.ends <= :end2::TIMESTAMP) OR (si1.starts <= :start3::TIMESTAMP AND si1.ends >= :end3::TIMESTAMP)) +ORDER BY si1.starts SQL; return Application_Common_Database::prepareAndExecute( $sql, array( From 91d4d1224e15854457dd8dd3b39776c9f1e98a11 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 15:52:24 -0400 Subject: [PATCH 105/181] redoing accordian properly. --- airtime_mvc/public/css/history_styles.css | 1 - airtime_mvc/public/js/airtime/playouthistory/historytable.js | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index b846b69d5..fb44d4677 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -101,7 +101,6 @@ } .ui-dialog form.ui-widget-content dd input { - max-width: 210px; width: 90%; } diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 1b052b49b..a2617654f 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -221,7 +221,9 @@ var AIRTIME = (function(AIRTIME) { $accordSection, show; - $showList.empty(); + $showList + .accordion( "destroy" ) + .empty(); for (i = 0, len = oShows.length; i < len; i++) { show = oShows[i]; From f97069bd0baed1ed6644b659e07dbd8a9cc6f38c Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 15:58:24 -0400 Subject: [PATCH 106/181] displaying show list in proper time zone. --- .../application/services/HistoryService.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 003ef41a8..75de3b6ae 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -279,13 +279,13 @@ class Application_Service_HistoryService } } - //need to display the results in the station's timezone. foreach ($rows as $index => &$result) { foreach ($boolCast as $name) { $result[$name] = (bool) $result[$name]; } + //need to display the results in the station's timezone. $dateTime = new DateTime($result["starts"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); $result["starts"] = $dateTime->format("Y-m-d H:i:s"); @@ -486,6 +486,22 @@ class Application_Service_HistoryService else { $filteredShows = $shows; } + + $timezoneUTC = new DateTimeZone("UTC"); + $timezoneLocal = new DateTimeZone($this->timezone); + + foreach ($filteredShows as &$result) { + + //need to display the results in the station's timezone. + $dateTime = new DateTime($result["starts"], $timezoneUTC); + $dateTime->setTimezone($timezoneLocal); + $result["starts"] = $dateTime->format("Y-m-d H:i:s"); + + $dateTime = new DateTime($result["ends"], $timezoneUTC); + $dateTime->setTimezone($timezoneLocal); + $result["ends"] = $dateTime->format("Y-m-d H:i:s"); + + } return $filteredShows; } From d50cdd16c288eadc189f4ca920c1e84377d96a44 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 17:40:08 -0400 Subject: [PATCH 107/181] starting association of a show instance. --- .../application/forms/EditHistoryItem.php | 15 ++++++++++ .../application/services/HistoryService.php | 30 +++++++++++++++++-- .../scripts/form/edit-history-item.phtml | 8 +++++ .../js/airtime/playouthistory/historytable.js | 7 +++++ 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php index cb9868e49..9552b1c22 100644 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -12,6 +12,15 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory 'PrepareElements', array('ViewScript', array('viewScript' => 'form/edit-history-item.phtml')) )); + + /* + $instance = new Zend_Form_Element_Select("instance_id"); + $instance->setLabel(_("Choose Show Instance")); + $instance->setMultiOptions(array("0" => "-----------")); + $instance->setValue(0); + $instance->setDecorators(array('ViewHelper')); + $this->addElement($instance); + */ $starts = new Zend_Form_Element_Text(self::ID_PREFIX.'starts'); $starts->setValidators(array( @@ -42,4 +51,10 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory parent::createFromTemplate($template, $required); } + + public function populateShowInstances($possibleInstances) { + + $instance = $this->getElement("instance_id"); + $instance->setMultiOptions($possibleInstances); + } } \ No newline at end of file diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 75de3b6ae..f950e8631 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -688,7 +688,7 @@ class Application_Service_HistoryService } } - public function populateTemplateItem($values, $id=null) { + public function populateTemplateItem($values, $id=null, $instance_id=null) { $this->con->beginTransaction(); @@ -702,6 +702,10 @@ class Application_Service_HistoryService else { $historyRecord = new CcPlayoutHistory(); } + + if (isset($instance_id)) { + $historyRecord->setDbInstanceId($instance_id); + } $timezoneUTC = new DateTimeZone("UTC"); $timezoneLocal = new DateTimeZone($this->timezone); @@ -780,12 +784,31 @@ class Application_Service_HistoryService throw $e; } } + + //start,end timestamp strings in local timezone. + public function populateShowInstances($start, $end) { + $timezoneLocal = new DateTimeZone($this->timezone); + + $startDT = new DateTime($start, $timezoneLocal); + $endDT = new DateTime($end, $timezoneLocal); + + $shows = $this->getShowList($startDT, $endDT); + + $select = array(); + + foreach ($shows as &$show) { + $select[$show["instance_id"]] = $show["name"]; + } + + return $select; + } public function createPlayedItem($data) { try { $form = $this->makeHistoryItemForm(null); $history_id = $form->getElement("his_item_id"); + $instance_id = $data["instance_id"]; $json = array(); if ($form->isValid($data)) { @@ -795,7 +818,7 @@ class Application_Service_HistoryService Logging::info("created list item"); Logging::info($values); - $this->populateTemplateItem($values); + $this->populateTemplateItem($values, null, $instance_id); } else { Logging::info("created list item NOT VALID"); @@ -819,6 +842,7 @@ class Application_Service_HistoryService try { $id = $data["his_item_id"]; + $instance_id = $data["instance_id"]; $form = $this->makeHistoryItemForm($id); $history_id = $form->getElement("his_item_id"); $history_id->setRequired(true); @@ -833,7 +857,7 @@ class Application_Service_HistoryService Logging::info("edited list item"); Logging::info($values); - $this->populateTemplateItem($values, $id); + $this->populateTemplateItem($values, $id, $instance_id); } else { Logging::info("edited list item NOT VALID"); diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml index 2225e4dfc..219942121 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml @@ -31,6 +31,14 @@ +
    + +
    +
    + + +
    + getSubForm('his_item_template') as $index=>$el): ?> getName(); ?> diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index a2617654f..c37b2e11b 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -577,6 +577,13 @@ var AIRTIME = (function(AIRTIME) { url; url = (id === "") ? createUrl : updateUrl; + + if (fnServerData.instance !== undefined) { + data.push({ + name: "instance_id", + value: fnServerData.instance + }); + } $.post(url, data, function(json) { From 0f0958ee6b69894b1763f5d1f277573d31c9440c Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 29 Aug 2013 18:32:42 -0400 Subject: [PATCH 108/181] changing the query to only filter by instance id not starts/ends if instance id is set. --- .../application/services/HistoryService.php | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index f950e8631..275c8d4fe 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -30,8 +30,6 @@ class Application_Service_HistoryService $start = $startDT->format("Y-m-d H:i:s"); $end = $endDT->format("Y-m-d H:i:s"); - $paramMap["starts"] = $start; - $paramMap["ends"] = $end; $template = $this->getConfiguredItemTemplate(); $fields = $template["fields"]; @@ -58,11 +56,25 @@ class Application_Service_HistoryService } } + //----------------------------------------------------------------------- + //Using the instance_id to filter the data. + + $historyRange = "(". "SELECT history.starts, history.ends, history.id AS history_id, history.instance_id". - " FROM cc_playout_history as history". - " WHERE history.starts >= :starts and history.starts < :ends". - ") AS history_range"; + " FROM cc_playout_history as history"; + + if (isset($instanceId)) { + $historyRange.= " WHERE history.instance_id = :instance"; + $paramMap["instance"] = $instanceId; + } + else { + $historyRange.= " WHERE history.starts >= :starts and history.starts < :ends"; + $paramMap["starts"] = $start; + $paramMap["ends"] = $end; + } + + $historyRange.= ") AS history_range"; $manualMeta = "(". "SELECT %KEY%.value AS %KEY%, %KEY%.history_id". @@ -174,25 +186,13 @@ class Application_Service_HistoryService " LEFT JOIN {$filter} USING(history_id)"; } - - //----------------------------------------------------------------------- - //Using the instance_id to filter the data. - - if (isset($instanceId)) { - - $mainSqlQuery.= - " WHERE history_range.instance_id = :instance"; - - $paramMap["instance"] = $instanceId; - } - //---------------------------------------------------------------------- //need to count the total rows to tell Datatables. $stmt = $this->con->prepare($mainSqlQuery); foreach ($paramMap as $param => $v) { $stmt->bindValue($param, $v); } - + if ($stmt->execute()) { $totalRows = $stmt->rowCount(); } @@ -486,21 +486,21 @@ class Application_Service_HistoryService else { $filteredShows = $shows; } - + $timezoneUTC = new DateTimeZone("UTC"); $timezoneLocal = new DateTimeZone($this->timezone); - + foreach ($filteredShows as &$result) { - + //need to display the results in the station's timezone. $dateTime = new DateTime($result["starts"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); $result["starts"] = $dateTime->format("Y-m-d H:i:s"); - + $dateTime = new DateTime($result["ends"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); $result["ends"] = $dateTime->format("Y-m-d H:i:s"); - + } return $filteredShows; @@ -702,7 +702,7 @@ class Application_Service_HistoryService else { $historyRecord = new CcPlayoutHistory(); } - + if (isset($instance_id)) { $historyRecord->setDbInstanceId($instance_id); } @@ -784,22 +784,22 @@ class Application_Service_HistoryService throw $e; } } - + //start,end timestamp strings in local timezone. public function populateShowInstances($start, $end) { $timezoneLocal = new DateTimeZone($this->timezone); - + $startDT = new DateTime($start, $timezoneLocal); $endDT = new DateTime($end, $timezoneLocal); - + $shows = $this->getShowList($startDT, $endDT); - + $select = array(); - + foreach ($shows as &$show) { $select[$show["instance_id"]] = $show["name"]; } - + return $select; } From 5a8957273fa2a1c2cbaa0d26ee82f9184a129873 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 29 Aug 2013 18:52:40 -0400 Subject: [PATCH 109/181] removing choice for show instance if in shows tab. --- .../scripts/form/edit-history-item.phtml | 14 +++++++------ .../js/airtime/playouthistory/historytable.js | 21 +++++++++++++++++-- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml index 219942121..7edbcc8da 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml @@ -31,12 +31,14 @@ -
    - -
    -
    - - +
    +
    + +
    +
    + + +
    getSubForm('his_item_template') as $index=>$el): ?> diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index c37b2e11b..3e7aae7cd 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -57,7 +57,8 @@ var AIRTIME = (function(AIRTIME) { oTableAgg, oTableItem, - oTableShow; + oTableShow, + inShowsTab = false; function getSelectedLogItems() { var items = Object.keys(selectedLogItems); @@ -424,6 +425,9 @@ var AIRTIME = (function(AIRTIME) { }, navigate: function() { delete fnServerData.instance; + }, + always: function() { + inShowsTab = false; } }, { @@ -433,14 +437,21 @@ var AIRTIME = (function(AIRTIME) { }, navigate: function() { delete fnServerData.instance; + }, + always: function() { + inShowsTab = false; } }, { initialized: false, initialize: function() { - showSummaryList(); + }, navigate: function() { + + }, + always: function() { + inShowsTab = true; showSummaryList(); } } @@ -478,6 +489,10 @@ var AIRTIME = (function(AIRTIME) { function makeHistoryDialog(html) { $hisDialogEl = $(html); + if (inShowsTab) { + $hisDialogEl.find("#his_choose_instance").remove(); + } + $hisDialogEl.dialog({ title: $.i18n._("Edit History Record"), modal: false, @@ -649,6 +664,8 @@ var AIRTIME = (function(AIRTIME) { else { tab.navigate(); } + + tab.always(); } }); From 15e27f8166e6b1332ca1852b91230f9384e3027a Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 00:43:43 -0400 Subject: [PATCH 110/181] history records for a show have times validated within show range. --- .../controllers/PlayouthistoryController.php | 1 - .../application/models/airtime/CcSubjs.php | 15 +++- .../application/services/HistoryService.php | 90 ++++++++++++------- .../application/services/UserService.php | 7 +- .../scripts/form/edit-history-item.phtml | 9 ++ .../js/airtime/playouthistory/historytable.js | 13 ++- 6 files changed, 89 insertions(+), 46 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index b6aadf568..d28c96412 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -202,7 +202,6 @@ class PlayouthistoryController extends Zend_Controller_Action public function editListItemAction() { $id = $this->_getParam('id', null); - Logging::info("Id is: $id"); $populate = isset($id) ? true : false; diff --git a/airtime_mvc/application/models/airtime/CcSubjs.php b/airtime_mvc/application/models/airtime/CcSubjs.php index 908adf554..78fd56d9e 100644 --- a/airtime_mvc/application/models/airtime/CcSubjs.php +++ b/airtime_mvc/application/models/airtime/CcSubjs.php @@ -1,11 +1,9 @@ filterByDbHost($this->getDbId()) ->count() > 0; } + + public function isHostOfShowInstance($instanceId) + { + $showInstance = CcShowInstancesQuery::create() + ->findPk($instanceId); + + return CcShowHostsQuery::create() + ->filterByDbShow($showInstance->getDbShowId()) + ->filterByDbHost($this->getDbId()) + ->count() > 0; + } } // CcSubjs diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 275c8d4fe..ed411efd0 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -803,31 +803,72 @@ class Application_Service_HistoryService return $select; } + private function validateHistoryItem($instanceId, $form) { + + /* + $userService = new Application_Service_UserService(); + $currentUser = $userService->getCurrentUser(); + + if (!$currentUser->isAdminOrPM()) { + if (empty($instance_id) ) { + + } + } + */ + + $valid = true; + + $recordStartsEl = $form->getElement("his_item_starts"); + $recordStarts = $recordStartsEl->getValue(); + $recordEndsEl = $form->getElement("his_item_starts"); + $recordEnds = $recordEndsEl->getValue(); + + $timezoneLocal = new DateTimeZone($this->timezone); + + $startDT = new DateTime($recordStarts, $timezoneLocal); + $endDT = new DateTime($recordEnds, $timezoneLocal); + + if ($recordStarts > $recordEnds) { + $valid = false; + $recordEndsEl->addErrorMessage("End time must be after start time"); + } + + if (isset($instanceId)) { + + $instance = CcShowInstancesQuery::create()->findPk($instanceId, $this->con); + $inStartsDT = $instance->getDbStarts(null); + $inEndsDT = $instance->getDbEnds(null); + + if ($startDT < $inStartsDT) { + $valid = false; + $form->addErrorMessage("History item begins before show."); + } + else if ($startDT > $inEndsDT) { + $valid = false; + $form->addErrorMessage("History item begins after show."); + } + } + + return $valid; + } + public function createPlayedItem($data) { try { $form = $this->makeHistoryItemForm(null); $history_id = $form->getElement("his_item_id"); - $instance_id = $data["instance_id"]; + $instanceId = $data["instance_id"]; $json = array(); - if ($form->isValid($data)) { + if ($form->isValid($data) && $this->validateHistoryItem($instanceId, $form)) { + $history_id->setIgnore(true); $values = $form->getValues(); - Logging::info("created list item"); - Logging::info($values); - - $this->populateTemplateItem($values, null, $instance_id); + $this->populateTemplateItem($values, null, $instanceId); } else { - Logging::info("created list item NOT VALID"); - - $msgs = $form->getMessages(); - Logging::info($msgs); - $json["form"] = $form; - $json["error"] = $msgs; } return $json; @@ -842,31 +883,21 @@ class Application_Service_HistoryService try { $id = $data["his_item_id"]; - $instance_id = $data["instance_id"]; + $instanceId = $data["instance_id"]; $form = $this->makeHistoryItemForm($id); $history_id = $form->getElement("his_item_id"); $history_id->setRequired(true); - Logging::info($data); $json = array(); - if ($form->isValid($data)) { + if ($form->isValid($data) && $this->validateHistoryItem($instanceId, $form)) { + $history_id->setIgnore(true); $values = $form->getValues(); - - Logging::info("edited list item"); - Logging::info($values); - - $this->populateTemplateItem($values, $id, $instance_id); + $this->populateTemplateItem($values, $id, $instanceId); } else { - Logging::info("edited list item NOT VALID"); - - $msgs = $form->getMessages(); - Logging::info($msgs); - $json["form"] = $form; - $json["error"] = $msgs; } return $json; @@ -885,22 +916,15 @@ class Application_Service_HistoryService $history_id = $form->getElement("his_file_id"); $history_id->setRequired(true); - Logging::info($data); $json = array(); if ($form->isValid($data)) { $history_id->setIgnore(true); $values = $form->getValues(); - Logging::info("edited list item"); - Logging::info($values); - $this->populateTemplateFile($values, $id); } else { - $msgs = $form->getMessages(); - Logging::info($msgs); - $json["error"] = $msgs; } diff --git a/airtime_mvc/application/services/UserService.php b/airtime_mvc/application/services/UserService.php index 879ba4d48..40e077a39 100644 --- a/airtime_mvc/application/services/UserService.php +++ b/airtime_mvc/application/services/UserService.php @@ -1,10 +1,5 @@ + getErrorMessages() ?> + 0) : ?> +
      + +
    • + +
    + +
    getElement($name); ?> diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 3e7aae7cd..9be44d77f 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -486,13 +486,19 @@ var AIRTIME = (function(AIRTIME) { }); } - function makeHistoryDialog(html) { - $hisDialogEl = $(html); + function processDialogHtml($el) { if (inShowsTab) { - $hisDialogEl.find("#his_choose_instance").remove(); + $el.find("#his_choose_instance").remove(); } + return $el + } + + function makeHistoryDialog(html) { + $hisDialogEl = $(html); + $hisDialogEl = processDialogHtml($hisDialogEl); + $hisDialogEl.dialog({ title: $.i18n._("Edit History Record"), modal: false, @@ -604,6 +610,7 @@ var AIRTIME = (function(AIRTIME) { if (json.form !== undefined) { var $newForm = $(json.form); + $newForm = processDialogHtml($newForm); $hisDialogEl.html($newForm.html()); initializeDialog(); } From 2c88d1e0a0b8d52d581efe03ebc7dabb864c285e Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:06:59 -0400 Subject: [PATCH 111/181] formating the date start/end of each show in the accordian. --- airtime_mvc/public/css/playouthistory.css | 26 +++++++++++++++++++ .../js/airtime/playouthistory/historytable.js | 21 +++++++++------ 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/public/css/playouthistory.css b/airtime_mvc/public/css/playouthistory.css index 8082d97ba..792e9143a 100644 --- a/airtime_mvc/public/css/playouthistory.css +++ b/airtime_mvc/public/css/playouthistory.css @@ -41,3 +41,29 @@ table.dataTable tbody tr { .his-selected.odd { background-color: rgba(255, 136, 56, 1); } + +.show-title, .show-time { + display:inline-block; + font-size:13px; +} +.show-title { + font-weight: bold; + margin: 0 8px; +} + +.show-date { + font-size:12px; + color: #363636; + margin: 0 5px; +} + +.show-time { + font-size:12px; + color: #363636; + margin: 0 5px; +} + +.push-right { + float:right; + margin-right:5px; +} diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 9be44d77f..9e071f9a8 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -180,15 +180,17 @@ var AIRTIME = (function(AIRTIME) { template = "

    " + "" + - "<%= name %>" + - "<%= starts %>" + - "<%= ends %>" + + "<%= name %>" + + "" + + "<%= date %>" + + "<%= startTime %>" + + "-" + + "<%= endTime %>" + + "" + "" + "

    " + "
    "; template = _.template(template); @@ -220,7 +222,8 @@ var AIRTIME = (function(AIRTIME) { i, len, $accordSection, - show; + show, + tmp; $showList .accordion( "destroy" ) @@ -228,12 +231,14 @@ var AIRTIME = (function(AIRTIME) { for (i = 0, len = oShows.length; i < len; i++) { show = oShows[i]; + tmp = show.starts.split(" "); $accordSection = createShowAccordSection({ instance: show.instance_id, name: show.name, - starts: show.starts, - ends: show.ends + date: tmp[0], + startTime: tmp[1], + endTime: show.ends.split(" ").pop() }); $showList.append($accordSection); From 7b54d3b6ce44b9f1d2e5b6384e3ce26e26c4e6de Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:08:49 -0400 Subject: [PATCH 112/181] fixing colour to go back to default theme --- airtime_mvc/public/css/playouthistory.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/airtime_mvc/public/css/playouthistory.css b/airtime_mvc/public/css/playouthistory.css index 792e9143a..1f80dc252 100644 --- a/airtime_mvc/public/css/playouthistory.css +++ b/airtime_mvc/public/css/playouthistory.css @@ -53,13 +53,11 @@ table.dataTable tbody tr { .show-date { font-size:12px; - color: #363636; margin: 0 5px; } .show-time { font-size:12px; - color: #363636; margin: 0 5px; } From 53c326b320524618714e1842f2782dc5463268a4 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:23:35 -0400 Subject: [PATCH 113/181] pagination buttons look better if they can fit on the same line. --- airtime_mvc/public/css/styles.css | 1 - 1 file changed, 1 deletion(-) diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 318030923..2d9ac34b7 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -808,7 +808,6 @@ dl.inline-list dd { .dataTables_paginate { float: right; padding: 8px 0 8px 8px; - clear: left; } .dataTables_paginate .ui-button { font-size:12px; From 0e017374b7216cf31ac2baea8f8cd45af3bc2209 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:30:23 -0400 Subject: [PATCH 114/181] change default text to "No Show" --- .../application/views/scripts/form/edit-history-item.phtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml index 76b376ae9..c6cd18466 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml @@ -45,7 +45,9 @@
    - +
    From 8971e6330a4809563dbb1618f4c811a224298319 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:39:51 -0400 Subject: [PATCH 115/181] removing animation for smoother effect. --- airtime_mvc/public/js/airtime/playouthistory/historytable.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 9e071f9a8..bf27b2e15 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -245,16 +245,18 @@ var AIRTIME = (function(AIRTIME) { } $showList.accordion({ + animated: false, create: function( event, ui ) { var $div = $showList.find(".ui-accordion-content-active"); createShowTable($div); }, change: function( event, ui ) { var $div = $(ui.newContent); + $(ui.oldContent).empty(); createShowTable($div); }, changestart: function( event, ui ) { - $(ui.oldContent).empty(); + } }); } From a4e9cd1add47e4ff584011caade50554cdd0fd2b Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:51:33 -0400 Subject: [PATCH 116/181] can research times in show summary now. --- .../public/js/airtime/playouthistory/historytable.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index bf27b2e15..1ce0e5fd6 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -653,7 +653,12 @@ var AIRTIME = (function(AIRTIME) { fn.start = oRange.start; fn.end = oRange.end; - redrawTables(); + if (inShowsTab) { + showSummaryList(); + } + else { + redrawTables(); + } }); $historyContentDiv.on("click", "#his_trash", function(ev){ From 846c90bc8f86d15e12e279a77235f343148caa9d Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 02:11:26 -0400 Subject: [PATCH 117/181] fixing select all/none button --- .../js/airtime/playouthistory/historytable.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 1ce0e5fd6..a118ba566 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -269,9 +269,9 @@ var AIRTIME = (function(AIRTIME) { $.i18n._("Select")+" " + "" + "" + ""); @@ -396,11 +396,7 @@ var AIRTIME = (function(AIRTIME) { $toolbar = $historyTableDiv.parents(".dataTables_wrapper").find(".fg-toolbar:first"); createToolbarButtons($toolbar); - - $("#his-select-page").click(selectCurrentPage); - $("#his-dselect-page").click(deselectCurrentPage); - $("#his-dselect-all").click(emptySelectedLogItems); - + return oTable; } @@ -661,6 +657,10 @@ var AIRTIME = (function(AIRTIME) { } }); + $historyContentDiv.on("click", ".his-select-page", selectCurrentPage); + $historyContentDiv.on("click", ".his-dselect-page", deselectCurrentPage); + $historyContentDiv.on("click", ".his-dselect-all", emptySelectedLogItems); + $historyContentDiv.on("click", "#his_trash", function(ev){ var items = getSelectedLogItems(), url = baseUrl+"playouthistory/delete-list-items"; From ad531f9512f507ca8393ceebbcf0741a158df6ae Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 02:24:16 -0400 Subject: [PATCH 118/181] clearing internal selected items array. --- .../public/js/airtime/playouthistory/historytable.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index a118ba566..c1d5ac6f0 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -254,10 +254,9 @@ var AIRTIME = (function(AIRTIME) { var $div = $(ui.newContent); $(ui.oldContent).empty(); createShowTable($div); - }, - changestart: function( event, ui ) { - + selectedLogItems = {}; } + //changestart: function( event, ui ) {} }); } @@ -431,6 +430,7 @@ var AIRTIME = (function(AIRTIME) { }, always: function() { inShowsTab = false; + selectedLogItems = {}; } }, { @@ -443,6 +443,7 @@ var AIRTIME = (function(AIRTIME) { }, always: function() { inShowsTab = false; + selectedLogItems = {}; } }, { @@ -456,6 +457,7 @@ var AIRTIME = (function(AIRTIME) { always: function() { inShowsTab = true; showSummaryList(); + selectedLogItems = {}; } } ]; @@ -665,7 +667,8 @@ var AIRTIME = (function(AIRTIME) { var items = getSelectedLogItems(), url = baseUrl+"playouthistory/delete-list-items"; - $.post(url, {ids: items, format: "json"}, function(){ + $.post(url, {ids: items, format: "json"}, function() { + selectedLogItems = {}; redrawTables(); }); }); From de225c589f716ba34b386e9d681720879513cc12 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 02:31:23 -0400 Subject: [PATCH 119/181] restricting search properly for select all/none. --- .../js/airtime/playouthistory/historytable.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index c1d5ac6f0..8b43be9b0 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -91,8 +91,9 @@ var AIRTIME = (function(AIRTIME) { selectedLogItems = {}; } - function selectCurrentPage() { - var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + function selectCurrentPage(e) { + var $ctx = $(e.currentTarget).parents("div.dataTables_wrapper"), + $inputs = $ctx.find(".his_checkbox").find("input"), $tr, $input; @@ -104,8 +105,9 @@ var AIRTIME = (function(AIRTIME) { }); } - function deselectCurrentPage() { - var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + function deselectCurrentPage(e) { + var $ctx = $(e.currentTarget).parents("div.dataTables_wrapper"), + $inputs = $ctx.find(".his_checkbox").find("input"), $tr, $input; @@ -430,7 +432,7 @@ var AIRTIME = (function(AIRTIME) { }, always: function() { inShowsTab = false; - selectedLogItems = {}; + emptySelectedLogItems(); } }, { @@ -443,7 +445,7 @@ var AIRTIME = (function(AIRTIME) { }, always: function() { inShowsTab = false; - selectedLogItems = {}; + emptySelectedLogItems(); } }, { @@ -457,7 +459,7 @@ var AIRTIME = (function(AIRTIME) { always: function() { inShowsTab = true; showSummaryList(); - selectedLogItems = {}; + emptySelectedLogItems(); } } ]; From ab8cf60fe32a56d5d1d04dffbc7adfbec0d43274 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 02:39:14 -0400 Subject: [PATCH 120/181] refreshing view on navigation. --- .../public/js/airtime/playouthistory/historytable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 8b43be9b0..ea92dc4b2 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -429,6 +429,7 @@ var AIRTIME = (function(AIRTIME) { }, navigate: function() { delete fnServerData.instance; + oTableItem.fnDraw(); }, always: function() { inShowsTab = false; @@ -442,6 +443,7 @@ var AIRTIME = (function(AIRTIME) { }, navigate: function() { delete fnServerData.instance; + oTableAgg.fnDraw(); }, always: function() { inShowsTab = false; @@ -656,9 +658,7 @@ var AIRTIME = (function(AIRTIME) { if (inShowsTab) { showSummaryList(); } - else { - redrawTables(); - } + redrawTables(); }); $historyContentDiv.on("click", ".his-select-page", selectCurrentPage); From 0c379ef840b4b7bb1165a366e51951ad4e01c5ff Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 30 Aug 2013 15:03:43 -0400 Subject: [PATCH 121/181] a working show instance select. --- .../application/services/HistoryService.php | 4 +- .../js/airtime/playouthistory/historytable.js | 58 ++++++++++++++++++- .../public/js/airtime/utilities/utilities.js | 26 ++++++--- 3 files changed, 75 insertions(+), 13 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index ed411efd0..1001e01cf 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -857,7 +857,7 @@ class Application_Service_HistoryService try { $form = $this->makeHistoryItemForm(null); $history_id = $form->getElement("his_item_id"); - $instanceId = $data["instance_id"]; + $instanceId = isset($data["instance_id"]) ? $data["instance_id"] : null; $json = array(); if ($form->isValid($data) && $this->validateHistoryItem($instanceId, $form)) { @@ -883,7 +883,7 @@ class Application_Service_HistoryService try { $id = $data["his_item_id"]; - $instanceId = $data["instance_id"]; + $instanceId = isset($data["instance_id"]) ? $data["instance_id"] : null; $form = $this->makeHistoryItemForm($id); $history_id = $form->getElement("his_item_id"); $history_id->setRequired(true); diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index ea92dc4b2..744a8b450 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -604,7 +604,9 @@ var AIRTIME = (function(AIRTIME) { id = data[0].value, createUrl = baseUrl+"Playouthistory/create-list-item/format/json", updateUrl = baseUrl+"Playouthistory/update-list-item/format/json", - url; + url, + $select = $hisDialogEl.find("#his_instance_select"), + instance; url = (id === "") ? createUrl : updateUrl; @@ -614,6 +616,16 @@ var AIRTIME = (function(AIRTIME) { value: fnServerData.instance }); } + else if ($select.length > 0) { + instance = $select.val(); + + if (instance > 0) { + data.push({ + name: "instance_id", + value: instance + }); + } + } $.post(url, data, function(json) { @@ -645,6 +657,46 @@ var AIRTIME = (function(AIRTIME) { } }); + $('body').on("click", "#his_instance_retrieve", function(e) { + var startPicker = $hisDialogEl.find('#his_item_starts_datetimepicker').data('datetimepicker'), + endPicker = $hisDialogEl.find('#his_item_ends_datetimepicker').data('datetimepicker'), + url = baseUrl+"playouthistory/show-history-feed", + startDate = startPicker.getLocalDate(), + endDate = endPicker.getLocalDate(), + getEpochSeconds = AIRTIME.utilities.fnGetSecondsEpoch, + data; + + data = { + start: getEpochSeconds(startDate), + end: getEpochSeconds(endDate), + format: "json" + }; + + $.get(url, data, function(json) { + var i, + $select = $('
    ") - .append( - $("") - .append(renderSection('left')) - .append(renderSection('center')) - .append(renderSection('right')) - ); - return element; - } - } - - - function destroy() { - element.remove(); - } - - - function renderSection(position) { - var e = $("" + - ""; - for (i=0; i"; // need fc- for setDayID - } - s += - "" + - "" + - ""; - for (i=0; i"; - for (j=0; j" + // need fc- for setDayID - "
    " + - (showNumbers ? - "
    " : - '' - ) + - "
    " + - "
     
    " + - "
    " + - "
    " + - ""; - } - s += - ""; - } - s += - "
    " + - "
    "); - var buttonStr = options.header[position]; - if (buttonStr) { - $.each(buttonStr.split(' '), function(i) { - if (i > 0) { - e.append(""); - } - var prevButton; - $.each(this.split(','), function(j, buttonName) { - if (buttonName == 'title') { - e.append("

     

    "); - if (prevButton) { - prevButton.addClass(tm + '-corner-right'); - } - prevButton = null; - }else{ - var buttonClick; - if (calendar[buttonName]) { - buttonClick = calendar[buttonName]; // calendar method - } - else if (fcViews[buttonName]) { - buttonClick = function() { - button.removeClass(tm + '-state-hover'); // forget why - calendar.changeView(buttonName); - }; - } - if (buttonClick) { - var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null; // why are we using smartProperty here? - var text = smartProperty(options.buttonText, buttonName); // why are we using smartProperty here? - var button = $( - "" + - "" + - "" + - (icon ? - "" + - "" + - "" : - text - ) + - "" + - "" + - "" + - "" - ); - if (button) { - button - .click(function() { - if (!button.hasClass(tm + '-state-disabled')) { - buttonClick(); - } - }) - .mousedown(function() { - button - .not('.' + tm + '-state-active') - .not('.' + tm + '-state-disabled') - .addClass(tm + '-state-down'); - }) - .mouseup(function() { - button.removeClass(tm + '-state-down'); - }) - .hover( - function() { - button - .not('.' + tm + '-state-active') - .not('.' + tm + '-state-disabled') - .addClass(tm + '-state-hover'); - }, - function() { - button - .removeClass(tm + '-state-hover') - .removeClass(tm + '-state-down'); - } - ) - .appendTo(e); - if (!prevButton) { - button.addClass(tm + '-corner-left'); - } - prevButton = button; - } - } - } - }); - if (prevButton) { - prevButton.addClass(tm + '-corner-right'); - } - }); - } - return e; - } - - - function updateTitle(html) { - element.find('h2') - .html(html); - } - - - function activateButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .addClass(tm + '-state-active'); - } - - - function deactivateButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .removeClass(tm + '-state-active'); - } - - - function disableButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .addClass(tm + '-state-disabled'); - } - - - function enableButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .removeClass(tm + '-state-disabled'); - } - - -} - -fc.sourceNormalizers = []; -fc.sourceFetchers = []; - -var ajaxDefaults = { - dataType: 'json', - cache: false -}; - -var eventGUID = 1; - - -function EventManager(options, _sources) { - var t = this; - - - // exports - t.isFetchNeeded = isFetchNeeded; - t.fetchEvents = fetchEvents; - t.addEventSource = addEventSource; - t.removeEventSource = removeEventSource; - t.updateEvent = updateEvent; - t.renderEvent = renderEvent; - t.removeEvents = removeEvents; - t.clientEvents = clientEvents; - t.normalizeEvent = normalizeEvent; - - - // imports - var trigger = t.trigger; - var getView = t.getView; - var reportEvents = t.reportEvents; - - - // locals - var stickySource = { events: [] }; - var sources = [ stickySource ]; - var rangeStart, rangeEnd; - var currentFetchID = 0; - var pendingSourceCnt = 0; - var loadingLevel = 0; - var cache = []; - - - for (var i=0; i<_sources.length; i++) { - _addEventSource(_sources[i]); - } - - - - /* Fetching - -----------------------------------------------------------------------------*/ - - - function isFetchNeeded(start, end) { - return !rangeStart || start < rangeStart || end > rangeEnd; - } - - - function fetchEvents(start, end) { - rangeStart = start; - rangeEnd = end; - cache = []; - var fetchID = ++currentFetchID; - var len = sources.length; - pendingSourceCnt = len; - for (var i=0; i)), return null instead - return null; -} - - -function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false - // derived from http://delete.me.uk/2005/03/iso8601.html - // TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html - var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/); - if (!m) { - return null; - } - var date = new Date(m[1], 0, 1); - if (ignoreTimezone || !m[13]) { - var check = new Date(m[1], 0, 1, 9, 0); - if (m[3]) { - date.setMonth(m[3] - 1); - check.setMonth(m[3] - 1); - } - if (m[5]) { - date.setDate(m[5]); - check.setDate(m[5]); - } - fixDate(date, check); - if (m[7]) { - date.setHours(m[7]); - } - if (m[8]) { - date.setMinutes(m[8]); - } - if (m[10]) { - date.setSeconds(m[10]); - } - if (m[12]) { - date.setMilliseconds(Number("0." + m[12]) * 1000); - } - fixDate(date, check); - }else{ - date.setUTCFullYear( - m[1], - m[3] ? m[3] - 1 : 0, - m[5] || 1 - ); - date.setUTCHours( - m[7] || 0, - m[8] || 0, - m[10] || 0, - m[12] ? Number("0." + m[12]) * 1000 : 0 - ); - if (m[14]) { - var offset = Number(m[16]) * 60 + (m[18] ? Number(m[18]) : 0); - offset *= m[15] == '-' ? 1 : -1; - date = new Date(+date + (offset * 60 * 1000)); - } - } - return date; -} - - -function parseTime(s) { // returns minutes since start of day - if (typeof s == 'number') { // an hour - return s * 60; - } - if (typeof s == 'object') { // a Date object - return s.getHours() * 60 + s.getMinutes(); - } - var m = s.match(/(\d+)(?::(\d+))?\s*(\w+)?/); - if (m) { - var h = parseInt(m[1], 10); - if (m[3]) { - h %= 12; - if (m[3].toLowerCase().charAt(0) == 'p') { - h += 12; - } - } - return h * 60 + (m[2] ? parseInt(m[2], 10) : 0); - } -} - - - -/* Date Formatting ------------------------------------------------------------------------------*/ -// TODO: use same function formatDate(date, [date2], format, [options]) - - -function formatDate(date, format, options) { - return formatDates(date, null, format, options); -} - - -function formatDates(date1, date2, format, options) { - options = options || defaults; - var date = date1, - otherDate = date2, - i, len = format.length, c, - i2, formatter, - res = ''; - for (i=0; ii; i2--) { - if (formatter = dateFormatters[format.substring(i, i2)]) { - if (date) { - res += formatter(date, options); - } - i = i2 - 1; - break; - } - } - if (i2 == i) { - if (date) { - res += c; - } - } - } - } - return res; -}; - - -var dateFormatters = { - s : function(d) { return d.getSeconds() }, - ss : function(d) { return zeroPad(d.getSeconds()) }, - m : function(d) { return d.getMinutes() }, - mm : function(d) { return zeroPad(d.getMinutes()) }, - h : function(d) { return d.getHours() % 12 || 12 }, - hh : function(d) { return zeroPad(d.getHours() % 12 || 12) }, - H : function(d) { return d.getHours() }, - HH : function(d) { return zeroPad(d.getHours()) }, - d : function(d) { return d.getDate() }, - dd : function(d) { return zeroPad(d.getDate()) }, - ddd : function(d,o) { return o.dayNamesShort[d.getDay()] }, - dddd: function(d,o) { return o.dayNames[d.getDay()] }, - M : function(d) { return d.getMonth() + 1 }, - MM : function(d) { return zeroPad(d.getMonth() + 1) }, - MMM : function(d,o) { return o.monthNamesShort[d.getMonth()] }, - MMMM: function(d,o) { return o.monthNames[d.getMonth()] }, - yy : function(d) { return (d.getFullYear()+'').substring(2) }, - yyyy: function(d) { return d.getFullYear() }, - t : function(d) { return d.getHours() < 12 ? 'a' : 'p' }, - tt : function(d) { return d.getHours() < 12 ? 'am' : 'pm' }, - T : function(d) { return d.getHours() < 12 ? 'A' : 'P' }, - TT : function(d) { return d.getHours() < 12 ? 'AM' : 'PM' }, - u : function(d) { return formatDate(d, "yyyy-MM-dd'T'HH:mm:ss'Z'") }, - S : function(d) { - var date = d.getDate(); - if (date > 10 && date < 20) { - return 'th'; - } - return ['st', 'nd', 'rd'][date%10-1] || 'th'; - } -}; - - - -fc.applyAll = applyAll; - - -/* Event Date Math ------------------------------------------------------------------------------*/ - - -function exclEndDay(event) { - if (event.end) { - return _exclEndDay(event.end, event.allDay); - }else{ - return addDays(cloneDate(event.start), 1); - } -} - - -function _exclEndDay(end, allDay) { - end = cloneDate(end); - return allDay || end.getHours() || end.getMinutes() ? addDays(end, 1) : clearTime(end); -} - - -function segCmp(a, b) { - return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start); -} - - -function segsCollide(seg1, seg2) { - return seg1.end > seg2.start && seg1.start < seg2.end; -} - - - -/* Event Sorting ------------------------------------------------------------------------------*/ - - -// event rendering utilities -function sliceSegs(events, visEventEnds, start, end) { - var segs = [], - i, len=events.length, event, - eventStart, eventEnd, - segStart, segEnd, - isStart, isEnd; - for (i=0; i start && eventStart < end) { - if (eventStart < start) { - segStart = cloneDate(start); - isStart = false; - }else{ - segStart = eventStart; - isStart = true; - } - if (eventEnd > end) { - segEnd = cloneDate(end); - isEnd = false; - }else{ - segEnd = eventEnd; - isEnd = true; - } - segs.push({ - event: event, - start: segStart, - end: segEnd, - isStart: isStart, - isEnd: isEnd, - msLength: segEnd - segStart - }); - } - } - return segs.sort(segCmp); -} - - -// event rendering calculation utilities -function stackSegs(segs) { - var levels = [], - i, len = segs.length, seg, - j, collide, k; - for (i=0; i=0; i--) { - res = obj[parts[i].toLowerCase()]; - if (res !== undefined) { - return res; - } - } - return obj['']; -} - - -function htmlEscape(s) { - return s.replace(/&/g, '&') - .replace(//g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"') - .replace(/\n/g, '
    '); -} - - -function cssKey(_element) { - return _element.id + '/' + _element.className + '/' + _element.style.cssText.replace(/(^|;)\s*(top|left|width|height)\s*:[^;]*/ig, ''); -} - - -function disableTextSelection(element) { - element - .attr('unselectable', 'on') - .css('MozUserSelect', 'none') - .bind('selectstart.ui', function() { return false; }); -} - - -/* -function enableTextSelection(element) { - element - .attr('unselectable', 'off') - .css('MozUserSelect', '') - .unbind('selectstart.ui'); -} -*/ - - -function markFirstLast(e) { - e.children() - .removeClass('fc-first fc-last') - .filter(':first-child') - .addClass('fc-first') - .end() - .filter(':last-child') - .addClass('fc-last'); -} - - -function setDayID(cell, date) { - cell.each(function(i, _cell) { - _cell.className = _cell.className.replace(/^fc-\w*/, 'fc-' + dayIDs[date.getDay()]); - // TODO: make a way that doesn't rely on order of classes - }); -} - - -function getSkinCss(event, opt) { - var source = event.source || {}; - var eventColor = event.color; - var sourceColor = source.color; - var optionColor = opt('eventColor'); - var backgroundColor = - event.backgroundColor || - eventColor || - source.backgroundColor || - sourceColor || - opt('eventBackgroundColor') || - optionColor; - var borderColor = - event.borderColor || - eventColor || - source.borderColor || - sourceColor || - opt('eventBorderColor') || - optionColor; - var textColor = - event.textColor || - source.textColor || - opt('eventTextColor'); - var statements = []; - if (backgroundColor) { - statements.push('background-color:' + backgroundColor); - } - if (borderColor) { - statements.push('border-color:' + borderColor); - } - if (textColor) { - statements.push('color:' + textColor); - } - return statements.join(';'); -} - - -function applyAll(functions, thisObj, args) { - if ($.isFunction(functions)) { - functions = [ functions ]; - } - if (functions) { - var i; - var ret; - for (i=0; i" + - "
    "; - table = $(s).appendTo(element); - - head = table.find('thead'); - headCells = head.find('th'); - body = table.find('tbody'); - bodyRows = body.find('tr'); - bodyCells = body.find('td'); - bodyFirstCells = bodyCells.filter(':first-child'); - bodyCellTopInners = bodyRows.eq(0).find('div.fc-day-content div'); - - markFirstLast(head.add(head.find('tr'))); // marks first+last tr/th's - markFirstLast(bodyRows); // marks first+last td's - bodyRows.eq(0).addClass('fc-first'); // fc-last is done in updateCells - - dayBind(bodyCells); - - daySegmentContainer = - $("
    ") - .appendTo(element); - } - - - - function updateCells(firstTime) { - var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating? - var month = t.start.getMonth(); - var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset"))); - var cell; - var date; - var row; - - if (dowDirty) { - headCells.each(function(i, _cell) { - cell = $(_cell); - date = indexDate(i); - cell.html(formatDate(date, colFormat)); - setDayID(cell, date); - }); - } - - bodyCells.each(function(i, _cell) { - cell = $(_cell); - date = indexDate(i); - if (date.getMonth() == month) { - cell.removeClass('fc-other-month'); - }else{ - cell.addClass('fc-other-month'); - } - if (+date == +today) { - cell.addClass(tm + '-state-highlight fc-today'); - }else{ - cell.removeClass(tm + '-state-highlight fc-today'); - } - cell.find('div.fc-day-number').text(date.getDate()); - if (dowDirty) { - setDayID(cell, date); - } - }); - - bodyRows.each(function(i, _row) { - row = $(_row); - if (i < rowCnt) { - row.show(); - if (i == rowCnt-1) { - row.addClass('fc-last'); - }else{ - row.removeClass('fc-last'); - } - }else{ - row.hide(); - } - }); - } - - - - function setHeight(height) { - viewHeight = height; - - var bodyHeight = viewHeight - head.height(); - var rowHeight; - var rowHeightLast; - var cell; - - if (opt('weekMode') == 'variable') { - rowHeight = rowHeightLast = Math.floor(bodyHeight / (rowCnt==1 ? 2 : 6)); - }else{ - rowHeight = Math.floor(bodyHeight / rowCnt); - rowHeightLast = bodyHeight - rowHeight * (rowCnt-1); - } - - bodyFirstCells.each(function(i, _cell) { - if (i < rowCnt) { - cell = $(_cell); - setMinHeight( - cell.find('> div'), - (i==rowCnt-1 ? rowHeightLast : rowHeight) - vsides(cell) - ); - } - }); - - } - - - function setWidth(width) { - viewWidth = width; - colContentPositions.clear(); - colWidth = Math.floor(viewWidth / colCnt); - setOuterWidth(headCells.slice(0, -1), colWidth); - } - - - - /* Day clicking and binding - -----------------------------------------------------------*/ - - - function dayBind(days) { - days.click(dayClick) - .mousedown(daySelectionMousedown); - } - - - function dayClick(ev) { - if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick - var index = parseInt(this.className.match(/fc\-day(\d+)/)[1]); // TODO: maybe use .data - var date = indexDate(index); - trigger('dayClick', this, date, true, ev); - } - } - - - - /* Semi-transparent Overlay Helpers - ------------------------------------------------------*/ - - - function renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive - if (refreshCoordinateGrid) { - coordinateGrid.build(); - } - var rowStart = cloneDate(t.visStart); - var rowEnd = addDays(cloneDate(rowStart), colCnt); - for (var i=0; i" + - "" + - "" + - " "; - for (i=0; i"; // fc- needed for setDayID - } - s += - " " + - "" + - "" + - "" + - "" + - " "; - for (i=0; i" + // fc- needed for setDayID - "
    " + - "
    " + - "
     
    " + - "
    " + - "
    " + - ""; - } - s += - " " + - "" + - "" + - ""; - dayTable = $(s).appendTo(element); - dayHead = dayTable.find('thead'); - dayHeadCells = dayHead.find('th').slice(1, -1); - dayBody = dayTable.find('tbody'); - dayBodyCells = dayBody.find('td').slice(0, -1); - dayBodyCellInners = dayBodyCells.find('div.fc-day-content div'); - dayBodyFirstCell = dayBodyCells.eq(0); - dayBodyFirstCellStretcher = dayBodyFirstCell.find('> div'); - - markFirstLast(dayHead.add(dayHead.find('tr'))); - markFirstLast(dayBody.add(dayBody.find('tr'))); - - axisFirstCells = dayHead.find('th:first'); - gutterCells = dayTable.find('.fc-agenda-gutter'); - - slotLayer = - $("
    ") - .appendTo(element); - - if (opt('allDaySlot')) { - - daySegmentContainer = - $("
    ") - .appendTo(slotLayer); - - s = - "" + - "" + - "" + - "" + - "" + - "" + - "
    " + opt('allDayText') + "" + - "
    " + - "
     
    "; - allDayTable = $(s).appendTo(slotLayer); - allDayRow = allDayTable.find('tr'); - - dayBind(allDayRow.find('td')); - - axisFirstCells = axisFirstCells.add(allDayTable.find('th:first')); - gutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter')); - - slotLayer.append( - "
    " + - "
    " + - "
    " - ); - - }else{ - - daySegmentContainer = $([]); // in jQuery 1.4, we can just do $() - - } - - slotScroller = - $("
    ") - .appendTo(slotLayer); - - slotContent = - $("
    ") - .appendTo(slotScroller); - - slotSegmentContainer = - $("
    ") - .appendTo(slotContent); - - s = - "" + - ""; - d = zeroDate(); - maxd = addMinutes(cloneDate(d), maxMinute); - addMinutes(d, minMinute); - slotCnt = 0; - for (i=0; d < maxd; i++) { - minutes = d.getMinutes(); - s += - "" + - "" + - "" + - ""; - addMinutes(d, opt('slotMinutes')); - slotCnt++; - } - s += - "" + - "
    " + - ((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') + - "" + - "
     
    " + - "
    "; - slotTable = $(s).appendTo(slotContent); - slotTableFirstInner = slotTable.find('div:first'); - - slotBind(slotTable.find('td')); - - axisFirstCells = axisFirstCells.add(slotTable.find('th:first')); - } - - - - function updateCells() { - var i; - var headCell; - var bodyCell; - var date; - var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset"))); - for (i=0; i= 0) { - addMinutes(d, minMinute + slotIndex * opt('slotMinutes')); - } - return d; - } - - - function colDate(col) { // returns dates with 00:00:00 - return addDays(cloneDate(t.visStart), col*dis+dit); - } - - - function cellIsAllDay(cell) { - return opt('allDaySlot') && !cell.row; - } - - - function dayOfWeekCol(dayOfWeek) { - return ((dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt)*dis+dit; - } - - - - - // get the Y coordinate of the given time on the given day (both Date objects) - function timePosition(day, time) { // both date objects. day holds 00:00 of current day - day = cloneDate(day, true); - if (time < addMinutes(cloneDate(day), minMinute)) { - return 0; - } - if (time >= addMinutes(cloneDate(day), maxMinute)) { - return slotTable.height(); - } - var slotMinutes = opt('slotMinutes'), - minutes = time.getHours()*60 + time.getMinutes() - minMinute, - slotI = Math.floor(minutes / slotMinutes), - slotTop = slotTopCache[slotI]; - if (slotTop === undefined) { - slotTop = slotTopCache[slotI] = slotTable.find('tr:eq(' + slotI + ') td div')[0].offsetTop; //.position().top; // need this optimization??? - } - return Math.max(0, Math.round( - slotTop - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes) - )); - } - - - function allDayBounds() { - return { - left: axisWidth, - right: viewWidth - gutterWidth - } - } - - - function getAllDayRow(index) { - return allDayRow; - } - - - function defaultEventEnd(event) { - var start = cloneDate(event.start); - if (event.allDay) { - return start; - } - return addMinutes(start, opt('defaultEventMinutes')); - } - - - - /* Selection - ---------------------------------------------------------------------------------*/ - - - function defaultSelectionEnd(startDate, allDay) { - if (allDay) { - return cloneDate(startDate); - } - return addMinutes(cloneDate(startDate), opt('slotMinutes')); - } - - - function renderSelection(startDate, endDate, allDay) { // only for all-day - if (allDay) { - if (opt('allDaySlot')) { - renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true); - } - }else{ - renderSlotSelection(startDate, endDate); - } - } - - - function renderSlotSelection(startDate, endDate) { - var helperOption = opt('selectHelper'); - coordinateGrid.build(); - if (helperOption) { - var col = dayDiff(startDate, t.visStart) * dis + dit; - if (col >= 0 && col < colCnt) { // only works when times are on same day - var rect = coordinateGrid.rect(0, col, 0, col, slotContent); // only for horizontal coords - var top = timePosition(startDate, startDate); - var bottom = timePosition(startDate, endDate); - if (bottom > top) { // protect against selections that are entirely before or after visible range - rect.top = top; - rect.height = bottom - top; - rect.left += 2; - rect.width -= 5; - if ($.isFunction(helperOption)) { - var helperRes = helperOption(startDate, endDate); - if (helperRes) { - rect.position = 'absolute'; - rect.zIndex = 8; - selectionHelper = $(helperRes) - .css(rect) - .appendTo(slotContent); - } - }else{ - rect.isStart = true; // conside rect a "seg" now - rect.isEnd = true; // - selectionHelper = $(slotSegHtml( - { - title: '', - start: startDate, - end: endDate, - className: ['fc-select-helper'], - editable: false - }, - rect - )); - selectionHelper.css('opacity', opt('dragOpacity')); - } - if (selectionHelper) { - slotBind(selectionHelper); - slotContent.append(selectionHelper); - setOuterWidth(selectionHelper, rect.width, true); // needs to be after appended - setOuterHeight(selectionHelper, rect.height, true); - } - } - } - }else{ - renderSlotOverlay(startDate, endDate); - } - } - - - function clearSelection() { - clearOverlays(); - if (selectionHelper) { - selectionHelper.remove(); - selectionHelper = null; - } - } - - - function slotSelectionMousedown(ev) { - if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button - unselect(ev); - var dates; - hoverListener.start(function(cell, origCell) { - clearSelection(); - if (cell && cell.col == origCell.col && !cellIsAllDay(cell)) { - var d1 = cellDate(origCell); - var d2 = cellDate(cell); - dates = [ - d1, - addMinutes(cloneDate(d1), opt('slotMinutes')), - d2, - addMinutes(cloneDate(d2), opt('slotMinutes')) - ].sort(cmp); - renderSlotSelection(dates[0], dates[3]); - }else{ - dates = null; - } - }, ev); - $(document).one('mouseup', function(ev) { - hoverListener.stop(); - if (dates) { - if (+dates[0] == +dates[1]) { - reportDayClick(dates[0], false, ev); - } - reportSelection(dates[0], dates[3], false, ev); - } - }); - } - } - - - function reportDayClick(date, allDay, ev) { - trigger('dayClick', dayBodyCells[dayOfWeekCol(date.getDay())], date, allDay, ev); - } - - - - /* External Dragging - --------------------------------------------------------------------------------*/ - - - function dragStart(_dragElement, ev, ui) { - hoverListener.start(function(cell) { - clearOverlays(); - if (cell) { - if (cellIsAllDay(cell)) { - renderCellOverlay(cell.row, cell.col, cell.row, cell.col); - }else{ - var d1 = cellDate(cell); - var d2 = addMinutes(cloneDate(d1), opt('defaultEventMinutes')); - renderSlotOverlay(d1, d2); - } - } - }, ev); - } - - - function dragStop(_dragElement, ev, ui) { - var cell = hoverListener.stop(); - clearOverlays(); - if (cell) { - trigger('drop', _dragElement, cellDate(cell), cellIsAllDay(cell), ev, ui); - } - } - - -} - -function AgendaEventRenderer() { - var t = this; - - - // exports - t.renderEvents = renderEvents; - t.compileDaySegs = compileDaySegs; // for DayEventRenderer - t.clearEvents = clearEvents; - t.slotSegHtml = slotSegHtml; - t.bindDaySeg = bindDaySeg; - - - // imports - DayEventRenderer.call(t); - var opt = t.opt; - var trigger = t.trigger; - //var setOverflowHidden = t.setOverflowHidden; - var isEventDraggable = t.isEventDraggable; - var isEventResizable = t.isEventResizable; - var eventEnd = t.eventEnd; - var reportEvents = t.reportEvents; - var reportEventClear = t.reportEventClear; - var eventElementHandlers = t.eventElementHandlers; - var setHeight = t.setHeight; - var getDaySegmentContainer = t.getDaySegmentContainer; - var getSlotSegmentContainer = t.getSlotSegmentContainer; - var getHoverListener = t.getHoverListener; - var getMaxMinute = t.getMaxMinute; - var getMinMinute = t.getMinMinute; - var timePosition = t.timePosition; - var colContentLeft = t.colContentLeft; - var colContentRight = t.colContentRight; - var renderDaySegs = t.renderDaySegs; - var resizableDayEvent = t.resizableDayEvent; // TODO: streamline binding architecture - var getColCnt = t.getColCnt; - var getColWidth = t.getColWidth; - var getSlotHeight = t.getSlotHeight; - var getBodyContent = t.getBodyContent; - var reportEventElement = t.reportEventElement; - var showEvents = t.showEvents; - var hideEvents = t.hideEvents; - var eventDrop = t.eventDrop; - var eventResize = t.eventResize; - var renderDayOverlay = t.renderDayOverlay; - var clearOverlays = t.clearOverlays; - var calendar = t.calendar; - var formatDate = calendar.formatDate; - var formatDates = calendar.formatDates; - - - - /* Rendering - ----------------------------------------------------------------------------*/ - - - function renderEvents(events, modifiedEventId) { - reportEvents(events); - var i, len=events.length, - dayEvents=[], - slotEvents=[]; - for (i=0; i" + - "
    " + - "
    " + - "
    " + - htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + - "
    " + - "
    " + - "
    " + - "
    " + - htmlEscape(event.title) + - "
    " + - "
    " + - "
    " + - "
    "; // close inner - if (seg.isEnd && isEventResizable(event)) { - html += - "
    =
    "; - } - html += - ""; - return html; - } - - - function bindDaySeg(event, eventElement, seg) { - if (isEventDraggable(event)) { - draggableDayEvent(event, eventElement, seg.isStart); - } - if (seg.isEnd && isEventResizable(event)) { - resizableDayEvent(event, eventElement, seg); - } - eventElementHandlers(event, eventElement); - // needs to be after, because resizableDayEvent might stopImmediatePropagation on click - } - - - function bindSlotSeg(event, eventElement, seg) { - var timeElement = eventElement.find('div.fc-event-time'); - if (isEventDraggable(event)) { - draggableSlotEvent(event, eventElement, timeElement); - } - if (seg.isEnd && isEventResizable(event)) { - resizableSlotEvent(event, eventElement, timeElement); - } - eventElementHandlers(event, eventElement); - } - - - - /* Dragging - -----------------------------------------------------------------------------------*/ - - - // when event starts out FULL-DAY - - function draggableDayEvent(event, eventElement, isStart) { - var origWidth; - var revert; - var allDay=true; - var dayDelta; - var dis = opt('isRTL') ? -1 : 1; - var hoverListener = getHoverListener(); - var colWidth = getColWidth(); - var slotHeight = getSlotHeight(); - var minMinute = getMinMinute(); - eventElement.draggable({ - zIndex: 9, - opacity: opt('dragOpacity', 'month'), // use whatever the month view was using - revertDuration: opt('dragRevertDuration'), - start: function(ev, ui) { - trigger('eventDragStart', eventElement, event, ev, ui); - hideEvents(event, eventElement); - origWidth = eventElement.width(); - hoverListener.start(function(cell, origCell, rowDelta, colDelta) { - clearOverlays(); - if (cell) { - //setOverflowHidden(true); - revert = false; - dayDelta = colDelta * dis; - if (!cell.row) { - // on full-days - renderDayOverlay( - addDays(cloneDate(event.start), dayDelta), - addDays(exclEndDay(event), dayDelta) - ); - resetElement(); - }else{ - // mouse is over bottom slots - if (isStart) { - if (allDay) { - // convert event to temporary slot-event - eventElement.width(colWidth - 10); // don't use entire width - setOuterHeight( - eventElement, - slotHeight * Math.round( - (event.end ? ((event.end - event.start) / MINUTE_MS) : opt('defaultEventMinutes')) - / opt('slotMinutes') - ) - ); - eventElement.draggable('option', 'grid', [colWidth, 1]); - allDay = false; - } - }else{ - revert = true; - } - } - revert = revert || (allDay && !dayDelta); - }else{ - resetElement(); - //setOverflowHidden(false); - revert = true; - } - eventElement.draggable('option', 'revert', revert); - }, ev, 'drag'); - }, - stop: function(ev, ui) { - hoverListener.stop(); - clearOverlays(); - trigger('eventDragStop', eventElement, event, ev, ui); - if (revert) { - // hasn't moved or is out of bounds (draggable has already reverted) - resetElement(); - eventElement.css('filter', ''); // clear IE opacity side-effects - showEvents(event, eventElement); - }else{ - // changed! - var minuteDelta = 0; - if (!allDay) { - minuteDelta = Math.round((eventElement.offset().top - getBodyContent().offset().top) / slotHeight) - * opt('slotMinutes') - + minMinute - - (event.start.getHours() * 60 + event.start.getMinutes()); - } - eventDrop(this, event, dayDelta, minuteDelta, allDay, ev, ui); - } - //setOverflowHidden(false); - } - }); - function resetElement() { - if (!allDay) { - eventElement - .width(origWidth) - .height('') - .draggable('option', 'grid', null); - allDay = true; - } - } - } - - - // when event starts out IN TIMESLOTS - - function draggableSlotEvent(event, eventElement, timeElement) { - var origPosition; - var allDay=false; - var dayDelta; - var minuteDelta; - var prevMinuteDelta; - var dis = opt('isRTL') ? -1 : 1; - var hoverListener = getHoverListener(); - var colCnt = getColCnt(); - var colWidth = getColWidth(); - var slotHeight = getSlotHeight(); - eventElement.draggable({ - zIndex: 9, - scroll: false, - grid: [colWidth, slotHeight], - axis: colCnt==1 ? 'y' : false, - opacity: opt('dragOpacity'), - revertDuration: opt('dragRevertDuration'), - start: function(ev, ui) { - trigger('eventDragStart', eventElement, event, ev, ui); - hideEvents(event, eventElement); - origPosition = eventElement.position(); - minuteDelta = prevMinuteDelta = 0; - hoverListener.start(function(cell, origCell, rowDelta, colDelta) { - eventElement.draggable('option', 'revert', !cell); - clearOverlays(); - if (cell) { - dayDelta = colDelta * dis; - if (opt('allDaySlot') && !cell.row) { - // over full days - if (!allDay) { - // convert to temporary all-day event - allDay = true; - timeElement.hide(); - eventElement.draggable('option', 'grid', null); - } - renderDayOverlay( - addDays(cloneDate(event.start), dayDelta), - addDays(exclEndDay(event), dayDelta) - ); - }else{ - // on slots - resetElement(); - } - } - }, ev, 'drag'); - }, - drag: function(ev, ui) { - minuteDelta = Math.round((ui.position.top - origPosition.top) / slotHeight) * opt('slotMinutes'); - if (minuteDelta != prevMinuteDelta) { - if (!allDay) { - updateTimeText(minuteDelta); - } - prevMinuteDelta = minuteDelta; - } - }, - stop: function(ev, ui) { - var cell = hoverListener.stop(); - clearOverlays(); - trigger('eventDragStop', eventElement, event, ev, ui); - if (cell && (dayDelta || minuteDelta || allDay)) { - // changed! - eventDrop(this, event, dayDelta, allDay ? 0 : minuteDelta, allDay, ev, ui); - }else{ - // either no change or out-of-bounds (draggable has already reverted) - resetElement(); - eventElement.css('filter', ''); // clear IE opacity side-effects - eventElement.css(origPosition); // sometimes fast drags make event revert to wrong position - updateTimeText(0); - showEvents(event, eventElement); - } - } - }); - function updateTimeText(minuteDelta) { - var newStart = addMinutes(cloneDate(event.start), minuteDelta); - var newEnd; - if (event.end) { - newEnd = addMinutes(cloneDate(event.end), minuteDelta); - } - timeElement.text(formatDates(newStart, newEnd, opt('timeFormat'))); - } - function resetElement() { - // convert back to original slot-event - if (allDay) { - timeElement.css('display', ''); // show() was causing display=inline - eventElement.draggable('option', 'grid', [colWidth, slotHeight]); - allDay = false; - } - } - } - - - - /* Resizing - --------------------------------------------------------------------------------------*/ - - - function resizableSlotEvent(event, eventElement, timeElement) { - var slotDelta, prevSlotDelta; - var slotHeight = getSlotHeight(); - eventElement.resizable({ - handles: { - s: 'div.ui-resizable-s' - }, - grid: slotHeight, - start: function(ev, ui) { - slotDelta = prevSlotDelta = 0; - hideEvents(event, eventElement); - eventElement.css('z-index', 9); - trigger('eventResizeStart', this, event, ev, ui); - }, - resize: function(ev, ui) { - // don't rely on ui.size.height, doesn't take grid into account - slotDelta = Math.round((Math.max(slotHeight, eventElement.height()) - ui.originalSize.height) / slotHeight); - if (slotDelta != prevSlotDelta) { - timeElement.text( - formatDates( - event.start, - (!slotDelta && !event.end) ? null : // no change, so don't display time range - addMinutes(eventEnd(event), opt('slotMinutes')*slotDelta), - opt('timeFormat') - ) - ); - prevSlotDelta = slotDelta; - } - }, - stop: function(ev, ui) { - trigger('eventResizeStop', this, event, ev, ui); - if (slotDelta) { - eventResize(this, event, 0, opt('slotMinutes')*slotDelta, ev, ui); - }else{ - eventElement.css('z-index', 8); - showEvents(event, eventElement); - // BUG: if event was really short, need to put title back in span - } - } - }); - } - - -} - - -function countForwardSegs(levels) { - var i, j, k, level, segForward, segBack; - for (i=levels.length-1; i>0; i--) { - level = levels[i]; - for (j=0; j"); - var elements; - var segmentContainer = getDaySegmentContainer(); - var i; - var segCnt = segs.length; - var element; - tempContainer[0].innerHTML = daySegHTML(segs); // faster than .html() - elements = tempContainer.children(); - segmentContainer.append(elements); - daySegElementResolve(segs, elements); - daySegCalcHSides(segs); - daySegSetWidths(segs); - daySegCalcHeights(segs); - daySegSetTops(segs, getRowTops(getRowDivs())); - elements = []; - for (i=0; i" + - ""; - if (!event.allDay && seg.isStart) { - html += - "" + - htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + - ""; - } - html += - "" + htmlEscape(event.title) + "" + - "
    "; - if (seg.isEnd && isEventResizable(event)) { - html += - "
    " + - "   " + // makes hit area a lot better for IE6/7 - "
    "; - } - html += - ""; - seg.left = left; - seg.outerWidth = right - left; - seg.startCol = leftCol; - seg.endCol = rightCol + 1; // needs to be exclusive - } - return html; - } - - - function daySegElementResolve(segs, elements) { // sets seg.element - var i; - var segCnt = segs.length; - var seg; - var event; - var element; - var triggerRes; - for (i=0; i div'); // optimal selector? - } - return rowDivs; - } - - - function getRowTops(rowDivs) { - var i; - var rowCnt = rowDivs.length; - var tops = []; - for (i=0; i selection for IE - element - .mousedown(function(ev) { // prevent native selection for others - ev.preventDefault(); - }) - .click(function(ev) { - if (isResizing) { - ev.preventDefault(); // prevent link from being visited (only method that worked in IE6) - ev.stopImmediatePropagation(); // prevent fullcalendar eventClick handler from being called - // (eventElementHandlers needs to be bound after resizableDayEvent) - } - }); - - handle.mousedown(function(ev) { - if (ev.which != 1) { - return; // needs to be left mouse button - } - isResizing = true; - var hoverListener = t.getHoverListener(); - var rowCnt = getRowCnt(); - var colCnt = getColCnt(); - var dis = rtl ? -1 : 1; - var dit = rtl ? colCnt-1 : 0; - var elementTop = element.css('top'); - var dayDelta; - var helpers; - var eventCopy = $.extend({}, event); - var minCell = dateCell(event.start); - clearSelection(); - $('body') - .css('cursor', direction + '-resize') - .one('mouseup', mouseup); - trigger('eventResizeStart', this, event, ev); - hoverListener.start(function(cell, origCell) { - if (cell) { - var r = Math.max(minCell.row, cell.row); - var c = cell.col; - if (rowCnt == 1) { - r = 0; // hack for all-day area in agenda views - } - if (r == minCell.row) { - if (rtl) { - c = Math.min(minCell.col, c); - }else{ - c = Math.max(minCell.col, c); - } - } - dayDelta = (r*7 + c*dis+dit) - (origCell.row*7 + origCell.col*dis+dit); - var newEnd = addDays(eventEnd(event), dayDelta, true); - if (dayDelta) { - eventCopy.end = newEnd; - var oldHelpers = helpers; - helpers = renderTempDaySegs(compileDaySegs([eventCopy]), seg.row, elementTop); - helpers.find('*').css('cursor', direction + '-resize'); - if (oldHelpers) { - oldHelpers.remove(); - } - hideEvents(event); - }else{ - if (helpers) { - showEvents(event); - helpers.remove(); - helpers = null; - } - } - clearOverlays(); - renderDayOverlay(event.start, addDays(cloneDate(newEnd), 1)); // coordinate grid already rebuild at hoverListener.start - } - }, ev); - - function mouseup(ev) { - trigger('eventResizeStop', this, event, ev); - $('body').css('cursor', ''); - hoverListener.stop(); - clearOverlays(); - if (dayDelta) { - eventResize(this, event, dayDelta, 0, ev); - // event redraw will clear helpers - } - // otherwise, the drag handler already restored the old events - - setTimeout(function() { // make this happen after the element's click event - isResizing = false; - },0); - } - - }); - } - - -} - -//BUG: unselect needs to be triggered when events are dragged+dropped - -function SelectionManager() { - var t = this; - - - // exports - t.select = select; - t.unselect = unselect; - t.reportSelection = reportSelection; - t.daySelectionMousedown = daySelectionMousedown; - - - // imports - var opt = t.opt; - var trigger = t.trigger; - var defaultSelectionEnd = t.defaultSelectionEnd; - var renderSelection = t.renderSelection; - var clearSelection = t.clearSelection; - - - // locals - var selected = false; - - - - // unselectAuto - if (opt('selectable') && opt('unselectAuto')) { - $(document).mousedown(function(ev) { - var ignore = opt('unselectCancel'); - if (ignore) { - if ($(ev.target).parents(ignore).length) { // could be optimized to stop after first match - return; - } - } - unselect(ev); - }); - } - - - function select(startDate, endDate, allDay) { - unselect(); - if (!endDate) { - endDate = defaultSelectionEnd(startDate, allDay); - } - renderSelection(startDate, endDate, allDay); - reportSelection(startDate, endDate, allDay); - } - - - function unselect(ev) { - if (selected) { - selected = false; - clearSelection(); - trigger('unselect', null, ev); - } - } - - - function reportSelection(startDate, endDate, allDay, ev) { - selected = true; - trigger('select', null, startDate, endDate, allDay, ev); - } - - - function daySelectionMousedown(ev) { // not really a generic manager method, oh well - var cellDate = t.cellDate; - var cellIsAllDay = t.cellIsAllDay; - var hoverListener = t.getHoverListener(); - var reportDayClick = t.reportDayClick; // this is hacky and sort of weird - if (ev.which == 1 && opt('selectable')) { // which==1 means left mouse button - unselect(ev); - var _mousedownElement = this; - var dates; - hoverListener.start(function(cell, origCell) { // TODO: maybe put cellDate/cellIsAllDay info in cell - clearSelection(); - if (cell && cellIsAllDay(cell)) { - dates = [ cellDate(origCell), cellDate(cell) ].sort(cmp); - renderSelection(dates[0], dates[1], true); - }else{ - dates = null; - } - }, ev); - $(document).one('mouseup', function(ev) { - hoverListener.stop(); - if (dates) { - if (+dates[0] == +dates[1]) { - reportDayClick(dates[0], true, ev); - } - reportSelection(dates[0], dates[1], true, ev); - } - }); - } - } - - -} - -function OverlayManager() { - var t = this; - - - // exports - t.renderOverlay = renderOverlay; - t.clearOverlays = clearOverlays; - - - // locals - var usedOverlays = []; - var unusedOverlays = []; - - - function renderOverlay(rect, parent) { - var e = unusedOverlays.shift(); - if (!e) { - e = $("
    "); - } - if (e[0].parentNode != parent[0]) { - e.appendTo(parent); - } - usedOverlays.push(e.css(rect).show()); - return e; - } - - - function clearOverlays() { - var e; - while (e = usedOverlays.shift()) { - unusedOverlays.push(e.hide().unbind()); - } - } - - -} - -function CoordinateGrid(buildFunc) { - - var t = this; - var rows; - var cols; - - - t.build = function() { - rows = []; - cols = []; - buildFunc(rows, cols); - }; - - - t.cell = function(x, y) { - var rowCnt = rows.length; - var colCnt = cols.length; - var i, r=-1, c=-1; - for (i=0; i= rows[i][0] && y < rows[i][1]) { - r = i; - break; - } - } - for (i=0; i= cols[i][0] && x < cols[i][1]) { - c = i; - break; - } - } - return (r>=0 && c>=0) ? { row:r, col:c } : null; - }; - - - t.rect = function(row0, col0, row1, col1, originElement) { // row1,col1 is inclusive - var origin = originElement.offset(); - return { - top: rows[row0][0] - origin.top, - left: cols[col0][0] - origin.left, - width: cols[col1][1] - cols[col0][0], - height: rows[row1][1] - rows[row0][0] - }; - }; - -} - -function HoverListener(coordinateGrid) { - - - var t = this; - var bindType; - var change; - var firstCell; - var cell; - - - t.start = function(_change, ev, _bindType) { - change = _change; - firstCell = cell = null; - coordinateGrid.build(); - mouse(ev); - bindType = _bindType || 'mousemove'; - $(document).bind(bindType, mouse); - }; - - - function mouse(ev) { - _fixUIEvent(ev); // see below - var newCell = coordinateGrid.cell(ev.pageX, ev.pageY); - if (!newCell != !cell || newCell && (newCell.row != cell.row || newCell.col != cell.col)) { - if (newCell) { - if (!firstCell) { - firstCell = newCell; - } - change(newCell, firstCell, newCell.row-firstCell.row, newCell.col-firstCell.col); - }else{ - change(newCell, firstCell); - } - cell = newCell; - } - } - - - t.stop = function() { - $(document).unbind(bindType, mouse); - return cell; - }; - - -} - - - -// this fix was only necessary for jQuery UI 1.8.16 (and jQuery 1.7 or 1.7.1) -// upgrading to jQuery UI 1.8.17 (and using either jQuery 1.7 or 1.7.1) fixed the problem -// but keep this in here for 1.8.16 users -// and maybe remove it down the line - -function _fixUIEvent(event) { // for issue 1168 - if (event.pageX === undefined) { - event.pageX = event.originalEvent.pageX; - event.pageY = event.originalEvent.pageY; - } -} -function HorizontalPositionCache(getElement) { - - var t = this, - elements = {}, - lefts = {}, - rights = {}; - - function e(i) { - return elements[i] = elements[i] || getElement(i); - } - - t.left = function(i) { - return lefts[i] = lefts[i] === undefined ? e(i).position().left : lefts[i]; - }; - - t.right = function(i) { - return rights[i] = rights[i] === undefined ? t.left(i) + e(i).width() : rights[i]; - }; - - t.clear = function() { - elements = {}; - lefts = {}; - rights = {}; - }; - -} - -})(jQuery); diff --git a/airtime_mvc/public/js/fullcalendar/fullcalendar.js b/airtime_mvc/public/js/fullcalendar/fullcalendar.js index 99e25e38f..85b760bec 100644 --- a/airtime_mvc/public/js/fullcalendar/fullcalendar.js +++ b/airtime_mvc/public/js/fullcalendar/fullcalendar.js @@ -1,6 +1,6 @@ /** * @preserve - * FullCalendar v1.5.4 + * FullCalendar v1.5.3-CUSTOM (Changes by Martin Konecny -added primitive support for timezones) * http://arshaw.com/fullcalendar/ * * Use fullcalendar.css for basic styling. @@ -11,7 +11,7 @@ * Dual licensed under the MIT and GPL licenses, located in * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. * - * Date: Tue Sep 4 23:38:33 2012 -0700 + * Date: Mon Feb 6 22:40:40 2012 -0800 * */ @@ -111,7 +111,7 @@ var rtlDefaults = { -var fc = $.fullCalendar = { version: "1.5.4" }; +var fc = $.fullCalendar = { version: "1.5.3" }; var fcViews = fc.views = {}; @@ -227,7 +227,7 @@ function Calendar(element, options, eventSources) { var absoluteViewElement; var resizeUID = 0; var ignoreWindowResize = 0; - var date = new Date(); + var date = adjustDateToServerDate(new Date(), options["serverTimezoneOffset"]); var events = []; var _dragElement; @@ -1658,7 +1658,7 @@ function sliceSegs(events, visEventEnds, start, end) { msLength: segEnd - segStart }); } - } + } return segs.sort(segCmp); } @@ -1742,26 +1742,29 @@ function setOuterHeight(element, height, includeMargins) { } +// TODO: curCSS has been deprecated (jQuery 1.4.3 - 10/16/2010) + + function hsides(element, includeMargins) { return hpadding(element) + hborders(element) + (includeMargins ? hmargins(element) : 0); } function hpadding(element) { - return (parseFloat($.css(element[0], 'paddingLeft', true)) || 0) + - (parseFloat($.css(element[0], 'paddingRight', true)) || 0); + return (parseFloat($.curCSS(element[0], 'paddingLeft', true)) || 0) + + (parseFloat($.curCSS(element[0], 'paddingRight', true)) || 0); } function hmargins(element) { - return (parseFloat($.css(element[0], 'marginLeft', true)) || 0) + - (parseFloat($.css(element[0], 'marginRight', true)) || 0); + return (parseFloat($.curCSS(element[0], 'marginLeft', true)) || 0) + + (parseFloat($.curCSS(element[0], 'marginRight', true)) || 0); } function hborders(element) { - return (parseFloat($.css(element[0], 'borderLeftWidth', true)) || 0) + - (parseFloat($.css(element[0], 'borderRightWidth', true)) || 0); + return (parseFloat($.curCSS(element[0], 'borderLeftWidth', true)) || 0) + + (parseFloat($.curCSS(element[0], 'borderRightWidth', true)) || 0); } @@ -1771,20 +1774,20 @@ function vsides(element, includeMargins) { function vpadding(element) { - return (parseFloat($.css(element[0], 'paddingTop', true)) || 0) + - (parseFloat($.css(element[0], 'paddingBottom', true)) || 0); + return (parseFloat($.curCSS(element[0], 'paddingTop', true)) || 0) + + (parseFloat($.curCSS(element[0], 'paddingBottom', true)) || 0); } function vmargins(element) { - return (parseFloat($.css(element[0], 'marginTop', true)) || 0) + - (parseFloat($.css(element[0], 'marginBottom', true)) || 0); + return (parseFloat($.curCSS(element[0], 'marginTop', true)) || 0) + + (parseFloat($.curCSS(element[0], 'marginBottom', true)) || 0); } function vborders(element) { - return (parseFloat($.css(element[0], 'borderTopWidth', true)) || 0) + - (parseFloat($.css(element[0], 'borderBottomWidth', true)) || 0); + return (parseFloat($.curCSS(element[0], 'borderTopWidth', true)) || 0) + + (parseFloat($.curCSS(element[0], 'borderBottomWidth', true)) || 0); } @@ -1953,6 +1956,7 @@ function firstDefined() { } + fcViews.month = MonthView; function MonthView(element, calendar) { @@ -2273,7 +2277,7 @@ function BasicView(element, calendar, viewName) { function updateCells(firstTime) { var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating? var month = t.start.getMonth(); - var today = clearTime(new Date()); + var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset"))); var cell; var date; var row; @@ -3106,7 +3110,7 @@ function AgendaView(element, calendar, viewName) { var headCell; var bodyCell; var date; - var today = clearTime(new Date()); + var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset"))); for (i=0; i Date: Fri, 30 Aug 2013 16:43:05 -0400 Subject: [PATCH 125/181] don't delete a history item if a show instance is removed from the database. --- .../application/models/airtime/map/CcPlayoutHistoryTableMap.php | 2 +- .../application/models/airtime/map/CcShowInstancesTableMap.php | 2 +- airtime_mvc/build/schema.xml | 2 +- airtime_mvc/build/sql/schema.sql | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php index 00e9099a8..6c365d7bb 100644 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php @@ -52,7 +52,7 @@ class CcPlayoutHistoryTableMap extends TableMap { public function buildRelations() { $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); - $this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'SET NULL', null); $this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', null); } // buildRelations() diff --git a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php index 894592f79..c55e86080 100644 --- a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php @@ -63,7 +63,7 @@ class CcShowInstancesTableMap extends TableMap { $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); $this->addRelation('CcShowInstancesRelatedByDbId', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); - $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); + $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'SET NULL', null); } // buildRelations() } // CcShowInstancesTableMap diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index d6bf6657c..f2a393f1f 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -488,7 +488,7 @@ - + diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index 1ea9dd4f6..8269fec2a 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -894,7 +894,7 @@ ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_mount_name_inst_fkey" FOREIGN ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_playout_history_file_tag_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE; -ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_his_item_inst_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE CASCADE; +ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_his_item_inst_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE SET NULL; ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "cc_playout_history_metadata_entry_fkey" FOREIGN KEY ("history_id") REFERENCES "cc_playout_history" ("id") ON DELETE CASCADE; From 65ecc74f3fc373566f894553b5e7f51896512ae2 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 30 Aug 2013 17:45:26 -0400 Subject: [PATCH 126/181] schema sql file. upgrade for ryerson. --- .../airtime-2.5.0/upgrade-ryerson.sql | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 install_minimal/upgrades/airtime-2.5.0/upgrade-ryerson.sql diff --git a/install_minimal/upgrades/airtime-2.5.0/upgrade-ryerson.sql b/install_minimal/upgrades/airtime-2.5.0/upgrade-ryerson.sql new file mode 100644 index 000000000..253021b24 --- /dev/null +++ b/install_minimal/upgrades/airtime-2.5.0/upgrade-ryerson.sql @@ -0,0 +1,83 @@ + +CREATE SEQUENCE cc_playout_history_id_seq + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + +CREATE SEQUENCE cc_playout_history_metadata_id_seq + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + +CREATE SEQUENCE cc_playout_history_template_field_id_seq + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + +CREATE SEQUENCE cc_playout_history_template_id_seq + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + +CREATE TABLE cc_playout_history ( + id integer DEFAULT nextval('cc_playout_history_id_seq'::regclass) NOT NULL, + file_id integer, + starts timestamp without time zone NOT NULL, + ends timestamp without time zone NOT NULL, + instance_id integer +); + +CREATE TABLE cc_playout_history_metadata ( + id integer DEFAULT nextval('cc_playout_history_metadata_id_seq'::regclass) NOT NULL, + history_id integer NOT NULL, + "key" character varying(128) NOT NULL, + "value" character varying(128) NOT NULL +); + +CREATE TABLE cc_playout_history_template ( + id integer DEFAULT nextval('cc_playout_history_template_id_seq'::regclass) NOT NULL, + name character varying(128) NOT NULL, + type character varying(35) NOT NULL +); + +CREATE TABLE cc_playout_history_template_field ( + id integer DEFAULT nextval('cc_playout_history_template_field_id_seq'::regclass) NOT NULL, + template_id integer NOT NULL, + name character varying(128) NOT NULL, + label character varying(128) NOT NULL, + type character varying(128) NOT NULL, + is_file_md boolean DEFAULT false NOT NULL, + "position" integer NOT NULL +); + +ALTER TABLE cc_playout_history + ADD CONSTRAINT cc_playout_history_pkey PRIMARY KEY (id); + +ALTER TABLE cc_playout_history_metadata + ADD CONSTRAINT cc_playout_history_metadata_pkey PRIMARY KEY (id); + +ALTER TABLE cc_playout_history_template + ADD CONSTRAINT cc_playout_history_template_pkey PRIMARY KEY (id); + +ALTER TABLE cc_playout_history_template_field + ADD CONSTRAINT cc_playout_history_template_field_pkey PRIMARY KEY (id); + +ALTER TABLE cc_playout_history + ADD CONSTRAINT cc_his_item_inst_fkey FOREIGN KEY (instance_id) REFERENCES cc_show_instances(id) ON DELETE SET NULL; + +ALTER TABLE cc_playout_history + ADD CONSTRAINT cc_playout_history_file_tag_fkey FOREIGN KEY (file_id) REFERENCES cc_files(id) ON DELETE CASCADE; + +ALTER TABLE cc_playout_history_metadata + ADD CONSTRAINT cc_playout_history_metadata_entry_fkey FOREIGN KEY (history_id) REFERENCES cc_playout_history(id) ON DELETE CASCADE; + +ALTER TABLE cc_playout_history_template_field + ADD CONSTRAINT cc_playout_history_template_template_fkey FOREIGN KEY (template_id) REFERENCES cc_playout_history_template(id) ON DELETE CASCADE; From d166f2035bc80f369be74a790b6138331c8c8834 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Sat, 31 Aug 2013 16:50:40 -0400 Subject: [PATCH 127/181] creating an upgrade script for the Ryerson feature. --- install_minimal/include/airtime-upgrade.php | 4 +++ .../upgrades/airtime-2.5.0/DbUpgrade.php | 25 +++++++++++++++++++ .../airtime-2.5.0/airtime-upgrade.php | 8 ++++++ .../{upgrade-ryerson.sql => data/schema.sql} | 0 .../upgrades/airtime-2.5.0/data/upgrade.sql | 7 ++++++ 5 files changed, 44 insertions(+) create mode 100644 install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php create mode 100644 install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php rename install_minimal/upgrades/airtime-2.5.0/{upgrade-ryerson.sql => data/schema.sql} (100%) create mode 100644 install_minimal/upgrades/airtime-2.5.0/data/upgrade.sql diff --git a/install_minimal/include/airtime-upgrade.php b/install_minimal/include/airtime-upgrade.php index 66ba70838..a8e7a3a22 100644 --- a/install_minimal/include/airtime-upgrade.php +++ b/install_minimal/include/airtime-upgrade.php @@ -88,4 +88,8 @@ if (strcmp($version, "2.4.1") < 0) { passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.1/airtime-upgrade.php"); pause(); } +if (strcmp($version, "2.5.0") < 0) { + passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.5.0/airtime-upgrade.php"); + pause(); +} echo "******************************* Upgrade Complete *******************************".PHP_EOL; diff --git a/install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php b/install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php new file mode 100644 index 000000000..5114b8f90 --- /dev/null +++ b/install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php @@ -0,0 +1,25 @@ +&1 | grep -v \"will create implicit index\""); + passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/data/upgrade.sql $database 2>&1 | grep -v \"will create implicit index\""); + } +} diff --git a/install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php new file mode 100644 index 000000000..042b92d05 --- /dev/null +++ b/install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php @@ -0,0 +1,8 @@ + Date: Sat, 31 Aug 2013 22:56:22 -0400 Subject: [PATCH 128/181] put "no show" at the end of the select by default. --- .../js/airtime/playouthistory/historytable.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index fa4a548dd..8cf00fc15 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -679,13 +679,7 @@ var AIRTIME = (function(AIRTIME) { }), $option, show; - - $option = $('
    + getElement("his_instance_select"); ?> + + + +
    From 71ee72015b5181b8d3021b472271ac0b9a6b14f0 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Sun, 1 Sep 2013 00:56:47 -0400 Subject: [PATCH 130/181] release version updates and changelog edits. --- CREDITS | 16 ++++++++++++++++ VERSION | 2 +- changelog | 9 +++++++++ install_minimal/include/airtime-constants.php | 2 +- python_apps/api_clients/api_client.py | 2 +- 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/CREDITS b/CREDITS index 4f377ea52..518f7366c 100644 --- a/CREDITS +++ b/CREDITS @@ -2,6 +2,22 @@ CREDITS ======= +Version 2.5.0 +------------- + +Denise Rigato (denise.rigato@sourcefabric.org) + Role: Software Developer + +Naomi Aro (naomi.aro@sourcefabric.org) + Role: Software Developer + +Cliff Wang (cliff.wang@sourcefabric.org) + Role: QA + +Daniel James (daniel.james@sourcefabric.org) + Role: Documentor & QA + + Version 2.4.1 ------------- diff --git a/VERSION b/VERSION index e7467e459..5a1ef0b72 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ PRODUCT_ID=Airtime -PRODUCT_RELEASE=2.4.1 +PRODUCT_RELEASE=2.5.0 diff --git a/changelog b/changelog index d5eb9175c..66da4fe23 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,12 @@ +2.5.0 - September 4th, 2013 + * New features + * Playout History feature overhaul. + - custom templates for log sheets. + - ability to manually log an item. + - ability to edit a history item. + - 3 history views: log, file summary, show summary. + - hosts can now view/log their own show history. + 2.4.1 - August 28th, 2013 * Bug Fixes * Playout Engine locking issue diff --git a/install_minimal/include/airtime-constants.php b/install_minimal/include/airtime-constants.php index 74af70dff..61408912c 100644 --- a/install_minimal/include/airtime-constants.php +++ b/install_minimal/include/airtime-constants.php @@ -1,3 +1,3 @@ Date: Sun, 1 Sep 2013 13:38:18 -0400 Subject: [PATCH 131/181] format/json to prevent zend errors. --- .../views/scripts/playouthistorytemplate/index.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml b/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml index 0e16acee8..043ee2150 100644 --- a/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml @@ -24,7 +24,7 @@
    "> - "> + "> Set Default @@ -55,7 +55,7 @@ "> - "> + "> Set Default From 4a4ef2767e90ba9040a0d2080b901e6667170927 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Sun, 1 Sep 2013 17:59:47 -0400 Subject: [PATCH 132/181] CC-5318 : Playout History: The last song of the show will display wrong end time. --- airtime_mvc/application/services/HistoryService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 08649097f..10e559c3b 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -526,10 +526,14 @@ class Application_Service_HistoryService $metadata = array(); $metadata["showname"] = $show->getDbName(); + $instanceEnd = $showInstance->getDbEnds(null); + $itemEnd = $item->getDbEnds(null); + $recordEnd = ($instanceEnd < $itemEnd) ? $instanceEnd : $itemEnd; + $history = new CcPlayoutHistory(); $history->setDbFileId($fileId); $history->setDbStarts($item->getDbStarts(null)); - $history->setDbEnds($item->getDbEnds(null)); + $history->setDbEnds($recordEnd); $history->setDbInstanceId($item->getDbInstanceId()); foreach ($metadata as $key => $val) { From 0734a4a98c26f9dc99bd802bafec7af805ef6457 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 5 Sep 2013 11:54:25 +0200 Subject: [PATCH 133/181] CC-5320 : UTC not included in Timezone List --- airtime_mvc/application/common/Timezone.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/common/Timezone.php b/airtime_mvc/application/common/Timezone.php index 271ea5f02..7da82f6f9 100644 --- a/airtime_mvc/application/common/Timezone.php +++ b/airtime_mvc/application/common/Timezone.php @@ -14,7 +14,8 @@ class Application_Common_Timezone 'Australia' => DateTimeZone::AUSTRALIA, 'Europe' => DateTimeZone::EUROPE, 'Indian' => DateTimeZone::INDIAN, - 'Pacific' => DateTimeZone::PACIFIC + 'Pacific' => DateTimeZone::PACIFIC, + 'UTC' => DateTimeZone::UTC ); $tzlist = array(); From 5a85fce89d5ec3b3aef03422ffc87cc3cbbf71f5 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 6 Sep 2013 12:35:31 +0200 Subject: [PATCH 134/181] CC-5321 : Changing Timezone after Creating shows creates Problems --- .../application/services/ShowService.php | 81 ++++++++++--------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index f5bed073e..a04ea691c 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -169,8 +169,8 @@ class Application_Service_ShowService } /** - * - * Receives a cc_show id and determines whether to create a + * + * Receives a cc_show id and determines whether to create a * single show instance or repeating show instances */ public function delegateInstanceCreation($daysAdded=null, $end=null, $fillInstances=false) @@ -190,7 +190,7 @@ class Application_Service_ShowService /* In case the user is moving forward in the calendar and there are * linked shows in the schedule we need to keep track of each cc_show * so we know which shows need to be filled with content - */ + */ $ccShows = array(); foreach ($ccShowDays as $day) { @@ -273,7 +273,7 @@ class Application_Service_ShowService } /** - * + * * Deletes all the cc_show_days entries for a specific show * that is currently being edited. They will get recreated with * the new show day specs @@ -298,12 +298,12 @@ SQL; /** * TODO: This function is messy. Needs refactoring - * + * * When editing a show we may need to perform some actions to reflect the new specs: * - Delete some show instances * - Update duration * - Update start and end time - * + * * @param $showData edit show form values in raw form * @param $isRecorded value computed from the edit show form * @param $repeatType value computed from the edit show form @@ -342,7 +342,7 @@ SQL; //if the start date changes, these are the repeat types //that require show instance deletion - $deleteRepeatTypes = array(REPEAT_BI_WEEKLY, REPEAT_MONTHLY_MONTHLY, + $deleteRepeatTypes = array(REPEAT_BI_WEEKLY, REPEAT_MONTHLY_MONTHLY, REPEAT_MONTHLY_WEEKLY); if (in_array($this->repeatType, $deleteRepeatTypes) && @@ -406,7 +406,7 @@ SQL; $this->deleteInstancesBeforeDate($showData['add_show_start_date'], $showId); } - + } } @@ -496,7 +496,7 @@ SQL; } /** - * + * * Enter description here ... * @param $daysRemoved array of days (days of the week) removed * (days of the week are represented numerically @@ -708,10 +708,10 @@ SQL; } /** - * + * * Determines what the show end date should be based on * the form data - * + * * @param $showData add/edit show form data * @return DateTime object in user's local timezone */ @@ -754,10 +754,10 @@ SQL; } /** - * + * * Returns the difference in seconds between a show's new and * old start time - * + * * @param $newStartDateTime DateTime object * @param $oldStartDateTime DateTime object */ @@ -767,9 +767,9 @@ SQL; } /** - * + * * Updates the start and end time for cc_show_instances - * + * * @param $showData edit show form data */ private function updateInstanceStartEndTime($diff) @@ -783,13 +783,13 @@ WHERE show_id = :showId SQL; Application_Common_Database::prepareAndExecute($sql, - array(':diff1' => $diff, ':diff2' => $diff, + array(':diff1' => $diff, ':diff2' => $diff, ':showId' => $this->ccShow->getDbId(), ':timestamp' => gmdate("Y-m-d H:i:s")), 'execute'); } /** - * + * * Enter description here ... * @param ccShowDays $showDay * @param DateTime $showStartDate user's local time @@ -826,7 +826,7 @@ SQL; } /** - * + * * Sets a single cc_show_instance table row * @param $showDay * @param $populateUntil @@ -863,7 +863,7 @@ SQL; } /** - * + * * Sets multiple cc_show_instances table rows * @param unknown_type $showDay * @param unknown_type $populateUntil @@ -904,7 +904,7 @@ SQL; /* * Make sure start date is less than populate until date AND * last show date is null OR start date is less than last show date - * + * * (NOTE: We cannot call getTimestamp() to compare the dates because of * a PHP 5.3.3 bug with DatePeriod objects - See CC-5159 for more details) */ @@ -964,8 +964,9 @@ SQL; */ if (isset($lastCreatedShow)) { /* Set UTC to local time before setting the next repeat date. If we don't - * the next repeat date might be scheduled for the following day */ - $lastCreatedShow->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); + * the next repeat date might be scheduled for the following day + * THIS MUST BE IN THE TIMEZONE THE SHOW WAS CREATED IN */ + $lastCreatedShow->setTimezone(new DateTimeZone($timezone)); $nextDate = $lastCreatedShow->add($repeatInterval); $this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id); } @@ -1064,10 +1065,10 @@ SQL; } /** - * + * * i.e. last thursday of each month * i.e. second monday of each month - * + * * @param string $showStart * @param string $timezone user's local timezone */ @@ -1112,7 +1113,7 @@ SQL; } /** - * + * * Enter description here ... * @param $start user's local time */ @@ -1182,7 +1183,7 @@ SQL; } /** - * + * * Create a DatePeriod object in the user's local time * It will get converted to UTC before the show instance gets created */ @@ -1203,11 +1204,11 @@ SQL; } /** - * + * * Attempts to retrieve the cc_show_instance belonging to a cc_show * that starts at $starts. We have to pass in the start * time in case the show is repeating - * + * * Returns the instance if one was found (one that is not a recording * and modified instance is false (has not been deleted)) */ @@ -1250,7 +1251,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show table row * @param $ccShow * @param $showData @@ -1285,7 +1286,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show_days table row * @param $showData * @param $showId @@ -1367,7 +1368,7 @@ SQL; } /** - * + * * Deletes all the cc_show_rebroadcast entries for a specific show * that is currently being edited. They will get recreated with * the new show specs @@ -1378,7 +1379,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show_rebroadcast table row * @param $showData * @param $showId @@ -1417,7 +1418,7 @@ SQL; } /** - * + * * Deletes all the cc_show_hosts entries for a specific show * that is currently being edited. They will get recreated with * the new show specs @@ -1428,7 +1429,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show_hosts table row * @param $showData * @param $showId @@ -1446,10 +1447,10 @@ SQL; } /** - * + * * Gets the date and time shows (particularly repeating shows) * can be populated until. - * + * * @return DateTime object */ private static function getPopulateShowUntilDateTIme() @@ -1464,13 +1465,13 @@ SQL; } /** - * + * * Enter description here ... * @param DateTime $showStart user's local time * @param string $duration time interval (h)h:(m)m(:ss) * @param string $timezone "Europe/Prague" * @param array $offset (days, hours, mins) used for rebroadcast shows - * + * * @return array of 2 DateTime objects, start/end time of the show in UTC */ private function createUTCStartEndDateTime($showStart, $duration, $offset=null) @@ -1496,12 +1497,12 @@ SQL; } /** - * + * * Show instances for repeating shows only get created up * until what is visible on the calendar. We need to set the * date for when the next repeating show instance should be created * as the user browses the calendar further. - * + * * @param $nextDate * @param $showId * @param $day From 0b66f620458a8046ae7962cafa9769f0b419af1e Mon Sep 17 00:00:00 2001 From: denise Date: Fri, 6 Sep 2013 11:08:01 -0400 Subject: [PATCH 135/181] Removed old jquery syntax --- .../public/js/airtime/preferences/streamsetting.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/public/js/airtime/preferences/streamsetting.js b/airtime_mvc/public/js/airtime/preferences/streamsetting.js index 3fdba7c8c..894f54461 100644 --- a/airtime_mvc/public/js/airtime/preferences/streamsetting.js +++ b/airtime_mvc/public/js/airtime/preferences/streamsetting.js @@ -13,11 +13,11 @@ function showErrorSections() { } function rebuildStreamURL(ele){ var div = ele.closest("div") - host = div.find("input:[id$=-host]").val() - port = div.find("input:[id$=-port]").val() - mount = div.find("input:[id$=-mount]").val() + host = div.find("input[id$=-host]").val() + port = div.find("input[id$=-port]").val() + mount = div.find("input[id$=-mount]").val() streamurl = "" - if(div.find("select:[id$=-output]").val()=="icecast"){ + if(div.find("select[id$=-output]").val()=="icecast"){ streamurl = "http://"+host if($.trim(port) != ""){ streamurl += ":"+port @@ -180,15 +180,15 @@ function setupEventListeners() { rebuildStreamURL($(this)); }) - $("input:[id$=-host], input:[id$=-port], input:[id$=-mount]").keyup(function(){ + $("input[id$=-host], input[id$=-port], input[id$=-mount]").keyup(function(){ rebuildStreamURL($(this)); }); - $("input:[id$=-port]").keypress(function(e){ + $("input[id$=-port]").keypress(function(e){ validate($(this),e); }); - $("select:[id$=-output]").change(function(){ + $("select[id$=-output]").change(function(){ rebuildStreamURL($(this)); }); From 4c6d96e0623a33984ff003c1464802c2bfc24cd9 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 20 Sep 2013 16:35:46 +0200 Subject: [PATCH 136/181] CC-5333 : Rebroadcast Shows are not created --- airtime_mvc/application/services/ShowService.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index a04ea691c..977c23eca 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -194,7 +194,11 @@ class Application_Service_ShowService $ccShows = array(); foreach ($ccShowDays as $day) { + $this->ccShow = $day->getCcShow(); + $this->isRecorded = isset($this->isRecorded) ? $this->isRecorded : $this->ccShow->isRecorded(); + $this->isRebroadcast = isset($this->isRebroadcast) ? $this->isRebroadcast : $this->ccShow->isRebroadcast(); + if (!isset($ccShows[$day->getDbShowId()])) { $ccShows[$day->getDbShowId()] = $day->getccShow(); } From c8b73850b9bdc15ac04f9994bbdf921e50dd6ec5 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Mon, 23 Sep 2013 11:00:43 +0200 Subject: [PATCH 137/181] Revert "Merge branch 'ryerson-history'" This reverts commit a554c6f72c17f4e978967f2c0fe5292b52c42066, reversing changes made to 2a0c9769aa7cbdb9cb25c045bd275f04ba430ae8. --- CREDITS | 20 +- LICENSE_3RD_PARTY | 16 +- VERSION | 2 +- airtime_mvc/application/Bootstrap.php | 27 +- airtime_mvc/application/common/Timezone.php | 3 +- airtime_mvc/application/configs/ACL.php | 4 +- .../configs/classmap-airtime-conf.php | 35 - airtime_mvc/application/configs/constants.php | 15 - .../application/configs/navigation.php | 30 +- .../application/controllers/ApiController.php | 77 +- .../controllers/LibraryController.php | 28 +- .../controllers/ListenerstatController.php | 35 +- .../controllers/PlayouthistoryController.php | 233 +- .../PlayouthistorytemplateController.php | 143 - .../controllers/ScheduleController.php | 23 +- airtime_mvc/application/forms/EditHistory.php | 211 - .../application/forms/EditHistoryFile.php | 22 - .../application/forms/EditHistoryItem.php | 66 - .../application/forms/SmartBlockCriteria.php | 14 +- airtime_mvc/application/models/Datatables.php | 129 +- .../application/models/ListenerStat.php | 29 +- airtime_mvc/application/models/Playlist.php | 7 +- .../application/models/PlayoutHistory.php | 83 + airtime_mvc/application/models/Preference.php | 16 - airtime_mvc/application/models/Scheduler.php | 39 +- airtime_mvc/application/models/Show.php | 1 - airtime_mvc/application/models/StoredFile.php | 48 +- airtime_mvc/application/models/User.php | 5 + .../application/models/airtime/CcFileTag.php | 18 - .../models/airtime/CcFileTagPeer.php | 18 - .../models/airtime/CcFileTagQuery.php | 18 - .../models/airtime/CcMountName.php | 18 - .../models/airtime/CcMountNamePeer.php | 18 - .../models/airtime/CcMountNameQuery.php | 18 - .../models/airtime/CcPlayoutHistory.php | 18 - .../airtime/CcPlayoutHistoryMetaData.php | 18 - .../airtime/CcPlayoutHistoryMetaDataPeer.php | 18 - .../airtime/CcPlayoutHistoryMetaDataQuery.php | 18 - .../models/airtime/CcPlayoutHistoryPeer.php | 18 - .../models/airtime/CcPlayoutHistoryQuery.php | 18 - .../airtime/CcPlayoutHistoryTemplate.php | 18 - .../airtime/CcPlayoutHistoryTemplateField.php | 18 - .../CcPlayoutHistoryTemplateFieldPeer.php | 18 - .../CcPlayoutHistoryTemplateFieldQuery.php | 18 - .../airtime/CcPlayoutHistoryTemplatePeer.php | 18 - .../airtime/CcPlayoutHistoryTemplateQuery.php | 18 - .../application/models/airtime/CcSubjs.php | 15 +- .../application/models/airtime/CcTag.php | 18 - .../application/models/airtime/CcTagPeer.php | 18 - .../application/models/airtime/CcTagQuery.php | 18 - .../models/airtime/map/CcFileTagTableMap.php | 56 - .../models/airtime/map/CcFilesTableMap.php | 1 - .../airtime/map/CcListenerCountTableMap.php | 2 +- .../airtime/map/CcMountNameTableMap.php | 54 - .../map/CcPlayoutHistoryMetaDataTableMap.php | 56 - .../airtime/map/CcPlayoutHistoryTableMap.php | 59 - .../CcPlayoutHistoryTemplateFieldTableMap.php | 59 - .../map/CcPlayoutHistoryTemplateTableMap.php | 55 - .../CcPlayoutHistoryTemplateTagTableMap.php | 58 - .../airtime/map/CcShowInstancesTableMap.php | 1 - .../models/airtime/map/CcTagTableMap.php | 57 - .../models/airtime/om/BaseCcFileTag.php | 936 -- .../models/airtime/om/BaseCcFileTagPeer.php | 1365 --- .../models/airtime/om/BaseCcFileTagQuery.php | 371 - .../models/airtime/om/BaseCcFiles.php | 169 - .../models/airtime/om/BaseCcFilesPeer.php | 3 - .../models/airtime/om/BaseCcFilesQuery.php | 68 - .../models/airtime/om/BaseCcListenerCount.php | 58 +- .../airtime/om/BaseCcListenerCountPeer.php | 104 +- .../airtime/om/BaseCcListenerCountQuery.php | 32 +- .../models/airtime/om/BaseCcMountName.php | 893 -- .../models/airtime/om/BaseCcMountNamePeer.php | 742 -- .../airtime/om/BaseCcMountNameQuery.php | 259 - .../airtime/om/BaseCcPlayoutHistory.php | 1288 --- .../om/BaseCcPlayoutHistoryMetaData.php | 905 -- .../om/BaseCcPlayoutHistoryMetaDataPeer.php | 983 -- .../om/BaseCcPlayoutHistoryMetaDataQuery.php | 320 - .../airtime/om/BaseCcPlayoutHistoryPeer.php | 1378 --- .../airtime/om/BaseCcPlayoutHistoryQuery.php | 509 - .../om/BaseCcPlayoutHistoryTemplate.php | 916 -- .../om/BaseCcPlayoutHistoryTemplateField.php | 1076 -- .../BaseCcPlayoutHistoryTemplateFieldPeer.php | 998 -- ...BaseCcPlayoutHistoryTemplateFieldQuery.php | 402 - .../om/BaseCcPlayoutHistoryTemplatePeer.php | 747 -- .../om/BaseCcPlayoutHistoryTemplateQuery.php | 285 - .../om/BaseCcPlayoutHistoryTemplateTag.php | 1028 -- .../BaseCcPlayoutHistoryTemplateTagPeer.php | 993 -- .../BaseCcPlayoutHistoryTemplateTagQuery.php | 376 - .../models/airtime/om/BaseCcShowInstances.php | 169 - .../airtime/om/BaseCcShowInstancesPeer.php | 3 - .../airtime/om/BaseCcShowInstancesQuery.php | 68 - .../models/airtime/om/BaseCcTag.php | 1306 --- .../models/airtime/om/BaseCcTagPeer.php | 753 -- .../models/airtime/om/BaseCcTagQuery.php | 421 - .../models/airtime/om/BaseCcTimestamp.php | 25 - .../application/services/CalendarService.php | 21 +- .../application/services/HistoryService.php | 1465 --- .../application/services/SchedulerService.php | 30 +- .../application/services/ShowFormService.php | 2 +- .../application/services/ShowService.php | 171 +- .../application/services/UserService.php | 7 +- .../scripts/audiopreview/audio-preview.phtml | 12 +- .../scripts/form/edit-history-file.phtml | 37 - .../scripts/form/edit-history-item.phtml | 86 - .../application/views/scripts/menu.phtml | 2 - .../views/scripts/playlist/update.phtml | 20 +- .../views/scripts/playouthistory/dialog.phtml | 1 - .../views/scripts/playouthistory/index.phtml | 25 +- .../configure-template.phtml | 3 - .../playouthistorytemplate/index.phtml | 67 - .../template-contents.phtml | 83 - airtime_mvc/build/schema.xml | 41 +- airtime_mvc/build/sql/schema.sql | 91 - .../locale/de_DE/LC_MESSAGES/airtime.mo | Bin 65602 -> 64776 bytes .../locale/de_DE/LC_MESSAGES/airtime.po | 1198 +- .../locale/ko_KR/LC_MESSAGES/airtime.mo | Bin 61175 -> 58929 bytes .../locale/ko_KR/LC_MESSAGES/airtime.po | 62 +- .../css/bootstrap-datetimepicker.min.css | 8 - airtime_mvc/public/css/fullcalendar-old.css | 627 -- airtime_mvc/public/css/fullcalendar.css | 13 +- airtime_mvc/public/css/fullcalendar.print.css | 61 + airtime_mvc/public/css/history_styles.css | 196 - airtime_mvc/public/css/images/drag.png | Bin 225 -> 0 bytes .../public/css/jquery-ui-timepicker-addon.css | 10 - airtime_mvc/public/css/jquery.contextMenu.css | 1 - airtime_mvc/public/css/playouthistory.css | 40 +- airtime_mvc/public/css/styles.css | 4 + .../public/js/airtime/dashboard/dashboard.js | 4 +- .../public/js/airtime/library/library.js | 8 +- .../playouthistory/configuretemplate.js | 167 - .../js/airtime/playouthistory/historytable.js | 957 +- .../js/airtime/playouthistory/template.js | 102 - .../js/airtime/preferences/streamsetting.js | 14 +- .../schedule/full-calendar-functions.js | 10 +- .../public/js/airtime/showbuilder/builder.js | 6 +- .../public/js/airtime/utilities/utilities.js | 26 +- .../public/js/blockui/jquery.blockUI.js | 2 - .../bootstrap-datetimepicker.js | 1305 --- .../bootstrap-datetimepicker.min.js | 26 - .../TableTools-2.1.5/css/TableTools.css | 321 - .../images/psd/copy document.psd | Bin 104729 -> 0 bytes .../TableTools-2.1.5/js/TableTools.min.js | 77 - .../TableTools-2.1.5/js/TableTools.min.js.gz | Bin 8785 -> 0 bytes .../TableTools-2.1.5/swf/copy_csv_xls.swf | Bin 2165 -> 0 bytes .../TableTools-2.1.5/swf/copy_csv_xls_pdf.swf | Bin 58824 -> 0 bytes .../as3/ZeroClipboard.as | 18 +- .../as3/ZeroClipboardPdf.as | 18 +- .../as3/lib/AlivePDF.swc | Bin .../plugin/TableTools/css/TableTools.css | 264 + .../css/TableTools_JUI.css | 28 +- .../images/background.png | Bin .../images/collection.png | Bin .../images/collection_hover.png | Bin .../images/copy.png | Bin .../images/copy_hover.png | Bin .../images/csv.png | Bin .../images/csv_hover.png | Bin .../images/pdf.png | Bin .../images/pdf_hover.png | Bin .../images/print.png | Bin .../images/print_hover.png | Bin .../images/psd/collection.psd | Bin .../images/psd/file_types.psd | Bin .../images/psd/printer.psd | Bin .../images/xls.png | Bin .../images/xls_hover.png | Bin .../js/TableTools.js | 1539 +-- .../plugin/TableTools/js/TableTools.min.js | 81 + .../plugin/TableTools/js/TableTools.min.js.gz | Bin 0 -> 8635 bytes .../js/ZeroClipboard.js | 42 +- .../plugin/TableTools/swf/copy_cvs_xls.swf | Bin 0 -> 2125 bytes .../TableTools/swf/copy_cvs_xls_pdf.swf | Bin 0 -> 58813 bytes .../plugin/dataTables.TableTools.js | 2569 +++++ .../plugin/dataTables.ZeroClipboard.js | 367 + .../public/js/fullcalendar/AIRTIME_DEV_README | 27 +- .../public/js/fullcalendar/fullcalendar.js | 2 +- airtime_mvc/public/js/libs/jquery-1.10.2.js | 9789 ----------------- .../public/js/libs/jquery-1.8.3.min.js | 2 - .../public/js/libs/jquery-migrate-1.2.1.js | 521 - .../public/js/libs/jquery-ui-1.8.24.min.js | 5 - airtime_mvc/public/js/libs/underscore-min.js | 6 - .../timepicker/jquery-ui-timepicker-addon.js | 2128 ---- changelog | 30 - install_full/php5/airtime.ini | 5 - install_full/ubuntu/airtime-full-install | 32 +- install_minimal/include/airtime-constants.php | 2 +- install_minimal/include/airtime-upgrade.php | 8 - .../upgrades/airtime-2.4.1/DbUpgrade.php | 24 - .../airtime-2.4.1/airtime-upgrade.php | 8 - .../upgrades/airtime-2.4.1/data/upgrade.sql | 3 - .../upgrades/airtime-2.5.0/DbUpgrade.php | 25 - .../airtime-2.5.0/airtime-upgrade.php | 8 - .../upgrades/airtime-2.5.0/data/schema.sql | 83 - .../upgrades/airtime-2.5.0/data/upgrade.sql | 7 - python_apps/api_clients/api_client.py | 2 +- .../media-monitor2/media/monitor/metadata.py | 1 + .../media-monitor2/media/monitor/pure.py | 36 +- .../pypo/liquidsoap_scripts/ls_script.liq | 12 +- python_apps/pypo/recorder/recorder.py | 10 +- python_apps/pypo/schedule/pypofetch.py | 3 +- 200 files changed, 5491 insertions(+), 41784 deletions(-) delete mode 100644 airtime_mvc/application/controllers/PlayouthistorytemplateController.php delete mode 100644 airtime_mvc/application/forms/EditHistory.php delete mode 100644 airtime_mvc/application/forms/EditHistoryFile.php delete mode 100644 airtime_mvc/application/forms/EditHistoryItem.php create mode 100644 airtime_mvc/application/models/PlayoutHistory.php delete mode 100644 airtime_mvc/application/models/airtime/CcFileTag.php delete mode 100644 airtime_mvc/application/models/airtime/CcFileTagPeer.php delete mode 100644 airtime_mvc/application/models/airtime/CcFileTagQuery.php delete mode 100644 airtime_mvc/application/models/airtime/CcMountName.php delete mode 100644 airtime_mvc/application/models/airtime/CcMountNamePeer.php delete mode 100644 airtime_mvc/application/models/airtime/CcMountNameQuery.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistory.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaDataPeer.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaDataQuery.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryPeer.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryQuery.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplate.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplateField.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplateFieldPeer.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplateFieldQuery.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplatePeer.php delete mode 100644 airtime_mvc/application/models/airtime/CcPlayoutHistoryTemplateQuery.php delete mode 100644 airtime_mvc/application/models/airtime/CcTag.php delete mode 100644 airtime_mvc/application/models/airtime/CcTagPeer.php delete mode 100644 airtime_mvc/application/models/airtime/CcTagQuery.php delete mode 100644 airtime_mvc/application/models/airtime/map/CcFileTagTableMap.php delete mode 100644 airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php delete mode 100644 airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php delete mode 100644 airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php delete mode 100644 airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateFieldTableMap.php delete mode 100644 airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTableMap.php delete mode 100644 airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php delete mode 100644 airtime_mvc/application/models/airtime/map/CcTagTableMap.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcFileTag.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcFileTagPeer.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcFileTagQuery.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcMountName.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplate.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateField.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateFieldPeer.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateFieldQuery.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplatePeer.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateQuery.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcTag.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php delete mode 100644 airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php delete mode 100644 airtime_mvc/application/services/HistoryService.php delete mode 100644 airtime_mvc/application/views/scripts/form/edit-history-file.phtml delete mode 100644 airtime_mvc/application/views/scripts/form/edit-history-item.phtml delete mode 100644 airtime_mvc/application/views/scripts/playouthistory/dialog.phtml delete mode 100644 airtime_mvc/application/views/scripts/playouthistorytemplate/configure-template.phtml delete mode 100644 airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml delete mode 100644 airtime_mvc/application/views/scripts/playouthistorytemplate/template-contents.phtml delete mode 100644 airtime_mvc/public/css/bootstrap-datetimepicker.min.css delete mode 100644 airtime_mvc/public/css/fullcalendar-old.css create mode 100644 airtime_mvc/public/css/fullcalendar.print.css delete mode 100644 airtime_mvc/public/css/history_styles.css delete mode 100644 airtime_mvc/public/css/images/drag.png delete mode 100644 airtime_mvc/public/css/jquery-ui-timepicker-addon.css delete mode 100644 airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js delete mode 100644 airtime_mvc/public/js/airtime/playouthistory/template.js delete mode 100644 airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js delete mode 100644 airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js delete mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/css/TableTools.css delete mode 100755 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/copy document.psd delete mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js delete mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js.gz delete mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls.swf delete mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls_pdf.swf rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/as3/ZeroClipboard.as (88%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/as3/ZeroClipboardPdf.as (91%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/as3/lib/AlivePDF.swc (100%) create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools/css/TableTools.css rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/css/TableTools_JUI.css (83%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/background.png (100%) rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/collection.png (100%) rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/collection_hover.png (100%) rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/copy.png (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/copy_hover.png (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/csv.png (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/csv_hover.png (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/pdf.png (100%) rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/pdf_hover.png (100%) rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/print.png (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/print_hover.png (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/psd/collection.psd (100%) rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/psd/file_types.psd (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/psd/printer.psd (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/xls.png (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/images/xls_hover.png (100%) mode change 100755 => 100644 rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/js/TableTools.js (66%) mode change 100755 => 100644 create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.min.js create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.min.js.gz rename airtime_mvc/public/js/datatables/plugin/{TableTools-2.1.5 => TableTools}/js/ZeroClipboard.js (86%) mode change 100755 => 100644 create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools/swf/copy_cvs_xls.swf create mode 100644 airtime_mvc/public/js/datatables/plugin/TableTools/swf/copy_cvs_xls_pdf.swf create mode 100644 airtime_mvc/public/js/datatables/plugin/dataTables.TableTools.js create mode 100644 airtime_mvc/public/js/datatables/plugin/dataTables.ZeroClipboard.js delete mode 100644 airtime_mvc/public/js/libs/jquery-1.10.2.js delete mode 100644 airtime_mvc/public/js/libs/jquery-1.8.3.min.js delete mode 100644 airtime_mvc/public/js/libs/jquery-migrate-1.2.1.js delete mode 100644 airtime_mvc/public/js/libs/jquery-ui-1.8.24.min.js delete mode 100644 airtime_mvc/public/js/libs/underscore-min.js delete mode 100644 airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js delete mode 100644 install_full/php5/airtime.ini delete mode 100644 install_minimal/upgrades/airtime-2.4.1/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.4.1/data/upgrade.sql delete mode 100644 install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php delete mode 100644 install_minimal/upgrades/airtime-2.5.0/data/schema.sql delete mode 100644 install_minimal/upgrades/airtime-2.5.0/data/upgrade.sql diff --git a/CREDITS b/CREDITS index 518f7366c..83b80fcc6 100644 --- a/CREDITS +++ b/CREDITS @@ -2,24 +2,10 @@ CREDITS ======= -Version 2.5.0 -------------- - -Denise Rigato (denise.rigato@sourcefabric.org) - Role: Software Developer - -Naomi Aro (naomi.aro@sourcefabric.org) - Role: Software Developer - -Cliff Wang (cliff.wang@sourcefabric.org) - Role: QA - -Daniel James (daniel.james@sourcefabric.org) - Role: Documentor & QA - - -Version 2.4.1 +Version 2.4.0 ------------- +Martin Konecny (martin.konecny@sourcefabric.org) + Role: Developer Team Lead Denise Rigato (denise.rigato@sourcefabric.org) Role: Software Developer diff --git a/LICENSE_3RD_PARTY b/LICENSE_3RD_PARTY index 7096a6f55..e48f0b314 100644 --- a/LICENSE_3RD_PARTY +++ b/LICENSE_3RD_PARTY @@ -8,7 +8,7 @@ Common Non-linked Code - Web site: https://github.com/torvalds/linux - License: GPLv2 - * RabbitMQ + * RabbitMQ (works with version 1.7.2 and above) - What is it: Interprocess Message Passing with Queuing - Web site: http://www.rabbitmq.com/ - License: Mozilla Public License (http://www.rabbitmq.com/mpl.html) @@ -63,11 +63,11 @@ Non-linked code: - Web site: http://httpd.apache.org/ - License: Apache 2.0. See http://httpd.apache.org/docs/2.2/license.html - * PostgreSQL 9.1 + * PostgreSQL 8.4 - Web site: http://www.postgresql.org/ - License: The PostgreSQL License. See http://www.postgresql.org/about/licence - * PHP 5.3 + * PHP 5.3 - Web site: http://www.php.net/ - License: The PHP License. See http://www.php.net/license/3_01.txt @@ -137,7 +137,7 @@ Linked code: - License: MIT Non-linked code: - * Python 2.7 + * Python 2.6 - Web site: http://www.python.org/ - License: PSF License. See http://docs.python.org/license.html @@ -158,11 +158,11 @@ Linked code: - Compatible with GPLv3? Yes. Non-linked code: - * Python 2.7 + * Python 2.6 - Web site: http://www.python.org/ - License: PSF License. See http://docs.python.org/license.html - * ecasound 2.8.1 + * ecasound 2.7.2 - What is it: Records audio from line-in - Web site: http://www.eca.cx/ecasound/ - License: GPLv2 @@ -177,10 +177,10 @@ Linked code: - Compatible with GPLv3? Yes. Non-linked code: - * Python 2.7 + * Python 2.6 - Web site: http://www.python.org/ - License: PSF License. See http://docs.python.org/license.html - * Liquidsoap 1.1.1 + * Liquidsoap 1.0.1 - Web site: http://savonet.sourceforge.net/ - License: GPLv2 diff --git a/VERSION b/VERSION index 5a1ef0b72..42fde3a5e 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ PRODUCT_ID=Airtime -PRODUCT_RELEASE=2.5.0 +PRODUCT_RELEASE=2.4.0 diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php index 313e448c8..e289e9c54 100644 --- a/airtime_mvc/application/Bootstrap.php +++ b/airtime_mvc/application/Bootstrap.php @@ -43,14 +43,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $view = $this->getResource('view'); $view->doctype('XHTML1_STRICT'); } - + protected function _initGlobals() { $view = $this->getResource('view'); $baseUrl = Application_Common_OsPath::getBaseDir(); - + $view->headScript()->appendScript("var baseUrl = '$baseUrl'"); - + $user = Application_Model_User::GetCurrentUser(); if (!is_null($user)){ $userType = $user->getType(); @@ -58,7 +58,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $userType = ""; } $view->headScript()->appendScript("var userType = '$userType';"); - + } protected function _initHeadLink() @@ -68,13 +68,13 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $view = $this->getResource('view'); $baseUrl = Application_Common_OsPath::getBaseDir(); - - $view->headLink()->appendStylesheet($baseUrl.'css/bootstrap.css?'.$CC_CONFIG['airtime_version']); + $view->headLink()->appendStylesheet($baseUrl.'css/redmond/jquery-ui-1.8.8.custom.css?'.$CC_CONFIG['airtime_version']); $view->headLink()->appendStylesheet($baseUrl.'css/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']); $view->headLink()->appendStylesheet($baseUrl.'css/qtip/jquery.qtip.min.css?'.$CC_CONFIG['airtime_version']); $view->headLink()->appendStylesheet($baseUrl.'css/styles.css?'.$CC_CONFIG['airtime_version']); $view->headLink()->appendStylesheet($baseUrl.'css/masterpanel.css?'.$CC_CONFIG['airtime_version']); + $view->headLink()->appendStylesheet($baseUrl.'css/bootstrap.css?'.$CC_CONFIG['airtime_version']); $view->headLink()->appendStylesheet($baseUrl.'css/tipsy/jquery.tipsy.css?'.$CC_CONFIG['airtime_version']); } @@ -83,26 +83,23 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $CC_CONFIG = Config::getConfig(); $view = $this->getResource('view'); - + $baseUrl = Application_Common_OsPath::getBaseDir(); - - $view->headScript()->appendFile($baseUrl.'js/libs/jquery-1.8.3.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'js/libs/jquery-ui-1.8.24.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'js/bootstrap/bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - - $view->headScript()->appendFile($baseUrl.'js/libs/underscore-min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - + + $view->headScript()->appendFile($baseUrl.'js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/qtip/jquery.qtip.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/sprintf/sprintf-0.7-beta1.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/bootstrap/bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/cookie/jquery.cookie.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/i18n/jquery.i18n.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'locale/general-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'locale/datatables-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendScript("$.i18n.setDictionary(general_dict)"); $view->headScript()->appendScript("var baseUrl='$baseUrl'"); - + //scripts for now playing bar $view->headScript()->appendFile($baseUrl.'js/airtime/airtime_bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/airtime/dashboard/helperfunctions.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); diff --git a/airtime_mvc/application/common/Timezone.php b/airtime_mvc/application/common/Timezone.php index 7da82f6f9..271ea5f02 100644 --- a/airtime_mvc/application/common/Timezone.php +++ b/airtime_mvc/application/common/Timezone.php @@ -14,8 +14,7 @@ class Application_Common_Timezone 'Australia' => DateTimeZone::AUSTRALIA, 'Europe' => DateTimeZone::EUROPE, 'Indian' => DateTimeZone::INDIAN, - 'Pacific' => DateTimeZone::PACIFIC, - 'UTC' => DateTimeZone::UTC + 'Pacific' => DateTimeZone::PACIFIC ); $tzlist = array(); diff --git a/airtime_mvc/application/configs/ACL.php b/airtime_mvc/application/configs/ACL.php index 83cba4b08..a23846a99 100644 --- a/airtime_mvc/application/configs/ACL.php +++ b/airtime_mvc/application/configs/ACL.php @@ -23,7 +23,6 @@ $ccAcl->add(new Zend_Acl_Resource('library')) ->add(new Zend_Acl_Resource('preference')) ->add(new Zend_Acl_Resource('showbuilder')) ->add(new Zend_Acl_Resource('playouthistory')) - ->add(new Zend_Acl_Resource('playouthistorytemplate')) ->add(new Zend_Acl_Resource('listenerstat')) ->add(new Zend_Acl_Resource('usersettings')) ->add(new Zend_Acl_Resource('audiopreview')) @@ -47,8 +46,7 @@ $ccAcl->allow('G', 'index') ->allow('H', 'plupload') ->allow('H', 'library') ->allow('H', 'playlist') - ->allow('H', 'playouthistory') - ->allow('A', 'playouthistorytemplate') + ->allow('A', 'playouthistory') ->allow('A', 'listenerstat') ->allow('A', 'user') ->allow('A', 'systemstatus') diff --git a/airtime_mvc/application/configs/classmap-airtime-conf.php b/airtime_mvc/application/configs/classmap-airtime-conf.php index fb4284681..ef0357425 100644 --- a/airtime_mvc/application/configs/classmap-airtime-conf.php +++ b/airtime_mvc/application/configs/classmap-airtime-conf.php @@ -183,13 +183,6 @@ return array ( 'BaseCcWebstreamMetadataPeer' => 'airtime/om/BaseCcWebstreamMetadataPeer.php', 'BaseCcWebstreamMetadata' => 'airtime/om/BaseCcWebstreamMetadata.php', 'BaseCcWebstreamMetadataQuery' => 'airtime/om/BaseCcWebstreamMetadataQuery.php', - 'CcMountNameTableMap' => 'airtime/map/CcMountNameTableMap.php', - 'CcMountNamePeer' => 'airtime/CcMountNamePeer.php', - 'CcMountName' => 'airtime/CcMountName.php', - 'CcMountNameQuery' => 'airtime/CcMountNameQuery.php', - 'BaseCcMountNamePeer' => 'airtime/om/BaseCcMountNamePeer.php', - 'BaseCcMountName' => 'airtime/om/BaseCcMountName.php', - 'BaseCcMountNameQuery' => 'airtime/om/BaseCcMountNameQuery.php', 'CcTimestampTableMap' => 'airtime/map/CcTimestampTableMap.php', 'CcTimestampPeer' => 'airtime/CcTimestampPeer.php', 'CcTimestamp' => 'airtime/CcTimestamp.php', @@ -211,32 +204,4 @@ return array ( 'BaseCcLocalePeer' => 'airtime/om/BaseCcLocalePeer.php', 'BaseCcLocale' => 'airtime/om/BaseCcLocale.php', 'BaseCcLocaleQuery' => 'airtime/om/BaseCcLocaleQuery.php', - 'CcPlayoutHistoryTableMap' => 'airtime/map/CcPlayoutHistoryTableMap.php', - 'CcPlayoutHistoryPeer' => 'airtime/CcPlayoutHistoryPeer.php', - 'CcPlayoutHistory' => 'airtime/CcPlayoutHistory.php', - 'CcPlayoutHistoryQuery' => 'airtime/CcPlayoutHistoryQuery.php', - 'BaseCcPlayoutHistoryPeer' => 'airtime/om/BaseCcPlayoutHistoryPeer.php', - 'BaseCcPlayoutHistory' => 'airtime/om/BaseCcPlayoutHistory.php', - 'BaseCcPlayoutHistoryQuery' => 'airtime/om/BaseCcPlayoutHistoryQuery.php', - 'CcPlayoutHistoryMetaDataTableMap' => 'airtime/map/CcPlayoutHistoryMetaDataTableMap.php', - 'CcPlayoutHistoryMetaDataPeer' => 'airtime/CcPlayoutHistoryMetaDataPeer.php', - 'CcPlayoutHistoryMetaData' => 'airtime/CcPlayoutHistoryMetaData.php', - 'CcPlayoutHistoryMetaDataQuery' => 'airtime/CcPlayoutHistoryMetaDataQuery.php', - 'BaseCcPlayoutHistoryMetaDataPeer' => 'airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php', - 'BaseCcPlayoutHistoryMetaData' => 'airtime/om/BaseCcPlayoutHistoryMetaData.php', - 'BaseCcPlayoutHistoryMetaDataQuery' => 'airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php', - 'CcPlayoutHistoryTemplateTableMap' => 'airtime/map/CcPlayoutHistoryTemplateTableMap.php', - 'CcPlayoutHistoryTemplatePeer' => 'airtime/CcPlayoutHistoryTemplatePeer.php', - 'CcPlayoutHistoryTemplate' => 'airtime/CcPlayoutHistoryTemplate.php', - 'CcPlayoutHistoryTemplateQuery' => 'airtime/CcPlayoutHistoryTemplateQuery.php', - 'BaseCcPlayoutHistoryTemplatePeer' => 'airtime/om/BaseCcPlayoutHistoryTemplatePeer.php', - 'BaseCcPlayoutHistoryTemplate' => 'airtime/om/BaseCcPlayoutHistoryTemplate.php', - 'BaseCcPlayoutHistoryTemplateQuery' => 'airtime/om/BaseCcPlayoutHistoryTemplateQuery.php', - 'CcPlayoutHistoryTemplateFieldTableMap' => 'airtime/map/CcPlayoutHistoryTemplateFieldTableMap.php', - 'CcPlayoutHistoryTemplateFieldPeer' => 'airtime/CcPlayoutHistoryTemplateFieldPeer.php', - 'CcPlayoutHistoryTemplateField' => 'airtime/CcPlayoutHistoryTemplateField.php', - 'CcPlayoutHistoryTemplateFieldQuery' => 'airtime/CcPlayoutHistoryTemplateFieldQuery.php', - 'BaseCcPlayoutHistoryTemplateFieldPeer' => 'airtime/om/BaseCcPlayoutHistoryTemplateFieldPeer.php', - 'BaseCcPlayoutHistoryTemplateField' => 'airtime/om/BaseCcPlayoutHistoryTemplateField.php', - 'BaseCcPlayoutHistoryTemplateFieldQuery' => 'airtime/om/BaseCcPlayoutHistoryTemplateFieldQuery.php', ); \ No newline at end of file diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 34f8cab41..4a1f3e55a 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -38,21 +38,6 @@ define('MDATA_KEY_CUE_OUT' , 'cueout'); define('UI_MDATA_VALUE_FORMAT_FILE' , 'File'); define('UI_MDATA_VALUE_FORMAT_STREAM' , 'live stream'); -//User types -define('UTYPE_HOST' , 'H'); -define('UTYPE_ADMIN' , 'A'); -define('UTYPE_GUEST' , 'G'); -define('UTYPE_PROGRAM_MANAGER' , 'P'); - -//Constants for playout history template fields -define('TEMPLATE_DATE', 'date'); -define('TEMPLATE_TIME', 'time'); -define('TEMPLATE_DATETIME', 'datetime'); -define('TEMPLATE_STRING', 'string'); -define('TEMPLATE_BOOLEAN', 'boolean'); -define('TEMPLATE_INT', 'integer'); -define('TEMPLATE_FLOAT', 'float'); - // Session Keys define('UI_PLAYLISTCONTROLLER_OBJ_SESSNAME', 'PLAYLISTCONTROLLER_OBJ'); /*define('UI_PLAYLIST_SESSNAME', 'PLAYLIST'); diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index f3149f146..32b4af39d 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -20,7 +20,7 @@ $pages = array( 'module' => 'default', 'controller' => 'Plupload', 'action' => 'index', - 'resource' => 'plupload' + 'resource' => 'plupload' ), array( 'label' => _('Library'), @@ -79,6 +79,13 @@ $pages = array( 'action' => 'index', 'resource' => 'systemstatus' ), + array( + 'label' => _('Playout History'), + 'module' => 'default', + 'controller' => 'playouthistory', + 'action' => 'index', + 'resource' => 'playouthistory' + ), array( 'label' => _('Listener Stats'), 'module' => 'default', @@ -88,27 +95,6 @@ $pages = array( ) ) ), - array( - 'label' => _('History'), - 'uri' => '#', - 'resource' => 'playouthistory', - 'pages' => array( - array( - 'label' => _('Playout History'), - 'module' => 'default', - 'controller' => 'playouthistory', - 'action' => 'index', - 'resource' => 'playouthistory' - ), - array( - 'label' => _('History Templates'), - 'module' => 'default', - 'controller' => 'playouthistorytemplate', - 'action' => 'index', - 'resource' => 'playouthistorytemplate' - ), - ) - ), array( 'label' => _('Help'), 'uri' => '#', diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index ac32ae832..63c24d14a 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -209,43 +209,6 @@ class ApiController extends Zend_Controller_Action } } - public function onAirLightAction() - { - $this->view->layout()->disableLayout(); - $this->_helper->viewRenderer->setNoRender(true); - - $result = array(); - $result["on_air_light"] = false; - $result["on_air_light_expected_status"] = false; - $result["station_down"] = false; - - $range = Application_Model_Schedule::GetPlayOrderRange(); - - $isItemCurrentlyScheduled = !is_null($range["current"]) && count($range["currentShow"]) > 0 ? true : false; - - $isCurrentItemPlaying = $range["current"]["media_item_played"] ? true : false; - - if ($isItemCurrentlyScheduled || - Application_Model_Preference::GetSourceSwitchStatus("live_dj") == "on" || - Application_Model_Preference::GetSourceSwitchStatus("master_dj") == "on") - { - $result["on_air_light_expected_status"] = true; - } - - if (($isItemCurrentlyScheduled && $isCurrentItemPlaying) || - Application_Model_Preference::GetSourceSwitchStatus("live_dj") == "on" || - Application_Model_Preference::GetSourceSwitchStatus("master_dj") == "on") - { - $result["on_air_light"] = true; - } - - if ($result["on_air_light_expected_status"] != $result["on_air_light"]) { - $result["station_down"] = true; - } - - echo isset($_GET['callback']) ? $_GET['callback'].'('.json_encode($result).')' : json_encode($result); - } - /** * Retrieve the currently playing show as well as upcoming shows. * Number of shows returned and the time interval in which to @@ -400,9 +363,6 @@ class ApiController extends Zend_Controller_Action $media_id = $this->_getParam("media_id"); Logging::debug("Received notification of new media item start: $media_id"); Application_Model_Schedule::UpdateMediaPlayedStatus($media_id); - - $historyService = new Application_Service_HistoryService(); - $historyService->insertPlayedItem($media_id); //set a 'last played' timestamp for media item //needed for smart blocks @@ -1009,30 +969,23 @@ class ApiController extends Zend_Controller_Action //calculated with silan by actually scanning the entire file. This //process takes a really long time, and so we only do it in the background //after the file has already been imported -MK - try { - $length = $file->getDbLength(); - if (isset($info['length'])) { - $length = $info['length']; - //length decimal number in seconds. Need to convert it to format - //HH:mm:ss to get around silly PHP limitations. - $length = Application_Common_DateHelper::secondsToPlaylistTime($length); - $file->setDbLength($length); - } + $length = $file->getDbLength(); + if (isset($info['length'])) { + $length = $info['length']; + //length decimal number in seconds. Need to convert it to format + //HH:mm:ss to get around silly PHP limitations. + $length = Application_Common_DateHelper::secondsToPlaylistTime($length); - $cuein = isset($info['cuein']) ? $info['cuein'] : 0; - $cueout = isset($info['cueout']) ? $info['cueout'] : $length; - - $file->setDbCuein($cuein); - $file->setDbCueout($cueout); - $file->setDbSilanCheck(true); - $file->save(); - } catch (Exception $e) { - Logging::info("Failed to update silan values for ".$file->getDbTrackTitle()); - Logging::info("File length analyzed by Silan is: ".$length); - //set silan_check to true so we don't attempt to re-anaylze again - $file->setDbSilanCheck(true); - $file->save(); + $file->setDbLength($length); } + + $cuein = isset($info['cuein']) ? $info['cuein'] : 0; + $cueout = isset($info['cueout']) ? $info['cueout'] : $length; + + $file->setDbCuein($cuein); + $file->setDbCueout($cueout); + $file->setDbSilanCheck(true); + $file->save(); } $this->_helper->json->sendJson(array()); diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index 2102a662e..780348372 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -53,7 +53,7 @@ class LibraryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/playlist/smart_blockbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - + $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/observer/observer.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/config.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/curves.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); @@ -68,9 +68,9 @@ class LibraryController extends Zend_Controller_Action //arbitrary attributes need to be allowed to set an id for the templates. $this->view->headScript()->setAllowArbitraryAttributes(true); - //$this->view->headScript()->appendScript(file_get_contents(APPLICATION_PATH.'/../public/js/waveformplaylist/templates/bottombar.tpl'), + //$this->view->headScript()->appendScript(file_get_contents(APPLICATION_PATH.'/../public/js/waveformplaylist/templates/bottombar.tpl'), // 'text/template', array('id' => 'tpl_playlist_cues', 'noescape' => true)); - + $this->view->headLink()->appendStylesheet($baseUrl.'css/playlist_builder.css?'.$CC_CONFIG['airtime_version']); try { @@ -179,7 +179,9 @@ class LibraryController extends Zend_Controller_Action $type = $this->_getParam('type'); //playlist||timeline $screen = $this->_getParam('screen'); - + + $baseUrl = Application_Common_OsPath::getBaseDir(); + $menu = array(); $userInfo = Zend_Auth::getInstance()->getStorage()->read(); @@ -248,7 +250,7 @@ class LibraryController extends Zend_Controller_Action } elseif ($type == "stream") { $webstream = CcWebstreamQuery::create()->findPK($id); $obj = new Application_Model_Webstream($webstream); - + $menu["play"]["mime"] = $webstream->getDbMime(); if (isset($obj_sess->id) && $screen == "playlist") { @@ -371,15 +373,15 @@ class LibraryController extends Zend_Controller_Action $this->view->message = $message; } } - + // duplicate playlist public function duplicateAction(){ $params = $this->getRequest()->getParams(); $id = $params['id']; - + $originalPl = new Application_Model_Playlist($id); $newPl = new Application_Model_Playlist(); - + $contents = $originalPl->getContents(); foreach ($contents as &$c) { if ($c['type'] == '0') { @@ -391,15 +393,15 @@ class LibraryController extends Zend_Controller_Action } $c[0] = $c['item_id']; } - + $newPl->addAudioClips($contents, null, 'before'); - + $newPl->setCreator(Application_Model_User::getCurrentUser()->getId()); $newPl->setDescription($originalPl->getDescription()); - + list($plFadeIn, ) = $originalPl->getFadeInfo(0); list(, $plFadeOut) = $originalPl->getFadeInfo($originalPl->getSize()-1); - + $newPl->setfades($plFadeIn, $plFadeOut); $newPl->setName(sprintf(_("Copy of %s"), $originalPl->getName())); } @@ -547,7 +549,7 @@ class LibraryController extends Zend_Controller_Action $id = $this->_getParam('id'); Application_Model_Soundcloud::uploadSoundcloud($id); // we should die with ui info - $this->_helper->json->sendJson(null); + $this->_helper->json->sendJson(null); } public function getUploadToSoundcloudStatusAction() diff --git a/airtime_mvc/application/controllers/ListenerstatController.php b/airtime_mvc/application/controllers/ListenerstatController.php index 3ec495839..bb280378d 100644 --- a/airtime_mvc/application/controllers/ListenerstatController.php +++ b/airtime_mvc/application/controllers/ListenerstatController.php @@ -9,36 +9,36 @@ class ListenerstatController extends Zend_Controller_Action ->addActionContext('get-data', 'json') ->initContext(); } - + public function indexAction() { $CC_CONFIG = Config::getConfig(); - + $request = $this->getRequest(); $baseUrl = Application_Common_OsPath::getBaseDir(); - + $this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.crosshair.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/listenerstat/listenerstat.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - + $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); - + //default time is the last 24 hours. $now = time(); $from = $request->getParam("from", $now - (24*60*60)); $to = $request->getParam("to", $now); - + $start = DateTime::createFromFormat("U", $from, new DateTimeZone("UTC")); $start->setTimezone(new DateTimeZone(date_default_timezone_get())); $end = DateTime::createFromFormat("U", $to, new DateTimeZone("UTC")); $end->setTimezone(new DateTimeZone(date_default_timezone_get())); - + $form = new Application_Form_DateRange(); $form->populate(array( 'his_date_start' => $start->format("Y-m-d"), @@ -46,7 +46,7 @@ class ListenerstatController extends Zend_Controller_Action 'his_date_end' => $end->format("Y-m-d"), 'his_time_end' => $end->format("H:i") )); - + $errorStatus = Application_Model_StreamSetting::GetAllListenerStatErrors(); Logging::info($errorStatus); $out = array(); @@ -57,24 +57,25 @@ class ListenerstatController extends Zend_Controller_Action } $out[$key[0]] = $v['value']; } - + $this->view->errorStatus = $out; $this->view->date_form = $form; } - + public function getDataAction(){ $request = $this->getRequest(); $current_time = time(); - + $params = $request->getParams(); - + $starts_epoch = $request->getParam("startTimestamp", $current_time - (60*60*24)); $ends_epoch = $request->getParam("endTimestamp", $current_time); - + $mountName = $request->getParam("mountName", null); + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - - $data = Application_Model_ListenerStat::getDataPointsWithinRange($startsDT->format("Y-m-d H:i:s"), $endsDT->format("Y-m-d H:i:s")); - $this->_helper->json->sendJson($data); + + $data = Application_Model_ListenerStat::getDataPointsWithinRange($startsDT->format("Y-m-d H:i:s"), $endsDT->format("Y-m-d H:i:s"), $mountName); + $this->_helper->json->sendJson($data); } } diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index d28c96412..3269fcd46 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -6,16 +6,7 @@ class PlayouthistoryController extends Zend_Controller_Action { $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext - ->addActionContext('file-history-feed', 'json') - ->addActionContext('item-history-feed', 'json') - ->addActionContext('show-history-feed', 'json') - ->addActionContext('edit-file-item', 'json') - ->addActionContext('create-list-item', 'json') - ->addActionContext('edit-list-item', 'json') - ->addActionContext('delete-list-item', 'json') - ->addActionContext('delete-list-items', 'json') - ->addActionContext('update-list-item', 'json') - ->addActionContext('update-file-item', 'json') + ->addActionContext('playout-history-feed', 'json') ->initContext(); } @@ -51,219 +42,45 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/historytable.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/bootstrap-datetimepicker.min.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools-2.1.5/css/TableTools.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools/css/TableTools.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); - - //set datatables columns for display of data. - $historyService = new Application_Service_HistoryService(); - $columns = json_encode($historyService->getDatatablesLogSheetColumns()); - $script = "localStorage.setItem( 'datatables-historyitem-aoColumns', JSON.stringify($columns) ); "; - - $columns = json_encode($historyService->getDatatablesFileSummaryColumns()); - $script.= "localStorage.setItem( 'datatables-historyfile-aoColumns', JSON.stringify($columns) );"; - $this->view->headScript()->appendScript($script); - - $user = Application_Model_User::getCurrentUser(); - $this->view->userType = $user->getType(); } - public function fileHistoryFeedAction() - { - try { - $request = $this->getRequest(); - $current_time = time(); - - $params = $request->getParams(); - - $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); - $ends_epoch = $request->getParam("end", $current_time); - - $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); - $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - - $historyService = new Application_Service_HistoryService(); - $r = $historyService->getFileSummaryData($startsDT, $endsDT, $params); - - $this->view->sEcho = $r["sEcho"]; - $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; - $this->view->iTotalRecords = $r["iTotalRecords"]; - $this->view->history = $r["history"]; - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function itemHistoryFeedAction() - { - try { - $request = $this->getRequest(); - $current_time = time(); - - $params = $request->getParams(); - - $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); - $ends_epoch = $request->getParam("end", $current_time); - $instance = $request->getParam("instance_id", null); - - $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); - $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - - $historyService = new Application_Service_HistoryService(); - $r = $historyService->getPlayedItemData($startsDT, $endsDT, $params, $instance); - - $this->view->sEcho = $r["sEcho"]; - $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; - $this->view->iTotalRecords = $r["iTotalRecords"]; - $this->view->history = $r["history"]; - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function showHistoryFeedAction() - { - try { - $request = $this->getRequest(); - $current_time = time(); - $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); - $ends_epoch = $request->getParam("end", $current_time); - - $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); - $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - - $historyService = new Application_Service_HistoryService(); - $shows = $historyService->getShowList($startsDT, $endsDT); - - $this->_helper->json->sendJson($shows); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function editFileItemAction() - { - $file_id = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); - $form = $historyService->makeHistoryFileForm($file_id); - - $this->view->form = $form; - $this->view->dialog = $this->view->render('playouthistory/dialog.phtml'); - - unset($this->view->form); - } - - public function createListItemAction() - { - try { - $request = $this->getRequest(); - $params = $request->getPost(); - Logging::info($params); - - $historyService = new Application_Service_HistoryService(); - $json = $historyService->createPlayedItem($params); - - if (isset($json["form"])) { - $this->view->form = $json["form"]; - $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - - unset($this->view->form); - } - - $this->_helper->json->sendJson($json); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function editListItemAction() - { - $id = $this->_getParam('id', null); - - $populate = isset($id) ? true : false; - - $historyService = new Application_Service_HistoryService(); - $form = $historyService->makeHistoryItemForm($id, $populate); - - $this->view->form = $form; - $this->view->dialog = $this->view->render('playouthistory/dialog.phtml'); - - unset($this->view->form); - } - - public function deleteListItemAction() - { - $history_id = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); - $historyService->deletePlayedItem($history_id); - } - - public function deleteListItemsAction() - { - $history_ids = $this->_getParam('ids'); - - $historyService = new Application_Service_HistoryService(); - $historyService->deletePlayedItems($history_ids); - } - - public function updateListItemAction() - { - try { - $request = $this->getRequest(); - $params = $request->getPost(); - Logging::info($params); - - $historyService = new Application_Service_HistoryService(); - $json = $historyService->editPlayedItem($params); - - if (isset($json["form"])) { - $this->view->form = $json["form"]; - $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - - unset($this->view->form); - } - - $this->_helper->json->sendJson($json); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function updateFileItemAction() + public function playoutHistoryFeedAction() { $request = $this->getRequest(); - $params = $request->getPost(); - Logging::info($params); + $current_time = time(); - $historyService = new Application_Service_HistoryService(); - $json = $historyService->editPlayedFile($params); + $params = $request->getParams(); - $this->_helper->json->sendJson($json); + $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); + $ends_epoch = $request->getParam("end", $current_time); + + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); + $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); + + Logging::info("history starts {$startsDT->format("Y-m-d H:i:s")}"); + Logging::info("history ends {$endsDT->format("Y-m-d H:i:s")}"); + + $history = new Application_Model_PlayoutHistory($startsDT, $endsDT, $params); + + $r = $history->getItems(); + + $this->view->sEcho = $r["sEcho"]; + $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; + $this->view->iTotalRecords = $r["iTotalRecords"]; + $this->view->history = $r["history"]; } + } diff --git a/airtime_mvc/application/controllers/PlayouthistorytemplateController.php b/airtime_mvc/application/controllers/PlayouthistorytemplateController.php deleted file mode 100644 index c6651d8eb..000000000 --- a/airtime_mvc/application/controllers/PlayouthistorytemplateController.php +++ /dev/null @@ -1,143 +0,0 @@ -_helper->getHelper('AjaxContext'); - $ajaxContext - ->addActionContext('create-template', 'json') - ->addActionContext('update-template', 'json') - ->addActionContext('delete-template', 'json') - ->addActionContext('set-template-default', 'json') - ->initContext(); - } - - public function indexAction() - { - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - $historyService = new Application_Service_HistoryService(); - $this->view->template_list = $historyService->getListItemTemplates(); - $this->view->template_file = $historyService->getFileTemplates(); - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - - public function configureTemplateAction() { - - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - try { - - $templateId = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); - $template = $historyService->loadTemplate($templateId); - - $templateType = $template["type"]; - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; - $mandatoryFields = $historyService->$getMandatoryFields(); - - $this->view->template_id = $templateId; - $this->view->template_name = $template["name"]; - $this->view->template_fields = $template["fields"]; - $this->view->template_type = $templateType; - $this->view->fileMD = $historyService->getFileMetadataTypes(); - $this->view->fields = $historyService->getFieldTypes(); - $this->view->required_fields = $mandatoryFields; - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - catch (Exception $e) { - Logging::info("Error?"); - Logging::info($e); - Logging::info($e->getMessage()); - - $this->_forward('index', 'playouthistorytemplate'); - } - } - - public function createTemplateAction() - { - $templateType = $this->_getParam('type', null); - - $request = $this->getRequest(); - $params = $request->getPost(); - - try { - $historyService = new Application_Service_HistoryService(); - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $id = $historyService->createTemplate($params); - - $this->view->url = $this->view->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - - $this->view->error = $e->getMessage(); - } - } - - public function setTemplateDefaultAction() - { - $templateId = $this->_getParam('id', null); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->setConfiguredTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function updateTemplateAction() - { - $templateId = $this->_getParam('id', null); - $name = $this->_getParam('name', null); - $fields = $this->_getParam('fields', array()); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->updateItemTemplate($templateId, $name, $fields); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function deleteTemplateAction() - { - $templateId = $this->_getParam('id'); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->deleteTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } -} \ No newline at end of file diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index e13547c88..b610063af 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -46,17 +46,6 @@ class ScheduleController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendScript( - "var calendarPref = {};\n". - "calendarPref.weekStart = ".Application_Model_Preference::GetWeekStartDay().";\n". - "calendarPref.timestamp = ".time().";\n". - "calendarPref.timezoneOffset = ".date("Z").";\n". - "calendarPref.timeScale = '".Application_Model_Preference::GetCalendarTimeScale()."';\n". - "calendarPref.timeInterval = ".Application_Model_Preference::GetCalendarTimeInterval().";\n". - "calendarPref.weekStartDay = ".Application_Model_Preference::GetWeekStartDay().";\n". - "var calendarEvents = null;" - ); - $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); //full-calendar-functions.js requires this variable, so that datePicker widget can be offset to server time instead of client time @@ -85,6 +74,7 @@ class ScheduleController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColReorder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); @@ -96,6 +86,7 @@ class ScheduleController extends Zend_Controller_Action $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/TableTools.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']); //End Show builder JS/CSS requirements @@ -107,6 +98,16 @@ class ScheduleController extends Zend_Controller_Action } $this->view->addNewShow = true; + $this->view->headScript()->appendScript( + "var calendarPref = {};\n". + "calendarPref.weekStart = ".Application_Model_Preference::GetWeekStartDay().";\n". + "calendarPref.timestamp = ".time().";\n". + "calendarPref.timezoneOffset = ".date("Z").";\n". + "calendarPref.timeScale = '".Application_Model_Preference::GetCalendarTimeScale()."';\n". + "calendarPref.timeInterval = ".Application_Model_Preference::GetCalendarTimeInterval().";\n". + "calendarPref.weekStartDay = ".Application_Model_Preference::GetWeekStartDay().";\n". + "var calendarEvents = null;" + ); } public function eventFeedAction() diff --git a/airtime_mvc/application/forms/EditHistory.php b/airtime_mvc/application/forms/EditHistory.php deleted file mode 100644 index ad7ae7a05..000000000 --- a/airtime_mvc/application/forms/EditHistory.php +++ /dev/null @@ -1,211 +0,0 @@ - array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "validators" => array( - array( - "class" => "Zend_Validate_Date", - "params" => array( - "format" => self::VALIDATE_DATE_FORMAT - ) - ) - ), - "filters" => array( - "StringTrim" - ) - ), - TEMPLATE_TIME => array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "validators" => array( - array( - "class" => "Zend_Validate_Date", - "params" => array( - "format" => self::VALIDATE_TIME_FORMAT - ) - ) - ), - "filters" => array( - "StringTrim" - ) - ), - TEMPLATE_DATETIME => array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "validators" => array( - array( - "class" => "Zend_Validate_Date", - "params" => array( - "format" => self::VALIDATE_DATETIME_FORMAT - ) - ) - ), - "filters" => array( - "StringTrim" - ) - ), - TEMPLATE_STRING => array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "filters" => array( - "StringTrim" - ) - ), - TEMPLATE_BOOLEAN => array( - "class" => "Zend_Form_Element_Checkbox", - "validators" => array( - array( - "class" => "Zend_Validate_InArray", - "options" => array( - "haystack" => array(0,1) - ) - ) - ) - ), - TEMPLATE_INT => array( - "class" => "Zend_Form_Element_Text", - "validators" => array( - array( - "class" => "Zend_Validate_Int", - ) - ), - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ) - ), - TEMPLATE_FLOAT => array( - "class" => "Zend_Form_Element_Text", - "attrs" => array( - "class" => self::TEXT_INPUT_CLASS - ), - "validators" => array( - array( - "class" => "Zend_Validate_Float", - ) - ) - ), - ); - - public function init() { - - $history_id = new Zend_Form_Element_Hidden($this::ID_PREFIX.'id'); - $history_id->setValidators(array( - new Zend_Validate_Int() - )); - $history_id->setDecorators(array('ViewHelper')); - $this->addElement($history_id); - - $dynamic_attrs = new Zend_Form_SubForm(); - $this->addSubForm($dynamic_attrs, $this::ID_PREFIX.'template'); - - // Add the submit button - $this->addElement('button', $this::ID_PREFIX.'save', array( - 'ignore' => true, - 'class' => 'btn '.$this::ID_PREFIX.'save', - 'label' => _('Save'), - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add the cancel button - $this->addElement('button', $this::ID_PREFIX.'cancel', array( - 'ignore' => true, - 'class' => 'btn '.$this::ID_PREFIX.'cancel', - 'label' => _('Cancel'), - 'decorators' => array( - 'ViewHelper' - ) - )); - } - - public function createFromTemplate($template, $required) { - - $templateSubForm = $this->getSubForm($this::ID_PREFIX.'template'); - - for ($i = 0, $len = count($template); $i < $len; $i++) { - - $item = $template[$i]; - //don't dynamically add this as it should be included in the - //init() function already if it should show up in the UI.. - if (in_array($item["name"], $required)) { - continue; - } - - $formElType = $this->formElTypes[$item[self::ITEM_TYPE]]; - - $label = $item[self::ITEM_ID_SUFFIX]; - $id = $this::ID_PREFIX.$label; - $el = new $formElType[self::ITEM_CLASS]($id); - $el->setLabel($item["label"]); - - if (isset($formElType["attrs"])) { - - $attrs = $formElType["attrs"]; - - foreach ($attrs as $key => $value) { - $el->setAttrib($key, $value); - } - } - - if (isset($formElType["filters"])) { - - $filters = $formElType["filters"]; - - foreach ($filters as $filter) { - $el->addFilter($filter); - } - } - - if (isset($formElType["validators"])) { - - $validators = $formElType["validators"]; - - foreach ($validators as $index => $arr) { - $options = isset($arr[self::ITEM_OPTIONS]) ? $arr[self::ITEM_OPTIONS] : null; - $validator = new $arr[self::ITEM_CLASS]($options); - - //extra validator info - if (isset($arr["params"])) { - - foreach ($arr["params"] as $key => $value) { - $method = "set".ucfirst($key); - $validator->$method($value); - } - } - - $el->addValidator($validator); - } - } - - $el->setDecorators(array('ViewHelper')); - $templateSubForm->addElement($el); - } - } -} \ No newline at end of file diff --git a/airtime_mvc/application/forms/EditHistoryFile.php b/airtime_mvc/application/forms/EditHistoryFile.php deleted file mode 100644 index b58db19a1..000000000 --- a/airtime_mvc/application/forms/EditHistoryFile.php +++ /dev/null @@ -1,22 +0,0 @@ -setDecorators( - array( - array('ViewScript', array('viewScript' => 'form/edit-history-file.phtml')) - ) - ); - } - - public function createFromTemplate($template, $required) { - - parent::createFromTemplate($template, $required); - } -} \ No newline at end of file diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php deleted file mode 100644 index 16ba5ded5..000000000 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ /dev/null @@ -1,66 +0,0 @@ -setDecorators(array( - 'PrepareElements', - array('ViewScript', array('viewScript' => 'form/edit-history-item.phtml')) - )); - - /* - $instance = new Zend_Form_Element_Select("instance_id"); - $instance->setLabel(_("Choose Show Instance")); - $instance->setMultiOptions(array("0" => "-----------")); - $instance->setValue(0); - $instance->setDecorators(array('ViewHelper')); - $this->addElement($instance); - */ - - $starts = new Zend_Form_Element_Text(self::ID_PREFIX.'starts'); - $starts->setValidators(array( - new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT) - )); - $starts->setAttrib('class', self::TEXT_INPUT_CLASS." datepicker"); - $starts->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT); - $starts->addFilter('StringTrim'); - $starts->setLabel(_('Start Time')); - $starts->setDecorators(array('ViewHelper')); - $starts->setRequired(true); - $this->addElement($starts); - - $ends = new Zend_Form_Element_Text(self::ID_PREFIX.'ends'); - $ends->setValidators(array( - new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT) - )); - $ends->setAttrib('class', self::TEXT_INPUT_CLASS." datepicker"); - $ends->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT); - $ends->addFilter('StringTrim'); - $ends->setLabel(_('End Time')); - $ends->setDecorators(array('ViewHelper')); - $ends->setRequired(true); - $this->addElement($ends); - } - - public function createFromTemplate($template, $required) { - - parent::createFromTemplate($template, $required); - } - - public function populateShowInstances($possibleInstances, $default) { - - $possibleInstances["0"] = _("No Show"); - - $instance = new Zend_Form_Element_Select("his_instance_select"); - //$instance->setLabel(_("Choose Show Instance")); - $instance->setMultiOptions($possibleInstances); - $instance->setValue($default); - $instance->setDecorators(array('ViewHelper')); - $this->addElement($instance); - } -} \ No newline at end of file diff --git a/airtime_mvc/application/forms/SmartBlockCriteria.php b/airtime_mvc/application/forms/SmartBlockCriteria.php index 52ea8d86d..cd588a215 100644 --- a/airtime_mvc/application/forms/SmartBlockCriteria.php +++ b/airtime_mvc/application/forms/SmartBlockCriteria.php @@ -5,7 +5,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm private $stringCriteriaOptions; private $numericCriteriaOptions; private $limitOptions; - + /* We need to know if the criteria value will be a string * or numeric value in order to populate the modifier * select list @@ -40,7 +40,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm "info_url" => "s", "year" => "n" ); - + private function getCriteriaOptions($option = null) { if (!isset($this->criteriaOptions)) { @@ -75,7 +75,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm "year" => _("Year") ); } - + if (is_null($option)) return $this->criteriaOptions; else return $this->criteriaOptions[$option]; } @@ -122,7 +122,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm } return $this->limitOptions; } - + public function init() { @@ -259,7 +259,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm $repeatTracks->setChecked($storedCrit["repeat_tracks"]["value"] == 1?true:false); } $this->addElement($repeatTracks); - + $limit = new Zend_Form_Element_Select('sp_limit_options'); $limit->setAttrib('class', 'sp_input_select') ->setDecorators(array('viewHelper')) @@ -268,7 +268,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm $limit->setValue($storedCrit["limit"]["modifier"]); } $this->addElement($limit); - + $limitValue = new Zend_Form_Element_Text('sp_limit_value'); $limitValue->setAttrib('class', 'sp_input_text_limit') ->setLabel(_('Limit to')) @@ -541,7 +541,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm $isValid = false; } // length check - if ($d['sp_criteria_value'] >= pow(2,31)) { + if (intval($d['sp_criteria_value']) >= pow(2,31)) { $element->addError(_("The value should be less then 2147483648")); $isValid = false; } diff --git a/airtime_mvc/application/models/Datatables.php b/airtime_mvc/application/models/Datatables.php index d39a939fa..b3b370352 100644 --- a/airtime_mvc/application/models/Datatables.php +++ b/airtime_mvc/application/models/Datatables.php @@ -58,6 +58,43 @@ class Application_Model_Datatables public static function findEntries($con, $displayColumns, $fromTable, $data, $dataProp = "aaData") { + $librarySetting = + Application_Model_Preference::getCurrentLibraryTableColumnMap(); + //$displayColumns[] = 'owner'; + + // map that maps original column position to db name + $current2dbname = array(); + // array of search terms + $orig2searchTerm = array(); + foreach ($data as $key => $d) { + if (strstr($key, "mDataProp_")) { + list($dump, $index) = explode("_", $key); + $current2dbname[$index] = $d; + } elseif (strstr($key, "sSearch_")) { + list($dump, $index) = explode("_", $key); + $orig2searchTerm[$index] = $d; + } + } + + // map that maps dbname to searchTerm + $dbname2searchTerm = array(); + foreach ($current2dbname as $currentPos => $dbname) { + $new_index = $librarySetting($currentPos); + // TODO : Fix this retarded hack later. Just a band aid for + // now at least we print some warnings so that we don't + // forget about this -- cc-4462 + if ( array_key_exists($new_index, $orig2searchTerm) ) { + $dbname2searchTerm[$dbname] = $orig2searchTerm[$new_index]; + } else { + Logging::warn("Trying to reorder to unknown index + printing as much debugging as possible..."); + $debug = array( + '$new_index' => $new_index, + '$currentPos' => $currentPos, + '$orig2searchTerm' => $orig2searchTerm); + Logging::warn($debug); + } + } $where = array(); /* Holds the parameters for binding after the statement has been @@ -65,45 +102,6 @@ class Application_Model_Datatables $params = array(); if (isset($data['advSearch']) && $data['advSearch'] === 'true') { - - $librarySetting = - Application_Model_Preference::getCurrentLibraryTableColumnMap(); - //$displayColumns[] = 'owner'; - - // map that maps original column position to db name - $current2dbname = array(); - // array of search terms - $orig2searchTerm = array(); - foreach ($data as $key => $d) { - if (strstr($key, "mDataProp_")) { - list($dump, $index) = explode("_", $key); - $current2dbname[$index] = $d; - } elseif (strstr($key, "sSearch_")) { - list($dump, $index) = explode("_", $key); - $orig2searchTerm[$index] = $d; - } - } - - // map that maps dbname to searchTerm - $dbname2searchTerm = array(); - foreach ($current2dbname as $currentPos => $dbname) { - $new_index = $librarySetting($currentPos); - // TODO : Fix this retarded hack later. Just a band aid for - // now at least we print some warnings so that we don't - // forget about this -- cc-4462 - if ( array_key_exists($new_index, $orig2searchTerm) ) { - $dbname2searchTerm[$dbname] = $orig2searchTerm[$new_index]; - } else { - Logging::warn("Trying to reorder to unknown index - printing as much debugging as possible..."); - $debug = array( - '$new_index' => $new_index, - '$currentPos' => $currentPos, - '$orig2searchTerm' => $orig2searchTerm); - Logging::warn($debug); - } - } - $advancedWhere = self::buildWhereClauseForAdvancedSearch($dbname2searchTerm); if (!empty($advancedWhere['clause'])) { $where[] = join(" AND ", $advancedWhere['clause']); @@ -121,6 +119,7 @@ class Application_Model_Datatables $sql = $selectorCount." FROM ".$fromTable; $sqlTotalRows = $sql; + if (isset($searchTerms)) { $searchCols = array(); for ($i = 0; $i < $data["iColumns"]; $i++) { @@ -165,47 +164,57 @@ class Application_Model_Datatables $sql = $selectorRows." FROM ".$fromTable." WHERE ".$where." ORDER BY ".$orderby; - } - else { + //limit the results returned. + if ($displayLength !== -1) { + $sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength; + } + } else { $sql = $selectorRows." FROM ".$fromTable." ORDER BY ".$orderby; - } - //limit the results returned. - if ($displayLength !== -1) { - $sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength; + //limit the results returned. + if ($displayLength !== -1) { + $sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength; + } } - try { - - //Logging::info($sqlTotalRows); - + $r = $con->query($sqlTotalRows); $totalRows = $r->fetchColumn(0); if (isset($sqlTotalDisplayRows)) { - //Logging::info("sql is set"); - //Logging::info($sqlTotalDisplayRows); $totalDisplayRows = Application_Common_Database::prepareAndExecute($sqlTotalDisplayRows, $params, 'column'); - } - else { - //Logging::info("sql is not set."); + } else { $totalDisplayRows = $totalRows; } //TODO if ($needToBind) { $results = Application_Common_Database::prepareAndExecute($sql, $params); - } - else { + } else { $stmt = $con->query($sql); $stmt->setFetchMode(PDO::FETCH_ASSOC); $results = $stmt->fetchAll(); } + + // we need to go over all items and fix length for playlist + // in case the playlist contains dynamic block + foreach ($results as &$r) { + //this function is also called for Manage Users so in + //this case there will be no 'ftype' + if (isset($r['ftype'])) { + if ($r['ftype'] == 'playlist') { + $pl = new Application_Model_Playlist($r['id']); + $r['length'] = $pl->getLength(); + } elseif ($r['ftype'] == "block") { + $bl = new Application_Model_Block($r['id']); + $r['bl_type'] = $bl->isStatic() ? 'static' : 'dynamic'; + $r['length'] = $bl->getLength(); + } + } + } + } catch (Exception $e) { + Logging::debug($e->getMessage()); } - catch (Exception $e) { - Logging::info($e->getMessage()); - } - return array( "sEcho" => intval($data["sEcho"]), "iTotalDisplayRecords" => intval($totalDisplayRows), diff --git a/airtime_mvc/application/models/ListenerStat.php b/airtime_mvc/application/models/ListenerStat.php index 69560b320..52360c55a 100644 --- a/airtime_mvc/application/models/ListenerStat.php +++ b/airtime_mvc/application/models/ListenerStat.php @@ -4,7 +4,7 @@ class Application_Model_ListenerStat public function __construct() { } - + public static function getDataPointsWithinRange($p_start, $p_end) { $sql = <<$p_start, 'p2'=>$p_end)); - + $out = array(); foreach ($data as $d) { $jump = intval($d['count']/1000); $jump = max(1, $jump); $remainder = $jump == 1?0:1; - + $sql = <<setTimezone(new DateTimeZone(date_default_timezone_get())); // tricking javascript so it thinks the server timezone is in UTC $dt = new DateTime($t->format("Y-m-d H:i:s"), new DateTimeZone("UTC")); - + $r['timestamp'] = $dt->format("U"); $out[$r['mount_name']][] = $r; } } - + $enabledStreamIds = Application_Model_StreamSetting::getEnabledStreamIds(); $enabledOut = array(); - + foreach ($enabledStreamIds as $sId) { - + $sql = "SELECT value FROM cc_stream_setting" ." WHERE keyname = :key"; - + $result = Application_Common_Database::prepareAndExecute($sql, array('key' => $sId."_mount"), "single"); - + $enabledMountPoint = $result["value"]; - + if (isset($out[$enabledMountPoint])) { $enabledOut[$enabledMountPoint] = $out[$enabledMountPoint]; } - else { - //TODO fix this hack (here for CC-5254) - //all shoutcast streams are automatically put under "shoutcast" mount point. - if (isset($out["shoutcast"])) { - $enabledOut["shoutcast"] = $out["shoutcast"]; - } - } } - + return $enabledOut; } diff --git a/airtime_mvc/application/models/Playlist.php b/airtime_mvc/application/models/Playlist.php index 7eaad0a64..7011a501f 100644 --- a/airtime_mvc/application/models/Playlist.php +++ b/airtime_mvc/application/models/Playlist.php @@ -505,12 +505,11 @@ SQL; foreach ($p_items as $ac) { $res = $this->insertPlaylistElement($this->buildEntry($ac, $pos)); + // update is_playlist flag in cc_files to indicate the // file belongs to a playlist or block (in this case a playlist) - if ($ac[1] == "audioclip") { - $db_file = CcFilesQuery::create()->findPk($ac[0], $this->con); - $db_file->setDbIsPlaylist(true)->save($this->con); - } + $db_file = CcFilesQuery::create()->findPk($ac[0], $this->con); + $db_file->setDbIsPlaylist(true)->save($this->con); $pos = $pos + 1; } diff --git a/airtime_mvc/application/models/PlayoutHistory.php b/airtime_mvc/application/models/PlayoutHistory.php new file mode 100644 index 000000000..7da1ff2c2 --- /dev/null +++ b/airtime_mvc/application/models/PlayoutHistory.php @@ -0,0 +1,83 @@ + "artist_name", + "title" => "track_title", + "played" => "played", + "length" => "length", + "composer" => "composer", + "copyright" => "copyright", + ); + + public function __construct($p_startDT, $p_endDT, $p_opts) + { + $this->con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME); + $this->startDT = $p_startDT; + $this->endDT = $p_endDT; + $this->timezone = date_default_timezone_get(); + $this->epoch_now = time(); + $this->opts = $p_opts; + } + + /* + * map front end mDataProp labels to proper column names for searching etc. + */ + private function translateColumns() + { + for ($i = 0; $i < $this->opts["iColumns"]; $i++) { + + $this->opts["mDataProp_{$i}"] = $this->mDataPropMap[$this->opts["mDataProp_{$i}"]]; + } + } + + public function getItems() + { + $this->translateColumns(); + + $select = array( + "file.track_title as title", + "file.artist_name as artist", + "playout.played", + "playout.file_id", + "file.composer", + "file.copyright", + "file.length" + ); + + $start = $this->startDT->format("Y-m-d H:i:s"); + $end = $this->endDT->format("Y-m-d H:i:s"); + + $historyTable = "( + select count(schedule.file_id) as played, schedule.file_id as file_id + from cc_schedule as schedule + where schedule.starts >= '{$start}' and schedule.starts < '{$end}' + and schedule.playout_status > 0 and schedule.media_item_played != FALSE and schedule.broadcasted = 1 + group by schedule.file_id + ) + AS playout left join cc_files as file on (file.id = playout.file_id)"; + + $results = Application_Model_Datatables::findEntries($this->con, $select, $historyTable, $this->opts, "history"); + + foreach ($results["history"] as &$row) { + $formatter = new LengthFormatter($row['length']); + $row['length'] = $formatter->format(); + } + + return $results; + } +} diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 015d400c5..5df8d878f 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -1369,20 +1369,4 @@ class Application_Model_Preference { self::setValue("replay_gain_modifier", $rg_modifier, true); } - - public static function SetHistoryItemTemplate($value) { - self::setValue("history_item_template", $value); - } - - public static function GetHistoryItemTemplate() { - return self::getValue("history_item_template"); - } - - public static function SetHistoryFileTemplate($value) { - self::setValue("history_file_template", $value); - } - - public static function GetHistoryFileTemplate() { - return self::getValue("history_file_template"); - } } diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index 661df065b..c62fed647 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -17,7 +17,7 @@ class Application_Model_Scheduler private $epochNow; private $nowDT; private $user; - + private $crossfadeDuration; private $checkUserPermissions = true; @@ -40,7 +40,7 @@ class Application_Model_Scheduler } $this->user = Application_Model_User::getCurrentUser(); - + $this->crossfadeDuration = Application_Model_Preference::GetDefaultCrossfadeDuration(); } @@ -200,12 +200,9 @@ class Application_Model_Scheduler } else { $data = $this->fileInfo; $data["id"] = $id; - - $cuein = Application_Common_DateHelper::playlistTimeToSeconds($file->getDbCuein()); - $cueout = Application_Common_DateHelper::playlistTimeToSeconds($file->getDbCueout()); - $row_length = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein); - - $data["cliplength"] = $row_length; + $data["cliplength"] = Application_Model_StoredFile::getRealClipLength( + $file->getDbCuein(), + $file->getDbCueout()); $data["cuein"] = $file->getDbCuein(); $data["cueout"] = $file->getDbCueout(); @@ -268,11 +265,11 @@ class Application_Model_Scheduler $cuein = Application_Common_DateHelper::calculateLengthInSeconds($data["cuein"]); $cueout = Application_Common_DateHelper::calculateLengthInSeconds($data["cueout"]); $data["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein); - + //fade is in format SS.uuuuuu $data["fadein"] = $defaultFadeIn; $data["fadeout"] = $defaultFadeOut; - + $data["type"] = 0; $files[] = $data; } @@ -327,11 +324,11 @@ class Application_Model_Scheduler $cuein = Application_Common_DateHelper::calculateLengthInSeconds($data["cuein"]); $cueout = Application_Common_DateHelper::calculateLengthInSeconds($data["cueout"]); $data["cliplength"] = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein); - + //fade is in format SS.uuuuuu $data["fadein"] = $defaultFadeIn; $data["fadeout"] = $defaultFadeOut; - + $data["type"] = 0; $files[] = $data; } @@ -341,7 +338,7 @@ class Application_Model_Scheduler return $files; } - + /* * @param DateTime startDT in UTC * @param string duration @@ -352,18 +349,18 @@ class Application_Model_Scheduler private function findTimeDifference($p_startDT, $p_seconds) { $startEpoch = $p_startDT->format("U.u"); - + //add two float numbers to 6 subsecond precision //DateTime::createFromFormat("U.u") will have a problem if there is no decimal in the resulting number. $newEpoch = bcsub($startEpoch , (string) $p_seconds, 6); - + $dt = DateTime::createFromFormat("U.u", $newEpoch, new DateTimeZone("UTC")); - + if ($dt === false) { //PHP 5.3.2 problem $dt = DateTime::createFromFormat("U", intval($newEpoch), new DateTimeZone("UTC")); } - + return $dt; } @@ -423,7 +420,7 @@ class Application_Model_Scheduler return $nextDT; } - + /* * @param int $showInstance * This function recalculates the start/end times of items in a gapless show to @@ -502,7 +499,7 @@ class Application_Model_Scheduler } /** - * + * * Enter description here ... * @param $scheduleItems * cc_schedule items, where the items get inserted after @@ -885,7 +882,7 @@ class Application_Model_Scheduler private function updateMovedItem() { - + } private function getInstances($instanceId) @@ -1105,7 +1102,7 @@ class Application_Model_Scheduler } else { $removedItem->delete($this->con); } - + // update is_scheduled in cc_files but only if // the file is not scheduled somewhere else $fileId = $removedItem->getDbFileId(); diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index f5cac2aa0..2930a7ff3 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -949,7 +949,6 @@ SQL; AND ((si1.starts >= :start1::TIMESTAMP AND si1.starts < :end1::TIMESTAMP) OR (si1.ends > :start2::TIMESTAMP AND si1.ends <= :end2::TIMESTAMP) OR (si1.starts <= :start3::TIMESTAMP AND si1.ends >= :end3::TIMESTAMP)) -ORDER BY si1.starts SQL; return Application_Common_Database::prepareAndExecute( $sql, array( diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 6f0a98cce..0c503344c 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -778,30 +778,17 @@ SQL; foreach ($results['aaData'] as &$row) { $row['id'] = intval($row['id']); - //taken from Datatables.php, needs to be cleaned up there. - if (isset($r['ftype'])) { - if ($r['ftype'] == 'playlist') { - $pl = new Application_Model_Playlist($r['id']); - $r['length'] = $pl->getLength(); - } elseif ($r['ftype'] == "block") { - $bl = new Application_Model_Block($r['id']); - $r['bl_type'] = $bl->isStatic() ? 'static' : 'dynamic'; - $r['length'] = $bl->getLength(); - } - } + $len_formatter = new LengthFormatter( + self::getRealClipLength($row["cuein"], $row["cueout"])); + $row['length'] = $len_formatter->format(); + + $cuein_formatter = new LengthFormatter($row["cuein"]); + $row["cuein"] = $cuein_formatter->format(); + + $cueout_formatter = new LengthFormatter($row["cueout"]); + $row["cueout"] = $cueout_formatter->format(); if ($row['ftype'] === "audioclip") { - - $cuein_formatter = new LengthFormatter($row["cuein"]); - $row["cuein"] = $cuein_formatter->format(); - - $cueout_formatter = new LengthFormatter($row["cueout"]); - $row["cueout"] = $cueout_formatter->format(); - - $cuein = Application_Common_DateHelper::playlistTimeToSeconds($row["cuein"]); - $cueout = Application_Common_DateHelper::playlistTimeToSeconds($row["cueout"]); - $row_length = Application_Common_DateHelper::secondsToPlaylistTime($cueout - $cuein); - $formatter = new SamplerateFormatter($row['sample_rate']); $row['sample_rate'] = $formatter->format(); @@ -814,17 +801,10 @@ SQL; // for audio preview $row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION); - - } - else { - + } else { $row['audioFile'] = $row['id']; - $row_length = $row['length']; } - $len_formatter = new LengthFormatter($row_length); - $row['length'] = $len_formatter->format(); - //convert mtime and utime to localtime $row['mtime'] = new DateTime($row['mtime'], new DateTimeZone('UTC')); $row['mtime']->setTimeZone(new DateTimeZone(date_default_timezone_get())); @@ -1367,6 +1347,14 @@ SQL; Application_Common_Database::prepareAndExecute($sql, array(), Application_Common_Database::EXECUTE); } + + public static function getRealClipLength($p_cuein, $p_cueout) { + $sql = "SELECT :cueout::INTERVAL - :cuein::INTERVAL"; + + return Application_Common_Database::prepareAndExecute($sql, array( + ':cueout' => $p_cueout, + ':cuein' => $p_cuein), 'column'); + } } class DeleteScheduledFileException extends Exception {} diff --git a/airtime_mvc/application/models/User.php b/airtime_mvc/application/models/User.php index 8a1008577..a3b2c5d3d 100644 --- a/airtime_mvc/application/models/User.php +++ b/airtime_mvc/application/models/User.php @@ -1,5 +1,10 @@ filterByDbHost($this->getDbId()) ->count() > 0; } - - public function isHostOfShowInstance($instanceId) - { - $showInstance = CcShowInstancesQuery::create() - ->findPk($instanceId); - - return CcShowHostsQuery::create() - ->filterByDbShow($showInstance->getDbShowId()) - ->filterByDbHost($this->getDbId()) - ->count() > 0; - } } // CcSubjs diff --git a/airtime_mvc/application/models/airtime/CcTag.php b/airtime_mvc/application/models/airtime/CcTag.php deleted file mode 100644 index 2b02b8368..000000000 --- a/airtime_mvc/application/models/airtime/CcTag.php +++ /dev/null @@ -1,18 +0,0 @@ -setName('cc_file_tag'); - $this->setPhpName('CcFileTag'); - $this->setClassname('CcFileTag'); - $this->setPackage('airtime'); - $this->setUseIdGenerator(true); - $this->setPrimaryKeyMethodInfo('cc_file_tag_id_seq'); - // columns - $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); - $this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', true, null, null); - $this->addForeignKey('TAG_ID', 'DbTagId', 'INTEGER', 'cc_tag', 'ID', true, null, null); - // validators - } // initialize() - - /** - * Build the RelationMap objects for this table relationships - */ - public function buildRelations() - { - $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); - $this->addRelation('CcTag', 'CcTag', RelationMap::MANY_TO_ONE, array('tag_id' => 'id', ), 'CASCADE', null); - } // buildRelations() - -} // CcFileTagTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php index 6f9f414dd..56e7a5fff 100644 --- a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php @@ -123,7 +123,6 @@ class CcFilesTableMap extends TableMap { $this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null); $this->addRelation('CcBlockcontents', 'CcBlockcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null); $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null); - $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null); } // buildRelations() } // CcFilesTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcListenerCountTableMap.php b/airtime_mvc/application/models/airtime/map/CcListenerCountTableMap.php index 2b9476a75..ec7a5165b 100644 --- a/airtime_mvc/application/models/airtime/map/CcListenerCountTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcListenerCountTableMap.php @@ -51,7 +51,7 @@ class CcListenerCountTableMap extends TableMap { public function buildRelations() { $this->addRelation('CcTimestamp', 'CcTimestamp', RelationMap::MANY_TO_ONE, array('timestamp_id' => 'id', ), 'CASCADE', null); - $this->addRelation('CcMountName', 'CcMountName', RelationMap::MANY_TO_ONE, array('mount_name_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcTimestamp', 'CcTimestamp', RelationMap::MANY_TO_ONE, array('mount_name_id' => 'id', ), 'CASCADE', null); } // buildRelations() } // CcListenerCountTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php b/airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php deleted file mode 100644 index f07bc5403..000000000 --- a/airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php +++ /dev/null @@ -1,54 +0,0 @@ -setName('cc_mount_name'); - $this->setPhpName('CcMountName'); - $this->setClassname('CcMountName'); - $this->setPackage('airtime'); - $this->setUseIdGenerator(true); - $this->setPrimaryKeyMethodInfo('cc_mount_name_id_seq'); - // columns - $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); - $this->addColumn('MOUNT_NAME', 'DbMountName', 'VARCHAR', true, 255, null); - // validators - } // initialize() - - /** - * Build the RelationMap objects for this table relationships - */ - public function buildRelations() - { - $this->addRelation('CcListenerCount', 'CcListenerCount', RelationMap::ONE_TO_MANY, array('id' => 'mount_name_id', ), 'CASCADE', null); - } // buildRelations() - -} // CcMountNameTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php deleted file mode 100644 index 8e937f6e5..000000000 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryMetaDataTableMap.php +++ /dev/null @@ -1,56 +0,0 @@ -setName('cc_playout_history_metadata'); - $this->setPhpName('CcPlayoutHistoryMetaData'); - $this->setClassname('CcPlayoutHistoryMetaData'); - $this->setPackage('airtime'); - $this->setUseIdGenerator(true); - $this->setPrimaryKeyMethodInfo('cc_playout_history_metadata_id_seq'); - // columns - $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); - $this->addForeignKey('HISTORY_ID', 'DbHistoryId', 'INTEGER', 'cc_playout_history', 'ID', true, null, null); - $this->addColumn('KEY', 'DbKey', 'VARCHAR', true, 128, null); - $this->addColumn('VALUE', 'DbValue', 'VARCHAR', true, 128, null); - // validators - } // initialize() - - /** - * Build the RelationMap objects for this table relationships - */ - public function buildRelations() - { - $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::MANY_TO_ONE, array('history_id' => 'id', ), 'CASCADE', null); - } // buildRelations() - -} // CcPlayoutHistoryMetaDataTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php deleted file mode 100644 index 6c365d7bb..000000000 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php +++ /dev/null @@ -1,59 +0,0 @@ -setName('cc_playout_history'); - $this->setPhpName('CcPlayoutHistory'); - $this->setClassname('CcPlayoutHistory'); - $this->setPackage('airtime'); - $this->setUseIdGenerator(true); - $this->setPrimaryKeyMethodInfo('cc_playout_history_id_seq'); - // columns - $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); - $this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null); - $this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null); - $this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null); - $this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', false, null, null); - // validators - } // initialize() - - /** - * Build the RelationMap objects for this table relationships - */ - public function buildRelations() - { - $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); - $this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'SET NULL', null); - $this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', null); - } // buildRelations() - -} // CcPlayoutHistoryTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateFieldTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateFieldTableMap.php deleted file mode 100644 index f68db26a1..000000000 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateFieldTableMap.php +++ /dev/null @@ -1,59 +0,0 @@ -setName('cc_playout_history_template_field'); - $this->setPhpName('CcPlayoutHistoryTemplateField'); - $this->setClassname('CcPlayoutHistoryTemplateField'); - $this->setPackage('airtime'); - $this->setUseIdGenerator(true); - $this->setPrimaryKeyMethodInfo('cc_playout_history_template_field_id_seq'); - // columns - $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); - $this->addForeignKey('TEMPLATE_ID', 'DbTemplateId', 'INTEGER', 'cc_playout_history_template', 'ID', true, null, null); - $this->addColumn('NAME', 'DbName', 'VARCHAR', true, 128, null); - $this->addColumn('LABEL', 'DbLabel', 'VARCHAR', true, 128, null); - $this->addColumn('TYPE', 'DbType', 'VARCHAR', true, 128, null); - $this->addColumn('IS_FILE_MD', 'DbIsFileMD', 'BOOLEAN', true, null, false); - $this->addColumn('POSITION', 'DbPosition', 'INTEGER', true, null, null); - // validators - } // initialize() - - /** - * Build the RelationMap objects for this table relationships - */ - public function buildRelations() - { - $this->addRelation('CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplate', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', null); - } // buildRelations() - -} // CcPlayoutHistoryTemplateFieldTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTableMap.php deleted file mode 100644 index e5aea573d..000000000 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTableMap.php +++ /dev/null @@ -1,55 +0,0 @@ -setName('cc_playout_history_template'); - $this->setPhpName('CcPlayoutHistoryTemplate'); - $this->setClassname('CcPlayoutHistoryTemplate'); - $this->setPackage('airtime'); - $this->setUseIdGenerator(true); - $this->setPrimaryKeyMethodInfo('cc_playout_history_template_id_seq'); - // columns - $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); - $this->addColumn('NAME', 'DbName', 'VARCHAR', true, 128, null); - $this->addColumn('TYPE', 'DbType', 'VARCHAR', true, 35, null); - // validators - } // initialize() - - /** - * Build the RelationMap objects for this table relationships - */ - public function buildRelations() - { - $this->addRelation('CcPlayoutHistoryTemplateField', 'CcPlayoutHistoryTemplateField', RelationMap::ONE_TO_MANY, array('id' => 'template_id', ), 'CASCADE', null); - } // buildRelations() - -} // CcPlayoutHistoryTemplateTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php deleted file mode 100644 index 9ce9ab7e1..000000000 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTemplateTagTableMap.php +++ /dev/null @@ -1,58 +0,0 @@ -setName('cc_playout_history_template_field'); - $this->setPhpName('CcPlayoutHistoryTemplateTag'); - $this->setClassname('CcPlayoutHistoryTemplateTag'); - $this->setPackage('airtime'); - $this->setUseIdGenerator(true); - $this->setPrimaryKeyMethodInfo('cc_playout_history_template_field_id_seq'); - // columns - $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); - $this->addForeignKey('TEMPLATE_ID', 'DbTemplateId', 'INTEGER', 'cc_playout_history_template', 'ID', true, null, null); - $this->addColumn('NAME', 'DbName', 'VARCHAR', true, 128, null); - $this->addColumn('TYPE', 'DbType', 'VARCHAR', true, 128, null); - $this->addColumn('IS_FILE_MD', 'DbIsFileMD', 'BOOLEAN', true, null, false); - $this->addColumn('POSITION', 'DbTagPosition', 'INTEGER', true, null, null); - // validators - } // initialize() - - /** - * Build the RelationMap objects for this table relationships - */ - public function buildRelations() - { - $this->addRelation('CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplate', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', null); - } // buildRelations() - -} // CcPlayoutHistoryTemplateTagTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php index c55e86080..e6a7b87a0 100644 --- a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php @@ -63,7 +63,6 @@ class CcShowInstancesTableMap extends TableMap { $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); $this->addRelation('CcShowInstancesRelatedByDbId', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); - $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'SET NULL', null); } // buildRelations() } // CcShowInstancesTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcTagTableMap.php b/airtime_mvc/application/models/airtime/map/CcTagTableMap.php deleted file mode 100644 index 0cfbcbb2c..000000000 --- a/airtime_mvc/application/models/airtime/map/CcTagTableMap.php +++ /dev/null @@ -1,57 +0,0 @@ -setName('cc_tag'); - $this->setPhpName('CcTag'); - $this->setClassname('CcTag'); - $this->setPackage('airtime'); - $this->setUseIdGenerator(true); - $this->setPrimaryKeyMethodInfo('cc_tag_id_seq'); - // columns - $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); - $this->addColumn('TAG_NAME', 'DbTagName', 'VARCHAR', true, 128, null); - $this->addColumn('TAG_TYPE', 'DbTagType', 'VARCHAR', true, 128, 'boolean'); - // validators - } // initialize() - - /** - * Build the RelationMap objects for this table relationships - */ - public function buildRelations() - { - $this->addRelation('CcFileTag', 'CcFileTag', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', null); - $this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', null); - $this->addRelation('CcPlayoutHistoryTemplateTag', 'CcPlayoutHistoryTemplateTag', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', null); - } // buildRelations() - -} // CcTagTableMap diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFileTag.php b/airtime_mvc/application/models/airtime/om/BaseCcFileTag.php deleted file mode 100644 index eea6b63e0..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcFileTag.php +++ /dev/null @@ -1,936 +0,0 @@ -id; - } - - /** - * Get the [file_id] column value. - * - * @return int - */ - public function getDbFileId() - { - return $this->file_id; - } - - /** - * Get the [tag_id] column value. - * - * @return int - */ - public function getDbTagId() - { - return $this->tag_id; - } - - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return CcFileTag The current object (for fluent API support) - */ - public function setDbId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = CcFileTagPeer::ID; - } - - return $this; - } // setDbId() - - /** - * Set the value of [file_id] column. - * - * @param int $v new value - * @return CcFileTag The current object (for fluent API support) - */ - public function setDbFileId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->file_id !== $v) { - $this->file_id = $v; - $this->modifiedColumns[] = CcFileTagPeer::FILE_ID; - } - - if ($this->aCcFiles !== null && $this->aCcFiles->getDbId() !== $v) { - $this->aCcFiles = null; - } - - return $this; - } // setDbFileId() - - /** - * Set the value of [tag_id] column. - * - * @param int $v new value - * @return CcFileTag The current object (for fluent API support) - */ - public function setDbTagId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->tag_id !== $v) { - $this->tag_id = $v; - $this->modifiedColumns[] = CcFileTagPeer::TAG_ID; - } - - if ($this->aCcTag !== null && $this->aCcTag->getDbId() !== $v) { - $this->aCcTag = null; - } - - return $this; - } // setDbTagId() - - /** - * Indicates whether the columns in this object are only set to default values. - * - * This method can be used in conjunction with isModified() to indicate whether an object is both - * modified _and_ has some values set which are non-default. - * - * @return boolean Whether the columns in this object are only been set with default values. - */ - public function hasOnlyDefaultValues() - { - // otherwise, everything was equal, so return TRUE - return true; - } // hasOnlyDefaultValues() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (0-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) - * @param int $startcol 0-based offset column which indicates which restultset column to start with. - * @param boolean $rehydrate Whether this object is being re-hydrated from the database. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate($row, $startcol = 0, $rehydrate = false) - { - try { - - $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; - $this->file_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; - $this->tag_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null; - $this->resetModified(); - - $this->setNew(false); - - if ($rehydrate) { - $this->ensureConsistency(); - } - - return $startcol + 3; // 3 = CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating CcFileTag object", $e); - } - } - - /** - * Checks and repairs the internal consistency of the object. - * - * This method is executed after an already-instantiated object is re-hydrated - * from the database. It exists to check any foreign keys to make sure that - * the objects related to the current object are correct based on foreign key. - * - * You can override this method in the stub class, but you should always invoke - * the base method from the overridden method (i.e. parent::ensureConsistency()), - * in case your model changes. - * - * @throws PropelException - */ - public function ensureConsistency() - { - - if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) { - $this->aCcFiles = null; - } - if ($this->aCcTag !== null && $this->tag_id !== $this->aCcTag->getDbId()) { - $this->aCcTag = null; - } - } // ensureConsistency - - /** - * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. - * - * This will only work if the object has been saved and has a valid primary key set. - * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param PropelPDO $con (optional) The PropelPDO connection to use. - * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db - */ - public function reload($deep = false, PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("Cannot reload a deleted object."); - } - - if ($this->isNew()) { - throw new PropelException("Cannot reload an unsaved object."); - } - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - // We don't need to alter the object instance pool; we're just modifying this instance - // already in the pool. - - $stmt = CcFileTagPeer::doSelectStmt($this->buildPkeyCriteria(), $con); - $row = $stmt->fetch(PDO::FETCH_NUM); - $stmt->closeCursor(); - if (!$row) { - throw new PropelException('Cannot find matching row in the database to reload object values.'); - } - $this->hydrate($row, 0, true); // rehydrate - - if ($deep) { // also de-associate any related objects? - - $this->aCcFiles = null; - $this->aCcTag = null; - } // if (deep) - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param PropelPDO $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - try { - $ret = $this->preDelete($con); - if ($ret) { - CcFileTagQuery::create() - ->filterByPrimaryKey($this->getPrimaryKey()) - ->delete($con); - $this->postDelete($con); - $con->commit(); - $this->setDeleted(true); - } else { - $con->commit(); - } - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Persists this object to the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All modified related objects will also be persisted in the doSave() - * method. This method wraps all precipitate database operations in a - * single transaction. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see doSave() - */ - public function save(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - $isInsert = $this->isNew(); - try { - $ret = $this->preSave($con); - if ($isInsert) { - $ret = $ret && $this->preInsert($con); - } else { - $ret = $ret && $this->preUpdate($con); - } - if ($ret) { - $affectedRows = $this->doSave($con); - if ($isInsert) { - $this->postInsert($con); - } else { - $this->postUpdate($con); - } - $this->postSave($con); - CcFileTagPeer::addInstanceToPool($this); - } else { - $affectedRows = 0; - } - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Performs the work of inserting or updating the row in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see save() - */ - protected function doSave(PropelPDO $con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - // We call the save method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcFiles !== null) { - if ($this->aCcFiles->isModified() || $this->aCcFiles->isNew()) { - $affectedRows += $this->aCcFiles->save($con); - } - $this->setCcFiles($this->aCcFiles); - } - - if ($this->aCcTag !== null) { - if ($this->aCcTag->isModified() || $this->aCcTag->isNew()) { - $affectedRows += $this->aCcTag->save($con); - } - $this->setCcTag($this->aCcTag); - } - - if ($this->isNew() ) { - $this->modifiedColumns[] = CcFileTagPeer::ID; - } - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $criteria = $this->buildCriteria(); - if ($criteria->keyContainsValue(CcFileTagPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcFileTagPeer::ID.')'); - } - - $pk = BasePeer::doInsert($criteria, $con); - $affectedRows += 1; - $this->setDbId($pk); //[IMV] update autoincrement primary key - $this->setNew(false); - } else { - $affectedRows += CcFileTagPeer::doUpdate($this, $con); - } - - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - $this->alreadyInSave = false; - - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - // We call the validate method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcFiles !== null) { - if (!$this->aCcFiles->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcFiles->getValidationFailures()); - } - } - - if ($this->aCcTag !== null) { - if (!$this->aCcTag->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcTag->getValidationFailures()); - } - } - - - if (($retval = CcFileTagPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcFileTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - $field = $this->getByPosition($pos); - return $field; - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getDbId(); - break; - case 1: - return $this->getDbFileId(); - break; - case 2: - return $this->getDbTagId(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * Defaults to BasePeer::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. - * - * @return array an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false) - { - $keys = CcFileTagPeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getDbId(), - $keys[1] => $this->getDbFileId(), - $keys[2] => $this->getDbTagId(), - ); - if ($includeForeignObjects) { - if (null !== $this->aCcFiles) { - $result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true); - } - if (null !== $this->aCcTag) { - $result['CcTag'] = $this->aCcTag->toArray($keyType, $includeLazyLoadColumns, true); - } - } - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcFileTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setDbId($value); - break; - case 1: - $this->setDbFileId($value); - break; - case 2: - $this->setDbTagId($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * The default key type is the column's phpname (e.g. 'AuthorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = CcFileTagPeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setDbFileId($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setDbTagId($arr[$keys[2]]); - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(CcFileTagPeer::DATABASE_NAME); - - if ($this->isColumnModified(CcFileTagPeer::ID)) $criteria->add(CcFileTagPeer::ID, $this->id); - if ($this->isColumnModified(CcFileTagPeer::FILE_ID)) $criteria->add(CcFileTagPeer::FILE_ID, $this->file_id); - if ($this->isColumnModified(CcFileTagPeer::TAG_ID)) $criteria->add(CcFileTagPeer::TAG_ID, $this->tag_id); - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(CcFileTagPeer::DATABASE_NAME); - $criteria->add(CcFileTagPeer::ID, $this->id); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return int - */ - public function getPrimaryKey() - { - return $this->getDbId(); - } - - /** - * Generic method to set the primary key (id column). - * - * @param int $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setDbId($key); - } - - /** - * Returns true if the primary key for this object is null. - * @return boolean - */ - public function isPrimaryKeyNull() - { - return null === $this->getDbId(); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of CcFileTag (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - $copyObj->setDbFileId($this->file_id); - $copyObj->setDbTagId($this->tag_id); - - $copyObj->setNew(true); - $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return CcFileTag Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return CcFileTagPeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new CcFileTagPeer(); - } - return self::$peer; - } - - /** - * Declares an association between this object and a CcFiles object. - * - * @param CcFiles $v - * @return CcFileTag The current object (for fluent API support) - * @throws PropelException - */ - public function setCcFiles(CcFiles $v = null) - { - if ($v === null) { - $this->setDbFileId(NULL); - } else { - $this->setDbFileId($v->getDbId()); - } - - $this->aCcFiles = $v; - - // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcFiles object, it will not be re-added. - if ($v !== null) { - $v->addCcFileTag($this); - } - - return $this; - } - - - /** - * Get the associated CcFiles object - * - * @param PropelPDO Optional Connection object. - * @return CcFiles The associated CcFiles object. - * @throws PropelException - */ - public function getCcFiles(PropelPDO $con = null) - { - if ($this->aCcFiles === null && ($this->file_id !== null)) { - $this->aCcFiles = CcFilesQuery::create()->findPk($this->file_id, $con); - /* The following can be used additionally to - guarantee the related object contains a reference - to this object. This level of coupling may, however, be - undesirable since it could result in an only partially populated collection - in the referenced object. - $this->aCcFiles->addCcFileTags($this); - */ - } - return $this->aCcFiles; - } - - /** - * Declares an association between this object and a CcTag object. - * - * @param CcTag $v - * @return CcFileTag The current object (for fluent API support) - * @throws PropelException - */ - public function setCcTag(CcTag $v = null) - { - if ($v === null) { - $this->setDbTagId(NULL); - } else { - $this->setDbTagId($v->getDbId()); - } - - $this->aCcTag = $v; - - // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcTag object, it will not be re-added. - if ($v !== null) { - $v->addCcFileTag($this); - } - - return $this; - } - - - /** - * Get the associated CcTag object - * - * @param PropelPDO Optional Connection object. - * @return CcTag The associated CcTag object. - * @throws PropelException - */ - public function getCcTag(PropelPDO $con = null) - { - if ($this->aCcTag === null && ($this->tag_id !== null)) { - $this->aCcTag = CcTagQuery::create()->findPk($this->tag_id, $con); - /* The following can be used additionally to - guarantee the related object contains a reference - to this object. This level of coupling may, however, be - undesirable since it could result in an only partially populated collection - in the referenced object. - $this->aCcTag->addCcFileTags($this); - */ - } - return $this->aCcTag; - } - - /** - * Clears the current object and sets all attributes to their default values - */ - public function clear() - { - $this->id = null; - $this->file_id = null; - $this->tag_id = null; - $this->alreadyInSave = false; - $this->alreadyInValidation = false; - $this->clearAllReferences(); - $this->resetModified(); - $this->setNew(true); - $this->setDeleted(false); - } - - /** - * Resets all collections of referencing foreign keys. - * - * This method is a user-space workaround for PHP's inability to garbage collect objects - * with circular references. This is currently necessary when using Propel in certain - * daemon or large-volumne/high-memory operations. - * - * @param boolean $deep Whether to also clear the references on all associated objects. - */ - public function clearAllReferences($deep = false) - { - if ($deep) { - } // if ($deep) - - $this->aCcFiles = null; - $this->aCcTag = null; - } - - /** - * Catches calls to virtual methods - */ - public function __call($name, $params) - { - if (preg_match('/get(\w+)/', $name, $matches)) { - $virtualColumn = $matches[1]; - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - // no lcfirst in php<5.3... - $virtualColumn[0] = strtolower($virtualColumn[0]); - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - } - throw new PropelException('Call to undefined method: ' . $name); - } - -} // BaseCcFileTag diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFileTagPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcFileTagPeer.php deleted file mode 100644 index e4454a44f..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcFileTagPeer.php +++ /dev/null @@ -1,1365 +0,0 @@ - array ('DbId', 'DbFileId', 'DbTagId', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbTagId', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::FILE_ID, self::TAG_ID, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'TAG_ID', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'tag_id', ), - BasePeer::TYPE_NUM => array (0, 1, 2, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbTagId' => 2, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbTagId' => 2, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FILE_ID => 1, self::TAG_ID => 2, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'TAG_ID' => 2, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'tag_id' => 2, ), - BasePeer::TYPE_NUM => array (0, 1, 2, ) - ); - - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - * @throws PropelException - if the specified name could not be found in the fieldname mappings. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. CcFileTagPeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(CcFileTagPeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria, $alias = null) - { - if (null === $alias) { - $criteria->addSelectColumn(CcFileTagPeer::ID); - $criteria->addSelectColumn(CcFileTagPeer::FILE_ID); - $criteria->addSelectColumn(CcFileTagPeer::TAG_ID); - } else { - $criteria->addSelectColumn($alias . '.ID'); - $criteria->addSelectColumn($alias . '.FILE_ID'); - $criteria->addSelectColumn($alias . '.TAG_ID'); - } - } - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) - { - // we may modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcFileTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - // BasePeer returns a PDOStatement - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param PropelPDO $con - * @return CcFileTag - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = CcFileTagPeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, PropelPDO $con = null) - { - return CcFileTagPeer::populateObjects(CcFileTagPeer::doSelectStmt($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. - * - * Use this method directly if you want to work with an executed statement durirectly (for example - * to perform your own object hydration). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con The connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return PDOStatement The executed PDOStatement object. - * @see BasePeer::doSelect() - */ - public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - if (!$criteria->hasSelectClause()) { - $criteria = clone $criteria; - CcFileTagPeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a PDOStatement - return BasePeer::doSelect($criteria, $con); - } - /** - * Adds an object to the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doSelect*() - * methods in your stub classes -- you may need to explicitly add objects - * to the cache in order to ensure that the same objects are always returned by doSelect*() - * and retrieveByPK*() calls. - * - * @param CcFileTag $value A CcFileTag object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). - */ - public static function addInstanceToPool(CcFileTag $obj, $key = null) - { - if (Propel::isInstancePoolingEnabled()) { - if ($key === null) { - $key = (string) $obj->getDbId(); - } // if key === null - self::$instances[$key] = $obj; - } - } - - /** - * Removes an object from the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doDelete - * methods in your stub classes -- you may need to explicitly remove objects - * from the cache in order to prevent returning objects that no longer exist. - * - * @param mixed $value A CcFileTag object or a primary key value. - */ - public static function removeInstanceFromPool($value) - { - if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof CcFileTag) { - $key = (string) $value->getDbId(); - } elseif (is_scalar($value)) { - // assume we've been passed a primary key - $key = (string) $value; - } else { - $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcFileTag object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); - throw $e; - } - - unset(self::$instances[$key]); - } - } // removeInstanceFromPool() - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param string $key The key (@see getPrimaryKeyHash()) for this instance. - * @return CcFileTag Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. - * @see getPrimaryKeyHash() - */ - public static function getInstanceFromPool($key) - { - if (Propel::isInstancePoolingEnabled()) { - if (isset(self::$instances[$key])) { - return self::$instances[$key]; - } - } - return null; // just to be explicit - } - - /** - * Clear the instance pool. - * - * @return void - */ - public static function clearInstancePool() - { - self::$instances = array(); - } - - /** - * Method to invalidate the instance pool of all tables related to cc_file_tag - * by a foreign key with ON DELETE CASCADE - */ - public static function clearRelatedInstancePool() - { - } - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return string A string version of PK or NULL if the components of primary key in result array are all null. - */ - public static function getPrimaryKeyHashFromRow($row, $startcol = 0) - { - // If the PK cannot be derived from the row, return NULL. - if ($row[$startcol] === null) { - return null; - } - return (string) $row[$startcol]; - } - - /** - * Retrieves the primary key from the DB resultset row - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, an array of the primary key columns will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return mixed The primary key of the row - */ - public static function getPrimaryKeyFromRow($row, $startcol = 0) - { - return (int) $row[$startcol]; - } - - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(PDOStatement $stmt) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = CcFileTagPeer::getOMClass(false); - // populate the object(s) - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = CcFileTagPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, 0, true); // rehydrate - $results[] = $obj; - } else { - $obj = new $cls(); - $obj->hydrate($row); - $results[] = $obj; - CcFileTagPeer::addInstanceToPool($obj, $key); - } // if key exists - } - $stmt->closeCursor(); - return $results; - } - /** - * Populates an object of the default type or an object that inherit from the default. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CcFileTag object, last column rank) - */ - public static function populateObject($row, $startcol = 0) - { - $key = CcFileTagPeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = CcFileTagPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, $startcol, true); // rehydrate - $col = $startcol + CcFileTagPeer::NUM_COLUMNS; - } else { - $cls = CcFileTagPeer::OM_CLASS; - $obj = new $cls(); - $col = $obj->hydrate($row, $startcol); - CcFileTagPeer::addInstanceToPool($obj, $key); - } - return array($obj, $col); - } - - /** - * Returns the number of rows matching criteria, joining the related CcFiles table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcFileTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Returns the number of rows matching criteria, joining the related CcTag table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcFileTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Selects a collection of CcFileTag objects pre-filled with their CcFiles objects. - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcFileTag objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcFileTagPeer::addSelectColumns($criteria); - $startcol = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); - CcFilesPeer::addSelectColumns($criteria); - - $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - - $cls = CcFileTagPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcFileTagPeer::addInstanceToPool($obj1, $key1); - } // if $obj1 already loaded - - $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol); - if ($key2 !== null) { - $obj2 = CcFilesPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcFilesPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol); - CcFilesPeer::addInstanceToPool($obj2, $key2); - } // if obj2 already loaded - - // Add the $obj1 (CcFileTag) to $obj2 (CcFiles) - $obj2->addCcFileTag($obj1); - - } // if joined row was not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Selects a collection of CcFileTag objects pre-filled with their CcTag objects. - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcFileTag objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcFileTagPeer::addSelectColumns($criteria); - $startcol = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); - CcTagPeer::addSelectColumns($criteria); - - $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - - $cls = CcFileTagPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcFileTagPeer::addInstanceToPool($obj1, $key1); - } // if $obj1 already loaded - - $key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol); - if ($key2 !== null) { - $obj2 = CcTagPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcTagPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol); - CcTagPeer::addInstanceToPool($obj2, $key2); - } // if obj2 already loaded - - // Add the $obj1 (CcFileTag) to $obj2 (CcTag) - $obj2->addCcFileTag($obj1); - - } // if joined row was not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Returns the number of rows matching criteria, joining all related tables - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcFileTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - /** - * Selects a collection of CcFileTag objects pre-filled with all related objects. - * - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcFileTag objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcFileTagPeer::addSelectColumns($criteria); - $startcol2 = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); - - CcFilesPeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); - - CcTagPeer::addSelectColumns($criteria); - $startcol4 = $startcol3 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - $cls = CcFileTagPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcFileTagPeer::addInstanceToPool($obj1, $key1); - } // if obj1 already loaded - - // Add objects for joined CcFiles rows - - $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcFilesPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcFilesPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcFilesPeer::addInstanceToPool($obj2, $key2); - } // if obj2 loaded - - // Add the $obj1 (CcFileTag) to the collection in $obj2 (CcFiles) - $obj2->addCcFileTag($obj1); - } // if joined row not null - - // Add objects for joined CcTag rows - - $key3 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol3); - if ($key3 !== null) { - $obj3 = CcTagPeer::getInstanceFromPool($key3); - if (!$obj3) { - - $cls = CcTagPeer::getOMClass(false); - - $obj3 = new $cls(); - $obj3->hydrate($row, $startcol3); - CcTagPeer::addInstanceToPool($obj3, $key3); - } // if obj3 loaded - - // Add the $obj1 (CcFileTag) to the collection in $obj3 (CcTag) - $obj3->addCcFileTag($obj1); - } // if joined row not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Returns the number of rows matching criteria, joining the related CcFiles table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinAllExceptCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcFileTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY should not affect count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Returns the number of rows matching criteria, joining the related CcTag table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinAllExceptCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcFileTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY should not affect count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Selects a collection of CcFileTag objects pre-filled with all related objects except CcFiles. - * - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcFileTag objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinAllExceptCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - // $criteria->getDbName() will return the same object if not set to another value - // so == check is okay and faster - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcFileTagPeer::addSelectColumns($criteria); - $startcol2 = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); - - CcTagPeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcFileTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior); - - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - $cls = CcFileTagPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcFileTagPeer::addInstanceToPool($obj1, $key1); - } // if obj1 already loaded - - // Add objects for joined CcTag rows - - $key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcTagPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcTagPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcTagPeer::addInstanceToPool($obj2, $key2); - } // if $obj2 already loaded - - // Add the $obj1 (CcFileTag) to the collection in $obj2 (CcTag) - $obj2->addCcFileTag($obj1); - - } // if joined row is not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Selects a collection of CcFileTag objects pre-filled with all related objects except CcTag. - * - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcFileTag objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinAllExceptCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - // $criteria->getDbName() will return the same object if not set to another value - // so == check is okay and faster - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcFileTagPeer::addSelectColumns($criteria); - $startcol2 = (CcFileTagPeer::NUM_COLUMNS - CcFileTagPeer::NUM_LAZY_LOAD_COLUMNS); - - CcFilesPeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcFileTagPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcFileTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcFileTagPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - $cls = CcFileTagPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcFileTagPeer::addInstanceToPool($obj1, $key1); - } // if obj1 already loaded - - // Add objects for joined CcFiles rows - - $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcFilesPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcFilesPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcFilesPeer::addInstanceToPool($obj2, $key2); - } // if $obj2 already loaded - - // Add the $obj1 (CcFileTag) to the collection in $obj2 (CcFiles) - $obj2->addCcFileTag($obj1); - - } // if joined row is not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * Add a TableMap instance to the database for this peer class. - */ - public static function buildTableMap() - { - $dbMap = Propel::getDatabaseMap(BaseCcFileTagPeer::DATABASE_NAME); - if (!$dbMap->hasTable(BaseCcFileTagPeer::TABLE_NAME)) - { - $dbMap->addTableObject(new CcFileTagTableMap()); - } - } - - /** - * The class that the Peer will make instances of. - * - * If $withPrefix is true, the returned path - * uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName - */ - public static function getOMClass($withPrefix = true) - { - return $withPrefix ? CcFileTagPeer::CLASS_DEFAULT : CcFileTagPeer::OM_CLASS; - } - - /** - * Method perform an INSERT on the database, given a CcFileTag or Criteria object. - * - * @param mixed $values Criteria or CcFileTag object containing data that is used to create the INSERT statement. - * @param PropelPDO $con the PropelPDO connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from CcFileTag object - } - - if ($criteria->containsKey(CcFileTagPeer::ID) && $criteria->keyContainsValue(CcFileTagPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcFileTagPeer::ID.')'); - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->beginTransaction(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch(PropelException $e) { - $con->rollBack(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a CcFileTag or Criteria object. - * - * @param mixed $values Criteria or CcFileTag object containing data that is used to create the UPDATE statement. - * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(CcFileTagPeer::ID); - $value = $criteria->remove(CcFileTagPeer::ID); - if ($value) { - $selectCriteria->add(CcFileTagPeer::ID, $value, $comparison); - } else { - $selectCriteria->setPrimaryTableName(CcFileTagPeer::TABLE_NAME); - } - - } else { // $values is CcFileTag object - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the cc_file_tag table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - $affectedRows += BasePeer::doDeleteAll(CcFileTagPeer::TABLE_NAME, $con, CcFileTagPeer::DATABASE_NAME); - // Because this db requires some delete cascade/set null emulation, we have to - // clear the cached instance *after* the emulation has happened (since - // instances get re-added by the select statement contained therein). - CcFileTagPeer::clearInstancePool(); - CcFileTagPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a CcFileTag or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or CcFileTag object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param PropelPDO $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - // invalidate the cache for all objects of this type, since we have no - // way of knowing (without running a query) what objects should be invalidated - // from the cache based on this Criteria. - CcFileTagPeer::clearInstancePool(); - // rename for clarity - $criteria = clone $values; - } elseif ($values instanceof CcFileTag) { // it's a model object - // invalidate the cache for this single object - CcFileTagPeer::removeInstanceFromPool($values); - // create criteria based on pk values - $criteria = $values->buildPkeyCriteria(); - } else { // it's a primary key, or an array of pks - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(CcFileTagPeer::ID, (array) $values, Criteria::IN); - // invalidate the cache for this object(s) - foreach ((array) $values as $singleval) { - CcFileTagPeer::removeInstanceFromPool($singleval); - } - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - CcFileTagPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Validates all modified columns of given CcFileTag object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param CcFileTag $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(CcFileTag $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(CcFileTagPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(CcFileTagPeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(CcFileTagPeer::DATABASE_NAME, CcFileTagPeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param int $pk the primary key. - * @param PropelPDO $con the connection to use - * @return CcFileTag - */ - public static function retrieveByPK($pk, PropelPDO $con = null) - { - - if (null !== ($obj = CcFileTagPeer::getInstanceFromPool((string) $pk))) { - return $obj; - } - - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria = new Criteria(CcFileTagPeer::DATABASE_NAME); - $criteria->add(CcFileTagPeer::ID, $pk); - - $v = CcFileTagPeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param PropelPDO $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcFileTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(CcFileTagPeer::DATABASE_NAME); - $criteria->add(CcFileTagPeer::ID, $pks, Criteria::IN); - $objs = CcFileTagPeer::doSelect($criteria, $con); - } - return $objs; - } - -} // BaseCcFileTagPeer - -// This is the static code needed to register the TableMap for this table with the main Propel class. -// -BaseCcFileTagPeer::buildTableMap(); - diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFileTagQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcFileTagQuery.php deleted file mode 100644 index 991c4e05a..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcFileTagQuery.php +++ /dev/null @@ -1,371 +0,0 @@ -setModelAlias($modelAlias); - } - if ($criteria instanceof Criteria) { - $query->mergeWith($criteria); - } - return $query; - } - - /** - * Find object by primary key - * Use instance pooling to avoid a database query if the object exists - * - * $obj = $c->findPk(12, $con); - * - * @param mixed $key Primary key to use for the query - * @param PropelPDO $con an optional connection object - * - * @return CcFileTag|array|mixed the result, formatted by the current formatter - */ - public function findPk($key, $con = null) - { - if ((null !== ($obj = CcFileTagPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { - // the object is alredy in the instance pool - return $obj; - } else { - // the object has not been requested yet, or the formatter is not an object formatter - $criteria = $this->isKeepQuery() ? clone $this : $this; - $stmt = $criteria - ->filterByPrimaryKey($key) - ->getSelectStatement($con); - return $criteria->getFormatter()->init($criteria)->formatOne($stmt); - } - } - - /** - * Find objects by primary key - * - * $objs = $c->findPks(array(12, 56, 832), $con); - * - * @param array $keys Primary keys to use for the query - * @param PropelPDO $con an optional connection object - * - * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter - */ - public function findPks($keys, $con = null) - { - $criteria = $this->isKeepQuery() ? clone $this : $this; - return $this - ->filterByPrimaryKeys($keys) - ->find($con); - } - - /** - * Filter the query by primary key - * - * @param mixed $key Primary key to use for the query - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function filterByPrimaryKey($key) - { - return $this->addUsingAlias(CcFileTagPeer::ID, $key, Criteria::EQUAL); - } - - /** - * Filter the query by a list of primary keys - * - * @param array $keys The list of primary key to use for the query - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function filterByPrimaryKeys($keys) - { - return $this->addUsingAlias(CcFileTagPeer::ID, $keys, Criteria::IN); - } - - /** - * Filter the query on the id column - * - * @param int|array $dbId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function filterByDbId($dbId = null, $comparison = null) - { - if (is_array($dbId) && null === $comparison) { - $comparison = Criteria::IN; - } - return $this->addUsingAlias(CcFileTagPeer::ID, $dbId, $comparison); - } - - /** - * Filter the query on the file_id column - * - * @param int|array $dbFileId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function filterByDbFileId($dbFileId = null, $comparison = null) - { - if (is_array($dbFileId)) { - $useMinMax = false; - if (isset($dbFileId['min'])) { - $this->addUsingAlias(CcFileTagPeer::FILE_ID, $dbFileId['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbFileId['max'])) { - $this->addUsingAlias(CcFileTagPeer::FILE_ID, $dbFileId['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcFileTagPeer::FILE_ID, $dbFileId, $comparison); - } - - /** - * Filter the query on the tag_id column - * - * @param int|array $dbTagId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function filterByDbTagId($dbTagId = null, $comparison = null) - { - if (is_array($dbTagId)) { - $useMinMax = false; - if (isset($dbTagId['min'])) { - $this->addUsingAlias(CcFileTagPeer::TAG_ID, $dbTagId['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbTagId['max'])) { - $this->addUsingAlias(CcFileTagPeer::TAG_ID, $dbTagId['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcFileTagPeer::TAG_ID, $dbTagId, $comparison); - } - - /** - * Filter the query by a related CcFiles object - * - * @param CcFiles $ccFiles the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function filterByCcFiles($ccFiles, $comparison = null) - { - return $this - ->addUsingAlias(CcFileTagPeer::FILE_ID, $ccFiles->getDbId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcFiles relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function joinCcFiles($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcFiles'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcFiles'); - } - - return $this; - } - - /** - * Use the CcFiles relation CcFiles object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcFilesQuery A secondary query class using the current class as primary query - */ - public function useCcFilesQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcFiles($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery'); - } - - /** - * Filter the query by a related CcTag object - * - * @param CcTag $ccTag the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function filterByCcTag($ccTag, $comparison = null) - { - return $this - ->addUsingAlias(CcFileTagPeer::TAG_ID, $ccTag->getDbId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcTag relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function joinCcTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcTag'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcTag'); - } - - return $this; - } - - /** - * Use the CcTag relation CcTag object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcTagQuery A secondary query class using the current class as primary query - */ - public function useCcTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcTag($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcTag', 'CcTagQuery'); - } - - /** - * Exclude object from result - * - * @param CcFileTag $ccFileTag Object to remove from the list of results - * - * @return CcFileTagQuery The current query, for fluid interface - */ - public function prune($ccFileTag = null) - { - if ($ccFileTag) { - $this->addUsingAlias(CcFileTagPeer::ID, $ccFileTag->getDbId(), Criteria::NOT_EQUAL); - } - - return $this; - } - -} // BaseCcFileTagQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php index 38d147c07..55f868769 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php @@ -493,11 +493,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent */ protected $collCcSchedules; - /** - * @var array CcPlayoutHistory[] Collection to store aggregation of CcPlayoutHistory objects. - */ - protected $collCcPlayoutHistorys; - /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. @@ -3114,8 +3109,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $this->collCcSchedules = null; - $this->collCcPlayoutHistorys = null; - } // if (deep) } @@ -3307,14 +3300,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } - if ($this->collCcPlayoutHistorys !== null) { - foreach ($this->collCcPlayoutHistorys as $referrerFK) { - if (!$referrerFK->isDeleted()) { - $affectedRows += $referrerFK->save($con); - } - } - } - $this->alreadyInSave = false; } @@ -3442,14 +3427,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } - if ($this->collCcPlayoutHistorys !== null) { - foreach ($this->collCcPlayoutHistorys as $referrerFK) { - if (!$referrerFK->validate($columns)) { - $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); - } - } - } - $this->alreadyInValidation = false; } @@ -4374,12 +4351,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } - foreach ($this->getCcPlayoutHistorys() as $relObj) { - if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addCcPlayoutHistory($relObj->copy($deepCopy)); - } - } - } // if ($deepCopy) @@ -5183,140 +5154,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent return $this->getCcSchedules($query, $con); } - /** - * Clears out the collCcPlayoutHistorys collection - * - * This does not modify the database; however, it will remove any associated objects, causing - * them to be refetched by subsequent calls to accessor method. - * - * @return void - * @see addCcPlayoutHistorys() - */ - public function clearCcPlayoutHistorys() - { - $this->collCcPlayoutHistorys = null; // important to set this to NULL since that means it is uninitialized - } - - /** - * Initializes the collCcPlayoutHistorys collection. - * - * By default this just sets the collCcPlayoutHistorys collection to an empty array (like clearcollCcPlayoutHistorys()); - * however, you may wish to override this method in your stub class to provide setting appropriate - * to your application -- for example, setting the initial array to the values stored in database. - * - * @return void - */ - public function initCcPlayoutHistorys() - { - $this->collCcPlayoutHistorys = new PropelObjectCollection(); - $this->collCcPlayoutHistorys->setModel('CcPlayoutHistory'); - } - - /** - * Gets an array of CcPlayoutHistory objects which contain a foreign key that references this object. - * - * If the $criteria is not null, it is used to always fetch the results from the database. - * Otherwise the results are fetched from the database the first time, then cached. - * Next time the same method is called without $criteria, the cached collection is returned. - * If this CcFiles is new, it will return - * an empty collection or the current collection; the criteria is ignored on a new object. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects - * @throws PropelException - */ - public function getCcPlayoutHistorys($criteria = null, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistorys || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistorys) { - // return empty collection - $this->initCcPlayoutHistorys(); - } else { - $collCcPlayoutHistorys = CcPlayoutHistoryQuery::create(null, $criteria) - ->filterByCcFiles($this) - ->find($con); - if (null !== $criteria) { - return $collCcPlayoutHistorys; - } - $this->collCcPlayoutHistorys = $collCcPlayoutHistorys; - } - } - return $this->collCcPlayoutHistorys; - } - - /** - * Returns the number of related CcPlayoutHistory objects. - * - * @param Criteria $criteria - * @param boolean $distinct - * @param PropelPDO $con - * @return int Count of related CcPlayoutHistory objects. - * @throws PropelException - */ - public function countCcPlayoutHistorys(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistorys || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistorys) { - return 0; - } else { - $query = CcPlayoutHistoryQuery::create(null, $criteria); - if($distinct) { - $query->distinct(); - } - return $query - ->filterByCcFiles($this) - ->count($con); - } - } else { - return count($this->collCcPlayoutHistorys); - } - } - - /** - * Method called to associate a CcPlayoutHistory object to this object - * through the CcPlayoutHistory foreign key attribute. - * - * @param CcPlayoutHistory $l CcPlayoutHistory - * @return void - * @throws PropelException - */ - public function addCcPlayoutHistory(CcPlayoutHistory $l) - { - if ($this->collCcPlayoutHistorys === null) { - $this->initCcPlayoutHistorys(); - } - if (!$this->collCcPlayoutHistorys->contains($l)) { // only add it if the **same** object is not already associated - $this->collCcPlayoutHistorys[]= $l; - $l->setCcFiles($this); - } - } - - - /** - * If this collection has already been initialized with - * an identical criteria, it returns the collection. - * Otherwise if this CcFiles is new, it will return - * an empty collection; or if this CcFiles has previously - * been saved, it will retrieve related CcPlayoutHistorys from storage. - * - * This method is protected by default in order to keep the public - * api reasonable. You can provide public methods for those you - * actually need in CcFiles. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) - * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects - */ - public function getCcPlayoutHistorysJoinCcShowInstances($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $query = CcPlayoutHistoryQuery::create(null, $criteria); - $query->joinWith('CcShowInstances', $join_behavior); - - return $this->getCcPlayoutHistorys($query, $con); - } - /** * Clears the current object and sets all attributes to their default values */ @@ -5433,18 +5270,12 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $o->clearAllReferences($deep); } } - if ($this->collCcPlayoutHistorys) { - foreach ((array) $this->collCcPlayoutHistorys as $o) { - $o->clearAllReferences($deep); - } - } } // if ($deep) $this->collCcShowInstancess = null; $this->collCcPlaylistcontentss = null; $this->collCcBlockcontentss = null; $this->collCcSchedules = null; - $this->collCcPlayoutHistorys = null; $this->aFkOwner = null; $this->aCcSubjsRelatedByDbEditedby = null; $this->aCcMusicDirs = null; diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php index dbfbeaf06..82ebc7851 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php @@ -695,9 +695,6 @@ abstract class BaseCcFilesPeer { // Invalidate objects in CcSchedulePeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. CcSchedulePeer::clearInstancePool(); - // Invalidate objects in CcPlayoutHistoryPeer instance pool, - // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - CcPlayoutHistoryPeer::clearInstancePool(); } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php index 50a21a332..fe42ad88c 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php @@ -180,10 +180,6 @@ * @method CcFilesQuery rightJoinCcSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSchedule relation * @method CcFilesQuery innerJoinCcSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSchedule relation * - * @method CcFilesQuery leftJoinCcPlayoutHistory($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistory relation - * @method CcFilesQuery rightJoinCcPlayoutHistory($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation - * @method CcFilesQuery innerJoinCcPlayoutHistory($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation - * * @method CcFiles findOne(PropelPDO $con = null) Return the first CcFiles matching the query * @method CcFiles findOneOrCreate(PropelPDO $con = null) Return the first CcFiles matching the query, or a new CcFiles object populated from the query conditions when no match is found * @@ -2539,70 +2535,6 @@ abstract class BaseCcFilesQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery'); } - /** - * Filter the query by a related CcPlayoutHistory object - * - * @param CcPlayoutHistory $ccPlayoutHistory the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcFilesQuery The current query, for fluid interface - */ - public function filterByCcPlayoutHistory($ccPlayoutHistory, $comparison = null) - { - return $this - ->addUsingAlias(CcFilesPeer::ID, $ccPlayoutHistory->getDbFileId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcPlayoutHistory relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcFilesQuery The current query, for fluid interface - */ - public function joinCcPlayoutHistory($relationAlias = '', $joinType = Criteria::LEFT_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcPlayoutHistory'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcPlayoutHistory'); - } - - return $this; - } - - /** - * Use the CcPlayoutHistory relation CcPlayoutHistory object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryQuery A secondary query class using the current class as primary query - */ - public function useCcPlayoutHistoryQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) - { - return $this - ->joinCcPlayoutHistory($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery'); - } - /** * Exclude object from result * diff --git a/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php b/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php index 42c435123..04d4b60f3 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php @@ -54,9 +54,9 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent protected $aCcTimestamp; /** - * @var CcMountName + * @var CcTimestamp */ - protected $aCcMountName; + protected $aCcTimestamp; /** * Flag to prevent endless save loop, if this object is referenced @@ -173,8 +173,8 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent $this->modifiedColumns[] = CcListenerCountPeer::MOUNT_NAME_ID; } - if ($this->aCcMountName !== null && $this->aCcMountName->getDbId() !== $v) { - $this->aCcMountName = null; + if ($this->aCcTimestamp !== null && $this->aCcTimestamp->getDbId() !== $v) { + $this->aCcTimestamp = null; } return $this; @@ -270,8 +270,8 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent if ($this->aCcTimestamp !== null && $this->timestamp_id !== $this->aCcTimestamp->getDbId()) { $this->aCcTimestamp = null; } - if ($this->aCcMountName !== null && $this->mount_name_id !== $this->aCcMountName->getDbId()) { - $this->aCcMountName = null; + if ($this->aCcTimestamp !== null && $this->mount_name_id !== $this->aCcTimestamp->getDbId()) { + $this->aCcTimestamp = null; } } // ensureConsistency @@ -313,7 +313,7 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent if ($deep) { // also de-associate any related objects? $this->aCcTimestamp = null; - $this->aCcMountName = null; + $this->aCcTimestamp = null; } // if (deep) } @@ -436,11 +436,11 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent $this->setCcTimestamp($this->aCcTimestamp); } - if ($this->aCcMountName !== null) { - if ($this->aCcMountName->isModified() || $this->aCcMountName->isNew()) { - $affectedRows += $this->aCcMountName->save($con); + if ($this->aCcTimestamp !== null) { + if ($this->aCcTimestamp->isModified() || $this->aCcTimestamp->isNew()) { + $affectedRows += $this->aCcTimestamp->save($con); } - $this->setCcMountName($this->aCcMountName); + $this->setCcTimestamp($this->aCcTimestamp); } if ($this->isNew() ) { @@ -543,9 +543,9 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent } } - if ($this->aCcMountName !== null) { - if (!$this->aCcMountName->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcMountName->getValidationFailures()); + if ($this->aCcTimestamp !== null) { + if (!$this->aCcTimestamp->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcTimestamp->getValidationFailures()); } } @@ -633,8 +633,8 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent if (null !== $this->aCcTimestamp) { $result['CcTimestamp'] = $this->aCcTimestamp->toArray($keyType, $includeLazyLoadColumns, true); } - if (null !== $this->aCcMountName) { - $result['CcMountName'] = $this->aCcMountName->toArray($keyType, $includeLazyLoadColumns, true); + if (null !== $this->aCcTimestamp) { + $result['CcTimestamp'] = $this->aCcTimestamp->toArray($keyType, $includeLazyLoadColumns, true); } } return $result; @@ -879,13 +879,13 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent } /** - * Declares an association between this object and a CcMountName object. + * Declares an association between this object and a CcTimestamp object. * - * @param CcMountName $v + * @param CcTimestamp $v * @return CcListenerCount The current object (for fluent API support) * @throws PropelException */ - public function setCcMountName(CcMountName $v = null) + public function setCcTimestamp(CcTimestamp $v = null) { if ($v === null) { $this->setDbMountNameId(NULL); @@ -893,10 +893,10 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent $this->setDbMountNameId($v->getDbId()); } - $this->aCcMountName = $v; + $this->aCcTimestamp = $v; // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcMountName object, it will not be re-added. + // If this object has already been added to the CcTimestamp object, it will not be re-added. if ($v !== null) { $v->addCcListenerCount($this); } @@ -906,25 +906,25 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent /** - * Get the associated CcMountName object + * Get the associated CcTimestamp object * * @param PropelPDO Optional Connection object. - * @return CcMountName The associated CcMountName object. + * @return CcTimestamp The associated CcTimestamp object. * @throws PropelException */ - public function getCcMountName(PropelPDO $con = null) + public function getCcTimestamp(PropelPDO $con = null) { - if ($this->aCcMountName === null && ($this->mount_name_id !== null)) { - $this->aCcMountName = CcMountNameQuery::create()->findPk($this->mount_name_id, $con); + if ($this->aCcTimestamp === null && ($this->mount_name_id !== null)) { + $this->aCcTimestamp = CcTimestampQuery::create()->findPk($this->mount_name_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. - $this->aCcMountName->addCcListenerCounts($this); + $this->aCcTimestamp->addCcListenerCounts($this); */ } - return $this->aCcMountName; + return $this->aCcTimestamp; } /** @@ -959,7 +959,7 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent } // if ($deep) $this->aCcTimestamp = null; - $this->aCcMountName = null; + $this->aCcTimestamp = null; } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php index dad3a53b9..9e3a7cb87 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php @@ -496,7 +496,7 @@ abstract class BaseCcListenerCountPeer { /** - * Returns the number of rows matching criteria, joining the related CcMountName table + * Returns the number of rows matching criteria, joining the related CcTimestamp table * * @param Criteria $criteria * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. @@ -504,7 +504,7 @@ abstract class BaseCcListenerCountPeer { * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @return int Number of matching rows. */ - public static function doCountJoinCcMountName(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doCountJoinCcTimestamp(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; @@ -531,7 +531,7 @@ abstract class BaseCcListenerCountPeer { $con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -612,7 +612,7 @@ abstract class BaseCcListenerCountPeer { /** - * Selects a collection of CcListenerCount objects pre-filled with their CcMountName objects. + * Selects a collection of CcListenerCount objects pre-filled with their CcTimestamp objects. * @param Criteria $criteria * @param PropelPDO $con * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN @@ -620,7 +620,7 @@ abstract class BaseCcListenerCountPeer { * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - public static function doSelectJoinCcMountName(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doSelectJoinCcTimestamp(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; @@ -631,9 +631,9 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addSelectColumns($criteria); $startcol = (CcListenerCountPeer::NUM_COLUMNS - CcListenerCountPeer::NUM_LAZY_LOAD_COLUMNS); - CcMountNamePeer::addSelectColumns($criteria); + CcTimestampPeer::addSelectColumns($criteria); - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -653,19 +653,19 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addInstanceToPool($obj1, $key1); } // if $obj1 already loaded - $key2 = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol); + $key2 = CcTimestampPeer::getPrimaryKeyHashFromRow($row, $startcol); if ($key2 !== null) { - $obj2 = CcMountNamePeer::getInstanceFromPool($key2); + $obj2 = CcTimestampPeer::getInstanceFromPool($key2); if (!$obj2) { - $cls = CcMountNamePeer::getOMClass(false); + $cls = CcTimestampPeer::getOMClass(false); $obj2 = new $cls(); $obj2->hydrate($row, $startcol); - CcMountNamePeer::addInstanceToPool($obj2, $key2); + CcTimestampPeer::addInstanceToPool($obj2, $key2); } // if obj2 already loaded - // Add the $obj1 (CcListenerCount) to $obj2 (CcMountName) + // Add the $obj1 (CcListenerCount) to $obj2 (CcTimestamp) $obj2->addCcListenerCount($obj1); } // if joined row was not null @@ -715,7 +715,7 @@ abstract class BaseCcListenerCountPeer { $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -753,12 +753,12 @@ abstract class BaseCcListenerCountPeer { CcTimestampPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + (CcTimestampPeer::NUM_COLUMNS - CcTimestampPeer::NUM_LAZY_LOAD_COLUMNS); - CcMountNamePeer::addSelectColumns($criteria); - $startcol4 = $startcol3 + (CcMountNamePeer::NUM_COLUMNS - CcMountNamePeer::NUM_LAZY_LOAD_COLUMNS); + CcTimestampPeer::addSelectColumns($criteria); + $startcol4 = $startcol3 + (CcTimestampPeer::NUM_COLUMNS - CcTimestampPeer::NUM_LAZY_LOAD_COLUMNS); $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -795,21 +795,21 @@ abstract class BaseCcListenerCountPeer { $obj2->addCcListenerCount($obj1); } // if joined row not null - // Add objects for joined CcMountName rows + // Add objects for joined CcTimestamp rows - $key3 = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol3); + $key3 = CcTimestampPeer::getPrimaryKeyHashFromRow($row, $startcol3); if ($key3 !== null) { - $obj3 = CcMountNamePeer::getInstanceFromPool($key3); + $obj3 = CcTimestampPeer::getInstanceFromPool($key3); if (!$obj3) { - $cls = CcMountNamePeer::getOMClass(false); + $cls = CcTimestampPeer::getOMClass(false); $obj3 = new $cls(); $obj3->hydrate($row, $startcol3); - CcMountNamePeer::addInstanceToPool($obj3, $key3); + CcTimestampPeer::addInstanceToPool($obj3, $key3); } // if obj3 loaded - // Add the $obj1 (CcListenerCount) to the collection in $obj3 (CcMountName) + // Add the $obj1 (CcListenerCount) to the collection in $obj3 (CcTimestamp) $obj3->addCcListenerCount($obj1); } // if joined row not null @@ -856,8 +856,6 @@ abstract class BaseCcListenerCountPeer { $con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); - $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { @@ -871,7 +869,7 @@ abstract class BaseCcListenerCountPeer { /** - * Returns the number of rows matching criteria, joining the related CcMountName table + * Returns the number of rows matching criteria, joining the related CcTimestamp table * * @param Criteria $criteria * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. @@ -879,7 +877,7 @@ abstract class BaseCcListenerCountPeer { * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @return int Number of matching rows. */ - public static function doCountJoinAllExceptCcMountName(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doCountJoinAllExceptCcTimestamp(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; @@ -906,8 +904,6 @@ abstract class BaseCcListenerCountPeer { $con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); - $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { @@ -944,11 +940,6 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addSelectColumns($criteria); $startcol2 = (CcListenerCountPeer::NUM_COLUMNS - CcListenerCountPeer::NUM_LAZY_LOAD_COLUMNS); - CcMountNamePeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcMountNamePeer::NUM_COLUMNS - CcMountNamePeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); - $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -967,25 +958,6 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded - // Add objects for joined CcMountName rows - - $key2 = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcMountNamePeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcMountNamePeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcMountNamePeer::addInstanceToPool($obj2, $key2); - } // if $obj2 already loaded - - // Add the $obj1 (CcListenerCount) to the collection in $obj2 (CcMountName) - $obj2->addCcListenerCount($obj1); - - } // if joined row is not null - $results[] = $obj1; } $stmt->closeCursor(); @@ -994,7 +966,7 @@ abstract class BaseCcListenerCountPeer { /** - * Selects a collection of CcListenerCount objects pre-filled with all related objects except CcMountName. + * Selects a collection of CcListenerCount objects pre-filled with all related objects except CcTimestamp. * * @param Criteria $criteria * @param PropelPDO $con @@ -1003,7 +975,7 @@ abstract class BaseCcListenerCountPeer { * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - public static function doSelectJoinAllExceptCcMountName(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doSelectJoinAllExceptCcTimestamp(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; @@ -1017,11 +989,6 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addSelectColumns($criteria); $startcol2 = (CcListenerCountPeer::NUM_COLUMNS - CcListenerCountPeer::NUM_LAZY_LOAD_COLUMNS); - CcTimestampPeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcTimestampPeer::NUM_COLUMNS - CcTimestampPeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); - $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -1040,25 +1007,6 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded - // Add objects for joined CcTimestamp rows - - $key2 = CcTimestampPeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcTimestampPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcTimestampPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcTimestampPeer::addInstanceToPool($obj2, $key2); - } // if $obj2 already loaded - - // Add the $obj1 (CcListenerCount) to the collection in $obj2 (CcTimestamp) - $obj2->addCcListenerCount($obj1); - - } // if joined row is not null - $results[] = $obj1; } $stmt->closeCursor(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php index 30c702e6e..ed04cd146 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php @@ -24,9 +24,9 @@ * @method CcListenerCountQuery rightJoinCcTimestamp($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTimestamp relation * @method CcListenerCountQuery innerJoinCcTimestamp($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTimestamp relation * - * @method CcListenerCountQuery leftJoinCcMountName($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcMountName relation - * @method CcListenerCountQuery rightJoinCcMountName($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcMountName relation - * @method CcListenerCountQuery innerJoinCcMountName($relationAlias = '') Adds a INNER JOIN clause to the query using the CcMountName relation + * @method CcListenerCountQuery leftJoinCcTimestamp($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcTimestamp relation + * @method CcListenerCountQuery rightJoinCcTimestamp($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTimestamp relation + * @method CcListenerCountQuery innerJoinCcTimestamp($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTimestamp relation * * @method CcListenerCount findOne(PropelPDO $con = null) Return the first CcListenerCount matching the query * @method CcListenerCount findOneOrCreate(PropelPDO $con = null) Return the first CcListenerCount matching the query, or a new CcListenerCount object populated from the query conditions when no match is found @@ -324,31 +324,31 @@ abstract class BaseCcListenerCountQuery extends ModelCriteria } /** - * Filter the query by a related CcMountName object + * Filter the query by a related CcTimestamp object * - * @param CcMountName $ccMountName the related object to use as filter + * @param CcTimestamp $ccTimestamp the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcListenerCountQuery The current query, for fluid interface */ - public function filterByCcMountName($ccMountName, $comparison = null) + public function filterByCcTimestamp($ccTimestamp, $comparison = null) { return $this - ->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $ccMountName->getDbId(), $comparison); + ->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $ccTimestamp->getDbId(), $comparison); } /** - * Adds a JOIN clause to the query using the CcMountName relation + * Adds a JOIN clause to the query using the CcTimestamp relation * * @param string $relationAlias optional alias for the relation * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return CcListenerCountQuery The current query, for fluid interface */ - public function joinCcMountName($relationAlias = '', $joinType = Criteria::INNER_JOIN) + public function joinCcTimestamp($relationAlias = '', $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcMountName'); + $relationMap = $tableMap->getRelation('CcTimestamp'); // create a ModelJoin object for this join $join = new ModelJoin(); @@ -363,14 +363,14 @@ abstract class BaseCcListenerCountQuery extends ModelCriteria $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { - $this->addJoinObject($join, 'CcMountName'); + $this->addJoinObject($join, 'CcTimestamp'); } return $this; } /** - * Use the CcMountName relation CcMountName object + * Use the CcTimestamp relation CcTimestamp object * * @see useQuery() * @@ -378,13 +378,13 @@ abstract class BaseCcListenerCountQuery extends ModelCriteria * to be used as main alias in the secondary query * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return CcMountNameQuery A secondary query class using the current class as primary query + * @return CcTimestampQuery A secondary query class using the current class as primary query */ - public function useCcMountNameQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + public function useCcTimestampQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) { return $this - ->joinCcMountName($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcMountName', 'CcMountNameQuery'); + ->joinCcTimestamp($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcTimestamp', 'CcTimestampQuery'); } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMountName.php b/airtime_mvc/application/models/airtime/om/BaseCcMountName.php deleted file mode 100644 index b476f05a8..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcMountName.php +++ /dev/null @@ -1,893 +0,0 @@ -id; - } - - /** - * Get the [mount_name] column value. - * - * @return string - */ - public function getDbMountName() - { - return $this->mount_name; - } - - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return CcMountName The current object (for fluent API support) - */ - public function setDbId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = CcMountNamePeer::ID; - } - - return $this; - } // setDbId() - - /** - * Set the value of [mount_name] column. - * - * @param string $v new value - * @return CcMountName The current object (for fluent API support) - */ - public function setDbMountName($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->mount_name !== $v) { - $this->mount_name = $v; - $this->modifiedColumns[] = CcMountNamePeer::MOUNT_NAME; - } - - return $this; - } // setDbMountName() - - /** - * Indicates whether the columns in this object are only set to default values. - * - * This method can be used in conjunction with isModified() to indicate whether an object is both - * modified _and_ has some values set which are non-default. - * - * @return boolean Whether the columns in this object are only been set with default values. - */ - public function hasOnlyDefaultValues() - { - // otherwise, everything was equal, so return TRUE - return true; - } // hasOnlyDefaultValues() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (0-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) - * @param int $startcol 0-based offset column which indicates which restultset column to start with. - * @param boolean $rehydrate Whether this object is being re-hydrated from the database. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate($row, $startcol = 0, $rehydrate = false) - { - try { - - $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; - $this->mount_name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; - $this->resetModified(); - - $this->setNew(false); - - if ($rehydrate) { - $this->ensureConsistency(); - } - - return $startcol + 2; // 2 = CcMountNamePeer::NUM_COLUMNS - CcMountNamePeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating CcMountName object", $e); - } - } - - /** - * Checks and repairs the internal consistency of the object. - * - * This method is executed after an already-instantiated object is re-hydrated - * from the database. It exists to check any foreign keys to make sure that - * the objects related to the current object are correct based on foreign key. - * - * You can override this method in the stub class, but you should always invoke - * the base method from the overridden method (i.e. parent::ensureConsistency()), - * in case your model changes. - * - * @throws PropelException - */ - public function ensureConsistency() - { - - } // ensureConsistency - - /** - * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. - * - * This will only work if the object has been saved and has a valid primary key set. - * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param PropelPDO $con (optional) The PropelPDO connection to use. - * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db - */ - public function reload($deep = false, PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("Cannot reload a deleted object."); - } - - if ($this->isNew()) { - throw new PropelException("Cannot reload an unsaved object."); - } - - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - // We don't need to alter the object instance pool; we're just modifying this instance - // already in the pool. - - $stmt = CcMountNamePeer::doSelectStmt($this->buildPkeyCriteria(), $con); - $row = $stmt->fetch(PDO::FETCH_NUM); - $stmt->closeCursor(); - if (!$row) { - throw new PropelException('Cannot find matching row in the database to reload object values.'); - } - $this->hydrate($row, 0, true); // rehydrate - - if ($deep) { // also de-associate any related objects? - - $this->collCcListenerCounts = null; - - } // if (deep) - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param PropelPDO $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - try { - $ret = $this->preDelete($con); - if ($ret) { - CcMountNameQuery::create() - ->filterByPrimaryKey($this->getPrimaryKey()) - ->delete($con); - $this->postDelete($con); - $con->commit(); - $this->setDeleted(true); - } else { - $con->commit(); - } - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Persists this object to the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All modified related objects will also be persisted in the doSave() - * method. This method wraps all precipitate database operations in a - * single transaction. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see doSave() - */ - public function save(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - $isInsert = $this->isNew(); - try { - $ret = $this->preSave($con); - if ($isInsert) { - $ret = $ret && $this->preInsert($con); - } else { - $ret = $ret && $this->preUpdate($con); - } - if ($ret) { - $affectedRows = $this->doSave($con); - if ($isInsert) { - $this->postInsert($con); - } else { - $this->postUpdate($con); - } - $this->postSave($con); - CcMountNamePeer::addInstanceToPool($this); - } else { - $affectedRows = 0; - } - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Performs the work of inserting or updating the row in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see save() - */ - protected function doSave(PropelPDO $con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - if ($this->isNew() ) { - $this->modifiedColumns[] = CcMountNamePeer::ID; - } - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $criteria = $this->buildCriteria(); - if ($criteria->keyContainsValue(CcMountNamePeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcMountNamePeer::ID.')'); - } - - $pk = BasePeer::doInsert($criteria, $con); - $affectedRows = 1; - $this->setDbId($pk); //[IMV] update autoincrement primary key - $this->setNew(false); - } else { - $affectedRows = CcMountNamePeer::doUpdate($this, $con); - } - - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - if ($this->collCcListenerCounts !== null) { - foreach ($this->collCcListenerCounts as $referrerFK) { - if (!$referrerFK->isDeleted()) { - $affectedRows += $referrerFK->save($con); - } - } - } - - $this->alreadyInSave = false; - - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - if (($retval = CcMountNamePeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - if ($this->collCcListenerCounts !== null) { - foreach ($this->collCcListenerCounts as $referrerFK) { - if (!$referrerFK->validate($columns)) { - $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); - } - } - } - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcMountNamePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - $field = $this->getByPosition($pos); - return $field; - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getDbId(); - break; - case 1: - return $this->getDbMountName(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * Defaults to BasePeer::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * - * @return array an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true) - { - $keys = CcMountNamePeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getDbId(), - $keys[1] => $this->getDbMountName(), - ); - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcMountNamePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setDbId($value); - break; - case 1: - $this->setDbMountName($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * The default key type is the column's phpname (e.g. 'AuthorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = CcMountNamePeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setDbMountName($arr[$keys[1]]); - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); - - if ($this->isColumnModified(CcMountNamePeer::ID)) $criteria->add(CcMountNamePeer::ID, $this->id); - if ($this->isColumnModified(CcMountNamePeer::MOUNT_NAME)) $criteria->add(CcMountNamePeer::MOUNT_NAME, $this->mount_name); - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); - $criteria->add(CcMountNamePeer::ID, $this->id); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return int - */ - public function getPrimaryKey() - { - return $this->getDbId(); - } - - /** - * Generic method to set the primary key (id column). - * - * @param int $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setDbId($key); - } - - /** - * Returns true if the primary key for this object is null. - * @return boolean - */ - public function isPrimaryKeyNull() - { - return null === $this->getDbId(); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of CcMountName (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - $copyObj->setDbMountName($this->mount_name); - - if ($deepCopy) { - // important: temporarily setNew(false) because this affects the behavior of - // the getter/setter methods for fkey referrer objects. - $copyObj->setNew(false); - - foreach ($this->getCcListenerCounts() as $relObj) { - if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addCcListenerCount($relObj->copy($deepCopy)); - } - } - - } // if ($deepCopy) - - - $copyObj->setNew(true); - $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return CcMountName Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return CcMountNamePeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new CcMountNamePeer(); - } - return self::$peer; - } - - /** - * Clears out the collCcListenerCounts collection - * - * This does not modify the database; however, it will remove any associated objects, causing - * them to be refetched by subsequent calls to accessor method. - * - * @return void - * @see addCcListenerCounts() - */ - public function clearCcListenerCounts() - { - $this->collCcListenerCounts = null; // important to set this to NULL since that means it is uninitialized - } - - /** - * Initializes the collCcListenerCounts collection. - * - * By default this just sets the collCcListenerCounts collection to an empty array (like clearcollCcListenerCounts()); - * however, you may wish to override this method in your stub class to provide setting appropriate - * to your application -- for example, setting the initial array to the values stored in database. - * - * @return void - */ - public function initCcListenerCounts() - { - $this->collCcListenerCounts = new PropelObjectCollection(); - $this->collCcListenerCounts->setModel('CcListenerCount'); - } - - /** - * Gets an array of CcListenerCount objects which contain a foreign key that references this object. - * - * If the $criteria is not null, it is used to always fetch the results from the database. - * Otherwise the results are fetched from the database the first time, then cached. - * Next time the same method is called without $criteria, the cached collection is returned. - * If this CcMountName is new, it will return - * an empty collection or the current collection; the criteria is ignored on a new object. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @return PropelCollection|array CcListenerCount[] List of CcListenerCount objects - * @throws PropelException - */ - public function getCcListenerCounts($criteria = null, PropelPDO $con = null) - { - if(null === $this->collCcListenerCounts || null !== $criteria) { - if ($this->isNew() && null === $this->collCcListenerCounts) { - // return empty collection - $this->initCcListenerCounts(); - } else { - $collCcListenerCounts = CcListenerCountQuery::create(null, $criteria) - ->filterByCcMountName($this) - ->find($con); - if (null !== $criteria) { - return $collCcListenerCounts; - } - $this->collCcListenerCounts = $collCcListenerCounts; - } - } - return $this->collCcListenerCounts; - } - - /** - * Returns the number of related CcListenerCount objects. - * - * @param Criteria $criteria - * @param boolean $distinct - * @param PropelPDO $con - * @return int Count of related CcListenerCount objects. - * @throws PropelException - */ - public function countCcListenerCounts(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) - { - if(null === $this->collCcListenerCounts || null !== $criteria) { - if ($this->isNew() && null === $this->collCcListenerCounts) { - return 0; - } else { - $query = CcListenerCountQuery::create(null, $criteria); - if($distinct) { - $query->distinct(); - } - return $query - ->filterByCcMountName($this) - ->count($con); - } - } else { - return count($this->collCcListenerCounts); - } - } - - /** - * Method called to associate a CcListenerCount object to this object - * through the CcListenerCount foreign key attribute. - * - * @param CcListenerCount $l CcListenerCount - * @return void - * @throws PropelException - */ - public function addCcListenerCount(CcListenerCount $l) - { - if ($this->collCcListenerCounts === null) { - $this->initCcListenerCounts(); - } - if (!$this->collCcListenerCounts->contains($l)) { // only add it if the **same** object is not already associated - $this->collCcListenerCounts[]= $l; - $l->setCcMountName($this); - } - } - - - /** - * If this collection has already been initialized with - * an identical criteria, it returns the collection. - * Otherwise if this CcMountName is new, it will return - * an empty collection; or if this CcMountName has previously - * been saved, it will retrieve related CcListenerCounts from storage. - * - * This method is protected by default in order to keep the public - * api reasonable. You can provide public methods for those you - * actually need in CcMountName. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) - * @return PropelCollection|array CcListenerCount[] List of CcListenerCount objects - */ - public function getCcListenerCountsJoinCcTimestamp($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $query = CcListenerCountQuery::create(null, $criteria); - $query->joinWith('CcTimestamp', $join_behavior); - - return $this->getCcListenerCounts($query, $con); - } - - /** - * Clears the current object and sets all attributes to their default values - */ - public function clear() - { - $this->id = null; - $this->mount_name = null; - $this->alreadyInSave = false; - $this->alreadyInValidation = false; - $this->clearAllReferences(); - $this->resetModified(); - $this->setNew(true); - $this->setDeleted(false); - } - - /** - * Resets all collections of referencing foreign keys. - * - * This method is a user-space workaround for PHP's inability to garbage collect objects - * with circular references. This is currently necessary when using Propel in certain - * daemon or large-volumne/high-memory operations. - * - * @param boolean $deep Whether to also clear the references on all associated objects. - */ - public function clearAllReferences($deep = false) - { - if ($deep) { - if ($this->collCcListenerCounts) { - foreach ((array) $this->collCcListenerCounts as $o) { - $o->clearAllReferences($deep); - } - } - } // if ($deep) - - $this->collCcListenerCounts = null; - } - - /** - * Catches calls to virtual methods - */ - public function __call($name, $params) - { - if (preg_match('/get(\w+)/', $name, $matches)) { - $virtualColumn = $matches[1]; - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - // no lcfirst in php<5.3... - $virtualColumn[0] = strtolower($virtualColumn[0]); - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - } - throw new PropelException('Call to undefined method: ' . $name); - } - -} // BaseCcMountName diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php b/airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php deleted file mode 100644 index af2e416b1..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php +++ /dev/null @@ -1,742 +0,0 @@ - array ('DbId', 'DbMountName', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbMountName', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::MOUNT_NAME, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'MOUNT_NAME', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'mount_name', ), - BasePeer::TYPE_NUM => array (0, 1, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbMountName' => 1, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbMountName' => 1, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::MOUNT_NAME => 1, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'MOUNT_NAME' => 1, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'mount_name' => 1, ), - BasePeer::TYPE_NUM => array (0, 1, ) - ); - - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - * @throws PropelException - if the specified name could not be found in the fieldname mappings. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. CcMountNamePeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(CcMountNamePeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria, $alias = null) - { - if (null === $alias) { - $criteria->addSelectColumn(CcMountNamePeer::ID); - $criteria->addSelectColumn(CcMountNamePeer::MOUNT_NAME); - } else { - $criteria->addSelectColumn($alias . '.ID'); - $criteria->addSelectColumn($alias . '.MOUNT_NAME'); - } - } - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) - { - // we may modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcMountNamePeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcMountNamePeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName - - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - // BasePeer returns a PDOStatement - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param PropelPDO $con - * @return CcMountName - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = CcMountNamePeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, PropelPDO $con = null) - { - return CcMountNamePeer::populateObjects(CcMountNamePeer::doSelectStmt($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. - * - * Use this method directly if you want to work with an executed statement durirectly (for example - * to perform your own object hydration). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con The connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return PDOStatement The executed PDOStatement object. - * @see BasePeer::doSelect() - */ - public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - if (!$criteria->hasSelectClause()) { - $criteria = clone $criteria; - CcMountNamePeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a PDOStatement - return BasePeer::doSelect($criteria, $con); - } - /** - * Adds an object to the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doSelect*() - * methods in your stub classes -- you may need to explicitly add objects - * to the cache in order to ensure that the same objects are always returned by doSelect*() - * and retrieveByPK*() calls. - * - * @param CcMountName $value A CcMountName object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). - */ - public static function addInstanceToPool(CcMountName $obj, $key = null) - { - if (Propel::isInstancePoolingEnabled()) { - if ($key === null) { - $key = (string) $obj->getDbId(); - } // if key === null - self::$instances[$key] = $obj; - } - } - - /** - * Removes an object from the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doDelete - * methods in your stub classes -- you may need to explicitly remove objects - * from the cache in order to prevent returning objects that no longer exist. - * - * @param mixed $value A CcMountName object or a primary key value. - */ - public static function removeInstanceFromPool($value) - { - if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof CcMountName) { - $key = (string) $value->getDbId(); - } elseif (is_scalar($value)) { - // assume we've been passed a primary key - $key = (string) $value; - } else { - $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcMountName object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); - throw $e; - } - - unset(self::$instances[$key]); - } - } // removeInstanceFromPool() - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param string $key The key (@see getPrimaryKeyHash()) for this instance. - * @return CcMountName Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. - * @see getPrimaryKeyHash() - */ - public static function getInstanceFromPool($key) - { - if (Propel::isInstancePoolingEnabled()) { - if (isset(self::$instances[$key])) { - return self::$instances[$key]; - } - } - return null; // just to be explicit - } - - /** - * Clear the instance pool. - * - * @return void - */ - public static function clearInstancePool() - { - self::$instances = array(); - } - - /** - * Method to invalidate the instance pool of all tables related to cc_mount_name - * by a foreign key with ON DELETE CASCADE - */ - public static function clearRelatedInstancePool() - { - // Invalidate objects in CcListenerCountPeer instance pool, - // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - CcListenerCountPeer::clearInstancePool(); - } - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return string A string version of PK or NULL if the components of primary key in result array are all null. - */ - public static function getPrimaryKeyHashFromRow($row, $startcol = 0) - { - // If the PK cannot be derived from the row, return NULL. - if ($row[$startcol] === null) { - return null; - } - return (string) $row[$startcol]; - } - - /** - * Retrieves the primary key from the DB resultset row - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, an array of the primary key columns will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return mixed The primary key of the row - */ - public static function getPrimaryKeyFromRow($row, $startcol = 0) - { - return (int) $row[$startcol]; - } - - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(PDOStatement $stmt) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = CcMountNamePeer::getOMClass(false); - // populate the object(s) - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = CcMountNamePeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = CcMountNamePeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, 0, true); // rehydrate - $results[] = $obj; - } else { - $obj = new $cls(); - $obj->hydrate($row); - $results[] = $obj; - CcMountNamePeer::addInstanceToPool($obj, $key); - } // if key exists - } - $stmt->closeCursor(); - return $results; - } - /** - * Populates an object of the default type or an object that inherit from the default. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CcMountName object, last column rank) - */ - public static function populateObject($row, $startcol = 0) - { - $key = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = CcMountNamePeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, $startcol, true); // rehydrate - $col = $startcol + CcMountNamePeer::NUM_COLUMNS; - } else { - $cls = CcMountNamePeer::OM_CLASS; - $obj = new $cls(); - $col = $obj->hydrate($row, $startcol); - CcMountNamePeer::addInstanceToPool($obj, $key); - } - return array($obj, $col); - } - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * Add a TableMap instance to the database for this peer class. - */ - public static function buildTableMap() - { - $dbMap = Propel::getDatabaseMap(BaseCcMountNamePeer::DATABASE_NAME); - if (!$dbMap->hasTable(BaseCcMountNamePeer::TABLE_NAME)) - { - $dbMap->addTableObject(new CcMountNameTableMap()); - } - } - - /** - * The class that the Peer will make instances of. - * - * If $withPrefix is true, the returned path - * uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName - */ - public static function getOMClass($withPrefix = true) - { - return $withPrefix ? CcMountNamePeer::CLASS_DEFAULT : CcMountNamePeer::OM_CLASS; - } - - /** - * Method perform an INSERT on the database, given a CcMountName or Criteria object. - * - * @param mixed $values Criteria or CcMountName object containing data that is used to create the INSERT statement. - * @param PropelPDO $con the PropelPDO connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from CcMountName object - } - - if ($criteria->containsKey(CcMountNamePeer::ID) && $criteria->keyContainsValue(CcMountNamePeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcMountNamePeer::ID.')'); - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->beginTransaction(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch(PropelException $e) { - $con->rollBack(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a CcMountName or Criteria object. - * - * @param mixed $values Criteria or CcMountName object containing data that is used to create the UPDATE statement. - * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(CcMountNamePeer::ID); - $value = $criteria->remove(CcMountNamePeer::ID); - if ($value) { - $selectCriteria->add(CcMountNamePeer::ID, $value, $comparison); - } else { - $selectCriteria->setPrimaryTableName(CcMountNamePeer::TABLE_NAME); - } - - } else { // $values is CcMountName object - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the cc_mount_name table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - $affectedRows += BasePeer::doDeleteAll(CcMountNamePeer::TABLE_NAME, $con, CcMountNamePeer::DATABASE_NAME); - // Because this db requires some delete cascade/set null emulation, we have to - // clear the cached instance *after* the emulation has happened (since - // instances get re-added by the select statement contained therein). - CcMountNamePeer::clearInstancePool(); - CcMountNamePeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a CcMountName or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or CcMountName object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param PropelPDO $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - // invalidate the cache for all objects of this type, since we have no - // way of knowing (without running a query) what objects should be invalidated - // from the cache based on this Criteria. - CcMountNamePeer::clearInstancePool(); - // rename for clarity - $criteria = clone $values; - } elseif ($values instanceof CcMountName) { // it's a model object - // invalidate the cache for this single object - CcMountNamePeer::removeInstanceFromPool($values); - // create criteria based on pk values - $criteria = $values->buildPkeyCriteria(); - } else { // it's a primary key, or an array of pks - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(CcMountNamePeer::ID, (array) $values, Criteria::IN); - // invalidate the cache for this object(s) - foreach ((array) $values as $singleval) { - CcMountNamePeer::removeInstanceFromPool($singleval); - } - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - CcMountNamePeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Validates all modified columns of given CcMountName object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param CcMountName $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(CcMountName $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(CcMountNamePeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(CcMountNamePeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(CcMountNamePeer::DATABASE_NAME, CcMountNamePeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param int $pk the primary key. - * @param PropelPDO $con the connection to use - * @return CcMountName - */ - public static function retrieveByPK($pk, PropelPDO $con = null) - { - - if (null !== ($obj = CcMountNamePeer::getInstanceFromPool((string) $pk))) { - return $obj; - } - - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); - $criteria->add(CcMountNamePeer::ID, $pk); - - $v = CcMountNamePeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param PropelPDO $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); - $criteria->add(CcMountNamePeer::ID, $pks, Criteria::IN); - $objs = CcMountNamePeer::doSelect($criteria, $con); - } - return $objs; - } - -} // BaseCcMountNamePeer - -// This is the static code needed to register the TableMap for this table with the main Propel class. -// -BaseCcMountNamePeer::buildTableMap(); - diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php deleted file mode 100644 index 52af75f38..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php +++ /dev/null @@ -1,259 +0,0 @@ -setModelAlias($modelAlias); - } - if ($criteria instanceof Criteria) { - $query->mergeWith($criteria); - } - return $query; - } - - /** - * Find object by primary key - * Use instance pooling to avoid a database query if the object exists - * - * $obj = $c->findPk(12, $con); - * - * @param mixed $key Primary key to use for the query - * @param PropelPDO $con an optional connection object - * - * @return CcMountName|array|mixed the result, formatted by the current formatter - */ - public function findPk($key, $con = null) - { - if ((null !== ($obj = CcMountNamePeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { - // the object is alredy in the instance pool - return $obj; - } else { - // the object has not been requested yet, or the formatter is not an object formatter - $criteria = $this->isKeepQuery() ? clone $this : $this; - $stmt = $criteria - ->filterByPrimaryKey($key) - ->getSelectStatement($con); - return $criteria->getFormatter()->init($criteria)->formatOne($stmt); - } - } - - /** - * Find objects by primary key - * - * $objs = $c->findPks(array(12, 56, 832), $con); - * - * @param array $keys Primary keys to use for the query - * @param PropelPDO $con an optional connection object - * - * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter - */ - public function findPks($keys, $con = null) - { - $criteria = $this->isKeepQuery() ? clone $this : $this; - return $this - ->filterByPrimaryKeys($keys) - ->find($con); - } - - /** - * Filter the query by primary key - * - * @param mixed $key Primary key to use for the query - * - * @return CcMountNameQuery The current query, for fluid interface - */ - public function filterByPrimaryKey($key) - { - return $this->addUsingAlias(CcMountNamePeer::ID, $key, Criteria::EQUAL); - } - - /** - * Filter the query by a list of primary keys - * - * @param array $keys The list of primary key to use for the query - * - * @return CcMountNameQuery The current query, for fluid interface - */ - public function filterByPrimaryKeys($keys) - { - return $this->addUsingAlias(CcMountNamePeer::ID, $keys, Criteria::IN); - } - - /** - * Filter the query on the id column - * - * @param int|array $dbId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcMountNameQuery The current query, for fluid interface - */ - public function filterByDbId($dbId = null, $comparison = null) - { - if (is_array($dbId) && null === $comparison) { - $comparison = Criteria::IN; - } - return $this->addUsingAlias(CcMountNamePeer::ID, $dbId, $comparison); - } - - /** - * Filter the query on the mount_name column - * - * @param string $dbMountName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcMountNameQuery The current query, for fluid interface - */ - public function filterByDbMountName($dbMountName = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbMountName)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbMountName)) { - $dbMountName = str_replace('*', '%', $dbMountName); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcMountNamePeer::MOUNT_NAME, $dbMountName, $comparison); - } - - /** - * Filter the query by a related CcListenerCount object - * - * @param CcListenerCount $ccListenerCount the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcMountNameQuery The current query, for fluid interface - */ - public function filterByCcListenerCount($ccListenerCount, $comparison = null) - { - return $this - ->addUsingAlias(CcMountNamePeer::ID, $ccListenerCount->getDbMountNameId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcListenerCount relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcMountNameQuery The current query, for fluid interface - */ - public function joinCcListenerCount($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcListenerCount'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcListenerCount'); - } - - return $this; - } - - /** - * Use the CcListenerCount relation CcListenerCount object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcListenerCountQuery A secondary query class using the current class as primary query - */ - public function useCcListenerCountQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcListenerCount($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcListenerCount', 'CcListenerCountQuery'); - } - - /** - * Exclude object from result - * - * @param CcMountName $ccMountName Object to remove from the list of results - * - * @return CcMountNameQuery The current query, for fluid interface - */ - public function prune($ccMountName = null) - { - if ($ccMountName) { - $this->addUsingAlias(CcMountNamePeer::ID, $ccMountName->getDbId(), Criteria::NOT_EQUAL); - } - - return $this; - } - -} // BaseCcMountNameQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php deleted file mode 100644 index 2e55a484f..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php +++ /dev/null @@ -1,1288 +0,0 @@ -id; - } - - /** - * Get the [file_id] column value. - * - * @return int - */ - public function getDbFileId() - { - return $this->file_id; - } - - /** - * Get the [optionally formatted] temporal [starts] column value. - * - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw DateTime object will be returned. - * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL - * @throws PropelException - if unable to parse/validate the date/time value. - */ - public function getDbStarts($format = 'Y-m-d H:i:s') - { - if ($this->starts === null) { - return null; - } - - - - try { - $dt = new DateTime($this->starts); - } catch (Exception $x) { - throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->starts, true), $x); - } - - if ($format === null) { - // Because propel.useDateTimeClass is TRUE, we return a DateTime object. - return $dt; - } elseif (strpos($format, '%') !== false) { - return strftime($format, $dt->format('U')); - } else { - return $dt->format($format); - } - } - - /** - * Get the [optionally formatted] temporal [ends] column value. - * - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw DateTime object will be returned. - * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL - * @throws PropelException - if unable to parse/validate the date/time value. - */ - public function getDbEnds($format = 'Y-m-d H:i:s') - { - if ($this->ends === null) { - return null; - } - - - - try { - $dt = new DateTime($this->ends); - } catch (Exception $x) { - throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->ends, true), $x); - } - - if ($format === null) { - // Because propel.useDateTimeClass is TRUE, we return a DateTime object. - return $dt; - } elseif (strpos($format, '%') !== false) { - return strftime($format, $dt->format('U')); - } else { - return $dt->format($format); - } - } - - /** - * Get the [instance_id] column value. - * - * @return int - */ - public function getDbInstanceId() - { - return $this->instance_id; - } - - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return CcPlayoutHistory The current object (for fluent API support) - */ - public function setDbId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryPeer::ID; - } - - return $this; - } // setDbId() - - /** - * Set the value of [file_id] column. - * - * @param int $v new value - * @return CcPlayoutHistory The current object (for fluent API support) - */ - public function setDbFileId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->file_id !== $v) { - $this->file_id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryPeer::FILE_ID; - } - - if ($this->aCcFiles !== null && $this->aCcFiles->getDbId() !== $v) { - $this->aCcFiles = null; - } - - return $this; - } // setDbFileId() - - /** - * Sets the value of [starts] column to a normalized version of the date/time value specified. - * - * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will - * be treated as NULL for temporal objects. - * @return CcPlayoutHistory The current object (for fluent API support) - */ - public function setDbStarts($v) - { - // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') - // -- which is unexpected, to say the least. - if ($v === null || $v === '') { - $dt = null; - } elseif ($v instanceof DateTime) { - $dt = $v; - } else { - // some string/numeric value passed; we normalize that so that we can - // validate it. - try { - if (is_numeric($v)) { // if it's a unix timestamp - $dt = new DateTime('@'.$v, new DateTimeZone('UTC')); - // We have to explicitly specify and then change the time zone because of a - // DateTime bug: http://bugs.php.net/bug.php?id=43003 - $dt->setTimeZone(new DateTimeZone(date_default_timezone_get())); - } else { - $dt = new DateTime($v); - } - } catch (Exception $x) { - throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); - } - } - - if ( $this->starts !== null || $dt !== null ) { - // (nested ifs are a little easier to read in this case) - - $currNorm = ($this->starts !== null && $tmpDt = new DateTime($this->starts)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null; - $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null; - - if ( ($currNorm !== $newNorm) // normalized values don't match - ) - { - $this->starts = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null); - $this->modifiedColumns[] = CcPlayoutHistoryPeer::STARTS; - } - } // if either are not null - - return $this; - } // setDbStarts() - - /** - * Sets the value of [ends] column to a normalized version of the date/time value specified. - * - * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will - * be treated as NULL for temporal objects. - * @return CcPlayoutHistory The current object (for fluent API support) - */ - public function setDbEnds($v) - { - // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') - // -- which is unexpected, to say the least. - if ($v === null || $v === '') { - $dt = null; - } elseif ($v instanceof DateTime) { - $dt = $v; - } else { - // some string/numeric value passed; we normalize that so that we can - // validate it. - try { - if (is_numeric($v)) { // if it's a unix timestamp - $dt = new DateTime('@'.$v, new DateTimeZone('UTC')); - // We have to explicitly specify and then change the time zone because of a - // DateTime bug: http://bugs.php.net/bug.php?id=43003 - $dt->setTimeZone(new DateTimeZone(date_default_timezone_get())); - } else { - $dt = new DateTime($v); - } - } catch (Exception $x) { - throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); - } - } - - if ( $this->ends !== null || $dt !== null ) { - // (nested ifs are a little easier to read in this case) - - $currNorm = ($this->ends !== null && $tmpDt = new DateTime($this->ends)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null; - $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null; - - if ( ($currNorm !== $newNorm) // normalized values don't match - ) - { - $this->ends = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null); - $this->modifiedColumns[] = CcPlayoutHistoryPeer::ENDS; - } - } // if either are not null - - return $this; - } // setDbEnds() - - /** - * Set the value of [instance_id] column. - * - * @param int $v new value - * @return CcPlayoutHistory The current object (for fluent API support) - */ - public function setDbInstanceId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->instance_id !== $v) { - $this->instance_id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryPeer::INSTANCE_ID; - } - - if ($this->aCcShowInstances !== null && $this->aCcShowInstances->getDbId() !== $v) { - $this->aCcShowInstances = null; - } - - return $this; - } // setDbInstanceId() - - /** - * Indicates whether the columns in this object are only set to default values. - * - * This method can be used in conjunction with isModified() to indicate whether an object is both - * modified _and_ has some values set which are non-default. - * - * @return boolean Whether the columns in this object are only been set with default values. - */ - public function hasOnlyDefaultValues() - { - // otherwise, everything was equal, so return TRUE - return true; - } // hasOnlyDefaultValues() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (0-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) - * @param int $startcol 0-based offset column which indicates which restultset column to start with. - * @param boolean $rehydrate Whether this object is being re-hydrated from the database. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate($row, $startcol = 0, $rehydrate = false) - { - try { - - $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; - $this->file_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; - $this->starts = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; - $this->ends = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; - $this->instance_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null; - $this->resetModified(); - - $this->setNew(false); - - if ($rehydrate) { - $this->ensureConsistency(); - } - - return $startcol + 5; // 5 = CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating CcPlayoutHistory object", $e); - } - } - - /** - * Checks and repairs the internal consistency of the object. - * - * This method is executed after an already-instantiated object is re-hydrated - * from the database. It exists to check any foreign keys to make sure that - * the objects related to the current object are correct based on foreign key. - * - * You can override this method in the stub class, but you should always invoke - * the base method from the overridden method (i.e. parent::ensureConsistency()), - * in case your model changes. - * - * @throws PropelException - */ - public function ensureConsistency() - { - - if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) { - $this->aCcFiles = null; - } - if ($this->aCcShowInstances !== null && $this->instance_id !== $this->aCcShowInstances->getDbId()) { - $this->aCcShowInstances = null; - } - } // ensureConsistency - - /** - * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. - * - * This will only work if the object has been saved and has a valid primary key set. - * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param PropelPDO $con (optional) The PropelPDO connection to use. - * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db - */ - public function reload($deep = false, PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("Cannot reload a deleted object."); - } - - if ($this->isNew()) { - throw new PropelException("Cannot reload an unsaved object."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - // We don't need to alter the object instance pool; we're just modifying this instance - // already in the pool. - - $stmt = CcPlayoutHistoryPeer::doSelectStmt($this->buildPkeyCriteria(), $con); - $row = $stmt->fetch(PDO::FETCH_NUM); - $stmt->closeCursor(); - if (!$row) { - throw new PropelException('Cannot find matching row in the database to reload object values.'); - } - $this->hydrate($row, 0, true); // rehydrate - - if ($deep) { // also de-associate any related objects? - - $this->aCcFiles = null; - $this->aCcShowInstances = null; - $this->collCcPlayoutHistoryMetaDatas = null; - - } // if (deep) - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param PropelPDO $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - try { - $ret = $this->preDelete($con); - if ($ret) { - CcPlayoutHistoryQuery::create() - ->filterByPrimaryKey($this->getPrimaryKey()) - ->delete($con); - $this->postDelete($con); - $con->commit(); - $this->setDeleted(true); - } else { - $con->commit(); - } - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Persists this object to the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All modified related objects will also be persisted in the doSave() - * method. This method wraps all precipitate database operations in a - * single transaction. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see doSave() - */ - public function save(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - $isInsert = $this->isNew(); - try { - $ret = $this->preSave($con); - if ($isInsert) { - $ret = $ret && $this->preInsert($con); - } else { - $ret = $ret && $this->preUpdate($con); - } - if ($ret) { - $affectedRows = $this->doSave($con); - if ($isInsert) { - $this->postInsert($con); - } else { - $this->postUpdate($con); - } - $this->postSave($con); - CcPlayoutHistoryPeer::addInstanceToPool($this); - } else { - $affectedRows = 0; - } - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Performs the work of inserting or updating the row in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see save() - */ - protected function doSave(PropelPDO $con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - // We call the save method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcFiles !== null) { - if ($this->aCcFiles->isModified() || $this->aCcFiles->isNew()) { - $affectedRows += $this->aCcFiles->save($con); - } - $this->setCcFiles($this->aCcFiles); - } - - if ($this->aCcShowInstances !== null) { - if ($this->aCcShowInstances->isModified() || $this->aCcShowInstances->isNew()) { - $affectedRows += $this->aCcShowInstances->save($con); - } - $this->setCcShowInstances($this->aCcShowInstances); - } - - if ($this->isNew() ) { - $this->modifiedColumns[] = CcPlayoutHistoryPeer::ID; - } - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $criteria = $this->buildCriteria(); - if ($criteria->keyContainsValue(CcPlayoutHistoryPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryPeer::ID.')'); - } - - $pk = BasePeer::doInsert($criteria, $con); - $affectedRows += 1; - $this->setDbId($pk); //[IMV] update autoincrement primary key - $this->setNew(false); - } else { - $affectedRows += CcPlayoutHistoryPeer::doUpdate($this, $con); - } - - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - if ($this->collCcPlayoutHistoryMetaDatas !== null) { - foreach ($this->collCcPlayoutHistoryMetaDatas as $referrerFK) { - if (!$referrerFK->isDeleted()) { - $affectedRows += $referrerFK->save($con); - } - } - } - - $this->alreadyInSave = false; - - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - // We call the validate method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcFiles !== null) { - if (!$this->aCcFiles->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcFiles->getValidationFailures()); - } - } - - if ($this->aCcShowInstances !== null) { - if (!$this->aCcShowInstances->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcShowInstances->getValidationFailures()); - } - } - - - if (($retval = CcPlayoutHistoryPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - if ($this->collCcPlayoutHistoryMetaDatas !== null) { - foreach ($this->collCcPlayoutHistoryMetaDatas as $referrerFK) { - if (!$referrerFK->validate($columns)) { - $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); - } - } - } - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - $field = $this->getByPosition($pos); - return $field; - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getDbId(); - break; - case 1: - return $this->getDbFileId(); - break; - case 2: - return $this->getDbStarts(); - break; - case 3: - return $this->getDbEnds(); - break; - case 4: - return $this->getDbInstanceId(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * Defaults to BasePeer::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. - * - * @return array an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false) - { - $keys = CcPlayoutHistoryPeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getDbId(), - $keys[1] => $this->getDbFileId(), - $keys[2] => $this->getDbStarts(), - $keys[3] => $this->getDbEnds(), - $keys[4] => $this->getDbInstanceId(), - ); - if ($includeForeignObjects) { - if (null !== $this->aCcFiles) { - $result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true); - } - if (null !== $this->aCcShowInstances) { - $result['CcShowInstances'] = $this->aCcShowInstances->toArray($keyType, $includeLazyLoadColumns, true); - } - } - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setDbId($value); - break; - case 1: - $this->setDbFileId($value); - break; - case 2: - $this->setDbStarts($value); - break; - case 3: - $this->setDbEnds($value); - break; - case 4: - $this->setDbInstanceId($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * The default key type is the column's phpname (e.g. 'AuthorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = CcPlayoutHistoryPeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setDbFileId($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setDbStarts($arr[$keys[2]]); - if (array_key_exists($keys[3], $arr)) $this->setDbEnds($arr[$keys[3]]); - if (array_key_exists($keys[4], $arr)) $this->setDbInstanceId($arr[$keys[4]]); - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryPeer::DATABASE_NAME); - - if ($this->isColumnModified(CcPlayoutHistoryPeer::ID)) $criteria->add(CcPlayoutHistoryPeer::ID, $this->id); - if ($this->isColumnModified(CcPlayoutHistoryPeer::FILE_ID)) $criteria->add(CcPlayoutHistoryPeer::FILE_ID, $this->file_id); - if ($this->isColumnModified(CcPlayoutHistoryPeer::STARTS)) $criteria->add(CcPlayoutHistoryPeer::STARTS, $this->starts); - if ($this->isColumnModified(CcPlayoutHistoryPeer::ENDS)) $criteria->add(CcPlayoutHistoryPeer::ENDS, $this->ends); - if ($this->isColumnModified(CcPlayoutHistoryPeer::INSTANCE_ID)) $criteria->add(CcPlayoutHistoryPeer::INSTANCE_ID, $this->instance_id); - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryPeer::ID, $this->id); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return int - */ - public function getPrimaryKey() - { - return $this->getDbId(); - } - - /** - * Generic method to set the primary key (id column). - * - * @param int $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setDbId($key); - } - - /** - * Returns true if the primary key for this object is null. - * @return boolean - */ - public function isPrimaryKeyNull() - { - return null === $this->getDbId(); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of CcPlayoutHistory (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - $copyObj->setDbFileId($this->file_id); - $copyObj->setDbStarts($this->starts); - $copyObj->setDbEnds($this->ends); - $copyObj->setDbInstanceId($this->instance_id); - - if ($deepCopy) { - // important: temporarily setNew(false) because this affects the behavior of - // the getter/setter methods for fkey referrer objects. - $copyObj->setNew(false); - - foreach ($this->getCcPlayoutHistoryMetaDatas() as $relObj) { - if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addCcPlayoutHistoryMetaData($relObj->copy($deepCopy)); - } - } - - } // if ($deepCopy) - - - $copyObj->setNew(true); - $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return CcPlayoutHistory Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return CcPlayoutHistoryPeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new CcPlayoutHistoryPeer(); - } - return self::$peer; - } - - /** - * Declares an association between this object and a CcFiles object. - * - * @param CcFiles $v - * @return CcPlayoutHistory The current object (for fluent API support) - * @throws PropelException - */ - public function setCcFiles(CcFiles $v = null) - { - if ($v === null) { - $this->setDbFileId(NULL); - } else { - $this->setDbFileId($v->getDbId()); - } - - $this->aCcFiles = $v; - - // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcFiles object, it will not be re-added. - if ($v !== null) { - $v->addCcPlayoutHistory($this); - } - - return $this; - } - - - /** - * Get the associated CcFiles object - * - * @param PropelPDO Optional Connection object. - * @return CcFiles The associated CcFiles object. - * @throws PropelException - */ - public function getCcFiles(PropelPDO $con = null) - { - if ($this->aCcFiles === null && ($this->file_id !== null)) { - $this->aCcFiles = CcFilesQuery::create()->findPk($this->file_id, $con); - /* The following can be used additionally to - guarantee the related object contains a reference - to this object. This level of coupling may, however, be - undesirable since it could result in an only partially populated collection - in the referenced object. - $this->aCcFiles->addCcPlayoutHistorys($this); - */ - } - return $this->aCcFiles; - } - - /** - * Declares an association between this object and a CcShowInstances object. - * - * @param CcShowInstances $v - * @return CcPlayoutHistory The current object (for fluent API support) - * @throws PropelException - */ - public function setCcShowInstances(CcShowInstances $v = null) - { - if ($v === null) { - $this->setDbInstanceId(NULL); - } else { - $this->setDbInstanceId($v->getDbId()); - } - - $this->aCcShowInstances = $v; - - // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcShowInstances object, it will not be re-added. - if ($v !== null) { - $v->addCcPlayoutHistory($this); - } - - return $this; - } - - - /** - * Get the associated CcShowInstances object - * - * @param PropelPDO Optional Connection object. - * @return CcShowInstances The associated CcShowInstances object. - * @throws PropelException - */ - public function getCcShowInstances(PropelPDO $con = null) - { - if ($this->aCcShowInstances === null && ($this->instance_id !== null)) { - $this->aCcShowInstances = CcShowInstancesQuery::create()->findPk($this->instance_id, $con); - /* The following can be used additionally to - guarantee the related object contains a reference - to this object. This level of coupling may, however, be - undesirable since it could result in an only partially populated collection - in the referenced object. - $this->aCcShowInstances->addCcPlayoutHistorys($this); - */ - } - return $this->aCcShowInstances; - } - - /** - * Clears out the collCcPlayoutHistoryMetaDatas collection - * - * This does not modify the database; however, it will remove any associated objects, causing - * them to be refetched by subsequent calls to accessor method. - * - * @return void - * @see addCcPlayoutHistoryMetaDatas() - */ - public function clearCcPlayoutHistoryMetaDatas() - { - $this->collCcPlayoutHistoryMetaDatas = null; // important to set this to NULL since that means it is uninitialized - } - - /** - * Initializes the collCcPlayoutHistoryMetaDatas collection. - * - * By default this just sets the collCcPlayoutHistoryMetaDatas collection to an empty array (like clearcollCcPlayoutHistoryMetaDatas()); - * however, you may wish to override this method in your stub class to provide setting appropriate - * to your application -- for example, setting the initial array to the values stored in database. - * - * @return void - */ - public function initCcPlayoutHistoryMetaDatas() - { - $this->collCcPlayoutHistoryMetaDatas = new PropelObjectCollection(); - $this->collCcPlayoutHistoryMetaDatas->setModel('CcPlayoutHistoryMetaData'); - } - - /** - * Gets an array of CcPlayoutHistoryMetaData objects which contain a foreign key that references this object. - * - * If the $criteria is not null, it is used to always fetch the results from the database. - * Otherwise the results are fetched from the database the first time, then cached. - * Next time the same method is called without $criteria, the cached collection is returned. - * If this CcPlayoutHistory is new, it will return - * an empty collection or the current collection; the criteria is ignored on a new object. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @return PropelCollection|array CcPlayoutHistoryMetaData[] List of CcPlayoutHistoryMetaData objects - * @throws PropelException - */ - public function getCcPlayoutHistoryMetaDatas($criteria = null, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistoryMetaDatas || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistoryMetaDatas) { - // return empty collection - $this->initCcPlayoutHistoryMetaDatas(); - } else { - $collCcPlayoutHistoryMetaDatas = CcPlayoutHistoryMetaDataQuery::create(null, $criteria) - ->filterByCcPlayoutHistory($this) - ->find($con); - if (null !== $criteria) { - return $collCcPlayoutHistoryMetaDatas; - } - $this->collCcPlayoutHistoryMetaDatas = $collCcPlayoutHistoryMetaDatas; - } - } - return $this->collCcPlayoutHistoryMetaDatas; - } - - /** - * Returns the number of related CcPlayoutHistoryMetaData objects. - * - * @param Criteria $criteria - * @param boolean $distinct - * @param PropelPDO $con - * @return int Count of related CcPlayoutHistoryMetaData objects. - * @throws PropelException - */ - public function countCcPlayoutHistoryMetaDatas(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistoryMetaDatas || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistoryMetaDatas) { - return 0; - } else { - $query = CcPlayoutHistoryMetaDataQuery::create(null, $criteria); - if($distinct) { - $query->distinct(); - } - return $query - ->filterByCcPlayoutHistory($this) - ->count($con); - } - } else { - return count($this->collCcPlayoutHistoryMetaDatas); - } - } - - /** - * Method called to associate a CcPlayoutHistoryMetaData object to this object - * through the CcPlayoutHistoryMetaData foreign key attribute. - * - * @param CcPlayoutHistoryMetaData $l CcPlayoutHistoryMetaData - * @return void - * @throws PropelException - */ - public function addCcPlayoutHistoryMetaData(CcPlayoutHistoryMetaData $l) - { - if ($this->collCcPlayoutHistoryMetaDatas === null) { - $this->initCcPlayoutHistoryMetaDatas(); - } - if (!$this->collCcPlayoutHistoryMetaDatas->contains($l)) { // only add it if the **same** object is not already associated - $this->collCcPlayoutHistoryMetaDatas[]= $l; - $l->setCcPlayoutHistory($this); - } - } - - /** - * Clears the current object and sets all attributes to their default values - */ - public function clear() - { - $this->id = null; - $this->file_id = null; - $this->starts = null; - $this->ends = null; - $this->instance_id = null; - $this->alreadyInSave = false; - $this->alreadyInValidation = false; - $this->clearAllReferences(); - $this->resetModified(); - $this->setNew(true); - $this->setDeleted(false); - } - - /** - * Resets all collections of referencing foreign keys. - * - * This method is a user-space workaround for PHP's inability to garbage collect objects - * with circular references. This is currently necessary when using Propel in certain - * daemon or large-volumne/high-memory operations. - * - * @param boolean $deep Whether to also clear the references on all associated objects. - */ - public function clearAllReferences($deep = false) - { - if ($deep) { - if ($this->collCcPlayoutHistoryMetaDatas) { - foreach ((array) $this->collCcPlayoutHistoryMetaDatas as $o) { - $o->clearAllReferences($deep); - } - } - } // if ($deep) - - $this->collCcPlayoutHistoryMetaDatas = null; - $this->aCcFiles = null; - $this->aCcShowInstances = null; - } - - /** - * Catches calls to virtual methods - */ - public function __call($name, $params) - { - if (preg_match('/get(\w+)/', $name, $matches)) { - $virtualColumn = $matches[1]; - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - // no lcfirst in php<5.3... - $virtualColumn[0] = strtolower($virtualColumn[0]); - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - } - throw new PropelException('Call to undefined method: ' . $name); - } - -} // BaseCcPlayoutHistory diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php deleted file mode 100644 index a0cbb9539..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaData.php +++ /dev/null @@ -1,905 +0,0 @@ -id; - } - - /** - * Get the [history_id] column value. - * - * @return int - */ - public function getDbHistoryId() - { - return $this->history_id; - } - - /** - * Get the [key] column value. - * - * @return string - */ - public function getDbKey() - { - return $this->key; - } - - /** - * Get the [value] column value. - * - * @return string - */ - public function getDbValue() - { - return $this->value; - } - - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return CcPlayoutHistoryMetaData The current object (for fluent API support) - */ - public function setDbId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::ID; - } - - return $this; - } // setDbId() - - /** - * Set the value of [history_id] column. - * - * @param int $v new value - * @return CcPlayoutHistoryMetaData The current object (for fluent API support) - */ - public function setDbHistoryId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->history_id !== $v) { - $this->history_id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::HISTORY_ID; - } - - if ($this->aCcPlayoutHistory !== null && $this->aCcPlayoutHistory->getDbId() !== $v) { - $this->aCcPlayoutHistory = null; - } - - return $this; - } // setDbHistoryId() - - /** - * Set the value of [key] column. - * - * @param string $v new value - * @return CcPlayoutHistoryMetaData The current object (for fluent API support) - */ - public function setDbKey($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->key !== $v) { - $this->key = $v; - $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::KEY; - } - - return $this; - } // setDbKey() - - /** - * Set the value of [value] column. - * - * @param string $v new value - * @return CcPlayoutHistoryMetaData The current object (for fluent API support) - */ - public function setDbValue($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->value !== $v) { - $this->value = $v; - $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::VALUE; - } - - return $this; - } // setDbValue() - - /** - * Indicates whether the columns in this object are only set to default values. - * - * This method can be used in conjunction with isModified() to indicate whether an object is both - * modified _and_ has some values set which are non-default. - * - * @return boolean Whether the columns in this object are only been set with default values. - */ - public function hasOnlyDefaultValues() - { - // otherwise, everything was equal, so return TRUE - return true; - } // hasOnlyDefaultValues() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (0-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) - * @param int $startcol 0-based offset column which indicates which restultset column to start with. - * @param boolean $rehydrate Whether this object is being re-hydrated from the database. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate($row, $startcol = 0, $rehydrate = false) - { - try { - - $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; - $this->history_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; - $this->key = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; - $this->value = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; - $this->resetModified(); - - $this->setNew(false); - - if ($rehydrate) { - $this->ensureConsistency(); - } - - return $startcol + 4; // 4 = CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating CcPlayoutHistoryMetaData object", $e); - } - } - - /** - * Checks and repairs the internal consistency of the object. - * - * This method is executed after an already-instantiated object is re-hydrated - * from the database. It exists to check any foreign keys to make sure that - * the objects related to the current object are correct based on foreign key. - * - * You can override this method in the stub class, but you should always invoke - * the base method from the overridden method (i.e. parent::ensureConsistency()), - * in case your model changes. - * - * @throws PropelException - */ - public function ensureConsistency() - { - - if ($this->aCcPlayoutHistory !== null && $this->history_id !== $this->aCcPlayoutHistory->getDbId()) { - $this->aCcPlayoutHistory = null; - } - } // ensureConsistency - - /** - * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. - * - * This will only work if the object has been saved and has a valid primary key set. - * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param PropelPDO $con (optional) The PropelPDO connection to use. - * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db - */ - public function reload($deep = false, PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("Cannot reload a deleted object."); - } - - if ($this->isNew()) { - throw new PropelException("Cannot reload an unsaved object."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - // We don't need to alter the object instance pool; we're just modifying this instance - // already in the pool. - - $stmt = CcPlayoutHistoryMetaDataPeer::doSelectStmt($this->buildPkeyCriteria(), $con); - $row = $stmt->fetch(PDO::FETCH_NUM); - $stmt->closeCursor(); - if (!$row) { - throw new PropelException('Cannot find matching row in the database to reload object values.'); - } - $this->hydrate($row, 0, true); // rehydrate - - if ($deep) { // also de-associate any related objects? - - $this->aCcPlayoutHistory = null; - } // if (deep) - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param PropelPDO $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - try { - $ret = $this->preDelete($con); - if ($ret) { - CcPlayoutHistoryMetaDataQuery::create() - ->filterByPrimaryKey($this->getPrimaryKey()) - ->delete($con); - $this->postDelete($con); - $con->commit(); - $this->setDeleted(true); - } else { - $con->commit(); - } - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Persists this object to the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All modified related objects will also be persisted in the doSave() - * method. This method wraps all precipitate database operations in a - * single transaction. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see doSave() - */ - public function save(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - $isInsert = $this->isNew(); - try { - $ret = $this->preSave($con); - if ($isInsert) { - $ret = $ret && $this->preInsert($con); - } else { - $ret = $ret && $this->preUpdate($con); - } - if ($ret) { - $affectedRows = $this->doSave($con); - if ($isInsert) { - $this->postInsert($con); - } else { - $this->postUpdate($con); - } - $this->postSave($con); - CcPlayoutHistoryMetaDataPeer::addInstanceToPool($this); - } else { - $affectedRows = 0; - } - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Performs the work of inserting or updating the row in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see save() - */ - protected function doSave(PropelPDO $con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - // We call the save method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcPlayoutHistory !== null) { - if ($this->aCcPlayoutHistory->isModified() || $this->aCcPlayoutHistory->isNew()) { - $affectedRows += $this->aCcPlayoutHistory->save($con); - } - $this->setCcPlayoutHistory($this->aCcPlayoutHistory); - } - - if ($this->isNew() ) { - $this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::ID; - } - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $criteria = $this->buildCriteria(); - if ($criteria->keyContainsValue(CcPlayoutHistoryMetaDataPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryMetaDataPeer::ID.')'); - } - - $pk = BasePeer::doInsert($criteria, $con); - $affectedRows += 1; - $this->setDbId($pk); //[IMV] update autoincrement primary key - $this->setNew(false); - } else { - $affectedRows += CcPlayoutHistoryMetaDataPeer::doUpdate($this, $con); - } - - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - $this->alreadyInSave = false; - - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - // We call the validate method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcPlayoutHistory !== null) { - if (!$this->aCcPlayoutHistory->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcPlayoutHistory->getValidationFailures()); - } - } - - - if (($retval = CcPlayoutHistoryMetaDataPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryMetaDataPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - $field = $this->getByPosition($pos); - return $field; - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getDbId(); - break; - case 1: - return $this->getDbHistoryId(); - break; - case 2: - return $this->getDbKey(); - break; - case 3: - return $this->getDbValue(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * Defaults to BasePeer::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. - * - * @return array an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false) - { - $keys = CcPlayoutHistoryMetaDataPeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getDbId(), - $keys[1] => $this->getDbHistoryId(), - $keys[2] => $this->getDbKey(), - $keys[3] => $this->getDbValue(), - ); - if ($includeForeignObjects) { - if (null !== $this->aCcPlayoutHistory) { - $result['CcPlayoutHistory'] = $this->aCcPlayoutHistory->toArray($keyType, $includeLazyLoadColumns, true); - } - } - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryMetaDataPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setDbId($value); - break; - case 1: - $this->setDbHistoryId($value); - break; - case 2: - $this->setDbKey($value); - break; - case 3: - $this->setDbValue($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * The default key type is the column's phpname (e.g. 'AuthorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = CcPlayoutHistoryMetaDataPeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setDbHistoryId($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setDbKey($arr[$keys[2]]); - if (array_key_exists($keys[3], $arr)) $this->setDbValue($arr[$keys[3]]); - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); - - if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $this->id); - if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::HISTORY_ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $this->history_id); - if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::KEY)) $criteria->add(CcPlayoutHistoryMetaDataPeer::KEY, $this->key); - if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::VALUE)) $criteria->add(CcPlayoutHistoryMetaDataPeer::VALUE, $this->value); - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $this->id); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return int - */ - public function getPrimaryKey() - { - return $this->getDbId(); - } - - /** - * Generic method to set the primary key (id column). - * - * @param int $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setDbId($key); - } - - /** - * Returns true if the primary key for this object is null. - * @return boolean - */ - public function isPrimaryKeyNull() - { - return null === $this->getDbId(); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of CcPlayoutHistoryMetaData (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - $copyObj->setDbHistoryId($this->history_id); - $copyObj->setDbKey($this->key); - $copyObj->setDbValue($this->value); - - $copyObj->setNew(true); - $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return CcPlayoutHistoryMetaData Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return CcPlayoutHistoryMetaDataPeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new CcPlayoutHistoryMetaDataPeer(); - } - return self::$peer; - } - - /** - * Declares an association between this object and a CcPlayoutHistory object. - * - * @param CcPlayoutHistory $v - * @return CcPlayoutHistoryMetaData The current object (for fluent API support) - * @throws PropelException - */ - public function setCcPlayoutHistory(CcPlayoutHistory $v = null) - { - if ($v === null) { - $this->setDbHistoryId(NULL); - } else { - $this->setDbHistoryId($v->getDbId()); - } - - $this->aCcPlayoutHistory = $v; - - // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcPlayoutHistory object, it will not be re-added. - if ($v !== null) { - $v->addCcPlayoutHistoryMetaData($this); - } - - return $this; - } - - - /** - * Get the associated CcPlayoutHistory object - * - * @param PropelPDO Optional Connection object. - * @return CcPlayoutHistory The associated CcPlayoutHistory object. - * @throws PropelException - */ - public function getCcPlayoutHistory(PropelPDO $con = null) - { - if ($this->aCcPlayoutHistory === null && ($this->history_id !== null)) { - $this->aCcPlayoutHistory = CcPlayoutHistoryQuery::create()->findPk($this->history_id, $con); - /* The following can be used additionally to - guarantee the related object contains a reference - to this object. This level of coupling may, however, be - undesirable since it could result in an only partially populated collection - in the referenced object. - $this->aCcPlayoutHistory->addCcPlayoutHistoryMetaDatas($this); - */ - } - return $this->aCcPlayoutHistory; - } - - /** - * Clears the current object and sets all attributes to their default values - */ - public function clear() - { - $this->id = null; - $this->history_id = null; - $this->key = null; - $this->value = null; - $this->alreadyInSave = false; - $this->alreadyInValidation = false; - $this->clearAllReferences(); - $this->resetModified(); - $this->setNew(true); - $this->setDeleted(false); - } - - /** - * Resets all collections of referencing foreign keys. - * - * This method is a user-space workaround for PHP's inability to garbage collect objects - * with circular references. This is currently necessary when using Propel in certain - * daemon or large-volumne/high-memory operations. - * - * @param boolean $deep Whether to also clear the references on all associated objects. - */ - public function clearAllReferences($deep = false) - { - if ($deep) { - } // if ($deep) - - $this->aCcPlayoutHistory = null; - } - - /** - * Catches calls to virtual methods - */ - public function __call($name, $params) - { - if (preg_match('/get(\w+)/', $name, $matches)) { - $virtualColumn = $matches[1]; - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - // no lcfirst in php<5.3... - $virtualColumn[0] = strtolower($virtualColumn[0]); - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - } - throw new PropelException('Call to undefined method: ' . $name); - } - -} // BaseCcPlayoutHistoryMetaData diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php deleted file mode 100644 index 0b980ec4e..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php +++ /dev/null @@ -1,983 +0,0 @@ - array ('DbId', 'DbHistoryId', 'DbKey', 'DbValue', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbHistoryId', 'dbKey', 'dbValue', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::HISTORY_ID, self::KEY, self::VALUE, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'HISTORY_ID', 'KEY', 'VALUE', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'history_id', 'key', 'value', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbHistoryId' => 1, 'DbKey' => 2, 'DbValue' => 3, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbHistoryId' => 1, 'dbKey' => 2, 'dbValue' => 3, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::HISTORY_ID => 1, self::KEY => 2, self::VALUE => 3, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'HISTORY_ID' => 1, 'KEY' => 2, 'VALUE' => 3, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'history_id' => 1, 'key' => 2, 'value' => 3, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) - ); - - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - * @throws PropelException - if the specified name could not be found in the fieldname mappings. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. CcPlayoutHistoryMetaDataPeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(CcPlayoutHistoryMetaDataPeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria, $alias = null) - { - if (null === $alias) { - $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::ID); - $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::HISTORY_ID); - $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::KEY); - $criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::VALUE); - } else { - $criteria->addSelectColumn($alias . '.ID'); - $criteria->addSelectColumn($alias . '.HISTORY_ID'); - $criteria->addSelectColumn($alias . '.KEY'); - $criteria->addSelectColumn($alias . '.VALUE'); - } - } - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) - { - // we may modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - // BasePeer returns a PDOStatement - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param PropelPDO $con - * @return CcPlayoutHistoryMetaData - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = CcPlayoutHistoryMetaDataPeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, PropelPDO $con = null) - { - return CcPlayoutHistoryMetaDataPeer::populateObjects(CcPlayoutHistoryMetaDataPeer::doSelectStmt($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. - * - * Use this method directly if you want to work with an executed statement durirectly (for example - * to perform your own object hydration). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con The connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return PDOStatement The executed PDOStatement object. - * @see BasePeer::doSelect() - */ - public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - if (!$criteria->hasSelectClause()) { - $criteria = clone $criteria; - CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a PDOStatement - return BasePeer::doSelect($criteria, $con); - } - /** - * Adds an object to the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doSelect*() - * methods in your stub classes -- you may need to explicitly add objects - * to the cache in order to ensure that the same objects are always returned by doSelect*() - * and retrieveByPK*() calls. - * - * @param CcPlayoutHistoryMetaData $value A CcPlayoutHistoryMetaData object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). - */ - public static function addInstanceToPool(CcPlayoutHistoryMetaData $obj, $key = null) - { - if (Propel::isInstancePoolingEnabled()) { - if ($key === null) { - $key = (string) $obj->getDbId(); - } // if key === null - self::$instances[$key] = $obj; - } - } - - /** - * Removes an object from the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doDelete - * methods in your stub classes -- you may need to explicitly remove objects - * from the cache in order to prevent returning objects that no longer exist. - * - * @param mixed $value A CcPlayoutHistoryMetaData object or a primary key value. - */ - public static function removeInstanceFromPool($value) - { - if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof CcPlayoutHistoryMetaData) { - $key = (string) $value->getDbId(); - } elseif (is_scalar($value)) { - // assume we've been passed a primary key - $key = (string) $value; - } else { - $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlayoutHistoryMetaData object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); - throw $e; - } - - unset(self::$instances[$key]); - } - } // removeInstanceFromPool() - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param string $key The key (@see getPrimaryKeyHash()) for this instance. - * @return CcPlayoutHistoryMetaData Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. - * @see getPrimaryKeyHash() - */ - public static function getInstanceFromPool($key) - { - if (Propel::isInstancePoolingEnabled()) { - if (isset(self::$instances[$key])) { - return self::$instances[$key]; - } - } - return null; // just to be explicit - } - - /** - * Clear the instance pool. - * - * @return void - */ - public static function clearInstancePool() - { - self::$instances = array(); - } - - /** - * Method to invalidate the instance pool of all tables related to cc_playout_history_metadata - * by a foreign key with ON DELETE CASCADE - */ - public static function clearRelatedInstancePool() - { - } - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return string A string version of PK or NULL if the components of primary key in result array are all null. - */ - public static function getPrimaryKeyHashFromRow($row, $startcol = 0) - { - // If the PK cannot be derived from the row, return NULL. - if ($row[$startcol] === null) { - return null; - } - return (string) $row[$startcol]; - } - - /** - * Retrieves the primary key from the DB resultset row - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, an array of the primary key columns will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return mixed The primary key of the row - */ - public static function getPrimaryKeyFromRow($row, $startcol = 0) - { - return (int) $row[$startcol]; - } - - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(PDOStatement $stmt) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false); - // populate the object(s) - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, 0, true); // rehydrate - $results[] = $obj; - } else { - $obj = new $cls(); - $obj->hydrate($row); - $results[] = $obj; - CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj, $key); - } // if key exists - } - $stmt->closeCursor(); - return $results; - } - /** - * Populates an object of the default type or an object that inherit from the default. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CcPlayoutHistoryMetaData object, last column rank) - */ - public static function populateObject($row, $startcol = 0) - { - $key = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, $startcol, true); // rehydrate - $col = $startcol + CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS; - } else { - $cls = CcPlayoutHistoryMetaDataPeer::OM_CLASS; - $obj = new $cls(); - $col = $obj->hydrate($row, $startcol); - CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj, $key); - } - return array($obj, $col); - } - - /** - * Returns the number of rows matching criteria, joining the related CcPlayoutHistory table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinCcPlayoutHistory(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with their CcPlayoutHistory objects. - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistoryMetaData objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinCcPlayoutHistory(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); - $startcol = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS); - CcPlayoutHistoryPeer::addSelectColumns($criteria); - - $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - - $cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1); - } // if $obj1 already loaded - - $key2 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, $startcol); - if ($key2 !== null) { - $obj2 = CcPlayoutHistoryPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcPlayoutHistoryPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol); - CcPlayoutHistoryPeer::addInstanceToPool($obj2, $key2); - } // if obj2 already loaded - - // Add the $obj1 (CcPlayoutHistoryMetaData) to $obj2 (CcPlayoutHistory) - $obj2->addCcPlayoutHistoryMetaData($obj1); - - } // if joined row was not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Returns the number of rows matching criteria, joining all related tables - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - /** - * Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with all related objects. - * - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistoryMetaData objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria); - $startcol2 = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS); - - CcPlayoutHistoryPeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - $cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1); - } // if obj1 already loaded - - // Add objects for joined CcPlayoutHistory rows - - $key2 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcPlayoutHistoryPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcPlayoutHistoryPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcPlayoutHistoryPeer::addInstanceToPool($obj2, $key2); - } // if obj2 loaded - - // Add the $obj1 (CcPlayoutHistoryMetaData) to the collection in $obj2 (CcPlayoutHistory) - $obj2->addCcPlayoutHistoryMetaData($obj1); - } // if joined row not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * Add a TableMap instance to the database for this peer class. - */ - public static function buildTableMap() - { - $dbMap = Propel::getDatabaseMap(BaseCcPlayoutHistoryMetaDataPeer::DATABASE_NAME); - if (!$dbMap->hasTable(BaseCcPlayoutHistoryMetaDataPeer::TABLE_NAME)) - { - $dbMap->addTableObject(new CcPlayoutHistoryMetaDataTableMap()); - } - } - - /** - * The class that the Peer will make instances of. - * - * If $withPrefix is true, the returned path - * uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName - */ - public static function getOMClass($withPrefix = true) - { - return $withPrefix ? CcPlayoutHistoryMetaDataPeer::CLASS_DEFAULT : CcPlayoutHistoryMetaDataPeer::OM_CLASS; - } - - /** - * Method perform an INSERT on the database, given a CcPlayoutHistoryMetaData or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistoryMetaData object containing data that is used to create the INSERT statement. - * @param PropelPDO $con the PropelPDO connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from CcPlayoutHistoryMetaData object - } - - if ($criteria->containsKey(CcPlayoutHistoryMetaDataPeer::ID) && $criteria->keyContainsValue(CcPlayoutHistoryMetaDataPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryMetaDataPeer::ID.')'); - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->beginTransaction(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch(PropelException $e) { - $con->rollBack(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a CcPlayoutHistoryMetaData or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistoryMetaData object containing data that is used to create the UPDATE statement. - * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(CcPlayoutHistoryMetaDataPeer::ID); - $value = $criteria->remove(CcPlayoutHistoryMetaDataPeer::ID); - if ($value) { - $selectCriteria->add(CcPlayoutHistoryMetaDataPeer::ID, $value, $comparison); - } else { - $selectCriteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); - } - - } else { // $values is CcPlayoutHistoryMetaData object - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the cc_playout_history_metadata table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - $affectedRows += BasePeer::doDeleteAll(CcPlayoutHistoryMetaDataPeer::TABLE_NAME, $con, CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); - // Because this db requires some delete cascade/set null emulation, we have to - // clear the cached instance *after* the emulation has happened (since - // instances get re-added by the select statement contained therein). - CcPlayoutHistoryMetaDataPeer::clearInstancePool(); - CcPlayoutHistoryMetaDataPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a CcPlayoutHistoryMetaData or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or CcPlayoutHistoryMetaData object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param PropelPDO $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - // invalidate the cache for all objects of this type, since we have no - // way of knowing (without running a query) what objects should be invalidated - // from the cache based on this Criteria. - CcPlayoutHistoryMetaDataPeer::clearInstancePool(); - // rename for clarity - $criteria = clone $values; - } elseif ($values instanceof CcPlayoutHistoryMetaData) { // it's a model object - // invalidate the cache for this single object - CcPlayoutHistoryMetaDataPeer::removeInstanceFromPool($values); - // create criteria based on pk values - $criteria = $values->buildPkeyCriteria(); - } else { // it's a primary key, or an array of pks - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, (array) $values, Criteria::IN); - // invalidate the cache for this object(s) - foreach ((array) $values as $singleval) { - CcPlayoutHistoryMetaDataPeer::removeInstanceFromPool($singleval); - } - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - CcPlayoutHistoryMetaDataPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Validates all modified columns of given CcPlayoutHistoryMetaData object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param CcPlayoutHistoryMetaData $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(CcPlayoutHistoryMetaData $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(CcPlayoutHistoryMetaDataPeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, CcPlayoutHistoryMetaDataPeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param int $pk the primary key. - * @param PropelPDO $con the connection to use - * @return CcPlayoutHistoryMetaData - */ - public static function retrieveByPK($pk, PropelPDO $con = null) - { - - if (null !== ($obj = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool((string) $pk))) { - return $obj; - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria = new Criteria(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $pk); - - $v = CcPlayoutHistoryMetaDataPeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param PropelPDO $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $pks, Criteria::IN); - $objs = CcPlayoutHistoryMetaDataPeer::doSelect($criteria, $con); - } - return $objs; - } - -} // BaseCcPlayoutHistoryMetaDataPeer - -// This is the static code needed to register the TableMap for this table with the main Propel class. -// -BaseCcPlayoutHistoryMetaDataPeer::buildTableMap(); - diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php deleted file mode 100644 index 7a27c61af..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php +++ /dev/null @@ -1,320 +0,0 @@ -setModelAlias($modelAlias); - } - if ($criteria instanceof Criteria) { - $query->mergeWith($criteria); - } - return $query; - } - - /** - * Find object by primary key - * Use instance pooling to avoid a database query if the object exists - * - * $obj = $c->findPk(12, $con); - * - * @param mixed $key Primary key to use for the query - * @param PropelPDO $con an optional connection object - * - * @return CcPlayoutHistoryMetaData|array|mixed the result, formatted by the current formatter - */ - public function findPk($key, $con = null) - { - if ((null !== ($obj = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { - // the object is alredy in the instance pool - return $obj; - } else { - // the object has not been requested yet, or the formatter is not an object formatter - $criteria = $this->isKeepQuery() ? clone $this : $this; - $stmt = $criteria - ->filterByPrimaryKey($key) - ->getSelectStatement($con); - return $criteria->getFormatter()->init($criteria)->formatOne($stmt); - } - } - - /** - * Find objects by primary key - * - * $objs = $c->findPks(array(12, 56, 832), $con); - * - * @param array $keys Primary keys to use for the query - * @param PropelPDO $con an optional connection object - * - * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter - */ - public function findPks($keys, $con = null) - { - $criteria = $this->isKeepQuery() ? clone $this : $this; - return $this - ->filterByPrimaryKeys($keys) - ->find($con); - } - - /** - * Filter the query by primary key - * - * @param mixed $key Primary key to use for the query - * - * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface - */ - public function filterByPrimaryKey($key) - { - return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $key, Criteria::EQUAL); - } - - /** - * Filter the query by a list of primary keys - * - * @param array $keys The list of primary key to use for the query - * - * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface - */ - public function filterByPrimaryKeys($keys) - { - return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $keys, Criteria::IN); - } - - /** - * Filter the query on the id column - * - * @param int|array $dbId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface - */ - public function filterByDbId($dbId = null, $comparison = null) - { - if (is_array($dbId) && null === $comparison) { - $comparison = Criteria::IN; - } - return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $dbId, $comparison); - } - - /** - * Filter the query on the history_id column - * - * @param int|array $dbHistoryId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface - */ - public function filterByDbHistoryId($dbHistoryId = null, $comparison = null) - { - if (is_array($dbHistoryId)) { - $useMinMax = false; - if (isset($dbHistoryId['min'])) { - $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbHistoryId['max'])) { - $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId, $comparison); - } - - /** - * Filter the query on the key column - * - * @param string $dbKey The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface - */ - public function filterByDbKey($dbKey = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbKey)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbKey)) { - $dbKey = str_replace('*', '%', $dbKey); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::KEY, $dbKey, $comparison); - } - - /** - * Filter the query on the value column - * - * @param string $dbValue The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface - */ - public function filterByDbValue($dbValue = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbValue)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbValue)) { - $dbValue = str_replace('*', '%', $dbValue); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::VALUE, $dbValue, $comparison); - } - - /** - * Filter the query by a related CcPlayoutHistory object - * - * @param CcPlayoutHistory $ccPlayoutHistory the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface - */ - public function filterByCcPlayoutHistory($ccPlayoutHistory, $comparison = null) - { - return $this - ->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $ccPlayoutHistory->getDbId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcPlayoutHistory relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface - */ - public function joinCcPlayoutHistory($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcPlayoutHistory'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcPlayoutHistory'); - } - - return $this; - } - - /** - * Use the CcPlayoutHistory relation CcPlayoutHistory object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryQuery A secondary query class using the current class as primary query - */ - public function useCcPlayoutHistoryQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcPlayoutHistory($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery'); - } - - /** - * Exclude object from result - * - * @param CcPlayoutHistoryMetaData $ccPlayoutHistoryMetaData Object to remove from the list of results - * - * @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface - */ - public function prune($ccPlayoutHistoryMetaData = null) - { - if ($ccPlayoutHistoryMetaData) { - $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $ccPlayoutHistoryMetaData->getDbId(), Criteria::NOT_EQUAL); - } - - return $this; - } - -} // BaseCcPlayoutHistoryMetaDataQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php deleted file mode 100644 index 01b944a65..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php +++ /dev/null @@ -1,1378 +0,0 @@ - array ('DbId', 'DbFileId', 'DbStarts', 'DbEnds', 'DbInstanceId', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbStarts', 'dbEnds', 'dbInstanceId', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::FILE_ID, self::STARTS, self::ENDS, self::INSTANCE_ID, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'STARTS', 'ENDS', 'INSTANCE_ID', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'starts', 'ends', 'instance_id', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbStarts' => 2, 'DbEnds' => 3, 'DbInstanceId' => 4, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbStarts' => 2, 'dbEnds' => 3, 'dbInstanceId' => 4, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FILE_ID => 1, self::STARTS => 2, self::ENDS => 3, self::INSTANCE_ID => 4, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'STARTS' => 2, 'ENDS' => 3, 'INSTANCE_ID' => 4, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'starts' => 2, 'ends' => 3, 'instance_id' => 4, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) - ); - - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - * @throws PropelException - if the specified name could not be found in the fieldname mappings. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. CcPlayoutHistoryPeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(CcPlayoutHistoryPeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria, $alias = null) - { - if (null === $alias) { - $criteria->addSelectColumn(CcPlayoutHistoryPeer::ID); - $criteria->addSelectColumn(CcPlayoutHistoryPeer::FILE_ID); - $criteria->addSelectColumn(CcPlayoutHistoryPeer::STARTS); - $criteria->addSelectColumn(CcPlayoutHistoryPeer::ENDS); - $criteria->addSelectColumn(CcPlayoutHistoryPeer::INSTANCE_ID); - } else { - $criteria->addSelectColumn($alias . '.ID'); - $criteria->addSelectColumn($alias . '.FILE_ID'); - $criteria->addSelectColumn($alias . '.STARTS'); - $criteria->addSelectColumn($alias . '.ENDS'); - $criteria->addSelectColumn($alias . '.INSTANCE_ID'); - } - } - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) - { - // we may modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - // BasePeer returns a PDOStatement - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param PropelPDO $con - * @return CcPlayoutHistory - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = CcPlayoutHistoryPeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, PropelPDO $con = null) - { - return CcPlayoutHistoryPeer::populateObjects(CcPlayoutHistoryPeer::doSelectStmt($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. - * - * Use this method directly if you want to work with an executed statement durirectly (for example - * to perform your own object hydration). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con The connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return PDOStatement The executed PDOStatement object. - * @see BasePeer::doSelect() - */ - public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - if (!$criteria->hasSelectClause()) { - $criteria = clone $criteria; - CcPlayoutHistoryPeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a PDOStatement - return BasePeer::doSelect($criteria, $con); - } - /** - * Adds an object to the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doSelect*() - * methods in your stub classes -- you may need to explicitly add objects - * to the cache in order to ensure that the same objects are always returned by doSelect*() - * and retrieveByPK*() calls. - * - * @param CcPlayoutHistory $value A CcPlayoutHistory object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). - */ - public static function addInstanceToPool(CcPlayoutHistory $obj, $key = null) - { - if (Propel::isInstancePoolingEnabled()) { - if ($key === null) { - $key = (string) $obj->getDbId(); - } // if key === null - self::$instances[$key] = $obj; - } - } - - /** - * Removes an object from the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doDelete - * methods in your stub classes -- you may need to explicitly remove objects - * from the cache in order to prevent returning objects that no longer exist. - * - * @param mixed $value A CcPlayoutHistory object or a primary key value. - */ - public static function removeInstanceFromPool($value) - { - if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof CcPlayoutHistory) { - $key = (string) $value->getDbId(); - } elseif (is_scalar($value)) { - // assume we've been passed a primary key - $key = (string) $value; - } else { - $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlayoutHistory object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); - throw $e; - } - - unset(self::$instances[$key]); - } - } // removeInstanceFromPool() - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param string $key The key (@see getPrimaryKeyHash()) for this instance. - * @return CcPlayoutHistory Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. - * @see getPrimaryKeyHash() - */ - public static function getInstanceFromPool($key) - { - if (Propel::isInstancePoolingEnabled()) { - if (isset(self::$instances[$key])) { - return self::$instances[$key]; - } - } - return null; // just to be explicit - } - - /** - * Clear the instance pool. - * - * @return void - */ - public static function clearInstancePool() - { - self::$instances = array(); - } - - /** - * Method to invalidate the instance pool of all tables related to cc_playout_history - * by a foreign key with ON DELETE CASCADE - */ - public static function clearRelatedInstancePool() - { - // Invalidate objects in CcPlayoutHistoryMetaDataPeer instance pool, - // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - CcPlayoutHistoryMetaDataPeer::clearInstancePool(); - } - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return string A string version of PK or NULL if the components of primary key in result array are all null. - */ - public static function getPrimaryKeyHashFromRow($row, $startcol = 0) - { - // If the PK cannot be derived from the row, return NULL. - if ($row[$startcol] === null) { - return null; - } - return (string) $row[$startcol]; - } - - /** - * Retrieves the primary key from the DB resultset row - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, an array of the primary key columns will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return mixed The primary key of the row - */ - public static function getPrimaryKeyFromRow($row, $startcol = 0) - { - return (int) $row[$startcol]; - } - - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(PDOStatement $stmt) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = CcPlayoutHistoryPeer::getOMClass(false); - // populate the object(s) - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = CcPlayoutHistoryPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, 0, true); // rehydrate - $results[] = $obj; - } else { - $obj = new $cls(); - $obj->hydrate($row); - $results[] = $obj; - CcPlayoutHistoryPeer::addInstanceToPool($obj, $key); - } // if key exists - } - $stmt->closeCursor(); - return $results; - } - /** - * Populates an object of the default type or an object that inherit from the default. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CcPlayoutHistory object, last column rank) - */ - public static function populateObject($row, $startcol = 0) - { - $key = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = CcPlayoutHistoryPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, $startcol, true); // rehydrate - $col = $startcol + CcPlayoutHistoryPeer::NUM_COLUMNS; - } else { - $cls = CcPlayoutHistoryPeer::OM_CLASS; - $obj = new $cls(); - $col = $obj->hydrate($row, $startcol); - CcPlayoutHistoryPeer::addInstanceToPool($obj, $key); - } - return array($obj, $col); - } - - /** - * Returns the number of rows matching criteria, joining the related CcFiles table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Returns the number of rows matching criteria, joining the related CcShowInstances table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinCcShowInstances(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Selects a collection of CcPlayoutHistory objects pre-filled with their CcFiles objects. - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistory objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryPeer::addSelectColumns($criteria); - $startcol = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); - CcFilesPeer::addSelectColumns($criteria); - - $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - - $cls = CcPlayoutHistoryPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); - } // if $obj1 already loaded - - $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol); - if ($key2 !== null) { - $obj2 = CcFilesPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcFilesPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol); - CcFilesPeer::addInstanceToPool($obj2, $key2); - } // if obj2 already loaded - - // Add the $obj1 (CcPlayoutHistory) to $obj2 (CcFiles) - $obj2->addCcPlayoutHistory($obj1); - - } // if joined row was not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Selects a collection of CcPlayoutHistory objects pre-filled with their CcShowInstances objects. - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistory objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinCcShowInstances(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryPeer::addSelectColumns($criteria); - $startcol = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); - CcShowInstancesPeer::addSelectColumns($criteria); - - $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - - $cls = CcPlayoutHistoryPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); - } // if $obj1 already loaded - - $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol); - if ($key2 !== null) { - $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcShowInstancesPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol); - CcShowInstancesPeer::addInstanceToPool($obj2, $key2); - } // if obj2 already loaded - - // Add the $obj1 (CcPlayoutHistory) to $obj2 (CcShowInstances) - $obj2->addCcPlayoutHistory($obj1); - - } // if joined row was not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Returns the number of rows matching criteria, joining all related tables - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - /** - * Selects a collection of CcPlayoutHistory objects pre-filled with all related objects. - * - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistory objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryPeer::addSelectColumns($criteria); - $startcol2 = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); - - CcFilesPeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); - - CcShowInstancesPeer::addSelectColumns($criteria); - $startcol4 = $startcol3 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - $cls = CcPlayoutHistoryPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); - } // if obj1 already loaded - - // Add objects for joined CcFiles rows - - $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcFilesPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcFilesPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcFilesPeer::addInstanceToPool($obj2, $key2); - } // if obj2 loaded - - // Add the $obj1 (CcPlayoutHistory) to the collection in $obj2 (CcFiles) - $obj2->addCcPlayoutHistory($obj1); - } // if joined row not null - - // Add objects for joined CcShowInstances rows - - $key3 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol3); - if ($key3 !== null) { - $obj3 = CcShowInstancesPeer::getInstanceFromPool($key3); - if (!$obj3) { - - $cls = CcShowInstancesPeer::getOMClass(false); - - $obj3 = new $cls(); - $obj3->hydrate($row, $startcol3); - CcShowInstancesPeer::addInstanceToPool($obj3, $key3); - } // if obj3 loaded - - // Add the $obj1 (CcPlayoutHistory) to the collection in $obj3 (CcShowInstances) - $obj3->addCcPlayoutHistory($obj1); - } // if joined row not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Returns the number of rows matching criteria, joining the related CcFiles table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinAllExceptCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY should not affect count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Returns the number of rows matching criteria, joining the related CcShowInstances table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinAllExceptCcShowInstances(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY should not affect count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Selects a collection of CcPlayoutHistory objects pre-filled with all related objects except CcFiles. - * - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistory objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinAllExceptCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - // $criteria->getDbName() will return the same object if not set to another value - // so == check is okay and faster - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryPeer::addSelectColumns($criteria); - $startcol2 = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); - - CcShowInstancesPeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); - - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - $cls = CcPlayoutHistoryPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); - } // if obj1 already loaded - - // Add objects for joined CcShowInstances rows - - $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcShowInstancesPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcShowInstancesPeer::addInstanceToPool($obj2, $key2); - } // if $obj2 already loaded - - // Add the $obj1 (CcPlayoutHistory) to the collection in $obj2 (CcShowInstances) - $obj2->addCcPlayoutHistory($obj1); - - } // if joined row is not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Selects a collection of CcPlayoutHistory objects pre-filled with all related objects except CcShowInstances. - * - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistory objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinAllExceptCcShowInstances(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - // $criteria->getDbName() will return the same object if not set to another value - // so == check is okay and faster - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryPeer::addSelectColumns($criteria); - $startcol2 = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); - - CcFilesPeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - $cls = CcPlayoutHistoryPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); - } // if obj1 already loaded - - // Add objects for joined CcFiles rows - - $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcFilesPeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcFilesPeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcFilesPeer::addInstanceToPool($obj2, $key2); - } // if $obj2 already loaded - - // Add the $obj1 (CcPlayoutHistory) to the collection in $obj2 (CcFiles) - $obj2->addCcPlayoutHistory($obj1); - - } // if joined row is not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * Add a TableMap instance to the database for this peer class. - */ - public static function buildTableMap() - { - $dbMap = Propel::getDatabaseMap(BaseCcPlayoutHistoryPeer::DATABASE_NAME); - if (!$dbMap->hasTable(BaseCcPlayoutHistoryPeer::TABLE_NAME)) - { - $dbMap->addTableObject(new CcPlayoutHistoryTableMap()); - } - } - - /** - * The class that the Peer will make instances of. - * - * If $withPrefix is true, the returned path - * uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName - */ - public static function getOMClass($withPrefix = true) - { - return $withPrefix ? CcPlayoutHistoryPeer::CLASS_DEFAULT : CcPlayoutHistoryPeer::OM_CLASS; - } - - /** - * Method perform an INSERT on the database, given a CcPlayoutHistory or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistory object containing data that is used to create the INSERT statement. - * @param PropelPDO $con the PropelPDO connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from CcPlayoutHistory object - } - - if ($criteria->containsKey(CcPlayoutHistoryPeer::ID) && $criteria->keyContainsValue(CcPlayoutHistoryPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryPeer::ID.')'); - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->beginTransaction(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch(PropelException $e) { - $con->rollBack(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a CcPlayoutHistory or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistory object containing data that is used to create the UPDATE statement. - * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(CcPlayoutHistoryPeer::ID); - $value = $criteria->remove(CcPlayoutHistoryPeer::ID); - if ($value) { - $selectCriteria->add(CcPlayoutHistoryPeer::ID, $value, $comparison); - } else { - $selectCriteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); - } - - } else { // $values is CcPlayoutHistory object - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the cc_playout_history table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - $affectedRows += BasePeer::doDeleteAll(CcPlayoutHistoryPeer::TABLE_NAME, $con, CcPlayoutHistoryPeer::DATABASE_NAME); - // Because this db requires some delete cascade/set null emulation, we have to - // clear the cached instance *after* the emulation has happened (since - // instances get re-added by the select statement contained therein). - CcPlayoutHistoryPeer::clearInstancePool(); - CcPlayoutHistoryPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a CcPlayoutHistory or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or CcPlayoutHistory object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param PropelPDO $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - // invalidate the cache for all objects of this type, since we have no - // way of knowing (without running a query) what objects should be invalidated - // from the cache based on this Criteria. - CcPlayoutHistoryPeer::clearInstancePool(); - // rename for clarity - $criteria = clone $values; - } elseif ($values instanceof CcPlayoutHistory) { // it's a model object - // invalidate the cache for this single object - CcPlayoutHistoryPeer::removeInstanceFromPool($values); - // create criteria based on pk values - $criteria = $values->buildPkeyCriteria(); - } else { // it's a primary key, or an array of pks - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryPeer::ID, (array) $values, Criteria::IN); - // invalidate the cache for this object(s) - foreach ((array) $values as $singleval) { - CcPlayoutHistoryPeer::removeInstanceFromPool($singleval); - } - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - CcPlayoutHistoryPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Validates all modified columns of given CcPlayoutHistory object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param CcPlayoutHistory $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(CcPlayoutHistory $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(CcPlayoutHistoryPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(CcPlayoutHistoryPeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(CcPlayoutHistoryPeer::DATABASE_NAME, CcPlayoutHistoryPeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param int $pk the primary key. - * @param PropelPDO $con the connection to use - * @return CcPlayoutHistory - */ - public static function retrieveByPK($pk, PropelPDO $con = null) - { - - if (null !== ($obj = CcPlayoutHistoryPeer::getInstanceFromPool((string) $pk))) { - return $obj; - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria = new Criteria(CcPlayoutHistoryPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryPeer::ID, $pk); - - $v = CcPlayoutHistoryPeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param PropelPDO $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(CcPlayoutHistoryPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryPeer::ID, $pks, Criteria::IN); - $objs = CcPlayoutHistoryPeer::doSelect($criteria, $con); - } - return $objs; - } - -} // BaseCcPlayoutHistoryPeer - -// This is the static code needed to register the TableMap for this table with the main Propel class. -// -BaseCcPlayoutHistoryPeer::buildTableMap(); - diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php deleted file mode 100644 index b772a0d7a..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php +++ /dev/null @@ -1,509 +0,0 @@ -setModelAlias($modelAlias); - } - if ($criteria instanceof Criteria) { - $query->mergeWith($criteria); - } - return $query; - } - - /** - * Find object by primary key - * Use instance pooling to avoid a database query if the object exists - * - * $obj = $c->findPk(12, $con); - * - * @param mixed $key Primary key to use for the query - * @param PropelPDO $con an optional connection object - * - * @return CcPlayoutHistory|array|mixed the result, formatted by the current formatter - */ - public function findPk($key, $con = null) - { - if ((null !== ($obj = CcPlayoutHistoryPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { - // the object is alredy in the instance pool - return $obj; - } else { - // the object has not been requested yet, or the formatter is not an object formatter - $criteria = $this->isKeepQuery() ? clone $this : $this; - $stmt = $criteria - ->filterByPrimaryKey($key) - ->getSelectStatement($con); - return $criteria->getFormatter()->init($criteria)->formatOne($stmt); - } - } - - /** - * Find objects by primary key - * - * $objs = $c->findPks(array(12, 56, 832), $con); - * - * @param array $keys Primary keys to use for the query - * @param PropelPDO $con an optional connection object - * - * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter - */ - public function findPks($keys, $con = null) - { - $criteria = $this->isKeepQuery() ? clone $this : $this; - return $this - ->filterByPrimaryKeys($keys) - ->find($con); - } - - /** - * Filter the query by primary key - * - * @param mixed $key Primary key to use for the query - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByPrimaryKey($key) - { - return $this->addUsingAlias(CcPlayoutHistoryPeer::ID, $key, Criteria::EQUAL); - } - - /** - * Filter the query by a list of primary keys - * - * @param array $keys The list of primary key to use for the query - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByPrimaryKeys($keys) - { - return $this->addUsingAlias(CcPlayoutHistoryPeer::ID, $keys, Criteria::IN); - } - - /** - * Filter the query on the id column - * - * @param int|array $dbId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByDbId($dbId = null, $comparison = null) - { - if (is_array($dbId) && null === $comparison) { - $comparison = Criteria::IN; - } - return $this->addUsingAlias(CcPlayoutHistoryPeer::ID, $dbId, $comparison); - } - - /** - * Filter the query on the file_id column - * - * @param int|array $dbFileId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByDbFileId($dbFileId = null, $comparison = null) - { - if (is_array($dbFileId)) { - $useMinMax = false; - if (isset($dbFileId['min'])) { - $this->addUsingAlias(CcPlayoutHistoryPeer::FILE_ID, $dbFileId['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbFileId['max'])) { - $this->addUsingAlias(CcPlayoutHistoryPeer::FILE_ID, $dbFileId['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcPlayoutHistoryPeer::FILE_ID, $dbFileId, $comparison); - } - - /** - * Filter the query on the starts column - * - * @param string|array $dbStarts The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByDbStarts($dbStarts = null, $comparison = null) - { - if (is_array($dbStarts)) { - $useMinMax = false; - if (isset($dbStarts['min'])) { - $this->addUsingAlias(CcPlayoutHistoryPeer::STARTS, $dbStarts['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbStarts['max'])) { - $this->addUsingAlias(CcPlayoutHistoryPeer::STARTS, $dbStarts['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcPlayoutHistoryPeer::STARTS, $dbStarts, $comparison); - } - - /** - * Filter the query on the ends column - * - * @param string|array $dbEnds The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByDbEnds($dbEnds = null, $comparison = null) - { - if (is_array($dbEnds)) { - $useMinMax = false; - if (isset($dbEnds['min'])) { - $this->addUsingAlias(CcPlayoutHistoryPeer::ENDS, $dbEnds['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbEnds['max'])) { - $this->addUsingAlias(CcPlayoutHistoryPeer::ENDS, $dbEnds['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcPlayoutHistoryPeer::ENDS, $dbEnds, $comparison); - } - - /** - * Filter the query on the instance_id column - * - * @param int|array $dbInstanceId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByDbInstanceId($dbInstanceId = null, $comparison = null) - { - if (is_array($dbInstanceId)) { - $useMinMax = false; - if (isset($dbInstanceId['min'])) { - $this->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $dbInstanceId['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbInstanceId['max'])) { - $this->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $dbInstanceId['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $dbInstanceId, $comparison); - } - - /** - * Filter the query by a related CcFiles object - * - * @param CcFiles $ccFiles the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByCcFiles($ccFiles, $comparison = null) - { - return $this - ->addUsingAlias(CcPlayoutHistoryPeer::FILE_ID, $ccFiles->getDbId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcFiles relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function joinCcFiles($relationAlias = '', $joinType = Criteria::LEFT_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcFiles'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcFiles'); - } - - return $this; - } - - /** - * Use the CcFiles relation CcFiles object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcFilesQuery A secondary query class using the current class as primary query - */ - public function useCcFilesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) - { - return $this - ->joinCcFiles($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery'); - } - - /** - * Filter the query by a related CcShowInstances object - * - * @param CcShowInstances $ccShowInstances the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByCcShowInstances($ccShowInstances, $comparison = null) - { - return $this - ->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $ccShowInstances->getDbId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcShowInstances relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function joinCcShowInstances($relationAlias = '', $joinType = Criteria::LEFT_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcShowInstances'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcShowInstances'); - } - - return $this; - } - - /** - * Use the CcShowInstances relation CcShowInstances object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcShowInstancesQuery A secondary query class using the current class as primary query - */ - public function useCcShowInstancesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) - { - return $this - ->joinCcShowInstances($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcShowInstances', 'CcShowInstancesQuery'); - } - - /** - * Filter the query by a related CcPlayoutHistoryMetaData object - * - * @param CcPlayoutHistoryMetaData $ccPlayoutHistoryMetaData the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function filterByCcPlayoutHistoryMetaData($ccPlayoutHistoryMetaData, $comparison = null) - { - return $this - ->addUsingAlias(CcPlayoutHistoryPeer::ID, $ccPlayoutHistoryMetaData->getDbHistoryId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcPlayoutHistoryMetaData relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function joinCcPlayoutHistoryMetaData($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcPlayoutHistoryMetaData'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcPlayoutHistoryMetaData'); - } - - return $this; - } - - /** - * Use the CcPlayoutHistoryMetaData relation CcPlayoutHistoryMetaData object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryMetaDataQuery A secondary query class using the current class as primary query - */ - public function useCcPlayoutHistoryMetaDataQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcPlayoutHistoryMetaData($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaDataQuery'); - } - - /** - * Exclude object from result - * - * @param CcPlayoutHistory $ccPlayoutHistory Object to remove from the list of results - * - * @return CcPlayoutHistoryQuery The current query, for fluid interface - */ - public function prune($ccPlayoutHistory = null) - { - if ($ccPlayoutHistory) { - $this->addUsingAlias(CcPlayoutHistoryPeer::ID, $ccPlayoutHistory->getDbId(), Criteria::NOT_EQUAL); - } - - return $this; - } - -} // BaseCcPlayoutHistoryQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplate.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplate.php deleted file mode 100644 index 222227af6..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplate.php +++ /dev/null @@ -1,916 +0,0 @@ -id; - } - - /** - * Get the [name] column value. - * - * @return string - */ - public function getDbName() - { - return $this->name; - } - - /** - * Get the [type] column value. - * - * @return string - */ - public function getDbType() - { - return $this->type; - } - - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return CcPlayoutHistoryTemplate The current object (for fluent API support) - */ - public function setDbId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplatePeer::ID; - } - - return $this; - } // setDbId() - - /** - * Set the value of [name] column. - * - * @param string $v new value - * @return CcPlayoutHistoryTemplate The current object (for fluent API support) - */ - public function setDbName($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->name !== $v) { - $this->name = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplatePeer::NAME; - } - - return $this; - } // setDbName() - - /** - * Set the value of [type] column. - * - * @param string $v new value - * @return CcPlayoutHistoryTemplate The current object (for fluent API support) - */ - public function setDbType($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->type !== $v) { - $this->type = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplatePeer::TYPE; - } - - return $this; - } // setDbType() - - /** - * Indicates whether the columns in this object are only set to default values. - * - * This method can be used in conjunction with isModified() to indicate whether an object is both - * modified _and_ has some values set which are non-default. - * - * @return boolean Whether the columns in this object are only been set with default values. - */ - public function hasOnlyDefaultValues() - { - // otherwise, everything was equal, so return TRUE - return true; - } // hasOnlyDefaultValues() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (0-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) - * @param int $startcol 0-based offset column which indicates which restultset column to start with. - * @param boolean $rehydrate Whether this object is being re-hydrated from the database. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate($row, $startcol = 0, $rehydrate = false) - { - try { - - $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; - $this->name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; - $this->type = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; - $this->resetModified(); - - $this->setNew(false); - - if ($rehydrate) { - $this->ensureConsistency(); - } - - return $startcol + 3; // 3 = CcPlayoutHistoryTemplatePeer::NUM_COLUMNS - CcPlayoutHistoryTemplatePeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating CcPlayoutHistoryTemplate object", $e); - } - } - - /** - * Checks and repairs the internal consistency of the object. - * - * This method is executed after an already-instantiated object is re-hydrated - * from the database. It exists to check any foreign keys to make sure that - * the objects related to the current object are correct based on foreign key. - * - * You can override this method in the stub class, but you should always invoke - * the base method from the overridden method (i.e. parent::ensureConsistency()), - * in case your model changes. - * - * @throws PropelException - */ - public function ensureConsistency() - { - - } // ensureConsistency - - /** - * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. - * - * This will only work if the object has been saved and has a valid primary key set. - * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param PropelPDO $con (optional) The PropelPDO connection to use. - * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db - */ - public function reload($deep = false, PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("Cannot reload a deleted object."); - } - - if ($this->isNew()) { - throw new PropelException("Cannot reload an unsaved object."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - // We don't need to alter the object instance pool; we're just modifying this instance - // already in the pool. - - $stmt = CcPlayoutHistoryTemplatePeer::doSelectStmt($this->buildPkeyCriteria(), $con); - $row = $stmt->fetch(PDO::FETCH_NUM); - $stmt->closeCursor(); - if (!$row) { - throw new PropelException('Cannot find matching row in the database to reload object values.'); - } - $this->hydrate($row, 0, true); // rehydrate - - if ($deep) { // also de-associate any related objects? - - $this->collCcPlayoutHistoryTemplateFields = null; - - } // if (deep) - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param PropelPDO $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - try { - $ret = $this->preDelete($con); - if ($ret) { - CcPlayoutHistoryTemplateQuery::create() - ->filterByPrimaryKey($this->getPrimaryKey()) - ->delete($con); - $this->postDelete($con); - $con->commit(); - $this->setDeleted(true); - } else { - $con->commit(); - } - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Persists this object to the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All modified related objects will also be persisted in the doSave() - * method. This method wraps all precipitate database operations in a - * single transaction. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see doSave() - */ - public function save(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - $isInsert = $this->isNew(); - try { - $ret = $this->preSave($con); - if ($isInsert) { - $ret = $ret && $this->preInsert($con); - } else { - $ret = $ret && $this->preUpdate($con); - } - if ($ret) { - $affectedRows = $this->doSave($con); - if ($isInsert) { - $this->postInsert($con); - } else { - $this->postUpdate($con); - } - $this->postSave($con); - CcPlayoutHistoryTemplatePeer::addInstanceToPool($this); - } else { - $affectedRows = 0; - } - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Performs the work of inserting or updating the row in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see save() - */ - protected function doSave(PropelPDO $con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - if ($this->isNew() ) { - $this->modifiedColumns[] = CcPlayoutHistoryTemplatePeer::ID; - } - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $criteria = $this->buildCriteria(); - if ($criteria->keyContainsValue(CcPlayoutHistoryTemplatePeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplatePeer::ID.')'); - } - - $pk = BasePeer::doInsert($criteria, $con); - $affectedRows = 1; - $this->setDbId($pk); //[IMV] update autoincrement primary key - $this->setNew(false); - } else { - $affectedRows = CcPlayoutHistoryTemplatePeer::doUpdate($this, $con); - } - - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - if ($this->collCcPlayoutHistoryTemplateFields !== null) { - foreach ($this->collCcPlayoutHistoryTemplateFields as $referrerFK) { - if (!$referrerFK->isDeleted()) { - $affectedRows += $referrerFK->save($con); - } - } - } - - $this->alreadyInSave = false; - - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - if (($retval = CcPlayoutHistoryTemplatePeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - if ($this->collCcPlayoutHistoryTemplateFields !== null) { - foreach ($this->collCcPlayoutHistoryTemplateFields as $referrerFK) { - if (!$referrerFK->validate($columns)) { - $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); - } - } - } - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryTemplatePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - $field = $this->getByPosition($pos); - return $field; - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getDbId(); - break; - case 1: - return $this->getDbName(); - break; - case 2: - return $this->getDbType(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * Defaults to BasePeer::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * - * @return array an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true) - { - $keys = CcPlayoutHistoryTemplatePeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getDbId(), - $keys[1] => $this->getDbName(), - $keys[2] => $this->getDbType(), - ); - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryTemplatePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setDbId($value); - break; - case 1: - $this->setDbName($value); - break; - case 2: - $this->setDbType($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * The default key type is the column's phpname (e.g. 'AuthorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = CcPlayoutHistoryTemplatePeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setDbName($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setDbType($arr[$keys[2]]); - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); - - if ($this->isColumnModified(CcPlayoutHistoryTemplatePeer::ID)) $criteria->add(CcPlayoutHistoryTemplatePeer::ID, $this->id); - if ($this->isColumnModified(CcPlayoutHistoryTemplatePeer::NAME)) $criteria->add(CcPlayoutHistoryTemplatePeer::NAME, $this->name); - if ($this->isColumnModified(CcPlayoutHistoryTemplatePeer::TYPE)) $criteria->add(CcPlayoutHistoryTemplatePeer::TYPE, $this->type); - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplatePeer::ID, $this->id); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return int - */ - public function getPrimaryKey() - { - return $this->getDbId(); - } - - /** - * Generic method to set the primary key (id column). - * - * @param int $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setDbId($key); - } - - /** - * Returns true if the primary key for this object is null. - * @return boolean - */ - public function isPrimaryKeyNull() - { - return null === $this->getDbId(); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of CcPlayoutHistoryTemplate (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - $copyObj->setDbName($this->name); - $copyObj->setDbType($this->type); - - if ($deepCopy) { - // important: temporarily setNew(false) because this affects the behavior of - // the getter/setter methods for fkey referrer objects. - $copyObj->setNew(false); - - foreach ($this->getCcPlayoutHistoryTemplateFields() as $relObj) { - if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addCcPlayoutHistoryTemplateField($relObj->copy($deepCopy)); - } - } - - } // if ($deepCopy) - - - $copyObj->setNew(true); - $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return CcPlayoutHistoryTemplate Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return CcPlayoutHistoryTemplatePeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new CcPlayoutHistoryTemplatePeer(); - } - return self::$peer; - } - - /** - * Clears out the collCcPlayoutHistoryTemplateFields collection - * - * This does not modify the database; however, it will remove any associated objects, causing - * them to be refetched by subsequent calls to accessor method. - * - * @return void - * @see addCcPlayoutHistoryTemplateFields() - */ - public function clearCcPlayoutHistoryTemplateFields() - { - $this->collCcPlayoutHistoryTemplateFields = null; // important to set this to NULL since that means it is uninitialized - } - - /** - * Initializes the collCcPlayoutHistoryTemplateFields collection. - * - * By default this just sets the collCcPlayoutHistoryTemplateFields collection to an empty array (like clearcollCcPlayoutHistoryTemplateFields()); - * however, you may wish to override this method in your stub class to provide setting appropriate - * to your application -- for example, setting the initial array to the values stored in database. - * - * @return void - */ - public function initCcPlayoutHistoryTemplateFields() - { - $this->collCcPlayoutHistoryTemplateFields = new PropelObjectCollection(); - $this->collCcPlayoutHistoryTemplateFields->setModel('CcPlayoutHistoryTemplateField'); - } - - /** - * Gets an array of CcPlayoutHistoryTemplateField objects which contain a foreign key that references this object. - * - * If the $criteria is not null, it is used to always fetch the results from the database. - * Otherwise the results are fetched from the database the first time, then cached. - * Next time the same method is called without $criteria, the cached collection is returned. - * If this CcPlayoutHistoryTemplate is new, it will return - * an empty collection or the current collection; the criteria is ignored on a new object. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @return PropelCollection|array CcPlayoutHistoryTemplateField[] List of CcPlayoutHistoryTemplateField objects - * @throws PropelException - */ - public function getCcPlayoutHistoryTemplateFields($criteria = null, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistoryTemplateFields || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateFields) { - // return empty collection - $this->initCcPlayoutHistoryTemplateFields(); - } else { - $collCcPlayoutHistoryTemplateFields = CcPlayoutHistoryTemplateFieldQuery::create(null, $criteria) - ->filterByCcPlayoutHistoryTemplate($this) - ->find($con); - if (null !== $criteria) { - return $collCcPlayoutHistoryTemplateFields; - } - $this->collCcPlayoutHistoryTemplateFields = $collCcPlayoutHistoryTemplateFields; - } - } - return $this->collCcPlayoutHistoryTemplateFields; - } - - /** - * Returns the number of related CcPlayoutHistoryTemplateField objects. - * - * @param Criteria $criteria - * @param boolean $distinct - * @param PropelPDO $con - * @return int Count of related CcPlayoutHistoryTemplateField objects. - * @throws PropelException - */ - public function countCcPlayoutHistoryTemplateFields(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistoryTemplateFields || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateFields) { - return 0; - } else { - $query = CcPlayoutHistoryTemplateFieldQuery::create(null, $criteria); - if($distinct) { - $query->distinct(); - } - return $query - ->filterByCcPlayoutHistoryTemplate($this) - ->count($con); - } - } else { - return count($this->collCcPlayoutHistoryTemplateFields); - } - } - - /** - * Method called to associate a CcPlayoutHistoryTemplateField object to this object - * through the CcPlayoutHistoryTemplateField foreign key attribute. - * - * @param CcPlayoutHistoryTemplateField $l CcPlayoutHistoryTemplateField - * @return void - * @throws PropelException - */ - public function addCcPlayoutHistoryTemplateField(CcPlayoutHistoryTemplateField $l) - { - if ($this->collCcPlayoutHistoryTemplateFields === null) { - $this->initCcPlayoutHistoryTemplateFields(); - } - if (!$this->collCcPlayoutHistoryTemplateFields->contains($l)) { // only add it if the **same** object is not already associated - $this->collCcPlayoutHistoryTemplateFields[]= $l; - $l->setCcPlayoutHistoryTemplate($this); - } - } - - /** - * Clears the current object and sets all attributes to their default values - */ - public function clear() - { - $this->id = null; - $this->name = null; - $this->type = null; - $this->alreadyInSave = false; - $this->alreadyInValidation = false; - $this->clearAllReferences(); - $this->resetModified(); - $this->setNew(true); - $this->setDeleted(false); - } - - /** - * Resets all collections of referencing foreign keys. - * - * This method is a user-space workaround for PHP's inability to garbage collect objects - * with circular references. This is currently necessary when using Propel in certain - * daemon or large-volumne/high-memory operations. - * - * @param boolean $deep Whether to also clear the references on all associated objects. - */ - public function clearAllReferences($deep = false) - { - if ($deep) { - if ($this->collCcPlayoutHistoryTemplateFields) { - foreach ((array) $this->collCcPlayoutHistoryTemplateFields as $o) { - $o->clearAllReferences($deep); - } - } - } // if ($deep) - - $this->collCcPlayoutHistoryTemplateFields = null; - } - - /** - * Catches calls to virtual methods - */ - public function __call($name, $params) - { - if (preg_match('/get(\w+)/', $name, $matches)) { - $virtualColumn = $matches[1]; - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - // no lcfirst in php<5.3... - $virtualColumn[0] = strtolower($virtualColumn[0]); - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - } - throw new PropelException('Call to undefined method: ' . $name); - } - -} // BaseCcPlayoutHistoryTemplate diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateField.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateField.php deleted file mode 100644 index 3476aa459..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateField.php +++ /dev/null @@ -1,1076 +0,0 @@ -is_file_md = false; - } - - /** - * Initializes internal state of BaseCcPlayoutHistoryTemplateField object. - * @see applyDefaults() - */ - public function __construct() - { - parent::__construct(); - $this->applyDefaultValues(); - } - - /** - * Get the [id] column value. - * - * @return int - */ - public function getDbId() - { - return $this->id; - } - - /** - * Get the [template_id] column value. - * - * @return int - */ - public function getDbTemplateId() - { - return $this->template_id; - } - - /** - * Get the [name] column value. - * - * @return string - */ - public function getDbName() - { - return $this->name; - } - - /** - * Get the [label] column value. - * - * @return string - */ - public function getDbLabel() - { - return $this->label; - } - - /** - * Get the [type] column value. - * - * @return string - */ - public function getDbType() - { - return $this->type; - } - - /** - * Get the [is_file_md] column value. - * - * @return boolean - */ - public function getDbIsFileMD() - { - return $this->is_file_md; - } - - /** - * Get the [position] column value. - * - * @return int - */ - public function getDbPosition() - { - return $this->position; - } - - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return CcPlayoutHistoryTemplateField The current object (for fluent API support) - */ - public function setDbId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateFieldPeer::ID; - } - - return $this; - } // setDbId() - - /** - * Set the value of [template_id] column. - * - * @param int $v new value - * @return CcPlayoutHistoryTemplateField The current object (for fluent API support) - */ - public function setDbTemplateId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->template_id !== $v) { - $this->template_id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID; - } - - if ($this->aCcPlayoutHistoryTemplate !== null && $this->aCcPlayoutHistoryTemplate->getDbId() !== $v) { - $this->aCcPlayoutHistoryTemplate = null; - } - - return $this; - } // setDbTemplateId() - - /** - * Set the value of [name] column. - * - * @param string $v new value - * @return CcPlayoutHistoryTemplateField The current object (for fluent API support) - */ - public function setDbName($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->name !== $v) { - $this->name = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateFieldPeer::NAME; - } - - return $this; - } // setDbName() - - /** - * Set the value of [label] column. - * - * @param string $v new value - * @return CcPlayoutHistoryTemplateField The current object (for fluent API support) - */ - public function setDbLabel($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->label !== $v) { - $this->label = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateFieldPeer::LABEL; - } - - return $this; - } // setDbLabel() - - /** - * Set the value of [type] column. - * - * @param string $v new value - * @return CcPlayoutHistoryTemplateField The current object (for fluent API support) - */ - public function setDbType($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->type !== $v) { - $this->type = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateFieldPeer::TYPE; - } - - return $this; - } // setDbType() - - /** - * Set the value of [is_file_md] column. - * - * @param boolean $v new value - * @return CcPlayoutHistoryTemplateField The current object (for fluent API support) - */ - public function setDbIsFileMD($v) - { - if ($v !== null) { - $v = (boolean) $v; - } - - if ($this->is_file_md !== $v || $this->isNew()) { - $this->is_file_md = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateFieldPeer::IS_FILE_MD; - } - - return $this; - } // setDbIsFileMD() - - /** - * Set the value of [position] column. - * - * @param int $v new value - * @return CcPlayoutHistoryTemplateField The current object (for fluent API support) - */ - public function setDbPosition($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->position !== $v) { - $this->position = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateFieldPeer::POSITION; - } - - return $this; - } // setDbPosition() - - /** - * Indicates whether the columns in this object are only set to default values. - * - * This method can be used in conjunction with isModified() to indicate whether an object is both - * modified _and_ has some values set which are non-default. - * - * @return boolean Whether the columns in this object are only been set with default values. - */ - public function hasOnlyDefaultValues() - { - if ($this->is_file_md !== false) { - return false; - } - - // otherwise, everything was equal, so return TRUE - return true; - } // hasOnlyDefaultValues() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (0-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) - * @param int $startcol 0-based offset column which indicates which restultset column to start with. - * @param boolean $rehydrate Whether this object is being re-hydrated from the database. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate($row, $startcol = 0, $rehydrate = false) - { - try { - - $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; - $this->template_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; - $this->name = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; - $this->label = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; - $this->type = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null; - $this->is_file_md = ($row[$startcol + 5] !== null) ? (boolean) $row[$startcol + 5] : null; - $this->position = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null; - $this->resetModified(); - - $this->setNew(false); - - if ($rehydrate) { - $this->ensureConsistency(); - } - - return $startcol + 7; // 7 = CcPlayoutHistoryTemplateFieldPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateFieldPeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating CcPlayoutHistoryTemplateField object", $e); - } - } - - /** - * Checks and repairs the internal consistency of the object. - * - * This method is executed after an already-instantiated object is re-hydrated - * from the database. It exists to check any foreign keys to make sure that - * the objects related to the current object are correct based on foreign key. - * - * You can override this method in the stub class, but you should always invoke - * the base method from the overridden method (i.e. parent::ensureConsistency()), - * in case your model changes. - * - * @throws PropelException - */ - public function ensureConsistency() - { - - if ($this->aCcPlayoutHistoryTemplate !== null && $this->template_id !== $this->aCcPlayoutHistoryTemplate->getDbId()) { - $this->aCcPlayoutHistoryTemplate = null; - } - } // ensureConsistency - - /** - * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. - * - * This will only work if the object has been saved and has a valid primary key set. - * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param PropelPDO $con (optional) The PropelPDO connection to use. - * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db - */ - public function reload($deep = false, PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("Cannot reload a deleted object."); - } - - if ($this->isNew()) { - throw new PropelException("Cannot reload an unsaved object."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - // We don't need to alter the object instance pool; we're just modifying this instance - // already in the pool. - - $stmt = CcPlayoutHistoryTemplateFieldPeer::doSelectStmt($this->buildPkeyCriteria(), $con); - $row = $stmt->fetch(PDO::FETCH_NUM); - $stmt->closeCursor(); - if (!$row) { - throw new PropelException('Cannot find matching row in the database to reload object values.'); - } - $this->hydrate($row, 0, true); // rehydrate - - if ($deep) { // also de-associate any related objects? - - $this->aCcPlayoutHistoryTemplate = null; - } // if (deep) - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param PropelPDO $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - try { - $ret = $this->preDelete($con); - if ($ret) { - CcPlayoutHistoryTemplateFieldQuery::create() - ->filterByPrimaryKey($this->getPrimaryKey()) - ->delete($con); - $this->postDelete($con); - $con->commit(); - $this->setDeleted(true); - } else { - $con->commit(); - } - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Persists this object to the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All modified related objects will also be persisted in the doSave() - * method. This method wraps all precipitate database operations in a - * single transaction. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see doSave() - */ - public function save(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - $isInsert = $this->isNew(); - try { - $ret = $this->preSave($con); - if ($isInsert) { - $ret = $ret && $this->preInsert($con); - } else { - $ret = $ret && $this->preUpdate($con); - } - if ($ret) { - $affectedRows = $this->doSave($con); - if ($isInsert) { - $this->postInsert($con); - } else { - $this->postUpdate($con); - } - $this->postSave($con); - CcPlayoutHistoryTemplateFieldPeer::addInstanceToPool($this); - } else { - $affectedRows = 0; - } - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Performs the work of inserting or updating the row in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see save() - */ - protected function doSave(PropelPDO $con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - // We call the save method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcPlayoutHistoryTemplate !== null) { - if ($this->aCcPlayoutHistoryTemplate->isModified() || $this->aCcPlayoutHistoryTemplate->isNew()) { - $affectedRows += $this->aCcPlayoutHistoryTemplate->save($con); - } - $this->setCcPlayoutHistoryTemplate($this->aCcPlayoutHistoryTemplate); - } - - if ($this->isNew() ) { - $this->modifiedColumns[] = CcPlayoutHistoryTemplateFieldPeer::ID; - } - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $criteria = $this->buildCriteria(); - if ($criteria->keyContainsValue(CcPlayoutHistoryTemplateFieldPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplateFieldPeer::ID.')'); - } - - $pk = BasePeer::doInsert($criteria, $con); - $affectedRows += 1; - $this->setDbId($pk); //[IMV] update autoincrement primary key - $this->setNew(false); - } else { - $affectedRows += CcPlayoutHistoryTemplateFieldPeer::doUpdate($this, $con); - } - - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - $this->alreadyInSave = false; - - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - // We call the validate method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcPlayoutHistoryTemplate !== null) { - if (!$this->aCcPlayoutHistoryTemplate->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcPlayoutHistoryTemplate->getValidationFailures()); - } - } - - - if (($retval = CcPlayoutHistoryTemplateFieldPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryTemplateFieldPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - $field = $this->getByPosition($pos); - return $field; - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getDbId(); - break; - case 1: - return $this->getDbTemplateId(); - break; - case 2: - return $this->getDbName(); - break; - case 3: - return $this->getDbLabel(); - break; - case 4: - return $this->getDbType(); - break; - case 5: - return $this->getDbIsFileMD(); - break; - case 6: - return $this->getDbPosition(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * Defaults to BasePeer::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. - * - * @return array an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false) - { - $keys = CcPlayoutHistoryTemplateFieldPeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getDbId(), - $keys[1] => $this->getDbTemplateId(), - $keys[2] => $this->getDbName(), - $keys[3] => $this->getDbLabel(), - $keys[4] => $this->getDbType(), - $keys[5] => $this->getDbIsFileMD(), - $keys[6] => $this->getDbPosition(), - ); - if ($includeForeignObjects) { - if (null !== $this->aCcPlayoutHistoryTemplate) { - $result['CcPlayoutHistoryTemplate'] = $this->aCcPlayoutHistoryTemplate->toArray($keyType, $includeLazyLoadColumns, true); - } - } - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryTemplateFieldPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setDbId($value); - break; - case 1: - $this->setDbTemplateId($value); - break; - case 2: - $this->setDbName($value); - break; - case 3: - $this->setDbLabel($value); - break; - case 4: - $this->setDbType($value); - break; - case 5: - $this->setDbIsFileMD($value); - break; - case 6: - $this->setDbPosition($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * The default key type is the column's phpname (e.g. 'AuthorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = CcPlayoutHistoryTemplateFieldPeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setDbTemplateId($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setDbName($arr[$keys[2]]); - if (array_key_exists($keys[3], $arr)) $this->setDbLabel($arr[$keys[3]]); - if (array_key_exists($keys[4], $arr)) $this->setDbType($arr[$keys[4]]); - if (array_key_exists($keys[5], $arr)) $this->setDbIsFileMD($arr[$keys[5]]); - if (array_key_exists($keys[6], $arr)) $this->setDbPosition($arr[$keys[6]]); - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME); - - if ($this->isColumnModified(CcPlayoutHistoryTemplateFieldPeer::ID)) $criteria->add(CcPlayoutHistoryTemplateFieldPeer::ID, $this->id); - if ($this->isColumnModified(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID)) $criteria->add(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $this->template_id); - if ($this->isColumnModified(CcPlayoutHistoryTemplateFieldPeer::NAME)) $criteria->add(CcPlayoutHistoryTemplateFieldPeer::NAME, $this->name); - if ($this->isColumnModified(CcPlayoutHistoryTemplateFieldPeer::LABEL)) $criteria->add(CcPlayoutHistoryTemplateFieldPeer::LABEL, $this->label); - if ($this->isColumnModified(CcPlayoutHistoryTemplateFieldPeer::TYPE)) $criteria->add(CcPlayoutHistoryTemplateFieldPeer::TYPE, $this->type); - if ($this->isColumnModified(CcPlayoutHistoryTemplateFieldPeer::IS_FILE_MD)) $criteria->add(CcPlayoutHistoryTemplateFieldPeer::IS_FILE_MD, $this->is_file_md); - if ($this->isColumnModified(CcPlayoutHistoryTemplateFieldPeer::POSITION)) $criteria->add(CcPlayoutHistoryTemplateFieldPeer::POSITION, $this->position); - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplateFieldPeer::ID, $this->id); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return int - */ - public function getPrimaryKey() - { - return $this->getDbId(); - } - - /** - * Generic method to set the primary key (id column). - * - * @param int $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setDbId($key); - } - - /** - * Returns true if the primary key for this object is null. - * @return boolean - */ - public function isPrimaryKeyNull() - { - return null === $this->getDbId(); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of CcPlayoutHistoryTemplateField (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - $copyObj->setDbTemplateId($this->template_id); - $copyObj->setDbName($this->name); - $copyObj->setDbLabel($this->label); - $copyObj->setDbType($this->type); - $copyObj->setDbIsFileMD($this->is_file_md); - $copyObj->setDbPosition($this->position); - - $copyObj->setNew(true); - $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return CcPlayoutHistoryTemplateField Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return CcPlayoutHistoryTemplateFieldPeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new CcPlayoutHistoryTemplateFieldPeer(); - } - return self::$peer; - } - - /** - * Declares an association between this object and a CcPlayoutHistoryTemplate object. - * - * @param CcPlayoutHistoryTemplate $v - * @return CcPlayoutHistoryTemplateField The current object (for fluent API support) - * @throws PropelException - */ - public function setCcPlayoutHistoryTemplate(CcPlayoutHistoryTemplate $v = null) - { - if ($v === null) { - $this->setDbTemplateId(NULL); - } else { - $this->setDbTemplateId($v->getDbId()); - } - - $this->aCcPlayoutHistoryTemplate = $v; - - // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcPlayoutHistoryTemplate object, it will not be re-added. - if ($v !== null) { - $v->addCcPlayoutHistoryTemplateField($this); - } - - return $this; - } - - - /** - * Get the associated CcPlayoutHistoryTemplate object - * - * @param PropelPDO Optional Connection object. - * @return CcPlayoutHistoryTemplate The associated CcPlayoutHistoryTemplate object. - * @throws PropelException - */ - public function getCcPlayoutHistoryTemplate(PropelPDO $con = null) - { - if ($this->aCcPlayoutHistoryTemplate === null && ($this->template_id !== null)) { - $this->aCcPlayoutHistoryTemplate = CcPlayoutHistoryTemplateQuery::create()->findPk($this->template_id, $con); - /* The following can be used additionally to - guarantee the related object contains a reference - to this object. This level of coupling may, however, be - undesirable since it could result in an only partially populated collection - in the referenced object. - $this->aCcPlayoutHistoryTemplate->addCcPlayoutHistoryTemplateFields($this); - */ - } - return $this->aCcPlayoutHistoryTemplate; - } - - /** - * Clears the current object and sets all attributes to their default values - */ - public function clear() - { - $this->id = null; - $this->template_id = null; - $this->name = null; - $this->label = null; - $this->type = null; - $this->is_file_md = null; - $this->position = null; - $this->alreadyInSave = false; - $this->alreadyInValidation = false; - $this->clearAllReferences(); - $this->applyDefaultValues(); - $this->resetModified(); - $this->setNew(true); - $this->setDeleted(false); - } - - /** - * Resets all collections of referencing foreign keys. - * - * This method is a user-space workaround for PHP's inability to garbage collect objects - * with circular references. This is currently necessary when using Propel in certain - * daemon or large-volumne/high-memory operations. - * - * @param boolean $deep Whether to also clear the references on all associated objects. - */ - public function clearAllReferences($deep = false) - { - if ($deep) { - } // if ($deep) - - $this->aCcPlayoutHistoryTemplate = null; - } - - /** - * Catches calls to virtual methods - */ - public function __call($name, $params) - { - if (preg_match('/get(\w+)/', $name, $matches)) { - $virtualColumn = $matches[1]; - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - // no lcfirst in php<5.3... - $virtualColumn[0] = strtolower($virtualColumn[0]); - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - } - throw new PropelException('Call to undefined method: ' . $name); - } - -} // BaseCcPlayoutHistoryTemplateField diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateFieldPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateFieldPeer.php deleted file mode 100644 index 91586fa1d..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateFieldPeer.php +++ /dev/null @@ -1,998 +0,0 @@ - array ('DbId', 'DbTemplateId', 'DbName', 'DbLabel', 'DbType', 'DbIsFileMD', 'DbPosition', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTemplateId', 'dbName', 'dbLabel', 'dbType', 'dbIsFileMD', 'dbPosition', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::TEMPLATE_ID, self::NAME, self::LABEL, self::TYPE, self::IS_FILE_MD, self::POSITION, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TEMPLATE_ID', 'NAME', 'LABEL', 'TYPE', 'IS_FILE_MD', 'POSITION', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'template_id', 'name', 'label', 'type', 'is_file_md', 'position', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTemplateId' => 1, 'DbName' => 2, 'DbLabel' => 3, 'DbType' => 4, 'DbIsFileMD' => 5, 'DbPosition' => 6, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTemplateId' => 1, 'dbName' => 2, 'dbLabel' => 3, 'dbType' => 4, 'dbIsFileMD' => 5, 'dbPosition' => 6, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TEMPLATE_ID => 1, self::NAME => 2, self::LABEL => 3, self::TYPE => 4, self::IS_FILE_MD => 5, self::POSITION => 6, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TEMPLATE_ID' => 1, 'NAME' => 2, 'LABEL' => 3, 'TYPE' => 4, 'IS_FILE_MD' => 5, 'POSITION' => 6, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'template_id' => 1, 'name' => 2, 'label' => 3, 'type' => 4, 'is_file_md' => 5, 'position' => 6, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, ) - ); - - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - * @throws PropelException - if the specified name could not be found in the fieldname mappings. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. CcPlayoutHistoryTemplateFieldPeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(CcPlayoutHistoryTemplateFieldPeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria, $alias = null) - { - if (null === $alias) { - $criteria->addSelectColumn(CcPlayoutHistoryTemplateFieldPeer::ID); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateFieldPeer::NAME); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateFieldPeer::LABEL); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateFieldPeer::TYPE); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateFieldPeer::IS_FILE_MD); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateFieldPeer::POSITION); - } else { - $criteria->addSelectColumn($alias . '.ID'); - $criteria->addSelectColumn($alias . '.TEMPLATE_ID'); - $criteria->addSelectColumn($alias . '.NAME'); - $criteria->addSelectColumn($alias . '.LABEL'); - $criteria->addSelectColumn($alias . '.TYPE'); - $criteria->addSelectColumn($alias . '.IS_FILE_MD'); - $criteria->addSelectColumn($alias . '.POSITION'); - } - } - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) - { - // we may modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateFieldPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryTemplateFieldPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - // BasePeer returns a PDOStatement - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param PropelPDO $con - * @return CcPlayoutHistoryTemplateField - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = CcPlayoutHistoryTemplateFieldPeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, PropelPDO $con = null) - { - return CcPlayoutHistoryTemplateFieldPeer::populateObjects(CcPlayoutHistoryTemplateFieldPeer::doSelectStmt($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. - * - * Use this method directly if you want to work with an executed statement durirectly (for example - * to perform your own object hydration). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con The connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return PDOStatement The executed PDOStatement object. - * @see BasePeer::doSelect() - */ - public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - if (!$criteria->hasSelectClause()) { - $criteria = clone $criteria; - CcPlayoutHistoryTemplateFieldPeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a PDOStatement - return BasePeer::doSelect($criteria, $con); - } - /** - * Adds an object to the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doSelect*() - * methods in your stub classes -- you may need to explicitly add objects - * to the cache in order to ensure that the same objects are always returned by doSelect*() - * and retrieveByPK*() calls. - * - * @param CcPlayoutHistoryTemplateField $value A CcPlayoutHistoryTemplateField object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). - */ - public static function addInstanceToPool(CcPlayoutHistoryTemplateField $obj, $key = null) - { - if (Propel::isInstancePoolingEnabled()) { - if ($key === null) { - $key = (string) $obj->getDbId(); - } // if key === null - self::$instances[$key] = $obj; - } - } - - /** - * Removes an object from the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doDelete - * methods in your stub classes -- you may need to explicitly remove objects - * from the cache in order to prevent returning objects that no longer exist. - * - * @param mixed $value A CcPlayoutHistoryTemplateField object or a primary key value. - */ - public static function removeInstanceFromPool($value) - { - if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof CcPlayoutHistoryTemplateField) { - $key = (string) $value->getDbId(); - } elseif (is_scalar($value)) { - // assume we've been passed a primary key - $key = (string) $value; - } else { - $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlayoutHistoryTemplateField object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); - throw $e; - } - - unset(self::$instances[$key]); - } - } // removeInstanceFromPool() - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param string $key The key (@see getPrimaryKeyHash()) for this instance. - * @return CcPlayoutHistoryTemplateField Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. - * @see getPrimaryKeyHash() - */ - public static function getInstanceFromPool($key) - { - if (Propel::isInstancePoolingEnabled()) { - if (isset(self::$instances[$key])) { - return self::$instances[$key]; - } - } - return null; // just to be explicit - } - - /** - * Clear the instance pool. - * - * @return void - */ - public static function clearInstancePool() - { - self::$instances = array(); - } - - /** - * Method to invalidate the instance pool of all tables related to cc_playout_history_template_field - * by a foreign key with ON DELETE CASCADE - */ - public static function clearRelatedInstancePool() - { - } - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return string A string version of PK or NULL if the components of primary key in result array are all null. - */ - public static function getPrimaryKeyHashFromRow($row, $startcol = 0) - { - // If the PK cannot be derived from the row, return NULL. - if ($row[$startcol] === null) { - return null; - } - return (string) $row[$startcol]; - } - - /** - * Retrieves the primary key from the DB resultset row - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, an array of the primary key columns will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return mixed The primary key of the row - */ - public static function getPrimaryKeyFromRow($row, $startcol = 0) - { - return (int) $row[$startcol]; - } - - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(PDOStatement $stmt) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = CcPlayoutHistoryTemplateFieldPeer::getOMClass(false); - // populate the object(s) - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = CcPlayoutHistoryTemplateFieldPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = CcPlayoutHistoryTemplateFieldPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, 0, true); // rehydrate - $results[] = $obj; - } else { - $obj = new $cls(); - $obj->hydrate($row); - $results[] = $obj; - CcPlayoutHistoryTemplateFieldPeer::addInstanceToPool($obj, $key); - } // if key exists - } - $stmt->closeCursor(); - return $results; - } - /** - * Populates an object of the default type or an object that inherit from the default. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CcPlayoutHistoryTemplateField object, last column rank) - */ - public static function populateObject($row, $startcol = 0) - { - $key = CcPlayoutHistoryTemplateFieldPeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = CcPlayoutHistoryTemplateFieldPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, $startcol, true); // rehydrate - $col = $startcol + CcPlayoutHistoryTemplateFieldPeer::NUM_COLUMNS; - } else { - $cls = CcPlayoutHistoryTemplateFieldPeer::OM_CLASS; - $obj = new $cls(); - $col = $obj->hydrate($row, $startcol); - CcPlayoutHistoryTemplateFieldPeer::addInstanceToPool($obj, $key); - } - return array($obj, $col); - } - - /** - * Returns the number of rows matching criteria, joining the related CcPlayoutHistoryTemplate table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinCcPlayoutHistoryTemplate(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateFieldPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryTemplateFieldPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Selects a collection of CcPlayoutHistoryTemplateField objects pre-filled with their CcPlayoutHistoryTemplate objects. - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistoryTemplateField objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinCcPlayoutHistoryTemplate(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryTemplateFieldPeer::addSelectColumns($criteria); - $startcol = (CcPlayoutHistoryTemplateFieldPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateFieldPeer::NUM_LAZY_LOAD_COLUMNS); - CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); - - $criteria->addJoin(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryTemplateFieldPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryTemplateFieldPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - - $cls = CcPlayoutHistoryTemplateFieldPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryTemplateFieldPeer::addInstanceToPool($obj1, $key1); - } // if $obj1 already loaded - - $key2 = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol); - if ($key2 !== null) { - $obj2 = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcPlayoutHistoryTemplatePeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol); - CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj2, $key2); - } // if obj2 already loaded - - // Add the $obj1 (CcPlayoutHistoryTemplateField) to $obj2 (CcPlayoutHistoryTemplate) - $obj2->addCcPlayoutHistoryTemplateField($obj1); - - } // if joined row was not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Returns the number of rows matching criteria, joining all related tables - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateFieldPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryTemplateFieldPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - /** - * Selects a collection of CcPlayoutHistoryTemplateField objects pre-filled with all related objects. - * - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistoryTemplateField objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryTemplateFieldPeer::addSelectColumns($criteria); - $startcol2 = (CcPlayoutHistoryTemplateFieldPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateFieldPeer::NUM_LAZY_LOAD_COLUMNS); - - CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcPlayoutHistoryTemplatePeer::NUM_COLUMNS - CcPlayoutHistoryTemplatePeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryTemplateFieldPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryTemplateFieldPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - $cls = CcPlayoutHistoryTemplateFieldPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryTemplateFieldPeer::addInstanceToPool($obj1, $key1); - } // if obj1 already loaded - - // Add objects for joined CcPlayoutHistoryTemplate rows - - $key2 = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcPlayoutHistoryTemplatePeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj2, $key2); - } // if obj2 loaded - - // Add the $obj1 (CcPlayoutHistoryTemplateField) to the collection in $obj2 (CcPlayoutHistoryTemplate) - $obj2->addCcPlayoutHistoryTemplateField($obj1); - } // if joined row not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * Add a TableMap instance to the database for this peer class. - */ - public static function buildTableMap() - { - $dbMap = Propel::getDatabaseMap(BaseCcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME); - if (!$dbMap->hasTable(BaseCcPlayoutHistoryTemplateFieldPeer::TABLE_NAME)) - { - $dbMap->addTableObject(new CcPlayoutHistoryTemplateFieldTableMap()); - } - } - - /** - * The class that the Peer will make instances of. - * - * If $withPrefix is true, the returned path - * uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName - */ - public static function getOMClass($withPrefix = true) - { - return $withPrefix ? CcPlayoutHistoryTemplateFieldPeer::CLASS_DEFAULT : CcPlayoutHistoryTemplateFieldPeer::OM_CLASS; - } - - /** - * Method perform an INSERT on the database, given a CcPlayoutHistoryTemplateField or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistoryTemplateField object containing data that is used to create the INSERT statement. - * @param PropelPDO $con the PropelPDO connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from CcPlayoutHistoryTemplateField object - } - - if ($criteria->containsKey(CcPlayoutHistoryTemplateFieldPeer::ID) && $criteria->keyContainsValue(CcPlayoutHistoryTemplateFieldPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplateFieldPeer::ID.')'); - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->beginTransaction(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch(PropelException $e) { - $con->rollBack(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a CcPlayoutHistoryTemplateField or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistoryTemplateField object containing data that is used to create the UPDATE statement. - * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(CcPlayoutHistoryTemplateFieldPeer::ID); - $value = $criteria->remove(CcPlayoutHistoryTemplateFieldPeer::ID); - if ($value) { - $selectCriteria->add(CcPlayoutHistoryTemplateFieldPeer::ID, $value, $comparison); - } else { - $selectCriteria->setPrimaryTableName(CcPlayoutHistoryTemplateFieldPeer::TABLE_NAME); - } - - } else { // $values is CcPlayoutHistoryTemplateField object - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the cc_playout_history_template_field table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - $affectedRows += BasePeer::doDeleteAll(CcPlayoutHistoryTemplateFieldPeer::TABLE_NAME, $con, CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME); - // Because this db requires some delete cascade/set null emulation, we have to - // clear the cached instance *after* the emulation has happened (since - // instances get re-added by the select statement contained therein). - CcPlayoutHistoryTemplateFieldPeer::clearInstancePool(); - CcPlayoutHistoryTemplateFieldPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a CcPlayoutHistoryTemplateField or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or CcPlayoutHistoryTemplateField object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param PropelPDO $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - // invalidate the cache for all objects of this type, since we have no - // way of knowing (without running a query) what objects should be invalidated - // from the cache based on this Criteria. - CcPlayoutHistoryTemplateFieldPeer::clearInstancePool(); - // rename for clarity - $criteria = clone $values; - } elseif ($values instanceof CcPlayoutHistoryTemplateField) { // it's a model object - // invalidate the cache for this single object - CcPlayoutHistoryTemplateFieldPeer::removeInstanceFromPool($values); - // create criteria based on pk values - $criteria = $values->buildPkeyCriteria(); - } else { // it's a primary key, or an array of pks - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplateFieldPeer::ID, (array) $values, Criteria::IN); - // invalidate the cache for this object(s) - foreach ((array) $values as $singleval) { - CcPlayoutHistoryTemplateFieldPeer::removeInstanceFromPool($singleval); - } - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - CcPlayoutHistoryTemplateFieldPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Validates all modified columns of given CcPlayoutHistoryTemplateField object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param CcPlayoutHistoryTemplateField $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(CcPlayoutHistoryTemplateField $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(CcPlayoutHistoryTemplateFieldPeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, CcPlayoutHistoryTemplateFieldPeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param int $pk the primary key. - * @param PropelPDO $con the connection to use - * @return CcPlayoutHistoryTemplateField - */ - public static function retrieveByPK($pk, PropelPDO $con = null) - { - - if (null !== ($obj = CcPlayoutHistoryTemplateFieldPeer::getInstanceFromPool((string) $pk))) { - return $obj; - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria = new Criteria(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplateFieldPeer::ID, $pk); - - $v = CcPlayoutHistoryTemplateFieldPeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param PropelPDO $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(CcPlayoutHistoryTemplateFieldPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplateFieldPeer::ID, $pks, Criteria::IN); - $objs = CcPlayoutHistoryTemplateFieldPeer::doSelect($criteria, $con); - } - return $objs; - } - -} // BaseCcPlayoutHistoryTemplateFieldPeer - -// This is the static code needed to register the TableMap for this table with the main Propel class. -// -BaseCcPlayoutHistoryTemplateFieldPeer::buildTableMap(); - diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateFieldQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateFieldQuery.php deleted file mode 100644 index 2bccd58ca..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateFieldQuery.php +++ /dev/null @@ -1,402 +0,0 @@ -setModelAlias($modelAlias); - } - if ($criteria instanceof Criteria) { - $query->mergeWith($criteria); - } - return $query; - } - - /** - * Find object by primary key - * Use instance pooling to avoid a database query if the object exists - * - * $obj = $c->findPk(12, $con); - * - * @param mixed $key Primary key to use for the query - * @param PropelPDO $con an optional connection object - * - * @return CcPlayoutHistoryTemplateField|array|mixed the result, formatted by the current formatter - */ - public function findPk($key, $con = null) - { - if ((null !== ($obj = CcPlayoutHistoryTemplateFieldPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { - // the object is alredy in the instance pool - return $obj; - } else { - // the object has not been requested yet, or the formatter is not an object formatter - $criteria = $this->isKeepQuery() ? clone $this : $this; - $stmt = $criteria - ->filterByPrimaryKey($key) - ->getSelectStatement($con); - return $criteria->getFormatter()->init($criteria)->formatOne($stmt); - } - } - - /** - * Find objects by primary key - * - * $objs = $c->findPks(array(12, 56, 832), $con); - * - * @param array $keys Primary keys to use for the query - * @param PropelPDO $con an optional connection object - * - * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter - */ - public function findPks($keys, $con = null) - { - $criteria = $this->isKeepQuery() ? clone $this : $this; - return $this - ->filterByPrimaryKeys($keys) - ->find($con); - } - - /** - * Filter the query by primary key - * - * @param mixed $key Primary key to use for the query - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByPrimaryKey($key) - { - return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $key, Criteria::EQUAL); - } - - /** - * Filter the query by a list of primary keys - * - * @param array $keys The list of primary key to use for the query - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByPrimaryKeys($keys) - { - return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $keys, Criteria::IN); - } - - /** - * Filter the query on the id column - * - * @param int|array $dbId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByDbId($dbId = null, $comparison = null) - { - if (is_array($dbId) && null === $comparison) { - $comparison = Criteria::IN; - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $dbId, $comparison); - } - - /** - * Filter the query on the template_id column - * - * @param int|array $dbTemplateId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByDbTemplateId($dbTemplateId = null, $comparison = null) - { - if (is_array($dbTemplateId)) { - $useMinMax = false; - if (isset($dbTemplateId['min'])) { - $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbTemplateId['max'])) { - $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId, $comparison); - } - - /** - * Filter the query on the name column - * - * @param string $dbName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByDbName($dbName = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbName)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbName)) { - $dbName = str_replace('*', '%', $dbName); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::NAME, $dbName, $comparison); - } - - /** - * Filter the query on the label column - * - * @param string $dbLabel The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByDbLabel($dbLabel = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbLabel)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbLabel)) { - $dbLabel = str_replace('*', '%', $dbLabel); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::LABEL, $dbLabel, $comparison); - } - - /** - * Filter the query on the type column - * - * @param string $dbType The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByDbType($dbType = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbType)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbType)) { - $dbType = str_replace('*', '%', $dbType); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TYPE, $dbType, $comparison); - } - - /** - * Filter the query on the is_file_md column - * - * @param boolean|string $dbIsFileMD 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByDbIsFileMD($dbIsFileMD = null, $comparison = null) - { - if (is_string($dbIsFileMD)) { - $is_file_md = in_array(strtolower($dbIsFileMD), array('false', 'off', '-', 'no', 'n', '0')) ? false : true; - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::IS_FILE_MD, $dbIsFileMD, $comparison); - } - - /** - * Filter the query on the position column - * - * @param int|array $dbPosition The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByDbPosition($dbPosition = null, $comparison = null) - { - if (is_array($dbPosition)) { - $useMinMax = false; - if (isset($dbPosition['min'])) { - $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbPosition['max'])) { - $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition, $comparison); - } - - /** - * Filter the query by a related CcPlayoutHistoryTemplate object - * - * @param CcPlayoutHistoryTemplate $ccPlayoutHistoryTemplate the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function filterByCcPlayoutHistoryTemplate($ccPlayoutHistoryTemplate, $comparison = null) - { - return $this - ->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $ccPlayoutHistoryTemplate->getDbId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcPlayoutHistoryTemplate relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function joinCcPlayoutHistoryTemplate($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplate'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcPlayoutHistoryTemplate'); - } - - return $this; - } - - /** - * Use the CcPlayoutHistoryTemplate relation CcPlayoutHistoryTemplate object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryTemplateQuery A secondary query class using the current class as primary query - */ - public function useCcPlayoutHistoryTemplateQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcPlayoutHistoryTemplate($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplateQuery'); - } - - /** - * Exclude object from result - * - * @param CcPlayoutHistoryTemplateField $ccPlayoutHistoryTemplateField Object to remove from the list of results - * - * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface - */ - public function prune($ccPlayoutHistoryTemplateField = null) - { - if ($ccPlayoutHistoryTemplateField) { - $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $ccPlayoutHistoryTemplateField->getDbId(), Criteria::NOT_EQUAL); - } - - return $this; - } - -} // BaseCcPlayoutHistoryTemplateFieldQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplatePeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplatePeer.php deleted file mode 100644 index 9e1d216f1..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplatePeer.php +++ /dev/null @@ -1,747 +0,0 @@ - array ('DbId', 'DbName', 'DbType', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbType', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::TYPE, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'TYPE', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'type', ), - BasePeer::TYPE_NUM => array (0, 1, 2, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbType' => 2, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbType' => 2, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::TYPE => 2, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'TYPE' => 2, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'type' => 2, ), - BasePeer::TYPE_NUM => array (0, 1, 2, ) - ); - - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - * @throws PropelException - if the specified name could not be found in the fieldname mappings. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. CcPlayoutHistoryTemplatePeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(CcPlayoutHistoryTemplatePeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria, $alias = null) - { - if (null === $alias) { - $criteria->addSelectColumn(CcPlayoutHistoryTemplatePeer::ID); - $criteria->addSelectColumn(CcPlayoutHistoryTemplatePeer::NAME); - $criteria->addSelectColumn(CcPlayoutHistoryTemplatePeer::TYPE); - } else { - $criteria->addSelectColumn($alias . '.ID'); - $criteria->addSelectColumn($alias . '.NAME'); - $criteria->addSelectColumn($alias . '.TYPE'); - } - } - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) - { - // we may modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryTemplatePeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - // BasePeer returns a PDOStatement - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param PropelPDO $con - * @return CcPlayoutHistoryTemplate - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = CcPlayoutHistoryTemplatePeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, PropelPDO $con = null) - { - return CcPlayoutHistoryTemplatePeer::populateObjects(CcPlayoutHistoryTemplatePeer::doSelectStmt($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. - * - * Use this method directly if you want to work with an executed statement durirectly (for example - * to perform your own object hydration). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con The connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return PDOStatement The executed PDOStatement object. - * @see BasePeer::doSelect() - */ - public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - if (!$criteria->hasSelectClause()) { - $criteria = clone $criteria; - CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a PDOStatement - return BasePeer::doSelect($criteria, $con); - } - /** - * Adds an object to the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doSelect*() - * methods in your stub classes -- you may need to explicitly add objects - * to the cache in order to ensure that the same objects are always returned by doSelect*() - * and retrieveByPK*() calls. - * - * @param CcPlayoutHistoryTemplate $value A CcPlayoutHistoryTemplate object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). - */ - public static function addInstanceToPool(CcPlayoutHistoryTemplate $obj, $key = null) - { - if (Propel::isInstancePoolingEnabled()) { - if ($key === null) { - $key = (string) $obj->getDbId(); - } // if key === null - self::$instances[$key] = $obj; - } - } - - /** - * Removes an object from the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doDelete - * methods in your stub classes -- you may need to explicitly remove objects - * from the cache in order to prevent returning objects that no longer exist. - * - * @param mixed $value A CcPlayoutHistoryTemplate object or a primary key value. - */ - public static function removeInstanceFromPool($value) - { - if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof CcPlayoutHistoryTemplate) { - $key = (string) $value->getDbId(); - } elseif (is_scalar($value)) { - // assume we've been passed a primary key - $key = (string) $value; - } else { - $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlayoutHistoryTemplate object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); - throw $e; - } - - unset(self::$instances[$key]); - } - } // removeInstanceFromPool() - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param string $key The key (@see getPrimaryKeyHash()) for this instance. - * @return CcPlayoutHistoryTemplate Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. - * @see getPrimaryKeyHash() - */ - public static function getInstanceFromPool($key) - { - if (Propel::isInstancePoolingEnabled()) { - if (isset(self::$instances[$key])) { - return self::$instances[$key]; - } - } - return null; // just to be explicit - } - - /** - * Clear the instance pool. - * - * @return void - */ - public static function clearInstancePool() - { - self::$instances = array(); - } - - /** - * Method to invalidate the instance pool of all tables related to cc_playout_history_template - * by a foreign key with ON DELETE CASCADE - */ - public static function clearRelatedInstancePool() - { - // Invalidate objects in CcPlayoutHistoryTemplateFieldPeer instance pool, - // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - CcPlayoutHistoryTemplateFieldPeer::clearInstancePool(); - } - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return string A string version of PK or NULL if the components of primary key in result array are all null. - */ - public static function getPrimaryKeyHashFromRow($row, $startcol = 0) - { - // If the PK cannot be derived from the row, return NULL. - if ($row[$startcol] === null) { - return null; - } - return (string) $row[$startcol]; - } - - /** - * Retrieves the primary key from the DB resultset row - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, an array of the primary key columns will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return mixed The primary key of the row - */ - public static function getPrimaryKeyFromRow($row, $startcol = 0) - { - return (int) $row[$startcol]; - } - - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(PDOStatement $stmt) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = CcPlayoutHistoryTemplatePeer::getOMClass(false); - // populate the object(s) - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, 0, true); // rehydrate - $results[] = $obj; - } else { - $obj = new $cls(); - $obj->hydrate($row); - $results[] = $obj; - CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj, $key); - } // if key exists - } - $stmt->closeCursor(); - return $results; - } - /** - * Populates an object of the default type or an object that inherit from the default. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CcPlayoutHistoryTemplate object, last column rank) - */ - public static function populateObject($row, $startcol = 0) - { - $key = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, $startcol, true); // rehydrate - $col = $startcol + CcPlayoutHistoryTemplatePeer::NUM_COLUMNS; - } else { - $cls = CcPlayoutHistoryTemplatePeer::OM_CLASS; - $obj = new $cls(); - $col = $obj->hydrate($row, $startcol); - CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj, $key); - } - return array($obj, $col); - } - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * Add a TableMap instance to the database for this peer class. - */ - public static function buildTableMap() - { - $dbMap = Propel::getDatabaseMap(BaseCcPlayoutHistoryTemplatePeer::DATABASE_NAME); - if (!$dbMap->hasTable(BaseCcPlayoutHistoryTemplatePeer::TABLE_NAME)) - { - $dbMap->addTableObject(new CcPlayoutHistoryTemplateTableMap()); - } - } - - /** - * The class that the Peer will make instances of. - * - * If $withPrefix is true, the returned path - * uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName - */ - public static function getOMClass($withPrefix = true) - { - return $withPrefix ? CcPlayoutHistoryTemplatePeer::CLASS_DEFAULT : CcPlayoutHistoryTemplatePeer::OM_CLASS; - } - - /** - * Method perform an INSERT on the database, given a CcPlayoutHistoryTemplate or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistoryTemplate object containing data that is used to create the INSERT statement. - * @param PropelPDO $con the PropelPDO connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from CcPlayoutHistoryTemplate object - } - - if ($criteria->containsKey(CcPlayoutHistoryTemplatePeer::ID) && $criteria->keyContainsValue(CcPlayoutHistoryTemplatePeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplatePeer::ID.')'); - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->beginTransaction(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch(PropelException $e) { - $con->rollBack(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a CcPlayoutHistoryTemplate or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistoryTemplate object containing data that is used to create the UPDATE statement. - * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(CcPlayoutHistoryTemplatePeer::ID); - $value = $criteria->remove(CcPlayoutHistoryTemplatePeer::ID); - if ($value) { - $selectCriteria->add(CcPlayoutHistoryTemplatePeer::ID, $value, $comparison); - } else { - $selectCriteria->setPrimaryTableName(CcPlayoutHistoryTemplatePeer::TABLE_NAME); - } - - } else { // $values is CcPlayoutHistoryTemplate object - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the cc_playout_history_template table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - $affectedRows += BasePeer::doDeleteAll(CcPlayoutHistoryTemplatePeer::TABLE_NAME, $con, CcPlayoutHistoryTemplatePeer::DATABASE_NAME); - // Because this db requires some delete cascade/set null emulation, we have to - // clear the cached instance *after* the emulation has happened (since - // instances get re-added by the select statement contained therein). - CcPlayoutHistoryTemplatePeer::clearInstancePool(); - CcPlayoutHistoryTemplatePeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a CcPlayoutHistoryTemplate or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or CcPlayoutHistoryTemplate object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param PropelPDO $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - // invalidate the cache for all objects of this type, since we have no - // way of knowing (without running a query) what objects should be invalidated - // from the cache based on this Criteria. - CcPlayoutHistoryTemplatePeer::clearInstancePool(); - // rename for clarity - $criteria = clone $values; - } elseif ($values instanceof CcPlayoutHistoryTemplate) { // it's a model object - // invalidate the cache for this single object - CcPlayoutHistoryTemplatePeer::removeInstanceFromPool($values); - // create criteria based on pk values - $criteria = $values->buildPkeyCriteria(); - } else { // it's a primary key, or an array of pks - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplatePeer::ID, (array) $values, Criteria::IN); - // invalidate the cache for this object(s) - foreach ((array) $values as $singleval) { - CcPlayoutHistoryTemplatePeer::removeInstanceFromPool($singleval); - } - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - CcPlayoutHistoryTemplatePeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Validates all modified columns of given CcPlayoutHistoryTemplate object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param CcPlayoutHistoryTemplate $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(CcPlayoutHistoryTemplate $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(CcPlayoutHistoryTemplatePeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, CcPlayoutHistoryTemplatePeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param int $pk the primary key. - * @param PropelPDO $con the connection to use - * @return CcPlayoutHistoryTemplate - */ - public static function retrieveByPK($pk, PropelPDO $con = null) - { - - if (null !== ($obj = CcPlayoutHistoryTemplatePeer::getInstanceFromPool((string) $pk))) { - return $obj; - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria = new Criteria(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplatePeer::ID, $pk); - - $v = CcPlayoutHistoryTemplatePeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param PropelPDO $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(CcPlayoutHistoryTemplatePeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplatePeer::ID, $pks, Criteria::IN); - $objs = CcPlayoutHistoryTemplatePeer::doSelect($criteria, $con); - } - return $objs; - } - -} // BaseCcPlayoutHistoryTemplatePeer - -// This is the static code needed to register the TableMap for this table with the main Propel class. -// -BaseCcPlayoutHistoryTemplatePeer::buildTableMap(); - diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateQuery.php deleted file mode 100644 index ca2f84229..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateQuery.php +++ /dev/null @@ -1,285 +0,0 @@ -setModelAlias($modelAlias); - } - if ($criteria instanceof Criteria) { - $query->mergeWith($criteria); - } - return $query; - } - - /** - * Find object by primary key - * Use instance pooling to avoid a database query if the object exists - * - * $obj = $c->findPk(12, $con); - * - * @param mixed $key Primary key to use for the query - * @param PropelPDO $con an optional connection object - * - * @return CcPlayoutHistoryTemplate|array|mixed the result, formatted by the current formatter - */ - public function findPk($key, $con = null) - { - if ((null !== ($obj = CcPlayoutHistoryTemplatePeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { - // the object is alredy in the instance pool - return $obj; - } else { - // the object has not been requested yet, or the formatter is not an object formatter - $criteria = $this->isKeepQuery() ? clone $this : $this; - $stmt = $criteria - ->filterByPrimaryKey($key) - ->getSelectStatement($con); - return $criteria->getFormatter()->init($criteria)->formatOne($stmt); - } - } - - /** - * Find objects by primary key - * - * $objs = $c->findPks(array(12, 56, 832), $con); - * - * @param array $keys Primary keys to use for the query - * @param PropelPDO $con an optional connection object - * - * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter - */ - public function findPks($keys, $con = null) - { - $criteria = $this->isKeepQuery() ? clone $this : $this; - return $this - ->filterByPrimaryKeys($keys) - ->find($con); - } - - /** - * Filter the query by primary key - * - * @param mixed $key Primary key to use for the query - * - * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface - */ - public function filterByPrimaryKey($key) - { - return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $key, Criteria::EQUAL); - } - - /** - * Filter the query by a list of primary keys - * - * @param array $keys The list of primary key to use for the query - * - * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface - */ - public function filterByPrimaryKeys($keys) - { - return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $keys, Criteria::IN); - } - - /** - * Filter the query on the id column - * - * @param int|array $dbId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface - */ - public function filterByDbId($dbId = null, $comparison = null) - { - if (is_array($dbId) && null === $comparison) { - $comparison = Criteria::IN; - } - return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $dbId, $comparison); - } - - /** - * Filter the query on the name column - * - * @param string $dbName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface - */ - public function filterByDbName($dbName = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbName)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbName)) { - $dbName = str_replace('*', '%', $dbName); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::NAME, $dbName, $comparison); - } - - /** - * Filter the query on the type column - * - * @param string $dbType The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface - */ - public function filterByDbType($dbType = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbType)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbType)) { - $dbType = str_replace('*', '%', $dbType); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::TYPE, $dbType, $comparison); - } - - /** - * Filter the query by a related CcPlayoutHistoryTemplateField object - * - * @param CcPlayoutHistoryTemplateField $ccPlayoutHistoryTemplateField the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface - */ - public function filterByCcPlayoutHistoryTemplateField($ccPlayoutHistoryTemplateField, $comparison = null) - { - return $this - ->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $ccPlayoutHistoryTemplateField->getDbTemplateId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcPlayoutHistoryTemplateField relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface - */ - public function joinCcPlayoutHistoryTemplateField($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplateField'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcPlayoutHistoryTemplateField'); - } - - return $this; - } - - /** - * Use the CcPlayoutHistoryTemplateField relation CcPlayoutHistoryTemplateField object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryTemplateFieldQuery A secondary query class using the current class as primary query - */ - public function useCcPlayoutHistoryTemplateFieldQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcPlayoutHistoryTemplateField($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplateField', 'CcPlayoutHistoryTemplateFieldQuery'); - } - - /** - * Exclude object from result - * - * @param CcPlayoutHistoryTemplate $ccPlayoutHistoryTemplate Object to remove from the list of results - * - * @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface - */ - public function prune($ccPlayoutHistoryTemplate = null) - { - if ($ccPlayoutHistoryTemplate) { - $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $ccPlayoutHistoryTemplate->getDbId(), Criteria::NOT_EQUAL); - } - - return $this; - } - -} // BaseCcPlayoutHistoryTemplateQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php deleted file mode 100644 index bd2530992..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTag.php +++ /dev/null @@ -1,1028 +0,0 @@ -is_file_md = false; - } - - /** - * Initializes internal state of BaseCcPlayoutHistoryTemplateTag object. - * @see applyDefaults() - */ - public function __construct() - { - parent::__construct(); - $this->applyDefaultValues(); - } - - /** - * Get the [id] column value. - * - * @return int - */ - public function getDbId() - { - return $this->id; - } - - /** - * Get the [template_id] column value. - * - * @return int - */ - public function getDbTemplateId() - { - return $this->template_id; - } - - /** - * Get the [name] column value. - * - * @return string - */ - public function getDbName() - { - return $this->name; - } - - /** - * Get the [type] column value. - * - * @return string - */ - public function getDbType() - { - return $this->type; - } - - /** - * Get the [is_file_md] column value. - * - * @return boolean - */ - public function getDbIsFileMD() - { - return $this->is_file_md; - } - - /** - * Get the [position] column value. - * - * @return int - */ - public function getDbTagPosition() - { - return $this->position; - } - - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) - */ - public function setDbId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::ID; - } - - return $this; - } // setDbId() - - /** - * Set the value of [template_id] column. - * - * @param int $v new value - * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) - */ - public function setDbTemplateId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->template_id !== $v) { - $this->template_id = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID; - } - - if ($this->aCcPlayoutHistoryTemplate !== null && $this->aCcPlayoutHistoryTemplate->getDbId() !== $v) { - $this->aCcPlayoutHistoryTemplate = null; - } - - return $this; - } // setDbTemplateId() - - /** - * Set the value of [name] column. - * - * @param string $v new value - * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) - */ - public function setDbName($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->name !== $v) { - $this->name = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::NAME; - } - - return $this; - } // setDbName() - - /** - * Set the value of [type] column. - * - * @param string $v new value - * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) - */ - public function setDbType($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->type !== $v) { - $this->type = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::TYPE; - } - - return $this; - } // setDbType() - - /** - * Set the value of [is_file_md] column. - * - * @param boolean $v new value - * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) - */ - public function setDbIsFileMD($v) - { - if ($v !== null) { - $v = (boolean) $v; - } - - if ($this->is_file_md !== $v || $this->isNew()) { - $this->is_file_md = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD; - } - - return $this; - } // setDbIsFileMD() - - /** - * Set the value of [position] column. - * - * @param int $v new value - * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) - */ - public function setDbTagPosition($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->position !== $v) { - $this->position = $v; - $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::POSITION; - } - - return $this; - } // setDbTagPosition() - - /** - * Indicates whether the columns in this object are only set to default values. - * - * This method can be used in conjunction with isModified() to indicate whether an object is both - * modified _and_ has some values set which are non-default. - * - * @return boolean Whether the columns in this object are only been set with default values. - */ - public function hasOnlyDefaultValues() - { - if ($this->is_file_md !== false) { - return false; - } - - // otherwise, everything was equal, so return TRUE - return true; - } // hasOnlyDefaultValues() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (0-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) - * @param int $startcol 0-based offset column which indicates which restultset column to start with. - * @param boolean $rehydrate Whether this object is being re-hydrated from the database. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate($row, $startcol = 0, $rehydrate = false) - { - try { - - $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; - $this->template_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; - $this->name = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; - $this->type = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; - $this->is_file_md = ($row[$startcol + 4] !== null) ? (boolean) $row[$startcol + 4] : null; - $this->position = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null; - $this->resetModified(); - - $this->setNew(false); - - if ($rehydrate) { - $this->ensureConsistency(); - } - - return $startcol + 6; // 6 = CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating CcPlayoutHistoryTemplateTag object", $e); - } - } - - /** - * Checks and repairs the internal consistency of the object. - * - * This method is executed after an already-instantiated object is re-hydrated - * from the database. It exists to check any foreign keys to make sure that - * the objects related to the current object are correct based on foreign key. - * - * You can override this method in the stub class, but you should always invoke - * the base method from the overridden method (i.e. parent::ensureConsistency()), - * in case your model changes. - * - * @throws PropelException - */ - public function ensureConsistency() - { - - if ($this->aCcPlayoutHistoryTemplate !== null && $this->template_id !== $this->aCcPlayoutHistoryTemplate->getDbId()) { - $this->aCcPlayoutHistoryTemplate = null; - } - } // ensureConsistency - - /** - * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. - * - * This will only work if the object has been saved and has a valid primary key set. - * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param PropelPDO $con (optional) The PropelPDO connection to use. - * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db - */ - public function reload($deep = false, PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("Cannot reload a deleted object."); - } - - if ($this->isNew()) { - throw new PropelException("Cannot reload an unsaved object."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - // We don't need to alter the object instance pool; we're just modifying this instance - // already in the pool. - - $stmt = CcPlayoutHistoryTemplateTagPeer::doSelectStmt($this->buildPkeyCriteria(), $con); - $row = $stmt->fetch(PDO::FETCH_NUM); - $stmt->closeCursor(); - if (!$row) { - throw new PropelException('Cannot find matching row in the database to reload object values.'); - } - $this->hydrate($row, 0, true); // rehydrate - - if ($deep) { // also de-associate any related objects? - - $this->aCcPlayoutHistoryTemplate = null; - } // if (deep) - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param PropelPDO $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - try { - $ret = $this->preDelete($con); - if ($ret) { - CcPlayoutHistoryTemplateTagQuery::create() - ->filterByPrimaryKey($this->getPrimaryKey()) - ->delete($con); - $this->postDelete($con); - $con->commit(); - $this->setDeleted(true); - } else { - $con->commit(); - } - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Persists this object to the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All modified related objects will also be persisted in the doSave() - * method. This method wraps all precipitate database operations in a - * single transaction. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see doSave() - */ - public function save(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - $isInsert = $this->isNew(); - try { - $ret = $this->preSave($con); - if ($isInsert) { - $ret = $ret && $this->preInsert($con); - } else { - $ret = $ret && $this->preUpdate($con); - } - if ($ret) { - $affectedRows = $this->doSave($con); - if ($isInsert) { - $this->postInsert($con); - } else { - $this->postUpdate($con); - } - $this->postSave($con); - CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($this); - } else { - $affectedRows = 0; - } - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Performs the work of inserting or updating the row in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see save() - */ - protected function doSave(PropelPDO $con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - // We call the save method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcPlayoutHistoryTemplate !== null) { - if ($this->aCcPlayoutHistoryTemplate->isModified() || $this->aCcPlayoutHistoryTemplate->isNew()) { - $affectedRows += $this->aCcPlayoutHistoryTemplate->save($con); - } - $this->setCcPlayoutHistoryTemplate($this->aCcPlayoutHistoryTemplate); - } - - if ($this->isNew() ) { - $this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::ID; - } - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $criteria = $this->buildCriteria(); - if ($criteria->keyContainsValue(CcPlayoutHistoryTemplateTagPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplateTagPeer::ID.')'); - } - - $pk = BasePeer::doInsert($criteria, $con); - $affectedRows += 1; - $this->setDbId($pk); //[IMV] update autoincrement primary key - $this->setNew(false); - } else { - $affectedRows += CcPlayoutHistoryTemplateTagPeer::doUpdate($this, $con); - } - - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - $this->alreadyInSave = false; - - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - // We call the validate method on the following object(s) if they - // were passed to this object by their coresponding set - // method. This object relates to these object(s) by a - // foreign key reference. - - if ($this->aCcPlayoutHistoryTemplate !== null) { - if (!$this->aCcPlayoutHistoryTemplate->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcPlayoutHistoryTemplate->getValidationFailures()); - } - } - - - if (($retval = CcPlayoutHistoryTemplateTagPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryTemplateTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - $field = $this->getByPosition($pos); - return $field; - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getDbId(); - break; - case 1: - return $this->getDbTemplateId(); - break; - case 2: - return $this->getDbName(); - break; - case 3: - return $this->getDbType(); - break; - case 4: - return $this->getDbIsFileMD(); - break; - case 5: - return $this->getDbTagPosition(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * Defaults to BasePeer::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. - * - * @return array an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false) - { - $keys = CcPlayoutHistoryTemplateTagPeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getDbId(), - $keys[1] => $this->getDbTemplateId(), - $keys[2] => $this->getDbName(), - $keys[3] => $this->getDbType(), - $keys[4] => $this->getDbIsFileMD(), - $keys[5] => $this->getDbTagPosition(), - ); - if ($includeForeignObjects) { - if (null !== $this->aCcPlayoutHistoryTemplate) { - $result['CcPlayoutHistoryTemplate'] = $this->aCcPlayoutHistoryTemplate->toArray($keyType, $includeLazyLoadColumns, true); - } - } - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcPlayoutHistoryTemplateTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setDbId($value); - break; - case 1: - $this->setDbTemplateId($value); - break; - case 2: - $this->setDbName($value); - break; - case 3: - $this->setDbType($value); - break; - case 4: - $this->setDbIsFileMD($value); - break; - case 5: - $this->setDbTagPosition($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * The default key type is the column's phpname (e.g. 'AuthorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = CcPlayoutHistoryTemplateTagPeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setDbTemplateId($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setDbName($arr[$keys[2]]); - if (array_key_exists($keys[3], $arr)) $this->setDbType($arr[$keys[3]]); - if (array_key_exists($keys[4], $arr)) $this->setDbIsFileMD($arr[$keys[4]]); - if (array_key_exists($keys[5], $arr)) $this->setDbTagPosition($arr[$keys[5]]); - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); - - if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $this->id); - if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $this->template_id); - if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::NAME)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::NAME, $this->name); - if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::TYPE)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::TYPE, $this->type); - if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD, $this->is_file_md); - if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::POSITION)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::POSITION, $this->position); - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $this->id); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return int - */ - public function getPrimaryKey() - { - return $this->getDbId(); - } - - /** - * Generic method to set the primary key (id column). - * - * @param int $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setDbId($key); - } - - /** - * Returns true if the primary key for this object is null. - * @return boolean - */ - public function isPrimaryKeyNull() - { - return null === $this->getDbId(); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of CcPlayoutHistoryTemplateTag (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - $copyObj->setDbTemplateId($this->template_id); - $copyObj->setDbName($this->name); - $copyObj->setDbType($this->type); - $copyObj->setDbIsFileMD($this->is_file_md); - $copyObj->setDbTagPosition($this->position); - - $copyObj->setNew(true); - $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return CcPlayoutHistoryTemplateTag Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return CcPlayoutHistoryTemplateTagPeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new CcPlayoutHistoryTemplateTagPeer(); - } - return self::$peer; - } - - /** - * Declares an association between this object and a CcPlayoutHistoryTemplate object. - * - * @param CcPlayoutHistoryTemplate $v - * @return CcPlayoutHistoryTemplateTag The current object (for fluent API support) - * @throws PropelException - */ - public function setCcPlayoutHistoryTemplate(CcPlayoutHistoryTemplate $v = null) - { - if ($v === null) { - $this->setDbTemplateId(NULL); - } else { - $this->setDbTemplateId($v->getDbId()); - } - - $this->aCcPlayoutHistoryTemplate = $v; - - // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcPlayoutHistoryTemplate object, it will not be re-added. - if ($v !== null) { - $v->addCcPlayoutHistoryTemplateTag($this); - } - - return $this; - } - - - /** - * Get the associated CcPlayoutHistoryTemplate object - * - * @param PropelPDO Optional Connection object. - * @return CcPlayoutHistoryTemplate The associated CcPlayoutHistoryTemplate object. - * @throws PropelException - */ - public function getCcPlayoutHistoryTemplate(PropelPDO $con = null) - { - if ($this->aCcPlayoutHistoryTemplate === null && ($this->template_id !== null)) { - $this->aCcPlayoutHistoryTemplate = CcPlayoutHistoryTemplateQuery::create()->findPk($this->template_id, $con); - /* The following can be used additionally to - guarantee the related object contains a reference - to this object. This level of coupling may, however, be - undesirable since it could result in an only partially populated collection - in the referenced object. - $this->aCcPlayoutHistoryTemplate->addCcPlayoutHistoryTemplateTags($this); - */ - } - return $this->aCcPlayoutHistoryTemplate; - } - - /** - * Clears the current object and sets all attributes to their default values - */ - public function clear() - { - $this->id = null; - $this->template_id = null; - $this->name = null; - $this->type = null; - $this->is_file_md = null; - $this->position = null; - $this->alreadyInSave = false; - $this->alreadyInValidation = false; - $this->clearAllReferences(); - $this->applyDefaultValues(); - $this->resetModified(); - $this->setNew(true); - $this->setDeleted(false); - } - - /** - * Resets all collections of referencing foreign keys. - * - * This method is a user-space workaround for PHP's inability to garbage collect objects - * with circular references. This is currently necessary when using Propel in certain - * daemon or large-volumne/high-memory operations. - * - * @param boolean $deep Whether to also clear the references on all associated objects. - */ - public function clearAllReferences($deep = false) - { - if ($deep) { - } // if ($deep) - - $this->aCcPlayoutHistoryTemplate = null; - } - - /** - * Catches calls to virtual methods - */ - public function __call($name, $params) - { - if (preg_match('/get(\w+)/', $name, $matches)) { - $virtualColumn = $matches[1]; - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - // no lcfirst in php<5.3... - $virtualColumn[0] = strtolower($virtualColumn[0]); - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - } - throw new PropelException('Call to undefined method: ' . $name); - } - -} // BaseCcPlayoutHistoryTemplateTag diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php deleted file mode 100644 index 617bcf2dc..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagPeer.php +++ /dev/null @@ -1,993 +0,0 @@ - array ('DbId', 'DbTemplateId', 'DbName', 'DbType', 'DbIsFileMD', 'DbTagPosition', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTemplateId', 'dbName', 'dbType', 'dbIsFileMD', 'dbTagPosition', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::TEMPLATE_ID, self::NAME, self::TYPE, self::IS_FILE_MD, self::POSITION, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TEMPLATE_ID', 'NAME', 'TYPE', 'IS_FILE_MD', 'POSITION', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'template_id', 'name', 'type', 'is_file_md', 'position', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTemplateId' => 1, 'DbName' => 2, 'DbType' => 3, 'DbIsFileMD' => 4, 'DbTagPosition' => 5, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTemplateId' => 1, 'dbName' => 2, 'dbType' => 3, 'dbIsFileMD' => 4, 'dbTagPosition' => 5, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TEMPLATE_ID => 1, self::NAME => 2, self::TYPE => 3, self::IS_FILE_MD => 4, self::POSITION => 5, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TEMPLATE_ID' => 1, 'NAME' => 2, 'TYPE' => 3, 'IS_FILE_MD' => 4, 'POSITION' => 5, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'template_id' => 1, 'name' => 2, 'type' => 3, 'is_file_md' => 4, 'position' => 5, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) - ); - - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - * @throws PropelException - if the specified name could not be found in the fieldname mappings. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. CcPlayoutHistoryTemplateTagPeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria, $alias = null) - { - if (null === $alias) { - $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::ID); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::NAME); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::TYPE); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD); - $criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::POSITION); - } else { - $criteria->addSelectColumn($alias . '.ID'); - $criteria->addSelectColumn($alias . '.TEMPLATE_ID'); - $criteria->addSelectColumn($alias . '.NAME'); - $criteria->addSelectColumn($alias . '.TYPE'); - $criteria->addSelectColumn($alias . '.IS_FILE_MD'); - $criteria->addSelectColumn($alias . '.POSITION'); - } - } - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) - { - // we may modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - // BasePeer returns a PDOStatement - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param PropelPDO $con - * @return CcPlayoutHistoryTemplateTag - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = CcPlayoutHistoryTemplateTagPeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, PropelPDO $con = null) - { - return CcPlayoutHistoryTemplateTagPeer::populateObjects(CcPlayoutHistoryTemplateTagPeer::doSelectStmt($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. - * - * Use this method directly if you want to work with an executed statement durirectly (for example - * to perform your own object hydration). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con The connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return PDOStatement The executed PDOStatement object. - * @see BasePeer::doSelect() - */ - public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - if (!$criteria->hasSelectClause()) { - $criteria = clone $criteria; - CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a PDOStatement - return BasePeer::doSelect($criteria, $con); - } - /** - * Adds an object to the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doSelect*() - * methods in your stub classes -- you may need to explicitly add objects - * to the cache in order to ensure that the same objects are always returned by doSelect*() - * and retrieveByPK*() calls. - * - * @param CcPlayoutHistoryTemplateTag $value A CcPlayoutHistoryTemplateTag object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). - */ - public static function addInstanceToPool(CcPlayoutHistoryTemplateTag $obj, $key = null) - { - if (Propel::isInstancePoolingEnabled()) { - if ($key === null) { - $key = (string) $obj->getDbId(); - } // if key === null - self::$instances[$key] = $obj; - } - } - - /** - * Removes an object from the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doDelete - * methods in your stub classes -- you may need to explicitly remove objects - * from the cache in order to prevent returning objects that no longer exist. - * - * @param mixed $value A CcPlayoutHistoryTemplateTag object or a primary key value. - */ - public static function removeInstanceFromPool($value) - { - if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof CcPlayoutHistoryTemplateTag) { - $key = (string) $value->getDbId(); - } elseif (is_scalar($value)) { - // assume we've been passed a primary key - $key = (string) $value; - } else { - $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlayoutHistoryTemplateTag object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); - throw $e; - } - - unset(self::$instances[$key]); - } - } // removeInstanceFromPool() - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param string $key The key (@see getPrimaryKeyHash()) for this instance. - * @return CcPlayoutHistoryTemplateTag Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. - * @see getPrimaryKeyHash() - */ - public static function getInstanceFromPool($key) - { - if (Propel::isInstancePoolingEnabled()) { - if (isset(self::$instances[$key])) { - return self::$instances[$key]; - } - } - return null; // just to be explicit - } - - /** - * Clear the instance pool. - * - * @return void - */ - public static function clearInstancePool() - { - self::$instances = array(); - } - - /** - * Method to invalidate the instance pool of all tables related to cc_playout_history_template_field - * by a foreign key with ON DELETE CASCADE - */ - public static function clearRelatedInstancePool() - { - } - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return string A string version of PK or NULL if the components of primary key in result array are all null. - */ - public static function getPrimaryKeyHashFromRow($row, $startcol = 0) - { - // If the PK cannot be derived from the row, return NULL. - if ($row[$startcol] === null) { - return null; - } - return (string) $row[$startcol]; - } - - /** - * Retrieves the primary key from the DB resultset row - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, an array of the primary key columns will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return mixed The primary key of the row - */ - public static function getPrimaryKeyFromRow($row, $startcol = 0) - { - return (int) $row[$startcol]; - } - - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(PDOStatement $stmt) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false); - // populate the object(s) - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, 0, true); // rehydrate - $results[] = $obj; - } else { - $obj = new $cls(); - $obj->hydrate($row); - $results[] = $obj; - CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj, $key); - } // if key exists - } - $stmt->closeCursor(); - return $results; - } - /** - * Populates an object of the default type or an object that inherit from the default. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CcPlayoutHistoryTemplateTag object, last column rank) - */ - public static function populateObject($row, $startcol = 0) - { - $key = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, $startcol, true); // rehydrate - $col = $startcol + CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS; - } else { - $cls = CcPlayoutHistoryTemplateTagPeer::OM_CLASS; - $obj = new $cls(); - $col = $obj->hydrate($row, $startcol); - CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj, $key); - } - return array($obj, $col); - } - - /** - * Returns the number of rows matching criteria, joining the related CcPlayoutHistoryTemplate table - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinCcPlayoutHistoryTemplate(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - - /** - * Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with their CcPlayoutHistoryTemplate objects. - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistoryTemplateTag objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinCcPlayoutHistoryTemplate(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); - $startcol = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS); - CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); - - $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - - $cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1); - } // if $obj1 already loaded - - $key2 = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol); - if ($key2 !== null) { - $obj2 = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcPlayoutHistoryTemplatePeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol); - CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj2, $key2); - } // if obj2 already loaded - - // Add the $obj1 (CcPlayoutHistoryTemplateTag) to $obj2 (CcPlayoutHistoryTemplate) - $obj2->addCcPlayoutHistoryTemplateTag($obj1); - - } // if joined row was not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - - /** - * Returns the number of rows matching criteria, joining all related tables - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return int Number of matching rows. - */ - public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - // we're going to modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); - - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - - /** - * Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with all related objects. - * - * @param Criteria $criteria - * @param PropelPDO $con - * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN - * @return array Array of CcPlayoutHistoryTemplateTag objects. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $criteria = clone $criteria; - - // Set the correct dbName if it has not been overridden - if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(self::DATABASE_NAME); - } - - CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria); - $startcol2 = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS); - - CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria); - $startcol3 = $startcol2 + (CcPlayoutHistoryTemplatePeer::NUM_COLUMNS - CcPlayoutHistoryTemplatePeer::NUM_LAZY_LOAD_COLUMNS); - - $criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior); - - $stmt = BasePeer::doSelect($criteria, $con); - $results = array(); - - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj1->hydrate($row, 0, true); // rehydrate - } else { - $cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false); - - $obj1 = new $cls(); - $obj1->hydrate($row); - CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1); - } // if obj1 already loaded - - // Add objects for joined CcPlayoutHistoryTemplate rows - - $key2 = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol2); - if ($key2 !== null) { - $obj2 = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key2); - if (!$obj2) { - - $cls = CcPlayoutHistoryTemplatePeer::getOMClass(false); - - $obj2 = new $cls(); - $obj2->hydrate($row, $startcol2); - CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj2, $key2); - } // if obj2 loaded - - // Add the $obj1 (CcPlayoutHistoryTemplateTag) to the collection in $obj2 (CcPlayoutHistoryTemplate) - $obj2->addCcPlayoutHistoryTemplateTag($obj1); - } // if joined row not null - - $results[] = $obj1; - } - $stmt->closeCursor(); - return $results; - } - - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * Add a TableMap instance to the database for this peer class. - */ - public static function buildTableMap() - { - $dbMap = Propel::getDatabaseMap(BaseCcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); - if (!$dbMap->hasTable(BaseCcPlayoutHistoryTemplateTagPeer::TABLE_NAME)) - { - $dbMap->addTableObject(new CcPlayoutHistoryTemplateTagTableMap()); - } - } - - /** - * The class that the Peer will make instances of. - * - * If $withPrefix is true, the returned path - * uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName - */ - public static function getOMClass($withPrefix = true) - { - return $withPrefix ? CcPlayoutHistoryTemplateTagPeer::CLASS_DEFAULT : CcPlayoutHistoryTemplateTagPeer::OM_CLASS; - } - - /** - * Method perform an INSERT on the database, given a CcPlayoutHistoryTemplateTag or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistoryTemplateTag object containing data that is used to create the INSERT statement. - * @param PropelPDO $con the PropelPDO connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from CcPlayoutHistoryTemplateTag object - } - - if ($criteria->containsKey(CcPlayoutHistoryTemplateTagPeer::ID) && $criteria->keyContainsValue(CcPlayoutHistoryTemplateTagPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlayoutHistoryTemplateTagPeer::ID.')'); - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->beginTransaction(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch(PropelException $e) { - $con->rollBack(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a CcPlayoutHistoryTemplateTag or Criteria object. - * - * @param mixed $values Criteria or CcPlayoutHistoryTemplateTag object containing data that is used to create the UPDATE statement. - * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(CcPlayoutHistoryTemplateTagPeer::ID); - $value = $criteria->remove(CcPlayoutHistoryTemplateTagPeer::ID); - if ($value) { - $selectCriteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $value, $comparison); - } else { - $selectCriteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); - } - - } else { // $values is CcPlayoutHistoryTemplateTag object - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the cc_playout_history_template_field table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - $affectedRows += BasePeer::doDeleteAll(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME, $con, CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); - // Because this db requires some delete cascade/set null emulation, we have to - // clear the cached instance *after* the emulation has happened (since - // instances get re-added by the select statement contained therein). - CcPlayoutHistoryTemplateTagPeer::clearInstancePool(); - CcPlayoutHistoryTemplateTagPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a CcPlayoutHistoryTemplateTag or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or CcPlayoutHistoryTemplateTag object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param PropelPDO $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - // invalidate the cache for all objects of this type, since we have no - // way of knowing (without running a query) what objects should be invalidated - // from the cache based on this Criteria. - CcPlayoutHistoryTemplateTagPeer::clearInstancePool(); - // rename for clarity - $criteria = clone $values; - } elseif ($values instanceof CcPlayoutHistoryTemplateTag) { // it's a model object - // invalidate the cache for this single object - CcPlayoutHistoryTemplateTagPeer::removeInstanceFromPool($values); - // create criteria based on pk values - $criteria = $values->buildPkeyCriteria(); - } else { // it's a primary key, or an array of pks - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, (array) $values, Criteria::IN); - // invalidate the cache for this object(s) - foreach ((array) $values as $singleval) { - CcPlayoutHistoryTemplateTagPeer::removeInstanceFromPool($singleval); - } - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - CcPlayoutHistoryTemplateTagPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Validates all modified columns of given CcPlayoutHistoryTemplateTag object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param CcPlayoutHistoryTemplateTag $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(CcPlayoutHistoryTemplateTag $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, CcPlayoutHistoryTemplateTagPeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param int $pk the primary key. - * @param PropelPDO $con the connection to use - * @return CcPlayoutHistoryTemplateTag - */ - public static function retrieveByPK($pk, PropelPDO $con = null) - { - - if (null !== ($obj = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool((string) $pk))) { - return $obj; - } - - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria = new Criteria(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $pk); - - $v = CcPlayoutHistoryTemplateTagPeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param PropelPDO $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME); - $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $pks, Criteria::IN); - $objs = CcPlayoutHistoryTemplateTagPeer::doSelect($criteria, $con); - } - return $objs; - } - -} // BaseCcPlayoutHistoryTemplateTagPeer - -// This is the static code needed to register the TableMap for this table with the main Propel class. -// -BaseCcPlayoutHistoryTemplateTagPeer::buildTableMap(); - diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php deleted file mode 100644 index 62b7eff77..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryTemplateTagQuery.php +++ /dev/null @@ -1,376 +0,0 @@ -setModelAlias($modelAlias); - } - if ($criteria instanceof Criteria) { - $query->mergeWith($criteria); - } - return $query; - } - - /** - * Find object by primary key - * Use instance pooling to avoid a database query if the object exists - * - * $obj = $c->findPk(12, $con); - * - * @param mixed $key Primary key to use for the query - * @param PropelPDO $con an optional connection object - * - * @return CcPlayoutHistoryTemplateTag|array|mixed the result, formatted by the current formatter - */ - public function findPk($key, $con = null) - { - if ((null !== ($obj = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { - // the object is alredy in the instance pool - return $obj; - } else { - // the object has not been requested yet, or the formatter is not an object formatter - $criteria = $this->isKeepQuery() ? clone $this : $this; - $stmt = $criteria - ->filterByPrimaryKey($key) - ->getSelectStatement($con); - return $criteria->getFormatter()->init($criteria)->formatOne($stmt); - } - } - - /** - * Find objects by primary key - * - * $objs = $c->findPks(array(12, 56, 832), $con); - * - * @param array $keys Primary keys to use for the query - * @param PropelPDO $con an optional connection object - * - * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter - */ - public function findPks($keys, $con = null) - { - $criteria = $this->isKeepQuery() ? clone $this : $this; - return $this - ->filterByPrimaryKeys($keys) - ->find($con); - } - - /** - * Filter the query by primary key - * - * @param mixed $key Primary key to use for the query - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function filterByPrimaryKey($key) - { - return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::ID, $key, Criteria::EQUAL); - } - - /** - * Filter the query by a list of primary keys - * - * @param array $keys The list of primary key to use for the query - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function filterByPrimaryKeys($keys) - { - return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::ID, $keys, Criteria::IN); - } - - /** - * Filter the query on the id column - * - * @param int|array $dbId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function filterByDbId($dbId = null, $comparison = null) - { - if (is_array($dbId) && null === $comparison) { - $comparison = Criteria::IN; - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::ID, $dbId, $comparison); - } - - /** - * Filter the query on the template_id column - * - * @param int|array $dbTemplateId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function filterByDbTemplateId($dbTemplateId = null, $comparison = null) - { - if (is_array($dbTemplateId)) { - $useMinMax = false; - if (isset($dbTemplateId['min'])) { - $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $dbTemplateId['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbTemplateId['max'])) { - $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $dbTemplateId['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $dbTemplateId, $comparison); - } - - /** - * Filter the query on the name column - * - * @param string $dbName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function filterByDbName($dbName = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbName)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbName)) { - $dbName = str_replace('*', '%', $dbName); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::NAME, $dbName, $comparison); - } - - /** - * Filter the query on the type column - * - * @param string $dbType The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function filterByDbType($dbType = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbType)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbType)) { - $dbType = str_replace('*', '%', $dbType); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TYPE, $dbType, $comparison); - } - - /** - * Filter the query on the is_file_md column - * - * @param boolean|string $dbIsFileMD 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 CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function filterByDbIsFileMD($dbIsFileMD = null, $comparison = null) - { - if (is_string($dbIsFileMD)) { - $is_file_md = in_array(strtolower($dbIsFileMD), array('false', 'off', '-', 'no', 'n', '0')) ? false : true; - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD, $dbIsFileMD, $comparison); - } - - /** - * Filter the query on the position column - * - * @param int|array $dbTagPosition The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function filterByDbTagPosition($dbTagPosition = null, $comparison = null) - { - if (is_array($dbTagPosition)) { - $useMinMax = false; - if (isset($dbTagPosition['min'])) { - $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::POSITION, $dbTagPosition['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($dbTagPosition['max'])) { - $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::POSITION, $dbTagPosition['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::POSITION, $dbTagPosition, $comparison); - } - - /** - * Filter the query by a related CcPlayoutHistoryTemplate object - * - * @param CcPlayoutHistoryTemplate $ccPlayoutHistoryTemplate the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function filterByCcPlayoutHistoryTemplate($ccPlayoutHistoryTemplate, $comparison = null) - { - return $this - ->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $ccPlayoutHistoryTemplate->getDbId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcPlayoutHistoryTemplate relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function joinCcPlayoutHistoryTemplate($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplate'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcPlayoutHistoryTemplate'); - } - - return $this; - } - - /** - * Use the CcPlayoutHistoryTemplate relation CcPlayoutHistoryTemplate object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryTemplateQuery A secondary query class using the current class as primary query - */ - public function useCcPlayoutHistoryTemplateQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcPlayoutHistoryTemplate($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplateQuery'); - } - - /** - * Exclude object from result - * - * @param CcPlayoutHistoryTemplateTag $ccPlayoutHistoryTemplateTag Object to remove from the list of results - * - * @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface - */ - public function prune($ccPlayoutHistoryTemplateTag = null) - { - if ($ccPlayoutHistoryTemplateTag) { - $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::ID, $ccPlayoutHistoryTemplateTag->getDbId(), Criteria::NOT_EQUAL); - } - - return $this; - } - -} // BaseCcPlayoutHistoryTemplateTagQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php index a783a8e20..1caf7df62 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php @@ -125,11 +125,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent */ protected $collCcSchedules; - /** - * @var array CcPlayoutHistory[] Collection to store aggregation of CcPlayoutHistory objects. - */ - protected $collCcPlayoutHistorys; - /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. @@ -894,8 +889,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent $this->collCcSchedules = null; - $this->collCcPlayoutHistorys = null; - } // if (deep) } @@ -1071,14 +1064,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent } } - if ($this->collCcPlayoutHistorys !== null) { - foreach ($this->collCcPlayoutHistorys as $referrerFK) { - if (!$referrerFK->isDeleted()) { - $affectedRows += $referrerFK->save($con); - } - } - } - $this->alreadyInSave = false; } @@ -1190,14 +1175,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent } } - if ($this->collCcPlayoutHistorys !== null) { - foreach ($this->collCcPlayoutHistorys as $referrerFK) { - if (!$referrerFK->validate($columns)) { - $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); - } - } - } - $this->alreadyInValidation = false; } @@ -1530,12 +1507,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent } } - foreach ($this->getCcPlayoutHistorys() as $relObj) { - if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addCcPlayoutHistory($relObj->copy($deepCopy)); - } - } - } // if ($deepCopy) @@ -2046,140 +2017,6 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent return $this->getCcSchedules($query, $con); } - /** - * Clears out the collCcPlayoutHistorys collection - * - * This does not modify the database; however, it will remove any associated objects, causing - * them to be refetched by subsequent calls to accessor method. - * - * @return void - * @see addCcPlayoutHistorys() - */ - public function clearCcPlayoutHistorys() - { - $this->collCcPlayoutHistorys = null; // important to set this to NULL since that means it is uninitialized - } - - /** - * Initializes the collCcPlayoutHistorys collection. - * - * By default this just sets the collCcPlayoutHistorys collection to an empty array (like clearcollCcPlayoutHistorys()); - * however, you may wish to override this method in your stub class to provide setting appropriate - * to your application -- for example, setting the initial array to the values stored in database. - * - * @return void - */ - public function initCcPlayoutHistorys() - { - $this->collCcPlayoutHistorys = new PropelObjectCollection(); - $this->collCcPlayoutHistorys->setModel('CcPlayoutHistory'); - } - - /** - * Gets an array of CcPlayoutHistory objects which contain a foreign key that references this object. - * - * If the $criteria is not null, it is used to always fetch the results from the database. - * Otherwise the results are fetched from the database the first time, then cached. - * Next time the same method is called without $criteria, the cached collection is returned. - * If this CcShowInstances is new, it will return - * an empty collection or the current collection; the criteria is ignored on a new object. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects - * @throws PropelException - */ - public function getCcPlayoutHistorys($criteria = null, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistorys || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistorys) { - // return empty collection - $this->initCcPlayoutHistorys(); - } else { - $collCcPlayoutHistorys = CcPlayoutHistoryQuery::create(null, $criteria) - ->filterByCcShowInstances($this) - ->find($con); - if (null !== $criteria) { - return $collCcPlayoutHistorys; - } - $this->collCcPlayoutHistorys = $collCcPlayoutHistorys; - } - } - return $this->collCcPlayoutHistorys; - } - - /** - * Returns the number of related CcPlayoutHistory objects. - * - * @param Criteria $criteria - * @param boolean $distinct - * @param PropelPDO $con - * @return int Count of related CcPlayoutHistory objects. - * @throws PropelException - */ - public function countCcPlayoutHistorys(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistorys || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistorys) { - return 0; - } else { - $query = CcPlayoutHistoryQuery::create(null, $criteria); - if($distinct) { - $query->distinct(); - } - return $query - ->filterByCcShowInstances($this) - ->count($con); - } - } else { - return count($this->collCcPlayoutHistorys); - } - } - - /** - * Method called to associate a CcPlayoutHistory object to this object - * through the CcPlayoutHistory foreign key attribute. - * - * @param CcPlayoutHistory $l CcPlayoutHistory - * @return void - * @throws PropelException - */ - public function addCcPlayoutHistory(CcPlayoutHistory $l) - { - if ($this->collCcPlayoutHistorys === null) { - $this->initCcPlayoutHistorys(); - } - if (!$this->collCcPlayoutHistorys->contains($l)) { // only add it if the **same** object is not already associated - $this->collCcPlayoutHistorys[]= $l; - $l->setCcShowInstances($this); - } - } - - - /** - * If this collection has already been initialized with - * an identical criteria, it returns the collection. - * Otherwise if this CcShowInstances is new, it will return - * an empty collection; or if this CcShowInstances has previously - * been saved, it will retrieve related CcPlayoutHistorys from storage. - * - * This method is protected by default in order to keep the public - * api reasonable. You can provide public methods for those you - * actually need in CcShowInstances. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) - * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects - */ - public function getCcPlayoutHistorysJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $query = CcPlayoutHistoryQuery::create(null, $criteria); - $query->joinWith('CcFiles', $join_behavior); - - return $this->getCcPlayoutHistorys($query, $con); - } - /** * Clears the current object and sets all attributes to their default values */ @@ -2228,16 +2065,10 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent $o->clearAllReferences($deep); } } - if ($this->collCcPlayoutHistorys) { - foreach ((array) $this->collCcPlayoutHistorys as $o) { - $o->clearAllReferences($deep); - } - } } // if ($deep) $this->collCcShowInstancessRelatedByDbId = null; $this->collCcSchedules = null; - $this->collCcPlayoutHistorys = null; $this->aCcShow = null; $this->aCcShowInstancesRelatedByDbOriginalShow = null; $this->aCcFiles = null; diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php index ad91f182c..076f2182c 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php @@ -399,9 +399,6 @@ abstract class BaseCcShowInstancesPeer { // Invalidate objects in CcSchedulePeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. CcSchedulePeer::clearInstancePool(); - // Invalidate objects in CcPlayoutHistoryPeer instance pool, - // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - CcPlayoutHistoryPeer::clearInstancePool(); } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php index 871b907ae..08a245d2e 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php @@ -56,10 +56,6 @@ * @method CcShowInstancesQuery rightJoinCcSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSchedule relation * @method CcShowInstancesQuery innerJoinCcSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSchedule relation * - * @method CcShowInstancesQuery leftJoinCcPlayoutHistory($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistory relation - * @method CcShowInstancesQuery rightJoinCcPlayoutHistory($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation - * @method CcShowInstancesQuery innerJoinCcPlayoutHistory($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation - * * @method CcShowInstances findOne(PropelPDO $con = null) Return the first CcShowInstances matching the query * @method CcShowInstances findOneOrCreate(PropelPDO $con = null) Return the first CcShowInstances matching the query, or a new CcShowInstances object populated from the query conditions when no match is found * @@ -852,70 +848,6 @@ abstract class BaseCcShowInstancesQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery'); } - /** - * Filter the query by a related CcPlayoutHistory object - * - * @param CcPlayoutHistory $ccPlayoutHistory the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcShowInstancesQuery The current query, for fluid interface - */ - public function filterByCcPlayoutHistory($ccPlayoutHistory, $comparison = null) - { - return $this - ->addUsingAlias(CcShowInstancesPeer::ID, $ccPlayoutHistory->getDbInstanceId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcPlayoutHistory relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcShowInstancesQuery The current query, for fluid interface - */ - public function joinCcPlayoutHistory($relationAlias = '', $joinType = Criteria::LEFT_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcPlayoutHistory'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcPlayoutHistory'); - } - - return $this; - } - - /** - * Use the CcPlayoutHistory relation CcPlayoutHistory object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryQuery A secondary query class using the current class as primary query - */ - public function useCcPlayoutHistoryQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) - { - return $this - ->joinCcPlayoutHistory($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery'); - } - /** * Exclude object from result * diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTag.php b/airtime_mvc/application/models/airtime/om/BaseCcTag.php deleted file mode 100644 index af656868b..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcTag.php +++ /dev/null @@ -1,1306 +0,0 @@ -tag_type = 'boolean'; - } - - /** - * Initializes internal state of BaseCcTag object. - * @see applyDefaults() - */ - public function __construct() - { - parent::__construct(); - $this->applyDefaultValues(); - } - - /** - * Get the [id] column value. - * - * @return int - */ - public function getDbId() - { - return $this->id; - } - - /** - * Get the [tag_name] column value. - * - * @return string - */ - public function getDbTagName() - { - return $this->tag_name; - } - - /** - * Get the [tag_type] column value. - * - * @return string - */ - public function getDbTagType() - { - return $this->tag_type; - } - - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return CcTag The current object (for fluent API support) - */ - public function setDbId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = CcTagPeer::ID; - } - - return $this; - } // setDbId() - - /** - * Set the value of [tag_name] column. - * - * @param string $v new value - * @return CcTag The current object (for fluent API support) - */ - public function setDbTagName($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->tag_name !== $v) { - $this->tag_name = $v; - $this->modifiedColumns[] = CcTagPeer::TAG_NAME; - } - - return $this; - } // setDbTagName() - - /** - * Set the value of [tag_type] column. - * - * @param string $v new value - * @return CcTag The current object (for fluent API support) - */ - public function setDbTagType($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->tag_type !== $v || $this->isNew()) { - $this->tag_type = $v; - $this->modifiedColumns[] = CcTagPeer::TAG_TYPE; - } - - return $this; - } // setDbTagType() - - /** - * Indicates whether the columns in this object are only set to default values. - * - * This method can be used in conjunction with isModified() to indicate whether an object is both - * modified _and_ has some values set which are non-default. - * - * @return boolean Whether the columns in this object are only been set with default values. - */ - public function hasOnlyDefaultValues() - { - if ($this->tag_type !== 'boolean') { - return false; - } - - // otherwise, everything was equal, so return TRUE - return true; - } // hasOnlyDefaultValues() - - /** - * Hydrates (populates) the object variables with values from the database resultset. - * - * An offset (0-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, - * for results of JOIN queries where the resultset row includes columns from two or - * more tables. - * - * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) - * @param int $startcol 0-based offset column which indicates which restultset column to start with. - * @param boolean $rehydrate Whether this object is being re-hydrated from the database. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. - */ - public function hydrate($row, $startcol = 0, $rehydrate = false) - { - try { - - $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; - $this->tag_name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; - $this->tag_type = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; - $this->resetModified(); - - $this->setNew(false); - - if ($rehydrate) { - $this->ensureConsistency(); - } - - return $startcol + 3; // 3 = CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS). - - } catch (Exception $e) { - throw new PropelException("Error populating CcTag object", $e); - } - } - - /** - * Checks and repairs the internal consistency of the object. - * - * This method is executed after an already-instantiated object is re-hydrated - * from the database. It exists to check any foreign keys to make sure that - * the objects related to the current object are correct based on foreign key. - * - * You can override this method in the stub class, but you should always invoke - * the base method from the overridden method (i.e. parent::ensureConsistency()), - * in case your model changes. - * - * @throws PropelException - */ - public function ensureConsistency() - { - - } // ensureConsistency - - /** - * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. - * - * This will only work if the object has been saved and has a valid primary key set. - * - * @param boolean $deep (optional) Whether to also de-associated any related objects. - * @param PropelPDO $con (optional) The PropelPDO connection to use. - * @return void - * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db - */ - public function reload($deep = false, PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("Cannot reload a deleted object."); - } - - if ($this->isNew()) { - throw new PropelException("Cannot reload an unsaved object."); - } - - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - // We don't need to alter the object instance pool; we're just modifying this instance - // already in the pool. - - $stmt = CcTagPeer::doSelectStmt($this->buildPkeyCriteria(), $con); - $row = $stmt->fetch(PDO::FETCH_NUM); - $stmt->closeCursor(); - if (!$row) { - throw new PropelException('Cannot find matching row in the database to reload object values.'); - } - $this->hydrate($row, 0, true); // rehydrate - - if ($deep) { // also de-associate any related objects? - - $this->collCcFileTags = null; - - $this->collCcPlayoutHistoryMetaDatas = null; - - $this->collCcPlayoutHistoryTemplateTags = null; - - } // if (deep) - } - - /** - * Removes this object from datastore and sets delete attribute. - * - * @param PropelPDO $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() - */ - public function delete(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - try { - $ret = $this->preDelete($con); - if ($ret) { - CcTagQuery::create() - ->filterByPrimaryKey($this->getPrimaryKey()) - ->delete($con); - $this->postDelete($con); - $con->commit(); - $this->setDeleted(true); - } else { - $con->commit(); - } - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Persists this object to the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All modified related objects will also be persisted in the doSave() - * method. This method wraps all precipitate database operations in a - * single transaction. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see doSave() - */ - public function save(PropelPDO $con = null) - { - if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); - } - - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $con->beginTransaction(); - $isInsert = $this->isNew(); - try { - $ret = $this->preSave($con); - if ($isInsert) { - $ret = $ret && $this->preInsert($con); - } else { - $ret = $ret && $this->preUpdate($con); - } - if ($ret) { - $affectedRows = $this->doSave($con); - if ($isInsert) { - $this->postInsert($con); - } else { - $this->postUpdate($con); - } - $this->postSave($con); - CcTagPeer::addInstanceToPool($this); - } else { - $affectedRows = 0; - } - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Performs the work of inserting or updating the row in the database. - * - * If the object is new, it inserts it; otherwise an update is performed. - * All related objects are also updated in this method. - * - * @param PropelPDO $con - * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. - * @throws PropelException - * @see save() - */ - protected function doSave(PropelPDO $con) - { - $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { - $this->alreadyInSave = true; - - if ($this->isNew() ) { - $this->modifiedColumns[] = CcTagPeer::ID; - } - - // If this object has been modified, then save it to the database. - if ($this->isModified()) { - if ($this->isNew()) { - $criteria = $this->buildCriteria(); - if ($criteria->keyContainsValue(CcTagPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcTagPeer::ID.')'); - } - - $pk = BasePeer::doInsert($criteria, $con); - $affectedRows = 1; - $this->setDbId($pk); //[IMV] update autoincrement primary key - $this->setNew(false); - } else { - $affectedRows = CcTagPeer::doUpdate($this, $con); - } - - $this->resetModified(); // [HL] After being saved an object is no longer 'modified' - } - - if ($this->collCcFileTags !== null) { - foreach ($this->collCcFileTags as $referrerFK) { - if (!$referrerFK->isDeleted()) { - $affectedRows += $referrerFK->save($con); - } - } - } - - if ($this->collCcPlayoutHistoryMetaDatas !== null) { - foreach ($this->collCcPlayoutHistoryMetaDatas as $referrerFK) { - if (!$referrerFK->isDeleted()) { - $affectedRows += $referrerFK->save($con); - } - } - } - - if ($this->collCcPlayoutHistoryTemplateTags !== null) { - foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) { - if (!$referrerFK->isDeleted()) { - $affectedRows += $referrerFK->save($con); - } - } - } - - $this->alreadyInSave = false; - - } - return $affectedRows; - } // doSave() - - /** - * Array of ValidationFailed objects. - * @var array ValidationFailed[] - */ - protected $validationFailures = array(); - - /** - * Gets any ValidationFailed objects that resulted from last call to validate(). - * - * - * @return array ValidationFailed[] - * @see validate() - */ - public function getValidationFailures() - { - return $this->validationFailures; - } - - /** - * Validates the objects modified field values and all objects related to this table. - * - * If $columns is either a column name or an array of column names - * only those columns are validated. - * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() - */ - public function validate($columns = null) - { - $res = $this->doValidate($columns); - if ($res === true) { - $this->validationFailures = array(); - return true; - } else { - $this->validationFailures = $res; - return false; - } - } - - /** - * This function performs the validation work for complex object models. - * - * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise - * an aggreagated array of ValidationFailed objects will be returned. - * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. - */ - protected function doValidate($columns = null) - { - if (!$this->alreadyInValidation) { - $this->alreadyInValidation = true; - $retval = null; - - $failureMap = array(); - - - if (($retval = CcTagPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); - } - - - if ($this->collCcFileTags !== null) { - foreach ($this->collCcFileTags as $referrerFK) { - if (!$referrerFK->validate($columns)) { - $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); - } - } - } - - if ($this->collCcPlayoutHistoryMetaDatas !== null) { - foreach ($this->collCcPlayoutHistoryMetaDatas as $referrerFK) { - if (!$referrerFK->validate($columns)) { - $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); - } - } - } - - if ($this->collCcPlayoutHistoryTemplateTags !== null) { - foreach ($this->collCcPlayoutHistoryTemplateTags as $referrerFK) { - if (!$referrerFK->validate($columns)) { - $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); - } - } - } - - - $this->alreadyInValidation = false; - } - - return (!empty($failureMap) ? $failureMap : true); - } - - /** - * Retrieves a field from the object by name passed in as a string. - * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return mixed Value of field. - */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - $field = $this->getByPosition($pos); - return $field; - } - - /** - * Retrieves a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos - */ - public function getByPosition($pos) - { - switch($pos) { - case 0: - return $this->getDbId(); - break; - case 1: - return $this->getDbTagName(); - break; - case 2: - return $this->getDbTagType(); - break; - default: - return null; - break; - } // switch() - } - - /** - * Exports the object as an array. - * - * You can specify the key type of the array by passing one of the class - * type constants. - * - * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * Defaults to BasePeer::TYPE_PHPNAME. - * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. - * - * @return array an associative array containing the field names (as keys) and field values - */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true) - { - $keys = CcTagPeer::getFieldNames($keyType); - $result = array( - $keys[0] => $this->getDbId(), - $keys[1] => $this->getDbTagName(), - $keys[2] => $this->getDbTagType(), - ); - return $result; - } - - /** - * Sets a field from the object by name passed in as a string. - * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return void - */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) - { - $pos = CcTagPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); - } - - /** - * Sets a field from the object by Position as specified in the xml schema. - * Zero-based. - * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void - */ - public function setByPosition($pos, $value) - { - switch($pos) { - case 0: - $this->setDbId($value); - break; - case 1: - $this->setDbTagName($value); - break; - case 2: - $this->setDbTagType($value); - break; - } // switch() - } - - /** - * Populates the object using an array. - * - * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column - * names, checking to see whether a matching key exists in populated - * array. If so the setByName() method is called for that column. - * - * You can specify the key type of the array by additionally passing one - * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. - * The default key type is the column's phpname (e.g. 'AuthorId') - * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void - */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) - { - $keys = CcTagPeer::getFieldNames($keyType); - - if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setDbTagName($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setDbTagType($arr[$keys[2]]); - } - - /** - * Build a Criteria object containing the values of all modified columns in this object. - * - * @return Criteria The Criteria object containing all modified values. - */ - public function buildCriteria() - { - $criteria = new Criteria(CcTagPeer::DATABASE_NAME); - - if ($this->isColumnModified(CcTagPeer::ID)) $criteria->add(CcTagPeer::ID, $this->id); - if ($this->isColumnModified(CcTagPeer::TAG_NAME)) $criteria->add(CcTagPeer::TAG_NAME, $this->tag_name); - if ($this->isColumnModified(CcTagPeer::TAG_TYPE)) $criteria->add(CcTagPeer::TAG_TYPE, $this->tag_type); - - return $criteria; - } - - /** - * Builds a Criteria object containing the primary key for this object. - * - * Unlike buildCriteria() this method includes the primary key values regardless - * of whether or not they have been modified. - * - * @return Criteria The Criteria object containing value(s) for primary key(s). - */ - public function buildPkeyCriteria() - { - $criteria = new Criteria(CcTagPeer::DATABASE_NAME); - $criteria->add(CcTagPeer::ID, $this->id); - - return $criteria; - } - - /** - * Returns the primary key for this object (row). - * @return int - */ - public function getPrimaryKey() - { - return $this->getDbId(); - } - - /** - * Generic method to set the primary key (id column). - * - * @param int $key Primary key. - * @return void - */ - public function setPrimaryKey($key) - { - $this->setDbId($key); - } - - /** - * Returns true if the primary key for this object is null. - * @return boolean - */ - public function isPrimaryKeyNull() - { - return null === $this->getDbId(); - } - - /** - * Sets contents of passed object to values from current object. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param object $copyObj An object of CcTag (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException - */ - public function copyInto($copyObj, $deepCopy = false) - { - $copyObj->setDbTagName($this->tag_name); - $copyObj->setDbTagType($this->tag_type); - - if ($deepCopy) { - // important: temporarily setNew(false) because this affects the behavior of - // the getter/setter methods for fkey referrer objects. - $copyObj->setNew(false); - - foreach ($this->getCcFileTags() as $relObj) { - if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addCcFileTag($relObj->copy($deepCopy)); - } - } - - foreach ($this->getCcPlayoutHistoryMetaDatas() as $relObj) { - if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addCcPlayoutHistoryMetaData($relObj->copy($deepCopy)); - } - } - - foreach ($this->getCcPlayoutHistoryTemplateTags() as $relObj) { - if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addCcPlayoutHistoryTemplateTag($relObj->copy($deepCopy)); - } - } - - } // if ($deepCopy) - - - $copyObj->setNew(true); - $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value - } - - /** - * Makes a copy of this object that will be inserted as a new row in table when saved. - * It creates a new object filling in the simple attributes, but skipping any primary - * keys that are defined for the table. - * - * If desired, this method can also make copies of all associated (fkey referrers) - * objects. - * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return CcTag Clone of current object. - * @throws PropelException - */ - public function copy($deepCopy = false) - { - // we use get_class(), because this might be a subclass - $clazz = get_class($this); - $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); - return $copyObj; - } - - /** - * Returns a peer instance associated with this om. - * - * Since Peer classes are not to have any instance attributes, this method returns the - * same instance for all member of this class. The method could therefore - * be static, but this would prevent one from overriding the behavior. - * - * @return CcTagPeer - */ - public function getPeer() - { - if (self::$peer === null) { - self::$peer = new CcTagPeer(); - } - return self::$peer; - } - - /** - * Clears out the collCcFileTags collection - * - * This does not modify the database; however, it will remove any associated objects, causing - * them to be refetched by subsequent calls to accessor method. - * - * @return void - * @see addCcFileTags() - */ - public function clearCcFileTags() - { - $this->collCcFileTags = null; // important to set this to NULL since that means it is uninitialized - } - - /** - * Initializes the collCcFileTags collection. - * - * By default this just sets the collCcFileTags collection to an empty array (like clearcollCcFileTags()); - * however, you may wish to override this method in your stub class to provide setting appropriate - * to your application -- for example, setting the initial array to the values stored in database. - * - * @return void - */ - public function initCcFileTags() - { - $this->collCcFileTags = new PropelObjectCollection(); - $this->collCcFileTags->setModel('CcFileTag'); - } - - /** - * Gets an array of CcFileTag objects which contain a foreign key that references this object. - * - * If the $criteria is not null, it is used to always fetch the results from the database. - * Otherwise the results are fetched from the database the first time, then cached. - * Next time the same method is called without $criteria, the cached collection is returned. - * If this CcTag is new, it will return - * an empty collection or the current collection; the criteria is ignored on a new object. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @return PropelCollection|array CcFileTag[] List of CcFileTag objects - * @throws PropelException - */ - public function getCcFileTags($criteria = null, PropelPDO $con = null) - { - if(null === $this->collCcFileTags || null !== $criteria) { - if ($this->isNew() && null === $this->collCcFileTags) { - // return empty collection - $this->initCcFileTags(); - } else { - $collCcFileTags = CcFileTagQuery::create(null, $criteria) - ->filterByCcTag($this) - ->find($con); - if (null !== $criteria) { - return $collCcFileTags; - } - $this->collCcFileTags = $collCcFileTags; - } - } - return $this->collCcFileTags; - } - - /** - * Returns the number of related CcFileTag objects. - * - * @param Criteria $criteria - * @param boolean $distinct - * @param PropelPDO $con - * @return int Count of related CcFileTag objects. - * @throws PropelException - */ - public function countCcFileTags(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) - { - if(null === $this->collCcFileTags || null !== $criteria) { - if ($this->isNew() && null === $this->collCcFileTags) { - return 0; - } else { - $query = CcFileTagQuery::create(null, $criteria); - if($distinct) { - $query->distinct(); - } - return $query - ->filterByCcTag($this) - ->count($con); - } - } else { - return count($this->collCcFileTags); - } - } - - /** - * Method called to associate a CcFileTag object to this object - * through the CcFileTag foreign key attribute. - * - * @param CcFileTag $l CcFileTag - * @return void - * @throws PropelException - */ - public function addCcFileTag(CcFileTag $l) - { - if ($this->collCcFileTags === null) { - $this->initCcFileTags(); - } - if (!$this->collCcFileTags->contains($l)) { // only add it if the **same** object is not already associated - $this->collCcFileTags[]= $l; - $l->setCcTag($this); - } - } - - - /** - * If this collection has already been initialized with - * an identical criteria, it returns the collection. - * Otherwise if this CcTag is new, it will return - * an empty collection; or if this CcTag has previously - * been saved, it will retrieve related CcFileTags from storage. - * - * This method is protected by default in order to keep the public - * api reasonable. You can provide public methods for those you - * actually need in CcTag. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) - * @return PropelCollection|array CcFileTag[] List of CcFileTag objects - */ - public function getCcFileTagsJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $query = CcFileTagQuery::create(null, $criteria); - $query->joinWith('CcFiles', $join_behavior); - - return $this->getCcFileTags($query, $con); - } - - /** - * Clears out the collCcPlayoutHistoryMetaDatas collection - * - * This does not modify the database; however, it will remove any associated objects, causing - * them to be refetched by subsequent calls to accessor method. - * - * @return void - * @see addCcPlayoutHistoryMetaDatas() - */ - public function clearCcPlayoutHistoryMetaDatas() - { - $this->collCcPlayoutHistoryMetaDatas = null; // important to set this to NULL since that means it is uninitialized - } - - /** - * Initializes the collCcPlayoutHistoryMetaDatas collection. - * - * By default this just sets the collCcPlayoutHistoryMetaDatas collection to an empty array (like clearcollCcPlayoutHistoryMetaDatas()); - * however, you may wish to override this method in your stub class to provide setting appropriate - * to your application -- for example, setting the initial array to the values stored in database. - * - * @return void - */ - public function initCcPlayoutHistoryMetaDatas() - { - $this->collCcPlayoutHistoryMetaDatas = new PropelObjectCollection(); - $this->collCcPlayoutHistoryMetaDatas->setModel('CcPlayoutHistoryMetaData'); - } - - /** - * Gets an array of CcPlayoutHistoryMetaData objects which contain a foreign key that references this object. - * - * If the $criteria is not null, it is used to always fetch the results from the database. - * Otherwise the results are fetched from the database the first time, then cached. - * Next time the same method is called without $criteria, the cached collection is returned. - * If this CcTag is new, it will return - * an empty collection or the current collection; the criteria is ignored on a new object. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @return PropelCollection|array CcPlayoutHistoryMetaData[] List of CcPlayoutHistoryMetaData objects - * @throws PropelException - */ - public function getCcPlayoutHistoryMetaDatas($criteria = null, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistoryMetaDatas || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistoryMetaDatas) { - // return empty collection - $this->initCcPlayoutHistoryMetaDatas(); - } else { - $collCcPlayoutHistoryMetaDatas = CcPlayoutHistoryMetaDataQuery::create(null, $criteria) - ->filterByCcTag($this) - ->find($con); - if (null !== $criteria) { - return $collCcPlayoutHistoryMetaDatas; - } - $this->collCcPlayoutHistoryMetaDatas = $collCcPlayoutHistoryMetaDatas; - } - } - return $this->collCcPlayoutHistoryMetaDatas; - } - - /** - * Returns the number of related CcPlayoutHistoryMetaData objects. - * - * @param Criteria $criteria - * @param boolean $distinct - * @param PropelPDO $con - * @return int Count of related CcPlayoutHistoryMetaData objects. - * @throws PropelException - */ - public function countCcPlayoutHistoryMetaDatas(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistoryMetaDatas || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistoryMetaDatas) { - return 0; - } else { - $query = CcPlayoutHistoryMetaDataQuery::create(null, $criteria); - if($distinct) { - $query->distinct(); - } - return $query - ->filterByCcTag($this) - ->count($con); - } - } else { - return count($this->collCcPlayoutHistoryMetaDatas); - } - } - - /** - * Method called to associate a CcPlayoutHistoryMetaData object to this object - * through the CcPlayoutHistoryMetaData foreign key attribute. - * - * @param CcPlayoutHistoryMetaData $l CcPlayoutHistoryMetaData - * @return void - * @throws PropelException - */ - public function addCcPlayoutHistoryMetaData(CcPlayoutHistoryMetaData $l) - { - if ($this->collCcPlayoutHistoryMetaDatas === null) { - $this->initCcPlayoutHistoryMetaDatas(); - } - if (!$this->collCcPlayoutHistoryMetaDatas->contains($l)) { // only add it if the **same** object is not already associated - $this->collCcPlayoutHistoryMetaDatas[]= $l; - $l->setCcTag($this); - } - } - - - /** - * If this collection has already been initialized with - * an identical criteria, it returns the collection. - * Otherwise if this CcTag is new, it will return - * an empty collection; or if this CcTag has previously - * been saved, it will retrieve related CcPlayoutHistoryMetaDatas from storage. - * - * This method is protected by default in order to keep the public - * api reasonable. You can provide public methods for those you - * actually need in CcTag. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) - * @return PropelCollection|array CcPlayoutHistoryMetaData[] List of CcPlayoutHistoryMetaData objects - */ - public function getCcPlayoutHistoryMetaDatasJoinCcPlayoutHistory($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $query = CcPlayoutHistoryMetaDataQuery::create(null, $criteria); - $query->joinWith('CcPlayoutHistory', $join_behavior); - - return $this->getCcPlayoutHistoryMetaDatas($query, $con); - } - - /** - * Clears out the collCcPlayoutHistoryTemplateTags collection - * - * This does not modify the database; however, it will remove any associated objects, causing - * them to be refetched by subsequent calls to accessor method. - * - * @return void - * @see addCcPlayoutHistoryTemplateTags() - */ - public function clearCcPlayoutHistoryTemplateTags() - { - $this->collCcPlayoutHistoryTemplateTags = null; // important to set this to NULL since that means it is uninitialized - } - - /** - * Initializes the collCcPlayoutHistoryTemplateTags collection. - * - * By default this just sets the collCcPlayoutHistoryTemplateTags collection to an empty array (like clearcollCcPlayoutHistoryTemplateTags()); - * however, you may wish to override this method in your stub class to provide setting appropriate - * to your application -- for example, setting the initial array to the values stored in database. - * - * @return void - */ - public function initCcPlayoutHistoryTemplateTags() - { - $this->collCcPlayoutHistoryTemplateTags = new PropelObjectCollection(); - $this->collCcPlayoutHistoryTemplateTags->setModel('CcPlayoutHistoryTemplateTag'); - } - - /** - * Gets an array of CcPlayoutHistoryTemplateTag objects which contain a foreign key that references this object. - * - * If the $criteria is not null, it is used to always fetch the results from the database. - * Otherwise the results are fetched from the database the first time, then cached. - * Next time the same method is called without $criteria, the cached collection is returned. - * If this CcTag is new, it will return - * an empty collection or the current collection; the criteria is ignored on a new object. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @return PropelCollection|array CcPlayoutHistoryTemplateTag[] List of CcPlayoutHistoryTemplateTag objects - * @throws PropelException - */ - public function getCcPlayoutHistoryTemplateTags($criteria = null, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistoryTemplateTags || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateTags) { - // return empty collection - $this->initCcPlayoutHistoryTemplateTags(); - } else { - $collCcPlayoutHistoryTemplateTags = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria) - ->filterByCcTag($this) - ->find($con); - if (null !== $criteria) { - return $collCcPlayoutHistoryTemplateTags; - } - $this->collCcPlayoutHistoryTemplateTags = $collCcPlayoutHistoryTemplateTags; - } - } - return $this->collCcPlayoutHistoryTemplateTags; - } - - /** - * Returns the number of related CcPlayoutHistoryTemplateTag objects. - * - * @param Criteria $criteria - * @param boolean $distinct - * @param PropelPDO $con - * @return int Count of related CcPlayoutHistoryTemplateTag objects. - * @throws PropelException - */ - public function countCcPlayoutHistoryTemplateTags(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) - { - if(null === $this->collCcPlayoutHistoryTemplateTags || null !== $criteria) { - if ($this->isNew() && null === $this->collCcPlayoutHistoryTemplateTags) { - return 0; - } else { - $query = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria); - if($distinct) { - $query->distinct(); - } - return $query - ->filterByCcTag($this) - ->count($con); - } - } else { - return count($this->collCcPlayoutHistoryTemplateTags); - } - } - - /** - * Method called to associate a CcPlayoutHistoryTemplateTag object to this object - * through the CcPlayoutHistoryTemplateTag foreign key attribute. - * - * @param CcPlayoutHistoryTemplateTag $l CcPlayoutHistoryTemplateTag - * @return void - * @throws PropelException - */ - public function addCcPlayoutHistoryTemplateTag(CcPlayoutHistoryTemplateTag $l) - { - if ($this->collCcPlayoutHistoryTemplateTags === null) { - $this->initCcPlayoutHistoryTemplateTags(); - } - if (!$this->collCcPlayoutHistoryTemplateTags->contains($l)) { // only add it if the **same** object is not already associated - $this->collCcPlayoutHistoryTemplateTags[]= $l; - $l->setCcTag($this); - } - } - - - /** - * If this collection has already been initialized with - * an identical criteria, it returns the collection. - * Otherwise if this CcTag is new, it will return - * an empty collection; or if this CcTag has previously - * been saved, it will retrieve related CcPlayoutHistoryTemplateTags from storage. - * - * This method is protected by default in order to keep the public - * api reasonable. You can provide public methods for those you - * actually need in CcTag. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) - * @return PropelCollection|array CcPlayoutHistoryTemplateTag[] List of CcPlayoutHistoryTemplateTag objects - */ - public function getCcPlayoutHistoryTemplateTagsJoinCcPlayoutHistoryTemplate($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $query = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria); - $query->joinWith('CcPlayoutHistoryTemplate', $join_behavior); - - return $this->getCcPlayoutHistoryTemplateTags($query, $con); - } - - /** - * Clears the current object and sets all attributes to their default values - */ - public function clear() - { - $this->id = null; - $this->tag_name = null; - $this->tag_type = null; - $this->alreadyInSave = false; - $this->alreadyInValidation = false; - $this->clearAllReferences(); - $this->applyDefaultValues(); - $this->resetModified(); - $this->setNew(true); - $this->setDeleted(false); - } - - /** - * Resets all collections of referencing foreign keys. - * - * This method is a user-space workaround for PHP's inability to garbage collect objects - * with circular references. This is currently necessary when using Propel in certain - * daemon or large-volumne/high-memory operations. - * - * @param boolean $deep Whether to also clear the references on all associated objects. - */ - public function clearAllReferences($deep = false) - { - if ($deep) { - if ($this->collCcFileTags) { - foreach ((array) $this->collCcFileTags as $o) { - $o->clearAllReferences($deep); - } - } - if ($this->collCcPlayoutHistoryMetaDatas) { - foreach ((array) $this->collCcPlayoutHistoryMetaDatas as $o) { - $o->clearAllReferences($deep); - } - } - if ($this->collCcPlayoutHistoryTemplateTags) { - foreach ((array) $this->collCcPlayoutHistoryTemplateTags as $o) { - $o->clearAllReferences($deep); - } - } - } // if ($deep) - - $this->collCcFileTags = null; - $this->collCcPlayoutHistoryMetaDatas = null; - $this->collCcPlayoutHistoryTemplateTags = null; - } - - /** - * Catches calls to virtual methods - */ - public function __call($name, $params) - { - if (preg_match('/get(\w+)/', $name, $matches)) { - $virtualColumn = $matches[1]; - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - // no lcfirst in php<5.3... - $virtualColumn[0] = strtolower($virtualColumn[0]); - if ($this->hasVirtualColumn($virtualColumn)) { - return $this->getVirtualColumn($virtualColumn); - } - } - throw new PropelException('Call to undefined method: ' . $name); - } - -} // BaseCcTag diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php deleted file mode 100644 index 6a68b6ede..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcTagPeer.php +++ /dev/null @@ -1,753 +0,0 @@ - array ('DbId', 'DbTagName', 'DbTagType', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTagName', 'dbTagType', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::TAG_NAME, self::TAG_TYPE, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TAG_NAME', 'TAG_TYPE', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'tag_name', 'tag_type', ), - BasePeer::TYPE_NUM => array (0, 1, 2, ) - ); - - /** - * holds an array of keys for quick access to the fieldnames array - * - * first dimension keys are the type constants - * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 - */ - private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTagName' => 1, 'DbTagType' => 2, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTagName' => 1, 'dbTagType' => 2, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TAG_NAME => 1, self::TAG_TYPE => 2, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TAG_NAME' => 1, 'TAG_TYPE' => 2, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'tag_name' => 1, 'tag_type' => 2, ), - BasePeer::TYPE_NUM => array (0, 1, 2, ) - ); - - /** - * Translates a fieldname to another type - * - * @param string $name field name - * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. - * @throws PropelException - if the specified name could not be found in the fieldname mappings. - */ - static public function translateFieldName($name, $fromType, $toType) - { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; - if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); - } - return $toNames[$key]; - } - - /** - * Returns an array of field names. - * - * @param string $type The type of fieldnames to return: - * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME - * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM - * @return array A list of field names - */ - - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) - { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); - } - return self::$fieldNames[$type]; - } - - /** - * Convenience method which changes table.column to alias.column. - * - * Using this method you can maintain SQL abstraction while using column aliases. - * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); - * - * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. CcTagPeer::COLUMN_NAME). - * @return string - */ - public static function alias($alias, $column) - { - return str_replace(CcTagPeer::TABLE_NAME.'.', $alias.'.', $column); - } - - /** - * Add all the columns needed to create a new object. - * - * Note: any columns that were marked with lazyLoad="true" in the - * XML schema will not be added to the select list and only loaded - * on demand. - * - * @param Criteria $criteria object containing the columns to add. - * @param string $alias optional table alias - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function addSelectColumns(Criteria $criteria, $alias = null) - { - if (null === $alias) { - $criteria->addSelectColumn(CcTagPeer::ID); - $criteria->addSelectColumn(CcTagPeer::TAG_NAME); - $criteria->addSelectColumn(CcTagPeer::TAG_TYPE); - } else { - $criteria->addSelectColumn($alias . '.ID'); - $criteria->addSelectColumn($alias . '.TAG_NAME'); - $criteria->addSelectColumn($alias . '.TAG_TYPE'); - } - } - - /** - * Returns the number of rows matching criteria. - * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. - * @param PropelPDO $con - * @return int Number of matching rows. - */ - public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) - { - // we may modify criteria, so copy it first - $criteria = clone $criteria; - - // We need to set the primary table name, since in the case that there are no WHERE columns - // it will be impossible for the BasePeer::createSelectSql() method to determine which - // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcTagPeer::TABLE_NAME); - - if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->setDistinct(); - } - - if (!$criteria->hasSelectClause()) { - CcTagPeer::addSelectColumns($criteria); - } - - $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName - - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - // BasePeer returns a PDOStatement - $stmt = BasePeer::doCount($criteria, $con); - - if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $count = (int) $row[0]; - } else { - $count = 0; // no rows returned; we infer that means 0 matches. - } - $stmt->closeCursor(); - return $count; - } - /** - * Method to select one object from the DB. - * - * @param Criteria $criteria object used to create the SELECT statement. - * @param PropelPDO $con - * @return CcTag - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) - { - $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = CcTagPeer::doSelect($critcopy, $con); - if ($objects) { - return $objects[0]; - } - return null; - } - /** - * Method to do selects. - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doSelect(Criteria $criteria, PropelPDO $con = null) - { - return CcTagPeer::populateObjects(CcTagPeer::doSelectStmt($criteria, $con)); - } - /** - * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. - * - * Use this method directly if you want to work with an executed statement durirectly (for example - * to perform your own object hydration). - * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param PropelPDO $con The connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return PDOStatement The executed PDOStatement object. - * @see BasePeer::doSelect() - */ - public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - if (!$criteria->hasSelectClause()) { - $criteria = clone $criteria; - CcTagPeer::addSelectColumns($criteria); - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - // BasePeer returns a PDOStatement - return BasePeer::doSelect($criteria, $con); - } - /** - * Adds an object to the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doSelect*() - * methods in your stub classes -- you may need to explicitly add objects - * to the cache in order to ensure that the same objects are always returned by doSelect*() - * and retrieveByPK*() calls. - * - * @param CcTag $value A CcTag object. - * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). - */ - public static function addInstanceToPool(CcTag $obj, $key = null) - { - if (Propel::isInstancePoolingEnabled()) { - if ($key === null) { - $key = (string) $obj->getDbId(); - } // if key === null - self::$instances[$key] = $obj; - } - } - - /** - * Removes an object from the instance pool. - * - * Propel keeps cached copies of objects in an instance pool when they are retrieved - * from the database. In some cases -- especially when you override doDelete - * methods in your stub classes -- you may need to explicitly remove objects - * from the cache in order to prevent returning objects that no longer exist. - * - * @param mixed $value A CcTag object or a primary key value. - */ - public static function removeInstanceFromPool($value) - { - if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof CcTag) { - $key = (string) $value->getDbId(); - } elseif (is_scalar($value)) { - // assume we've been passed a primary key - $key = (string) $value; - } else { - $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcTag object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); - throw $e; - } - - unset(self::$instances[$key]); - } - } // removeInstanceFromPool() - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param string $key The key (@see getPrimaryKeyHash()) for this instance. - * @return CcTag Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. - * @see getPrimaryKeyHash() - */ - public static function getInstanceFromPool($key) - { - if (Propel::isInstancePoolingEnabled()) { - if (isset(self::$instances[$key])) { - return self::$instances[$key]; - } - } - return null; // just to be explicit - } - - /** - * Clear the instance pool. - * - * @return void - */ - public static function clearInstancePool() - { - self::$instances = array(); - } - - /** - * Method to invalidate the instance pool of all tables related to cc_tag - * by a foreign key with ON DELETE CASCADE - */ - public static function clearRelatedInstancePool() - { - // Invalidate objects in CcFileTagPeer instance pool, - // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - CcFileTagPeer::clearInstancePool(); - // Invalidate objects in CcPlayoutHistoryMetaDataPeer instance pool, - // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - CcPlayoutHistoryMetaDataPeer::clearInstancePool(); - // Invalidate objects in CcPlayoutHistoryTemplateTagPeer instance pool, - // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - CcPlayoutHistoryTemplateTagPeer::clearInstancePool(); - } - - /** - * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. - * - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, a serialize()d version of the primary key will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return string A string version of PK or NULL if the components of primary key in result array are all null. - */ - public static function getPrimaryKeyHashFromRow($row, $startcol = 0) - { - // If the PK cannot be derived from the row, return NULL. - if ($row[$startcol] === null) { - return null; - } - return (string) $row[$startcol]; - } - - /** - * Retrieves the primary key from the DB resultset row - * For tables with a single-column primary key, that simple pkey value will be returned. For tables with - * a multi-column primary key, an array of the primary key columns will be returned. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @return mixed The primary key of the row - */ - public static function getPrimaryKeyFromRow($row, $startcol = 0) - { - return (int) $row[$startcol]; - } - - /** - * The returned array will contain objects of the default type or - * objects that inherit from the default. - * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function populateObjects(PDOStatement $stmt) - { - $results = array(); - - // set the class once to avoid overhead in the loop - $cls = CcTagPeer::getOMClass(false); - // populate the object(s) - while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = CcTagPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = CcTagPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, 0, true); // rehydrate - $results[] = $obj; - } else { - $obj = new $cls(); - $obj->hydrate($row); - $results[] = $obj; - CcTagPeer::addInstanceToPool($obj, $key); - } // if key exists - } - $stmt->closeCursor(); - return $results; - } - /** - * Populates an object of the default type or an object that inherit from the default. - * - * @param array $row PropelPDO resultset row. - * @param int $startcol The 0-based offset for reading from the resultset row. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return array (CcTag object, last column rank) - */ - public static function populateObject($row, $startcol = 0) - { - $key = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = CcTagPeer::getInstanceFromPool($key))) { - // We no longer rehydrate the object, since this can cause data loss. - // See http://www.propelorm.org/ticket/509 - // $obj->hydrate($row, $startcol, true); // rehydrate - $col = $startcol + CcTagPeer::NUM_COLUMNS; - } else { - $cls = CcTagPeer::OM_CLASS; - $obj = new $cls(); - $col = $obj->hydrate($row, $startcol); - CcTagPeer::addInstanceToPool($obj, $key); - } - return array($obj, $col); - } - /** - * Returns the TableMap related to this peer. - * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function getTableMap() - { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); - } - - /** - * Add a TableMap instance to the database for this peer class. - */ - public static function buildTableMap() - { - $dbMap = Propel::getDatabaseMap(BaseCcTagPeer::DATABASE_NAME); - if (!$dbMap->hasTable(BaseCcTagPeer::TABLE_NAME)) - { - $dbMap->addTableObject(new CcTagTableMap()); - } - } - - /** - * The class that the Peer will make instances of. - * - * If $withPrefix is true, the returned path - * uses a dot-path notation which is tranalted into a path - * relative to a location on the PHP include_path. - * (e.g. path.to.MyClass -> 'path/to/MyClass.php') - * - * @param boolean $withPrefix Whether or not to return the path with the class name - * @return string path.to.ClassName - */ - public static function getOMClass($withPrefix = true) - { - return $withPrefix ? CcTagPeer::CLASS_DEFAULT : CcTagPeer::OM_CLASS; - } - - /** - * Method perform an INSERT on the database, given a CcTag or Criteria object. - * - * @param mixed $values Criteria or CcTag object containing data that is used to create the INSERT statement. - * @param PropelPDO $con the PropelPDO connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doInsert($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - } else { - $criteria = $values->buildCriteria(); // build Criteria from CcTag object - } - - if ($criteria->containsKey(CcTagPeer::ID) && $criteria->keyContainsValue(CcTagPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcTagPeer::ID.')'); - } - - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - try { - // use transaction because $criteria could contain info - // for more than one table (I guess, conceivably) - $con->beginTransaction(); - $pk = BasePeer::doInsert($criteria, $con); - $con->commit(); - } catch(PropelException $e) { - $con->rollBack(); - throw $e; - } - - return $pk; - } - - /** - * Method perform an UPDATE on the database, given a CcTag or Criteria object. - * - * @param mixed $values Criteria or CcTag object containing data that is used to create the UPDATE statement. - * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). - * @return int The number of affected rows (if supported by underlying database driver). - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doUpdate($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - $selectCriteria = new Criteria(self::DATABASE_NAME); - - if ($values instanceof Criteria) { - $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(CcTagPeer::ID); - $value = $criteria->remove(CcTagPeer::ID); - if ($value) { - $selectCriteria->add(CcTagPeer::ID, $value, $comparison); - } else { - $selectCriteria->setPrimaryTableName(CcTagPeer::TABLE_NAME); - } - - } else { // $values is CcTag object - $criteria = $values->buildCriteria(); // gets full criteria - $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) - } - - // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); - } - - /** - * Method to DELETE all rows from the cc_tag table. - * - * @return int The number of affected rows (if supported by underlying database driver). - */ - public static function doDeleteAll($con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - $affectedRows = 0; // initialize var to track total num of affected rows - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - $affectedRows += BasePeer::doDeleteAll(CcTagPeer::TABLE_NAME, $con, CcTagPeer::DATABASE_NAME); - // Because this db requires some delete cascade/set null emulation, we have to - // clear the cached instance *after* the emulation has happened (since - // instances get re-added by the select statement contained therein). - CcTagPeer::clearInstancePool(); - CcTagPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Method perform a DELETE on the database, given a CcTag or Criteria object OR a primary key value. - * - * @param mixed $values Criteria or CcTag object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param PropelPDO $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); - } - - if ($values instanceof Criteria) { - // invalidate the cache for all objects of this type, since we have no - // way of knowing (without running a query) what objects should be invalidated - // from the cache based on this Criteria. - CcTagPeer::clearInstancePool(); - // rename for clarity - $criteria = clone $values; - } elseif ($values instanceof CcTag) { // it's a model object - // invalidate the cache for this single object - CcTagPeer::removeInstanceFromPool($values); - // create criteria based on pk values - $criteria = $values->buildPkeyCriteria(); - } else { // it's a primary key, or an array of pks - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(CcTagPeer::ID, (array) $values, Criteria::IN); - // invalidate the cache for this object(s) - foreach ((array) $values as $singleval) { - CcTagPeer::removeInstanceFromPool($singleval); - } - } - - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - $affectedRows = 0; // initialize var to track total num of affected rows - - try { - // use transaction because $criteria could contain info - // for more than one table or we could emulating ON DELETE CASCADE, etc. - $con->beginTransaction(); - - $affectedRows += BasePeer::doDelete($criteria, $con); - CcTagPeer::clearRelatedInstancePool(); - $con->commit(); - return $affectedRows; - } catch (PropelException $e) { - $con->rollBack(); - throw $e; - } - } - - /** - * Validates all modified columns of given CcTag object. - * If parameter $columns is either a single column name or an array of column names - * than only those columns are validated. - * - * NOTICE: This does not apply to primary or foreign keys for now. - * - * @param CcTag $obj The object to validate. - * @param mixed $cols Column name or array of column names. - * - * @return mixed TRUE if all columns are valid or the error message of the first invalid column. - */ - public static function doValidate(CcTag $obj, $cols = null) - { - $columns = array(); - - if ($cols) { - $dbMap = Propel::getDatabaseMap(CcTagPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(CcTagPeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); - } - - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); - $columns[$colName] = $obj->$get(); - } - } - } else { - - } - - return BasePeer::doValidate(CcTagPeer::DATABASE_NAME, CcTagPeer::TABLE_NAME, $columns); - } - - /** - * Retrieve a single object by pkey. - * - * @param int $pk the primary key. - * @param PropelPDO $con the connection to use - * @return CcTag - */ - public static function retrieveByPK($pk, PropelPDO $con = null) - { - - if (null !== ($obj = CcTagPeer::getInstanceFromPool((string) $pk))) { - return $obj; - } - - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $criteria = new Criteria(CcTagPeer::DATABASE_NAME); - $criteria->add(CcTagPeer::ID, $pk); - - $v = CcTagPeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; - } - - /** - * Retrieve multiple objects by pkey. - * - * @param array $pks List of primary keys - * @param PropelPDO $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function retrieveByPKs($pks, PropelPDO $con = null) - { - if ($con === null) { - $con = Propel::getConnection(CcTagPeer::DATABASE_NAME, Propel::CONNECTION_READ); - } - - $objs = null; - if (empty($pks)) { - $objs = array(); - } else { - $criteria = new Criteria(CcTagPeer::DATABASE_NAME); - $criteria->add(CcTagPeer::ID, $pks, Criteria::IN); - $objs = CcTagPeer::doSelect($criteria, $con); - } - return $objs; - } - -} // BaseCcTagPeer - -// This is the static code needed to register the TableMap for this table with the main Propel class. -// -BaseCcTagPeer::buildTableMap(); - diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php deleted file mode 100644 index c90d8cb09..000000000 --- a/airtime_mvc/application/models/airtime/om/BaseCcTagQuery.php +++ /dev/null @@ -1,421 +0,0 @@ -setModelAlias($modelAlias); - } - if ($criteria instanceof Criteria) { - $query->mergeWith($criteria); - } - return $query; - } - - /** - * Find object by primary key - * Use instance pooling to avoid a database query if the object exists - * - * $obj = $c->findPk(12, $con); - * - * @param mixed $key Primary key to use for the query - * @param PropelPDO $con an optional connection object - * - * @return CcTag|array|mixed the result, formatted by the current formatter - */ - public function findPk($key, $con = null) - { - if ((null !== ($obj = CcTagPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { - // the object is alredy in the instance pool - return $obj; - } else { - // the object has not been requested yet, or the formatter is not an object formatter - $criteria = $this->isKeepQuery() ? clone $this : $this; - $stmt = $criteria - ->filterByPrimaryKey($key) - ->getSelectStatement($con); - return $criteria->getFormatter()->init($criteria)->formatOne($stmt); - } - } - - /** - * Find objects by primary key - * - * $objs = $c->findPks(array(12, 56, 832), $con); - * - * @param array $keys Primary keys to use for the query - * @param PropelPDO $con an optional connection object - * - * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter - */ - public function findPks($keys, $con = null) - { - $criteria = $this->isKeepQuery() ? clone $this : $this; - return $this - ->filterByPrimaryKeys($keys) - ->find($con); - } - - /** - * Filter the query by primary key - * - * @param mixed $key Primary key to use for the query - * - * @return CcTagQuery The current query, for fluid interface - */ - public function filterByPrimaryKey($key) - { - return $this->addUsingAlias(CcTagPeer::ID, $key, Criteria::EQUAL); - } - - /** - * Filter the query by a list of primary keys - * - * @param array $keys The list of primary key to use for the query - * - * @return CcTagQuery The current query, for fluid interface - */ - public function filterByPrimaryKeys($keys) - { - return $this->addUsingAlias(CcTagPeer::ID, $keys, Criteria::IN); - } - - /** - * Filter the query on the id column - * - * @param int|array $dbId The value to use as filter. - * Accepts an associative array('min' => $minValue, 'max' => $maxValue) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcTagQuery The current query, for fluid interface - */ - public function filterByDbId($dbId = null, $comparison = null) - { - if (is_array($dbId) && null === $comparison) { - $comparison = Criteria::IN; - } - return $this->addUsingAlias(CcTagPeer::ID, $dbId, $comparison); - } - - /** - * Filter the query on the tag_name column - * - * @param string $dbTagName The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcTagQuery The current query, for fluid interface - */ - public function filterByDbTagName($dbTagName = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbTagName)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbTagName)) { - $dbTagName = str_replace('*', '%', $dbTagName); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcTagPeer::TAG_NAME, $dbTagName, $comparison); - } - - /** - * Filter the query on the tag_type column - * - * @param string $dbTagType The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcTagQuery The current query, for fluid interface - */ - public function filterByDbTagType($dbTagType = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($dbTagType)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $dbTagType)) { - $dbTagType = str_replace('*', '%', $dbTagType); - $comparison = Criteria::LIKE; - } - } - return $this->addUsingAlias(CcTagPeer::TAG_TYPE, $dbTagType, $comparison); - } - - /** - * Filter the query by a related CcFileTag object - * - * @param CcFileTag $ccFileTag the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcTagQuery The current query, for fluid interface - */ - public function filterByCcFileTag($ccFileTag, $comparison = null) - { - return $this - ->addUsingAlias(CcTagPeer::ID, $ccFileTag->getDbTagId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcFileTag relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcTagQuery The current query, for fluid interface - */ - public function joinCcFileTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcFileTag'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcFileTag'); - } - - return $this; - } - - /** - * Use the CcFileTag relation CcFileTag object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcFileTagQuery A secondary query class using the current class as primary query - */ - public function useCcFileTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcFileTag($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcFileTag', 'CcFileTagQuery'); - } - - /** - * Filter the query by a related CcPlayoutHistoryMetaData object - * - * @param CcPlayoutHistoryMetaData $ccPlayoutHistoryMetaData the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcTagQuery The current query, for fluid interface - */ - public function filterByCcPlayoutHistoryMetaData($ccPlayoutHistoryMetaData, $comparison = null) - { - return $this - ->addUsingAlias(CcTagPeer::ID, $ccPlayoutHistoryMetaData->getDbTagId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcPlayoutHistoryMetaData relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcTagQuery The current query, for fluid interface - */ - public function joinCcPlayoutHistoryMetaData($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcPlayoutHistoryMetaData'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcPlayoutHistoryMetaData'); - } - - return $this; - } - - /** - * Use the CcPlayoutHistoryMetaData relation CcPlayoutHistoryMetaData object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryMetaDataQuery A secondary query class using the current class as primary query - */ - public function useCcPlayoutHistoryMetaDataQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcPlayoutHistoryMetaData($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaDataQuery'); - } - - /** - * Filter the query by a related CcPlayoutHistoryTemplateTag object - * - * @param CcPlayoutHistoryTemplateTag $ccPlayoutHistoryTemplateTag the related object to use as filter - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return CcTagQuery The current query, for fluid interface - */ - public function filterByCcPlayoutHistoryTemplateTag($ccPlayoutHistoryTemplateTag, $comparison = null) - { - return $this - ->addUsingAlias(CcTagPeer::ID, $ccPlayoutHistoryTemplateTag->getDbTagId(), $comparison); - } - - /** - * Adds a JOIN clause to the query using the CcPlayoutHistoryTemplateTag relation - * - * @param string $relationAlias optional alias for the relation - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcTagQuery The current query, for fluid interface - */ - public function joinCcPlayoutHistoryTemplateTag($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplateTag'); - - // create a ModelJoin object for this join - $join = new ModelJoin(); - $join->setJoinType($joinType); - $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); - if ($previousJoin = $this->getPreviousJoin()) { - $join->setPreviousJoin($previousJoin); - } - - // add the ModelJoin to the current object - if($relationAlias) { - $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); - $this->addJoinObject($join, $relationAlias); - } else { - $this->addJoinObject($join, 'CcPlayoutHistoryTemplateTag'); - } - - return $this; - } - - /** - * Use the CcPlayoutHistoryTemplateTag relation CcPlayoutHistoryTemplateTag object - * - * @see useQuery() - * - * @param string $relationAlias optional alias for the relation, - * to be used as main alias in the secondary query - * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' - * - * @return CcPlayoutHistoryTemplateTagQuery A secondary query class using the current class as primary query - */ - public function useCcPlayoutHistoryTemplateTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) - { - return $this - ->joinCcPlayoutHistoryTemplateTag($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplateTag', 'CcPlayoutHistoryTemplateTagQuery'); - } - - /** - * Exclude object from result - * - * @param CcTag $ccTag Object to remove from the list of results - * - * @return CcTagQuery The current query, for fluid interface - */ - public function prune($ccTag = null) - { - if ($ccTag) { - $this->addUsingAlias(CcTagPeer::ID, $ccTag->getDbId(), Criteria::NOT_EQUAL); - } - - return $this; - } - -} // BaseCcTagQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php b/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php index d61b8e513..5ede5b73c 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php @@ -861,31 +861,6 @@ abstract class BaseCcTimestamp extends BaseObject implements Persistent } } - - /** - * If this collection has already been initialized with - * an identical criteria, it returns the collection. - * Otherwise if this CcTimestamp is new, it will return - * an empty collection; or if this CcTimestamp has previously - * been saved, it will retrieve related CcListenerCounts from storage. - * - * This method is protected by default in order to keep the public - * api reasonable. You can provide public methods for those you - * actually need in CcTimestamp. - * - * @param Criteria $criteria optional Criteria object to narrow the query - * @param PropelPDO $con optional connection object - * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) - * @return PropelCollection|array CcListenerCount[] List of CcListenerCount objects - */ - public function getCcListenerCountsJoinCcMountName($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) - { - $query = CcListenerCountQuery::create(null, $criteria); - $query->joinWith('CcMountName', $join_behavior); - - return $this->getCcListenerCounts($query, $con); - } - /** * Clears the current object and sets all attributes to their default values */ diff --git a/airtime_mvc/application/services/CalendarService.php b/airtime_mvc/application/services/CalendarService.php index b0e1ad865..b0a98174f 100644 --- a/airtime_mvc/application/services/CalendarService.php +++ b/airtime_mvc/application/services/CalendarService.php @@ -45,16 +45,11 @@ class Application_Service_CalendarService if ($this->ccShowInstance->isRecorded()) { $ccFile = $this->ccShowInstance->getCcFiles(); - if (!isset($ccFile)) { - $menu["error when recording"] = array ( - "name" => _("Record file doesn't exist"), - "icon" => "error"); - }else { - $menu["view_recorded"] = array( - "name" => _("View Recorded File Metadata"), - "icon" => "overview", - "url" => $baseUrl."library/edit-file-md/id/".$ccFile->getDbId()); - } + + $menu["view_recorded"] = array( + "name" => _("View Recorded File Metadata"), + "icon" => "overview", + "url" => $baseUrl."library/edit-file-md/id/".$ccFile->getDbId()); //recorded show can be uploaded to soundcloud if (Application_Model_Preference::GetUploadToSoundcloudOption()) { @@ -80,10 +75,10 @@ class Application_Service_CalendarService } } else { //Show content can be modified from the calendar if: - // the show has not started, + // the show has not ended, // the user is admin or hosting the show, // the show is not recorded - if ($now < $start && ($isAdminOrPM || $isHostOfShow) && + if ($now < $end && ($isAdminOrPM || $isHostOfShow) && !$this->ccShowInstance->isRecorded() ) { $menu["schedule"] = array( @@ -333,4 +328,4 @@ class Application_Service_CalendarService } } -} +} \ No newline at end of file diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php deleted file mode 100644 index 10e559c3b..000000000 --- a/airtime_mvc/application/services/HistoryService.php +++ /dev/null @@ -1,1465 +0,0 @@ -con = isset($con) ? $con : Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME); - $this->timezone = Application_Model_Preference::GetTimezone(); - } - - public function getSupportedTemplateTypes() - { - return array(self::TEMPLATE_TYPE_ITEM, self::TEMPLATE_TYPE_FILE); - } - - //opts is from datatables. - public function getPlayedItemData($startDT, $endDT, $opts, $instanceId=null) - { - $mainSqlQuery = ""; - $paramMap = array(); - $sqlTypes = $this->getSqlTypes(); - - $start = $startDT->format("Y-m-d H:i:s"); - $end = $endDT->format("Y-m-d H:i:s"); - - $template = $this->getConfiguredItemTemplate(); - $fields = $template["fields"]; - $required = $this->mandatoryItemFields(); - - $fields_filemd = array(); - $filemd_keys = array(); - $fields_general = array(); - $general_keys = array(); - - foreach ($fields as $index=>$field) { - - if (in_array($field["name"], $required)) { - continue; - } - - if ($field["isFileMd"]) { - $fields_filemd[] = $field; - $filemd_keys[] = $field["name"]; - } - else { - $fields_general[] = $field; - $general_keys[] = $field["name"]; - } - } - - //----------------------------------------------------------------------- - //Using the instance_id to filter the data. - - - $historyRange = "(". - "SELECT history.starts, history.ends, history.id AS history_id, history.instance_id". - " FROM cc_playout_history as history"; - - if (isset($instanceId)) { - $historyRange.= " WHERE history.instance_id = :instance"; - $paramMap["instance"] = $instanceId; - } - else { - $historyRange.= " WHERE history.starts >= :starts and history.starts < :ends"; - $paramMap["starts"] = $start; - $paramMap["ends"] = $end; - } - - $historyRange.= ") AS history_range"; - - $manualMeta = "(". - "SELECT %KEY%.value AS %KEY%, %KEY%.history_id". - " FROM (". - " SELECT * from cc_playout_history_metadata AS phm WHERE phm.key = :meta_%KEY%". - " ) AS %KEY%". - " ) AS %KEY%_filter"; - - $mainSelect = array( - "history_range.starts", - "history_range.ends", - "history_range.history_id", - "history_range.instance_id" - ); - $mdFilters = array(); - - $numFileMdFields = count($fields_filemd); - - if ($numFileMdFields > 0) { - - //these 3 selects are only needed if $fields_filemd has some fields. - $fileSelect = array("history_file.history_id"); - $nonNullFileSelect = array("file.id as file_id"); - $nullFileSelect = array("null_file.history_id"); - - $fileMdFilters = array(); - - //populate the different dynamic selects with file info. - for ($i = 0; $i < $numFileMdFields; $i++) { - - $field = $fields_filemd[$i]; - $key = $field["name"]; - $type = $sqlTypes[$field["type"]]; - - $fileSelect[] = "file_md.{$key}::{$type}"; - $nonNullFileSelect[] = "file.{$key}::{$type}"; - $nullFileSelect[] = "{$key}_filter.{$key}::{$type}"; - $mainSelect[] = "file_info.{$key}::{$type}"; - - $fileMdFilters[] = str_replace("%KEY%", $key, $manualMeta); - $paramMap["meta_{$key}"] = $key; - } - - //the files associated with scheduled playback in Airtime. - $historyFile = "(". - "SELECT history.id AS history_id, history.file_id". - " FROM cc_playout_history AS history". - " WHERE history.file_id IS NOT NULL". - ") AS history_file"; - - $fileMd = "(". - "SELECT %NON_NULL_FILE_SELECT%". - " FROM cc_files AS file". - ") AS file_md"; - - $fileMd = str_replace("%NON_NULL_FILE_SELECT%", join(", ", $nonNullFileSelect), $fileMd); - - //null files are from manually added data (filling in webstream info etc) - $nullFile = "(". - "SELECT history.id AS history_id". - " FROM cc_playout_history AS history". - " WHERE history.file_id IS NULL". - ") AS null_file"; - - - //---------------------------------- - //building the file inner query - - $fileSqlQuery = - "SELECT ".join(", ", $fileSelect). - " FROM {$historyFile}". - " LEFT JOIN {$fileMd} USING (file_id)". - " UNION". - " SELECT ".join(", ", $nullFileSelect). - " FROM {$nullFile}"; - - foreach ($fileMdFilters as $filter) { - - $fileSqlQuery.= - " LEFT JOIN {$filter} USING(history_id)"; - } - - } - - for ($i = 0, $len = count($fields_general); $i < $len; $i++) { - - $field = $fields_general[$i]; - $key = $field["name"]; - $type = $sqlTypes[$field["type"]]; - - $mdFilters[] = str_replace("%KEY%", $key, $manualMeta); - $paramMap["meta_{$key}"] = $key; - $mainSelect[] = "{$key}_filter.{$key}::{$type}"; - } - - $mainSqlQuery.= - "SELECT ".join(", ", $mainSelect). - " FROM {$historyRange}"; - - if (isset($fileSqlQuery)) { - - $mainSqlQuery.= - " LEFT JOIN ( {$fileSqlQuery} ) as file_info USING(history_id)"; - } - - foreach ($mdFilters as $filter) { - - $mainSqlQuery.= - " LEFT JOIN {$filter} USING(history_id)"; - } - - //---------------------------------------------------------------------- - //need to count the total rows to tell Datatables. - $stmt = $this->con->prepare($mainSqlQuery); - foreach ($paramMap as $param => $v) { - $stmt->bindValue($param, $v); - } - - if ($stmt->execute()) { - $totalRows = $stmt->rowCount(); - } - else { - $msg = implode(',', $stmt->errorInfo()); - throw new Exception("Error: $msg"); - } - - //------------------------------------------------------------------------ - //Using Datatables parameters to sort the data. - - $numOrderColumns = $opts["iSortingCols"]; - $orderBys = array(); - - for ($i = 0; $i < $numOrderColumns; $i++) { - - $colNum = $opts["iSortCol_".$i]; - $key = $opts["mDataProp_".$colNum]; - $sortDir = $opts["sSortDir_".$i]; - - if (in_array($key, $required)) { - - $orderBys[] = "history_range.{$key} {$sortDir}"; - } - else if (in_array($key, $filemd_keys)) { - - $orderBys[] = "file_info.{$key} {$sortDir}"; - } - else if (in_array($key, $general_keys)) { - - $orderBys[] = "{$key}_filter.{$key} {$sortDir}"; - } - else { - //throw new Exception("Error: $key is not part of the template."); - } - } - - if (count($orderBys) > 0) { - - $orders = join(", ", $orderBys); - - $mainSqlQuery.= - " ORDER BY {$orders}"; - } - - //--------------------------------------------------------------- - //using Datatables parameters to add limits/offsets - - $displayLength = intval($opts["iDisplayLength"]); - //limit the results returned. - if ($displayLength !== -1) { - $mainSqlQuery.= - " OFFSET :offset LIMIT :limit"; - - $paramMap["offset"] = intval($opts["iDisplayStart"]); - $paramMap["limit"] = $displayLength; - } - - $stmt = $this->con->prepare($mainSqlQuery); - foreach ($paramMap as $param => $v) { - $stmt->bindValue($param, $v); - } - - $rows = array(); - if ($stmt->execute()) { - $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); - } - else { - $msg = implode(',', $stmt->errorInfo()); - throw new Exception("Error: $msg"); - } - - //----------------------------------------------------------------------- - //processing results. - - $timezoneUTC = new DateTimeZone("UTC"); - $timezoneLocal = new DateTimeZone($this->timezone); - - $boolCast = array(); - foreach ($fields as $index=>$field) { - - if ($field["type"] == TEMPLATE_BOOLEAN) { - $boolCast[] = $field["name"]; - } - } - - foreach ($rows as $index => &$result) { - - foreach ($boolCast as $name) { - $result[$name] = (bool) $result[$name]; - } - - //need to display the results in the station's timezone. - $dateTime = new DateTime($result["starts"], $timezoneUTC); - $dateTime->setTimezone($timezoneLocal); - $result["starts"] = $dateTime->format("Y-m-d H:i:s"); - - $dateTime = new DateTime($result["ends"], $timezoneUTC); - $dateTime->setTimezone($timezoneLocal); - $result["ends"] = $dateTime->format("Y-m-d H:i:s"); - - if (isset($result[MDATA_KEY_DURATION])) { - $formatter = new LengthFormatter($result[MDATA_KEY_DURATION]); - $result[MDATA_KEY_DURATION] = $formatter->format(); - } - - //need to add a checkbox.. - $result["checkbox"] = ""; - - //$unicodeChar = '\u2612'; - //$result["new"] = json_decode('"'.$unicodeChar.'"'); - //$result["new"] = "U+2612"; - } - - return array( - "sEcho" => intval($opts["sEcho"]), - //"iTotalDisplayRecords" => intval($totalDisplayRows), - "iTotalDisplayRecords" => intval($totalRows), - "iTotalRecords" => intval($totalRows), - "history" => $rows - ); - } - - public function getFileSummaryData($startDT, $endDT, $opts) - { - $select = array ( - "summary.played", - "summary.file_id", - "summary.".MDATA_KEY_TITLE, - "summary.".MDATA_KEY_CREATOR - ); - - $mainSqlQuery = ""; - $paramMap = array(); - $start = $startDT->format("Y-m-d H:i:s"); - $end = $endDT->format("Y-m-d H:i:s"); - - $paramMap["starts"] = $start; - $paramMap["ends"] = $end; - - $template = $this->getConfiguredFileTemplate(); - $fields = $template["fields"]; - $required = $this->mandatoryFileFields(); - - foreach ($fields as $index=>$field) { - - $key = $field["name"]; - - if (in_array($field["name"], $required)) { - continue; - } - - $select[] = "summary.{$key}"; - } - - $fileSummaryTable = "(( - SELECT COUNT(history.file_id) as played, history.file_id as file_id - FROM cc_playout_history AS history - WHERE history.starts >= :starts AND history.starts < :ends - AND history.file_id IS NOT NULL - GROUP BY history.file_id - ) AS playout - LEFT JOIN cc_files AS file ON (file.id = playout.file_id)) AS summary"; - - $mainSqlQuery.= - "SELECT ".join(", ", $select). - " FROM {$fileSummaryTable}"; - - //------------------------------------------------------------------------- - //need to count the total rows to tell Datatables. - $stmt = $this->con->prepare($mainSqlQuery); - foreach ($paramMap as $param => $v) { - $stmt->bindValue($param, $v); - } - - if ($stmt->execute()) { - $totalRows = $stmt->rowCount(); - } - else { - $msg = implode(',', $stmt->errorInfo()); - throw new Exception("Error: $msg"); - } - - //------------------------------------------------------------------------ - //Using Datatables parameters to sort the data. - - $numOrderColumns = $opts["iSortingCols"]; - $orderBys = array(); - - for ($i = 0; $i < $numOrderColumns; $i++) { - - $colNum = $opts["iSortCol_".$i]; - $key = $opts["mDataProp_".$colNum]; - $sortDir = $opts["sSortDir_".$i]; - - $orderBys[] = "summary.{$key} {$sortDir}"; - } - - if ($numOrderColumns > 0) { - - $orders = join(", ", $orderBys); - - $mainSqlQuery.= - " ORDER BY {$orders}"; - } - - //------------------------------------------------------------ - //using datatables params to add limits/offsets - $displayLength = intval($opts["iDisplayLength"]); - if ($displayLength !== -1) { - $mainSqlQuery.= - " OFFSET :offset LIMIT :limit"; - - $paramMap["offset"] = $opts["iDisplayStart"]; - $paramMap["limit"] = $displayLength; - } - - $stmt = $this->con->prepare($mainSqlQuery); - foreach ($paramMap as $param => $v) { - $stmt->bindValue($param, $v); - } - - $rows = array(); - if ($stmt->execute()) { - $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); - } - else { - $msg = implode(',', $stmt->errorInfo()); - throw new Exception("Error: $msg"); - } - - //----------------------------------------------------------------- - //processing the results - foreach ($rows as &$row) { - $formatter = new LengthFormatter($row['length']); - $row['length'] = $formatter->format(); - } - - return array( - "sEcho" => intval($opts["sEcho"]), - //"iTotalDisplayRecords" => intval($totalDisplayRows), - "iTotalDisplayRecords" => intval($totalRows), - "iTotalRecords" => intval($totalRows), - "history" => $rows - ); - } - - public function getShowList($startDT, $endDT) - { - $user = Application_Model_User::getCurrentUser(); - $shows = Application_Model_Show::getShows($startDT, $endDT); - - Logging::info($startDT->format("Y-m-d H:i:s")); - Logging::info($endDT->format("Y-m-d H:i:s")); - - Logging::info($shows); - - //need to filter the list to only their shows - if ($user->isHost()) { - - $showIds = array(); - - foreach ($shows as $show) { - $showIds[] = $show["show_id"]; - } - - $showIds = array_unique($showIds); - Logging::info($showIds); - - $hostRecords = CcShowHostsQuery::create() - ->filterByDbHost($user->getId()) - ->filterByDbShow($showIds) - ->find($this->con); - - $filteredShowIds = array(); - - foreach($hostRecords as $record) { - $filteredShowIds[] = $record->getDbShow(); - } - - Logging::info($filteredShowIds); - - $filteredShows = array(); - - foreach($shows as $show) { - if (in_array($show["show_id"], $filteredShowIds)) { - $filteredShows[] = $show; - } - } - } - else { - $filteredShows = $shows; - } - - $timezoneUTC = new DateTimeZone("UTC"); - $timezoneLocal = new DateTimeZone($this->timezone); - - foreach ($filteredShows as &$result) { - - //need to display the results in the station's timezone. - $dateTime = new DateTime($result["starts"], $timezoneUTC); - $dateTime->setTimezone($timezoneLocal); - $result["starts"] = $dateTime->format("Y-m-d H:i:s"); - - $dateTime = new DateTime($result["ends"], $timezoneUTC); - $dateTime->setTimezone($timezoneLocal); - $result["ends"] = $dateTime->format("Y-m-d H:i:s"); - - } - - return $filteredShows; - } - - public function insertPlayedItem($schedId) { - - $this->con->beginTransaction(); - - try { - - $item = CcScheduleQuery::create()->findPK($schedId, $this->con); - - //TODO figure out how to combine these all into 1 query. - $showInstance = $item->getCcShowInstances($this->con); - $show = $showInstance->getCcShow($this->con); - - $fileId = $item->getDbFileId(); - - //don't add webstreams - if (isset($fileId)) { - - $metadata = array(); - $metadata["showname"] = $show->getDbName(); - - $instanceEnd = $showInstance->getDbEnds(null); - $itemEnd = $item->getDbEnds(null); - $recordEnd = ($instanceEnd < $itemEnd) ? $instanceEnd : $itemEnd; - - $history = new CcPlayoutHistory(); - $history->setDbFileId($fileId); - $history->setDbStarts($item->getDbStarts(null)); - $history->setDbEnds($recordEnd); - $history->setDbInstanceId($item->getDbInstanceId()); - - foreach ($metadata as $key => $val) { - $meta = new CcPlayoutHistoryMetaData(); - $meta->setDbKey($key); - $meta->setDbValue($val); - - $history->addCcPlayoutHistoryMetaData($meta); - } - - $history->save($this->con); - } - - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - throw $e; - } - } - - /* id is an id in cc_playout_history */ - public function makeHistoryItemForm($id, $populate=false) { - - try { - $form = new Application_Form_EditHistoryItem(); - $template = $this->getConfiguredItemTemplate(); - $required = $this->mandatoryItemFields(); - $form->createFromTemplate($template["fields"], $required); - - if ($populate) { - $formValues = array(); - - $historyRecord = CcPlayoutHistoryQuery::create()->findPk($id, $this->con); - $file = $historyRecord->getCcFiles($this->con); - $instance = $historyRecord->getCcShowInstances($this->con); - - if (isset($instance)) { - $show = $instance->getCcShow($this->con); - $selOpts = array(); - $instance_id = $instance->getDbId(); - $selOpts[$instance_id] = $show->getDbName(); - $form->populateShowInstances($selOpts, $instance_id); - } - - if (isset($file)) { - $f = Application_Model_StoredFile::createWithFile($file, $this->con); - $filemd = $f->getDbColMetadata(); - } - $metadata = array(); - $mds = $historyRecord->getCcPlayoutHistoryMetaDatas(); - foreach ($mds as $md) { - $metadata[$md->getDbKey()] = $md->getDbValue(); - } - - $prefix = Application_Form_EditHistoryItem::ID_PREFIX; - $formValues["{$prefix}id"] = $id; - - foreach($template["fields"] as $index => $field) { - - $key = $field["name"]; - $value = ""; - - if (in_array($key, $required)) { - - $method = "getDb".ucfirst($key); - $value = $historyRecord->$method(); - } - else if (isset($filemd) && $field["isFileMd"]) { - - $value = $filemd[$key]; - } - else if (isset($metadata[$key])) { - $value = $metadata[$key]; - } - - //need to convert to the station's local time first. - if ($field["type"] == TEMPLATE_DATETIME) { - $timezoneUTC = new DateTimeZone("UTC"); - $timezoneLocal = new DateTimeZone($this->timezone); - - $dateTime = new DateTime($value, $timezoneUTC); - $dateTime->setTimezone($timezoneLocal); - $value = $dateTime->format("Y-m-d H:i:s"); - } - - $formValues["$prefix{$key}"] = $value; - } - - $form->populate($formValues); - } - - return $form; - } - catch (Exception $e) { - Logging::info($e); - throw $e; - } - } - - /* id is an id in cc_files */ - public function makeHistoryFileForm($id) { - - try { - $form = new Application_Form_EditHistoryFile(); - $template = $this->getConfiguredFileTemplate(); - $required = $this->mandatoryFileFields(); - $form->createFromTemplate($template["fields"], $required); - - $file = Application_Model_StoredFile::RecallById($id, $this->con); - $md = $file->getDbColMetadata(); - - $prefix = Application_Form_EditHistoryFile::ID_PREFIX; - $formValues = array(); - $formValues["{$prefix}id"] = $id; - - foreach($template["fields"] as $index => $field) { - - $key = $field["name"]; - - if (in_array($key, $required)) { - continue; - } - - $value = $md[$key]; - $formValues["$prefix{$key}"] = $value; - } - - $form->populate($formValues); - - return $form; - } - catch (Exception $e) { - Logging::info($e); - throw $e; - } - } - - public function populateTemplateFile($values, $id) { - - $this->con->beginTransaction(); - - try { - - $file = Application_Model_StoredFile::RecallById($id, $this->con); - - $prefix = Application_Form_EditHistoryFile::ID_PREFIX; - $prefix_len = strlen($prefix); - $templateValues = $values[$prefix."template"]; - - $md = array(); - - foreach ($templateValues as $index => $value) { - - $key = substr($index, $prefix_len); - $md[$key] = $value; - } - - $file->setDbColMetadata($md); - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - throw $e; - } - } - - public function populateTemplateItem($values, $id=null, $instance_id=null) { - - $this->con->beginTransaction(); - - try { - $template = $this->getConfiguredItemTemplate(); - $prefix = Application_Form_EditHistoryItem::ID_PREFIX; - - if (isset($id)) { - $historyRecord = CcPlayoutHistoryQuery::create()->findPk($id, $this->con); - } - else { - $historyRecord = new CcPlayoutHistory(); - } - - if (isset($instance_id)) { - $historyRecord->setDbInstanceId($instance_id); - } - - $timezoneUTC = new DateTimeZone("UTC"); - $timezoneLocal = new DateTimeZone($this->timezone); - - $dateTime = new DateTime($values[$prefix."starts"], $timezoneLocal); - $dateTime->setTimezone($timezoneUTC); - $historyRecord->setDbStarts($dateTime->format("Y-m-d H:i:s")); - - $dateTime = new DateTime($values[$prefix."ends"], $timezoneLocal); - $dateTime->setTimezone($timezoneUTC); - $historyRecord->setDbEnds($dateTime->format("Y-m-d H:i:s")); - - $templateValues = $values[$prefix."template"]; - - $file = $historyRecord->getCcFiles(); - - $md = array(); - $metadata = array(); - $fields = $template["fields"]; - $required = $this->mandatoryItemFields(); - $phpCasts = $this->getPhpCasts(); - - for ($i = 0, $len = count($fields); $i < $len; $i++) { - - $field = $fields[$i]; - $key = $field["name"]; - - //required is delt with before this loop. - if (in_array($key, $required)) { - continue; - } - - $isFileMd = $field["isFileMd"]; - $entry = $phpCasts[$field["type"]]($templateValues[$prefix.$key]); - - if ($isFileMd && isset($file)) { - Logging::info("adding metadata associated to a file for {$key} = {$entry}"); - $md[$key] = $entry; - } - else { - Logging::info("adding metadata for {$key} = {$entry}"); - $metadata[$key] = $entry; - } - } - - if (count($md) > 0) { - $f = Application_Model_StoredFile::createWithFile($file, $this->con); - $f->setDbColMetadata($md); - } - - //Use this array to update existing values. - $mds = $historyRecord->getCcPlayoutHistoryMetaDatas(); - foreach ($mds as $md) { - $prevmd[$md->getDbKey()] = $md; - } - foreach ($metadata as $key => $val) { - - if (isset($prevmd[$key])) { - $meta = $prevmd[$key]; - $meta->setDbValue($val); - } - else { - $meta = new CcPlayoutHistoryMetaData(); - $meta->setDbKey($key); - $meta->setDbValue($val); - - $historyRecord->addCcPlayoutHistoryMetaData($meta); - } - } - - $historyRecord->save($this->con); - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - throw $e; - } - } - - //start,end timestamp strings in local timezone. - public function populateShowInstances($start, $end) { - $timezoneLocal = new DateTimeZone($this->timezone); - - $startDT = new DateTime($start, $timezoneLocal); - $endDT = new DateTime($end, $timezoneLocal); - - $shows = $this->getShowList($startDT, $endDT); - - $select = array(); - - foreach ($shows as &$show) { - $select[$show["instance_id"]] = $show["name"]; - } - - return $select; - } - - private function validateHistoryItem($instanceId, $form) { - - /* - $userService = new Application_Service_UserService(); - $currentUser = $userService->getCurrentUser(); - - if (!$currentUser->isAdminOrPM()) { - if (empty($instance_id) ) { - - } - } - */ - - $valid = true; - - $recordStartsEl = $form->getElement("his_item_starts"); - $recordStarts = $recordStartsEl->getValue(); - $recordEndsEl = $form->getElement("his_item_starts"); - $recordEnds = $recordEndsEl->getValue(); - - $timezoneLocal = new DateTimeZone($this->timezone); - - $startDT = new DateTime($recordStarts, $timezoneLocal); - $endDT = new DateTime($recordEnds, $timezoneLocal); - - if ($recordStarts > $recordEnds) { - $valid = false; - $recordEndsEl->addErrorMessage("End time must be after start time"); - } - - if (isset($instanceId)) { - - $instance = CcShowInstancesQuery::create()->findPk($instanceId, $this->con); - $inStartsDT = $instance->getDbStarts(null); - $inEndsDT = $instance->getDbEnds(null); - - if ($startDT < $inStartsDT) { - $valid = false; - $form->addErrorMessage("History item begins before show."); - } - else if ($startDT > $inEndsDT) { - $valid = false; - $form->addErrorMessage("History item begins after show."); - } - } - - return $valid; - } - - public function createPlayedItem($data) { - - try { - $form = $this->makeHistoryItemForm(null); - $history_id = $form->getElement("his_item_id"); - $instanceId = isset($data["instance_id"]) ? $data["instance_id"] : null; - $json = array(); - - if ($form->isValid($data) && $this->validateHistoryItem($instanceId, $form)) { - - $history_id->setIgnore(true); - $values = $form->getValues(); - - $this->populateTemplateItem($values, null, $instanceId); - } - else { - $json["form"] = $form; - } - - return $json; - } - catch (Exception $e) { - throw $e; - } - } - - /* id is an id in cc_playout_history */ - public function editPlayedItem($data) { - - try { - $id = $data["his_item_id"]; - $instanceId = isset($data["instance_id"]) ? $data["instance_id"] : null; - $form = $this->makeHistoryItemForm($id); - $history_id = $form->getElement("his_item_id"); - $history_id->setRequired(true); - - $json = array(); - - if ($form->isValid($data) && $this->validateHistoryItem($instanceId, $form)) { - - $history_id->setIgnore(true); - $values = $form->getValues(); - $this->populateTemplateItem($values, $id, $instanceId); - } - else { - $json["form"] = $form; - } - - return $json; - } - catch (Exception $e) { - throw $e; - } - } - - /* id is an id in cc_files */ - public function editPlayedFile($data) { - - try { - $id = $data["his_file_id"]; - $form = $form = $this->makeHistoryFileForm($id); - $history_id = $form->getElement("his_file_id"); - $history_id->setRequired(true); - - $json = array(); - - if ($form->isValid($data)) { - $history_id->setIgnore(true); - $values = $form->getValues(); - - $this->populateTemplateFile($values, $id); - } - else { - $json["error"] = $msgs; - } - - return $json; - - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - Logging::info($e); - throw $e; - } - - return $json; - } - - /* id is an id in cc_playout_history */ - public function deletePlayedItem($id) { - - $this->con->beginTransaction(); - - try { - - $record = CcPlayoutHistoryQuery::create()->findPk($id, $this->con); - $record->delete($this->con); - - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - Logging::info($e); - throw $e; - } - } - - /* id is an id in cc_playout_history */ - public function deletePlayedItems($ids) { - - $this->con->beginTransaction(); - - try { - - $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); - $records->delete($this->con); - - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - Logging::info($e); - throw $e; - } - } - - - //---------------- Following code is for History Templates --------------------------// - - public function getFieldTypes() { - - $fields = array( - //TEMPLATE_DATE, - //TEMPLATE_TIME, - //TEMPLATE_DATETIME, - TEMPLATE_STRING, - TEMPLATE_BOOLEAN, - TEMPLATE_INT, - TEMPLATE_FLOAT, - ); - - return $fields; - } - - private function getPhpCasts() { - - $fields = array( - TEMPLATE_DATE => "strval", - TEMPLATE_TIME => "strval", - TEMPLATE_DATETIME => "strval", - TEMPLATE_STRING => "strval", - TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? - TEMPLATE_INT => "intval", - TEMPLATE_FLOAT => "floatval", - ); - - return $fields; - } - - private function getSqlTypes() { - - $fields = array( - TEMPLATE_DATE => "date", - TEMPLATE_TIME => "time", - TEMPLATE_DATETIME => "datetime", - TEMPLATE_STRING => "text", - TEMPLATE_BOOLEAN => "boolean", - TEMPLATE_INT => "integer", - TEMPLATE_FLOAT => "float", - ); - - return $fields; - } - - public function getFileMetadataTypes() { - - $fileMD = array( - array("name"=> MDATA_KEY_TITLE, "label"=> _("Title"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_CREATOR, "label"=> _("Creator"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_SOURCE, "label"=> _("Album"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_DURATION, "label"=> _("Length"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_GENRE, "label"=> _("Genre"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_MOOD, "label"=> _("Mood"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_LABEL, "label"=> _("Label"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_COMPOSER, "label"=> _("Composer"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_ISRC, "label"=> _("ISRC"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_COPYRIGHT, "label"=> _("Copyright"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_YEAR, "label"=> _("Year"), "type"=> TEMPLATE_INT), - array("name"=> MDATA_KEY_TRACKNUMBER, "label"=> _("Track"), "type"=> TEMPLATE_INT), - array("name"=> MDATA_KEY_CONDUCTOR, "label"=> _("Conductor"), "type"=> TEMPLATE_STRING), - array("name"=> MDATA_KEY_LANGUAGE, "label"=> _("Language"), "type"=> TEMPLATE_STRING), - ); - - return $fileMD; - } - - public function mandatoryItemFields() { - - $fields = array("starts", "ends"); - - return $fields; - } - - public function mandatoryFileFields() { - - $fields = array("played"); - - return $fields; - } - - private function defaultItemTemplate() { - - $template = array(); - $fields = array(); - - $fields[] = array("name" => "starts", "label"=> _("Start Time"),"type" => TEMPLATE_DATETIME, "isFileMd" => false); - $fields[] = array("name" => "ends", "label"=> _("End Time"), "type" => TEMPLATE_DATETIME, "isFileMd" => false); - $fields[] = array("name" => MDATA_KEY_TITLE, "label"=> _("Title"), "type" => TEMPLATE_STRING, "isFileMd" => true); //these fields can be populated from an associated file. - $fields[] = array("name" => MDATA_KEY_CREATOR, "label"=> _("Creator"), "type" => TEMPLATE_STRING, "isFileMd" => true); - - $template["name"] = "Log Sheet ".date("Y-m-d H:i:s")." Template"; - $template["fields"] = $fields; - - return $template; - } - - /* - * Default File Summary Template. Taken from The Czech radio requirements (customer requested this in the past). - */ - private function defaultFileTemplate() { - - $template = array(); - $fields = array(); - - $fields[] = array("name" => MDATA_KEY_TITLE, "label"=> _("Title"), "type" => TEMPLATE_STRING, "isFileMd" => true); - $fields[] = array("name" => MDATA_KEY_CREATOR, "label"=> _("Creator"), "type" => TEMPLATE_STRING, "isFileMd" => true); - $fields[] = array("name" => "played", "label"=> _("Played"), "type" => TEMPLATE_INT, "isFileMd" => false); - $fields[] = array("name" => MDATA_KEY_DURATION, "label"=> _("Length"), "type" => TEMPLATE_STRING, "isFileMd" => true); - $fields[] = array("name" => MDATA_KEY_COMPOSER, "label"=> _("Composer"), "type" => TEMPLATE_STRING, "isFileMd" => true); - $fields[] = array("name" => MDATA_KEY_COPYRIGHT, "label"=> _("Copyright"), "type" => TEMPLATE_STRING, "isFileMd" => true); - - $template["name"] = "File Summary ".date("Y-m-d H:i:s")." Template"; - $template["fields"] = $fields; - - return $template; - } - - public function loadTemplate($id) { - - try { - - if (!is_numeric($id)) { - throw new Exception("Error: $id is not numeric."); - } - - $template = CcPlayoutHistoryTemplateQuery::create()->findPk($id, $this->con); - - if (empty($template)) { - throw new Exception("Error: Template $id does not exist."); - } - - $c = new Criteria(); - $c->addAscendingOrderByColumn(CcPlayoutHistoryTemplateFieldPeer::POSITION); - $config = $template->getCcPlayoutHistoryTemplateFields($c, $this->con); - $fields = array(); - - foreach ($config as $item) { - - $fields[] = array( - "name" => $item->getDbName(), - "label" => $item->getDbLabel(), - "type" => $item->getDbType(), - "isFileMd" => $item->getDbIsFileMD(), - "id" => $item->getDbId() - ); - } - - $data = array(); - $data["id"] = $template->getDbId(); - $data["name"] = $template->getDbName(); - $data["fields"] = $fields; - $data["type"] = $template->getDbType(); - - return $data; - } - catch (Exception $e) { - throw $e; - } - } - - public function getItemTemplate($id) { - - if (is_numeric($id)) { - Logging::info("template id is: $id"); - $template = $this->loadTemplate($id); - } - else { - Logging::info("Using default template"); - $template = $this->defaultItemTemplate(); - } - - return $template; - } - - public function getTemplates($type) { - - $list = array(); - - try { - - $query = CcPlayoutHistoryTemplateQuery::create() - ->setFormatter(ModelCriteria::FORMAT_ON_DEMAND); - - if (isset($type)) { - $templates = $query->findByDbType($type); - } - else { - $templates = $query->find(); - } - - foreach ($templates as $template) { - $list[$template->getDbId()] = $template->getDbName(); - } - - return $list; - } - catch (Exception $e) { - throw $e; - } - } - - public function getListItemTemplates() { - return $this->getTemplates(self::TEMPLATE_TYPE_ITEM); - } - - public function getFileTemplates() { - return $this->getTemplates(self::TEMPLATE_TYPE_FILE); - } - - private function datatablesColumns($fields) { - - $columns = array(); - - foreach ($fields as $field) { - - $label = $field["label"]; - $key = $field["name"]; - - $columns[] = array( - "sTitle"=> $label, - "mDataProp"=> $key, - "sClass"=> "his_{$key}", - "sDataType"=> $field["type"] - ); - } - - return $columns; - } - - public function getDatatablesLogSheetColumns() { - - //need to prepend a checkbox column. - $checkbox = array( - "sTitle"=> "", - "mDataProp"=> "checkbox", - "sClass"=> "his_checkbox", - "bSortable"=> false - ); - - try { - $template = $this->getConfiguredItemTemplate(); - $fields = $template["fields"]; - - $columns = $this->datatablesColumns($fields); - array_unshift($columns, $checkbox); - - return $columns; - } - catch (Exception $e) { - throw $e; - } - } - - public function getDatatablesFileSummaryColumns() { - - try { - $template = $this->getConfiguredFileTemplate(); - return $this->datatablesColumns($template["fields"]); - } - catch (Exception $e) { - throw $e; - } - } - - public function getConfiguredItemTemplate() { - - try { - $id = Application_Model_Preference::GetHistoryItemTemplate(); - - if (is_numeric($id)) { - $template = $this->loadTemplate($id); - } - else { - $template = $this->defaultItemTemplate(); - } - return $template; - } - catch (Exception $e) { - throw $e; - } - } - - public function setConfiguredItemTemplate($id) { - try { - Application_Model_Preference::SetHistoryItemTemplate($id); - } - catch (Exception $e) { - throw $e; - } - } - - public function getConfiguredFileTemplate() { - - try { - $id = Application_Model_Preference::GetHistoryFileTemplate(); - - if (is_numeric($id)) { - $template = $this->loadTemplate($id); - } - else { - $template = $this->defaultFileTemplate(); - } - return $template; - } - catch (Exception $e) { - throw $e; - } - } - - public function setConfiguredFileTemplate($id) { - try { - Application_Model_Preference::SetHistoryFileTemplate($id); - } - catch (Exception $e) { - throw $e; - } - } - - public function setConfiguredTemplate($id) { - try { - - $template = $this->loadTemplate($id); - $type = $template["type"]; - - $setTemplate = "setConfigured".ucfirst($type)."Template"; - - $this->$setTemplate($id); - } - catch (Exception $e) { - throw $e; - } - } - - public function getConfiguredTemplateIds() { - - try { - $id = Application_Model_Preference::GetHistoryItemTemplate(); - $id2 = Application_Model_Preference::GetHistoryFileTemplate(); - - $configured = array(); - - if (is_numeric($id)) { - $configured[] = $id; - } - - if (is_numeric($id2)) { - $configured[] = $id2; - } - - return $configured; - } - catch (Exception $e) { - throw $e; - } - } - - public function createTemplate($config) { - - $this->con->beginTransaction(); - - try { - - $type = $config["type"]; - - $method = "default".ucfirst($type)."Template"; - $default = $this->$method(); - - $name = isset($config["name"]) ? $config["name"] : $default["name"]; - $fields = isset($config["fields"]) ? $config["fields"] : $default["fields"]; - - $doSetDefault = isset($config['setDefault']) ? $config['setDefault'] : false; - - $template = new CcPlayoutHistoryTemplate(); - $template->setDbName($name); - $template->setDbType($type); - - foreach ($fields as $index=>$field) { - - $isMd = ($field["isFileMd"] == 'true') ? true : false; - - $templateField = new CcPlayoutHistoryTemplateField(); - $templateField->setDbName($field["name"]); - $templateField->setDbLabel($field["label"]); - $templateField->setDbType($field["type"]); - $templateField->setDbIsFileMD($isMd); - $templateField->setDbPosition($index); - - $template->addCcPlayoutHistoryTemplateField($templateField); - } - - $template->save($this->con); - - if ($doSetDefault) { - $this->setConfiguredItemTemplate($template->getDbid()); - } - - $this->con->commit(); - - return $template->getDbid(); - } - catch (Exception $e) { - $this->con->rollback(); - throw $e; - } - } - - public function updateItemTemplate($id, $name, $fields, $doSetDefault=false) { - - $this->con->beginTransaction(); - - try { - - $template = CcPlayoutHistoryTemplateQuery::create()->findPk($id, $this->con); - $template->setDbName($name); - - if (count($fields) === 0) { - $t = $this->defaultItemTemplate(); - $fields = $t["fields"]; - } - - $template->getCcPlayoutHistoryTemplateFields()->delete($this->con); - - foreach ($fields as $index=>$field) { - - $isMd = ($field["isFileMd"] == 'true') ? true : false; - - $templateField = new CcPlayoutHistoryTemplateField(); - $templateField->setDbName($field["name"]); - $templateField->setDbType($field["type"]); - $templateField->setDbLabel($field["label"]); - $templateField->setDbIsFileMD($isMd); - $templateField->setDbPosition($index); - - $template->addCcPlayoutHistoryTemplateField($templateField); - } - - $template->save($this->con); - - if ($doSetDefault) { - $this->setConfiguredItemTemplate($template->getDbid()); - } - - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - throw $e; - } - } - - public function deleteTemplate($id) { - - $this->con->beginTransaction(); - - try { - - $template = CcPlayoutHistoryTemplateQuery::create()->findPk($id, $this->con); - $template->delete($this->con); - - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - throw $e; - } - } -} \ No newline at end of file diff --git a/airtime_mvc/application/services/SchedulerService.php b/airtime_mvc/application/services/SchedulerService.php index c1dd6fc1f..7ab662c5c 100644 --- a/airtime_mvc/application/services/SchedulerService.php +++ b/airtime_mvc/application/services/SchedulerService.php @@ -248,24 +248,22 @@ class Application_Service_SchedulerService } } //foreach linked instance - if (!empty($values)) { - $insert_sql = "INSERT INTO cc_schedule (starts, ends, ". - "clip_length, fade_in, fade_out, cue_in, cue_out, ". - "file_id, stream_id, instance_id, position) VALUES ". - implode($values, ","); + $insert_sql = "INSERT INTO cc_schedule (starts, ends, ". + "clip_length, fade_in, fade_out, cue_in, cue_out, ". + "file_id, stream_id, instance_id, position) VALUES ". + implode($values, ","); - Application_Common_Database::prepareAndExecute( - $insert_sql, array(), Application_Common_Database::EXECUTE); + Application_Common_Database::prepareAndExecute( + $insert_sql, array(), Application_Common_Database::EXECUTE); - //update time_filled in cc_show_instances - $now = gmdate("Y-m-d H:i:s"); - $update_sql = "UPDATE cc_show_instances SET ". - "time_filled = '{$timeFilled}', ". - "last_scheduled = '{$now}' ". - "WHERE show_id = {$ccShow->getDbId()}"; - Application_Common_Database::prepareAndExecute( - $update_sql, array(), Application_Common_Database::EXECUTE); - } + //update time_filled in cc_show_instances + $now = gmdate("Y-m-d H:i:s"); + $update_sql = "UPDATE cc_show_instances SET ". + "time_filled = '{$timeFilled}', ". + "last_scheduled = '{$now}' ". + "WHERE show_id = {$ccShow->getDbId()}"; + Application_Common_Database::prepareAndExecute( + $update_sql, array(), Application_Common_Database::EXECUTE); } //if at least one linked instance has content } diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index c651c8ebd..6b3e67239 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -441,7 +441,7 @@ class Application_Service_ShowFormService $rebroadcast = true; $absRebroadcast = true; - if (isset($formData["add_show_rebroadcast"]) && $formData["add_show_rebroadcast"]) { + if ($formData["add_show_rebroadcast"]) { $formData["add_show_duration"] = Application_Service_ShowService::formatShowDuration( $formData["add_show_duration"]); $absRebroadcast = $forms["abs_rebroadcast"]->isValid($formData); diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 8b39eadd1..f0adcbfff 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -169,8 +169,8 @@ class Application_Service_ShowService } /** - * - * Receives a cc_show id and determines whether to create a + * + * Receives a cc_show id and determines whether to create a * single show instance or repeating show instances */ public function delegateInstanceCreation($daysAdded=null, $end=null, $fillInstances=false) @@ -179,6 +179,9 @@ class Application_Service_ShowService if (is_null($this->ccShow)) { $ccShowDays = $this->getShowDaysInRange($populateUntil, $end); + if (count($ccShowDays) > 0) { + $this->ccShow = $ccShowDays[0]->getCcShow(); + } } else { $ccShowDays = $this->ccShow->getCcShowDays(); } @@ -187,22 +190,7 @@ class Application_Service_ShowService $populateUntil = $end; } - /* In case the user is moving forward in the calendar and there are - * linked shows in the schedule we need to keep track of each cc_show - * so we know which shows need to be filled with content - */ - $ccShows = array(); - foreach ($ccShowDays as $day) { - - $this->ccShow = $day->getCcShow(); - $this->isRecorded = isset($this->isRecorded) ? $this->isRecorded : $this->ccShow->isRecorded(); - $this->isRebroadcast = isset($this->isRebroadcast) ? $this->isRebroadcast : $this->ccShow->isRebroadcast(); - - if (!isset($ccShows[$day->getDbShowId()])) { - $ccShows[$day->getDbShowId()] = $day->getccShow(); - } - switch ($day->getDbRepeatType()) { case NO_REPEAT: $this->createNonRepeatingInstance($day, $populateUntil); @@ -224,10 +212,9 @@ class Application_Service_ShowService } } - foreach ($ccShows as $ccShow) { - if (($this->isUpdate || $fillInstances) && $ccShow->isLinked()) { - Application_Service_SchedulerService::fillNewLinkedInstances($ccShow); - } + if (isset($this->ccShow) && ($this->isUpdate || $fillInstances) && + $this->ccShow->isLinked()) { + Application_Service_SchedulerService::fillNewLinkedInstances($this->ccShow); } if (isset($this->linkedShowContent)) { @@ -277,7 +264,7 @@ class Application_Service_ShowService } /** - * + * * Deletes all the cc_show_days entries for a specific show * that is currently being edited. They will get recreated with * the new show day specs @@ -302,12 +289,12 @@ SQL; /** * TODO: This function is messy. Needs refactoring - * + * * When editing a show we may need to perform some actions to reflect the new specs: * - Delete some show instances * - Update duration * - Update start and end time - * + * * @param $showData edit show form values in raw form * @param $isRecorded value computed from the edit show form * @param $repeatType value computed from the edit show form @@ -346,7 +333,7 @@ SQL; //if the start date changes, these are the repeat types //that require show instance deletion - $deleteRepeatTypes = array(REPEAT_BI_WEEKLY, REPEAT_MONTHLY_MONTHLY, + $deleteRepeatTypes = array(REPEAT_BI_WEEKLY, REPEAT_MONTHLY_MONTHLY, REPEAT_MONTHLY_WEEKLY); if (in_array($this->repeatType, $deleteRepeatTypes) && @@ -410,7 +397,7 @@ SQL; $this->deleteInstancesBeforeDate($showData['add_show_start_date'], $showId); } - + } } @@ -500,7 +487,7 @@ SQL; } /** - * + * * Enter description here ... * @param $daysRemoved array of days (days of the week) removed * (days of the week are represented numerically @@ -631,45 +618,29 @@ SQL; ->filterByDbShowId($showId) ->filterByDbModifiedInstance(false) ->filterByDbRebroadcast(0) - ->orderByDbStarts() ->find(); if ($ccShowInstances->isEmpty()) { return true; } - /* We need to update the last_show in cc_show_days so the instances - * don't get recreated as the user moves forward in the calendar - */ - else if (count($ccShowInstances) >= 1) { - $lastShowDays = array(); - /* Creates an array where the key is the day of the week (monday, - * tuesday, etc.) and the value is the last show date for each - * day of the week. We will use this array to update the last_show - * for each cc_show_days entry of a cc_show - */ - foreach ($ccShowInstances as $instance) { - $instanceStartDT = new DateTime($instance->getDbStarts(), - new DateTimeZone("UTC")); - $lastShowDays[$instanceStartDT->format("w")] = $instanceStartDT; - } + //only 1 show instance left of the show, make it non repeating. + else if (count($ccShowInstances) === 1) { + $ccShowInstance = $ccShowInstances[0]; - foreach ($lastShowDays as $dayOfWeek => $lastShowStartDT) { - $ccShowDay = CcShowDaysQuery::create() - ->filterByDbShowId($showId) - ->filterByDbDay($dayOfWeek) - ->findOne(); + $ccShowDay = CcShowDaysQuery::create() + ->filterByDbShowId($showId) + ->findOne(); + $tz = $ccShowDay->getDbTimezone(); - if (isset($ccShowDay)) { - $lastShowStartDT->setTimeZone(new DateTimeZone( - $ccShowDay->getDbTimezone())); - $lastShowEndDT = Application_Service_CalendarService::addDeltas( - $lastShowStartDT, 1, 0); + $startDate = new DateTime($ccShowInstance->getDbStarts(), new DateTimeZone("UTC")); + $startDate->setTimeZone(new DateTimeZone($tz)); + $endDate = Application_Service_CalendarService::addDeltas($startDate, 1, 0); - $ccShowDay - ->setDbLastShow($lastShowEndDT->format("Y-m-d")) - ->save(); - } - } + $ccShowDay->setDbFirstShow($startDate->format("Y-m-d")); + $ccShowDay->setDbLastShow($endDate->format("Y-m-d")); + $ccShowDay->setDbStartTime($startDate->format("H:i:s")); + $ccShowDay->setDbRepeatType(-1); + $ccShowDay->save(); //remove the old repeating deleted instances. CcShowInstancesQuery::create() @@ -712,10 +683,10 @@ SQL; } /** - * + * * Determines what the show end date should be based on * the form data - * + * * @param $showData add/edit show form data * @return DateTime object in user's local timezone */ @@ -758,10 +729,10 @@ SQL; } /** - * + * * Returns the difference in seconds between a show's new and * old start time - * + * * @param $newStartDateTime DateTime object * @param $oldStartDateTime DateTime object */ @@ -771,9 +742,9 @@ SQL; } /** - * + * * Updates the start and end time for cc_show_instances - * + * * @param $showData edit show form data */ private function updateInstanceStartEndTime($diff) @@ -787,13 +758,13 @@ WHERE show_id = :showId SQL; Application_Common_Database::prepareAndExecute($sql, - array(':diff1' => $diff, ':diff2' => $diff, + array(':diff1' => $diff, ':diff2' => $diff, ':showId' => $this->ccShow->getDbId(), ':timestamp' => gmdate("Y-m-d H:i:s")), 'execute'); } /** - * + * * Enter description here ... * @param ccShowDays $showDay * @param DateTime $showStartDate user's local time @@ -830,7 +801,7 @@ SQL; } /** - * + * * Sets a single cc_show_instance table row * @param $showDay * @param $populateUntil @@ -867,7 +838,7 @@ SQL; } /** - * + * * Sets multiple cc_show_instances table rows * @param unknown_type $showDay * @param unknown_type $populateUntil @@ -877,7 +848,6 @@ SQL; private function createWeeklyRepeatInstances($showDay, $populateUntil, $repeatType, $repeatInterval, $daysAdded=null) { - $show_id = $showDay->getDbShowId(); $first_show = $showDay->getDbFirstShow(); //non-UTC $last_show = $showDay->getDbLastShow(); //non-UTC @@ -900,15 +870,16 @@ SQL; $utcLastShowDateTime = $last_show ? Application_Common_DateHelper::ConvertToUtcDateTime($last_show, $timezone) : null; + $utcStartDateTime = new DateTime("now"); $previousDate = clone $start; - foreach ($datePeriod as $date) { + list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime( $date, $duration); /* * Make sure start date is less than populate until date AND * last show date is null OR start date is less than last show date - * + * * (NOTE: We cannot call getTimestamp() to compare the dates because of * a PHP 5.3.3 bug with DatePeriod objects - See CC-5159 for more details) */ @@ -916,7 +887,6 @@ SQL; ( is_null($utcLastShowDateTime) || $utcStartDateTime->format("Y-m-d H:i:s") < $utcLastShowDateTime->format("Y-m-d H:i:s")) ) { - $lastCreatedShow = clone $utcStartDateTime; /* There may not always be an instance when editing a show * This will be the case when we are adding a new show day to * a repeating show @@ -960,20 +930,12 @@ SQL; $previousDate = clone $date; } - /* We need to set the next populate date for repeat shows so when a user - * moves forward in the calendar we know when to start generating new - * show instances. - * If $utcStartDateTime is not set then we know zero new shows were - * created and we shouldn't update the next populate date. + /* Set UTC to local time before setting the next repeat date. If we don't + * the next repeat date might be scheduled for the following day */ - if (isset($lastCreatedShow)) { - /* Set UTC to local time before setting the next repeat date. If we don't - * the next repeat date might be scheduled for the following day - * THIS MUST BE IN THE TIMEZONE THE SHOW WAS CREATED IN */ - $lastCreatedShow->setTimezone(new DateTimeZone($timezone)); - $nextDate = $lastCreatedShow->add($repeatInterval); - $this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id); - } + $utcStartDateTime->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); + $nextDate = $utcStartDateTime->add($repeatInterval); + $this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id); } private function createMonthlyRepeatInstances($showDay, $populateUntil) @@ -1015,7 +977,6 @@ SQL; ( is_null($utcLastShowDateTime) || $utcStartDateTime->getTimestamp() < $utcLastShowDateTime->getTimestamp()) ) { - $lastCreatedShow = clone $utcStartDateTime; /* There may not always be an instance when editing a show * This will be the case when we are adding a new show day to * a repeating show @@ -1069,10 +1030,10 @@ SQL; } /** - * + * * i.e. last thursday of each month * i.e. second monday of each month - * + * * @param string $showStart * @param string $timezone user's local timezone */ @@ -1117,7 +1078,7 @@ SQL; } /** - * + * * Enter description here ... * @param $start user's local time */ @@ -1187,7 +1148,7 @@ SQL; } /** - * + * * Create a DatePeriod object in the user's local time * It will get converted to UTC before the show instance gets created */ @@ -1208,11 +1169,11 @@ SQL; } /** - * + * * Attempts to retrieve the cc_show_instance belonging to a cc_show * that starts at $starts. We have to pass in the start * time in case the show is repeating - * + * * Returns the instance if one was found (one that is not a recording * and modified instance is false (has not been deleted)) */ @@ -1255,7 +1216,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show table row * @param $ccShow * @param $showData @@ -1290,7 +1251,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show_days table row * @param $showData * @param $showId @@ -1372,7 +1333,7 @@ SQL; } /** - * + * * Deletes all the cc_show_rebroadcast entries for a specific show * that is currently being edited. They will get recreated with * the new show specs @@ -1383,7 +1344,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show_rebroadcast table row * @param $showData * @param $showId @@ -1422,7 +1383,7 @@ SQL; } /** - * + * * Deletes all the cc_show_hosts entries for a specific show * that is currently being edited. They will get recreated with * the new show specs @@ -1433,7 +1394,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show_hosts table row * @param $showData * @param $showId @@ -1451,10 +1412,10 @@ SQL; } /** - * + * * Gets the date and time shows (particularly repeating shows) * can be populated until. - * + * * @return DateTime object */ private static function getPopulateShowUntilDateTIme() @@ -1469,13 +1430,13 @@ SQL; } /** - * + * * Enter description here ... * @param DateTime $showStart user's local time * @param string $duration time interval (h)h:(m)m(:ss) * @param string $timezone "Europe/Prague" * @param array $offset (days, hours, mins) used for rebroadcast shows - * + * * @return array of 2 DateTime objects, start/end time of the show in UTC */ private function createUTCStartEndDateTime($showStart, $duration, $offset=null) @@ -1501,12 +1462,12 @@ SQL; } /** - * + * * Show instances for repeating shows only get created up * until what is visible on the calendar. We need to set the * date for when the next repeating show instance should be created * as the user browses the calendar further. - * + * * @param $nextDate * @param $showId * @param $day @@ -1523,4 +1484,4 @@ SQL; $repeatInfo->setDbNextPopDate($nextInfo[0]) ->save(); } -} +} \ No newline at end of file diff --git a/airtime_mvc/application/services/UserService.php b/airtime_mvc/application/services/UserService.php index 40e077a39..879ba4d48 100644 --- a/airtime_mvc/application/services/UserService.php +++ b/airtime_mvc/application/services/UserService.php @@ -1,5 +1,10 @@
    ' + - '
    ' + - '' + - DPGlobal.headTemplate + - DPGlobal.contTemplate+ - '
    '+ - '
    '+ - '
    '+ - ''+ - DPGlobal.headTemplate+ - DPGlobal.contTemplate+ - '
    '+ - '
    '; - var TPGlobal = { - hourTemplate: '', - minuteTemplate: '', - secondTemplate: '' - }; - TPGlobal.getTemplate = function(is12Hours, showSeconds) { - return ( - '
    ' + - '' + - '' + - '' + - '' + - '' + - (showSeconds ? - '' + - '': '')+ - (is12Hours ? '' : '') + - '' + - '' + - ' ' + - '' + - ' ' + - (showSeconds ? - '' + - '' : '') + - (is12Hours ? - '' + - '' : '') + - '' + - '' + - '' + - '' + - '' + - (showSeconds ? - '' + - '': '') + - (is12Hours ? '' : '') + - '' + - '
    ' + TPGlobal.hourTemplate + ':' + TPGlobal.minuteTemplate + ':' + TPGlobal.secondTemplate + '' + - '' + - '
    ' + - '
    ' + - '
    ' + - '' + - '
    '+ - '
    '+ - '
    ' + - '' + - '
    '+ - '
    '+ - (showSeconds ? - '
    ' + - '' + - '
    '+ - '
    ': '') - ); - } - - -})(window.jQuery) \ No newline at end of file diff --git a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js deleted file mode 100644 index a30f77645..000000000 --- a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * ========================================================= - * bootstrap-datetimepicker.js - * http://www.eyecon.ro/bootstrap-datepicker - * ========================================================= - * Copyright 2012 Stefan Petre - * - * Contributions: - * - Andrew Rowls - * - Thiago de Arruda - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= - */ -(function($){var smartPhone=window.orientation!=undefined;var DateTimePicker=function(element,options){this.id=dpgId++;this.init(element,options)};var dateToDate=function(dt){if(typeof dt==="string"){return new Date(dt)}return dt};DateTimePicker.prototype={constructor:DateTimePicker,init:function(element,options){var icon;if(!(options.pickTime||options.pickDate))throw new Error("Must choose at least one picker");this.options=options;this.$element=$(element);this.language=options.language in dates?options.language:"en";this.pickDate=options.pickDate;this.pickTime=options.pickTime;this.isInput=this.$element.is("input");this.component=false;if(this.$element.find(".input-append")||this.$element.find(".input-prepend"))this.component=this.$element.find(".add-on");this.format=options.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"}this._compileFormat();if(this.component){icon=this.component.find("i")}if(this.pickTime){if(icon&&icon.length)this.timeIcon=icon.data("time-icon");if(!this.timeIcon)this.timeIcon="icon-time";icon.addClass(this.timeIcon)}if(this.pickDate){if(icon&&icon.length)this.dateIcon=icon.data("date-icon");if(!this.dateIcon)this.dateIcon="icon-calendar";icon.removeClass(this.timeIcon);icon.addClass(this.dateIcon)}this.widget=$(getTemplate(this.timeIcon,options.pickDate,options.pickTime,options.pick12HourFormat,options.pickSeconds,options.collapse)).appendTo("body");this.minViewMode=options.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=options.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=options.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(options.startDate||this.$element.data("date-startdate"));this.setEndDate(options.endDate||this.$element.data("date-enddate"));this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e){e.stopPropagation();e.preventDefault()}},disable:function(){this.$element.find("input").prop("disabled",true);this._detachDatePickerEvents()},enable:function(){this.$element.find("input").prop("disabled",false);this._attachDatePickerEvents()},hide:function(){var collapse=this.widget.find(".collapse");for(var i=0;i");while(dowCnt'+dates[this.language].daysMin[dowCnt++%7]+"")}this.widget.find(".datepicker-days thead").append(html)},fillMonths:function(){var html="";var i=0;while(i<12){html+=''+dates[this.language].monthsShort[i++]+""}this.widget.find(".datepicker-months td").append(html)},fillDate:function(){var year=this.viewDate.getUTCFullYear();var month=this.viewDate.getUTCMonth();var currentDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);var startYear=typeof this.startDate==="object"?this.startDate.getUTCFullYear():-Infinity;var startMonth=typeof this.startDate==="object"?this.startDate.getUTCMonth():-1;var endYear=typeof this.endDate==="object"?this.endDate.getUTCFullYear():Infinity;var endMonth=typeof this.endDate==="object"?this.endDate.getUTCMonth():12;this.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-days th:eq(1)").text(dates[this.language].months[month]+" "+year);var prevMonth=UTCDate(year,month-1,28,0,0,0,0);var day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);if(year==startYear&&month<=startMonth||year=endMonth||year>endYear){this.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var row;var clsName;while(prevMonth.valueOf()");html.push(row)}clsName="";if(prevMonth.getUTCFullYear()year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month){clsName+=" new"}if(prevMonth.valueOf()===currentDate.valueOf()){clsName+=" active"}if(prevMonth.valueOf()+864e5<=this.startDate){clsName+=" disabled"}if(prevMonth.valueOf()>this.endDate){clsName+=" disabled"}row.append(''+prevMonth.getUTCDate()+"");prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(html);var currentYear=this._date.getUTCFullYear();var months=this.widget.find(".datepicker-months").find("th:eq(1)").text(year).end().find("span").removeClass("active");if(currentYear===year){months.eq(this._date.getUTCMonth()).addClass("active")}if(currentYear-1endYear){this.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(var i=0;i<12;i++){if(year==startYear&&startMonth>i||yearendYear){$(months[i]).addClass("disabled")}}html="";year=parseInt(year/10,10)*10;var yearCont=this.widget.find(".datepicker-years").find("th:eq(1)").text(year+"-"+(year+9)).end().find("td");this.widget.find(".datepicker-years").find("th").removeClass("disabled");if(startYear>year){this.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(endYearendYear?" disabled":"")+'">'+year+"";year+=1}yearCont.html(html)},fillHours:function(){var table=this.widget.find(".timepicker .timepicker-hours table");table.parent().hide();var html="";if(this.options.pick12HourFormat){var current=1;for(var i=0;i<3;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}else{var current=0;for(var i=0;i<6;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}table.html(html)},fillMinutes:function(){var table=this.widget.find(".timepicker .timepicker-minutes table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillSeconds:function(){var table=this.widget.find(".timepicker .timepicker-seconds table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillTime:function(){if(!this._date)return;var timeComponents=this.widget.find(".timepicker span[data-time-component]");var table=timeComponents.closest("table");var is12HourFormat=this.options.pick12HourFormat;var hour=this._date.getUTCHours();var period="AM";if(is12HourFormat){if(hour>=12)period="PM";if(hour===0)hour=12;else if(hour!=12)hour=hour%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(period)}hour=padLeft(hour.toString(),2,"0");var minute=padLeft(this._date.getUTCMinutes().toString(),2,"0");var second=padLeft(this._date.getUTCSeconds().toString(),2,"0");timeComponents.filter("[data-time-component=hours]").text(hour);timeComponents.filter("[data-time-component=minutes]").text(minute);timeComponents.filter("[data-time-component=seconds]").text(second)},click:function(e){e.stopPropagation();e.preventDefault();this._unset=false;var target=$(e.target).closest("span, td, th");if(target.length===1){if(!target.is(".disabled")){switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var vd=this.viewDate;var navFnc=DPGlobal.modes[this.viewMode].navFnc;var step=DPGlobal.modes[this.viewMode].navStep;if(target[0].className==="prev")step=step*-1;vd["set"+navFnc](vd["get"+navFnc]()+step);this.fillDate();this.set();break}break;case"span":if(target.is(".month")){var month=target.parent().find("span").index(target);this.viewDate.setUTCMonth(month)}else{var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year)}if(this.viewMode!==0){this._date=UTCDate(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();this.set();break;case"td":if(target.is(".day")){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getUTCMonth();var year=this.viewDate.getUTCFullYear();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}this._date=UTCDate(year,month,day,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=UTCDate(year,month,Math.min(28,day),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}}},actions:{incrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e){var hour=this._date.getUTCHours();if(hour>=12)hour-=12;else hour+=12;this._date.setUTCHours(hour)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);if(this.options.pick12HourFormat){var current=this._date.getUTCHours();if(current>=12){if(value!=12)value=(value+12)%24}else{if(value===12)value=0;else value=value%12}}this._date.setUTCHours(value);this.actions.showPicker.call(this)},selectMinute:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCMinutes(value);this.actions.showPicker.call(this)},selectSecond:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCSeconds(value);this.actions.showPicker.call(this)}},doAction:function(e){e.stopPropagation();e.preventDefault();if(!this._date)this._date=UTCDate(1970,0,0,0,0,0,0);var action=$(e.currentTarget).data("action");var rv=this.actions[action].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return rv},stopEvent:function(e){e.stopPropagation();e.preventDefault()},keydown:function(e){var self=this,k=e.which,input=$(e.target);if(k==8||k==46){setTimeout(function(){self._resetMaskPos(input)})}},keypress:function(e){var k=e.which;if(k==8||k==46){return}var input=$(e.target);var c=String.fromCharCode(k);var val=input.val()||"";val+=c;var mask=this._mask[this._maskPos];if(!mask){return false}if(mask.end!=val.length){return}if(!mask.pattern.test(val.slice(mask.start))){val=val.slice(0,val.length-1);while((mask=this._mask[this._maskPos])&&mask.character){val+=mask.character;this._maskPos++}val+=c;if(mask.end!=val.length){input.val(val);return false}else{if(!mask.pattern.test(val.slice(mask.start))){input.val(val.slice(0,mask.start));return false}else{input.val(val);this._maskPos++;return false}}}else{this._maskPos++}},change:function(e){var input=$(e.target);var val=input.val();if(this._formatPattern.test(val)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(val&&val.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else input.val("")}else{if(this._date){this.setValue(null);this.notifyChange();this._unset=true}}this._resetMaskPos(input)},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+DPGlobal.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(d){return this.format.replace(formatReplacer,function(match){var methodName,property,rv,len=match.length;if(match==="ms")len=1;property=dateFormatComponents[match].property;if(property==="Hours12"){rv=d.getUTCHours();if(rv===0)rv=12;else if(rv!==12)rv=rv%12}else if(property==="Period12"){if(d.getUTCHours()>=12)return"PM";else return"AM"}else{methodName="get"+property;rv=d[methodName]()}if(methodName==="getUTCMonth")rv=rv+1;if(methodName==="getUTCYear")rv=rv+1900-2e3;return padLeft(rv.toString(),len,"0")})},parseDate:function(str){var match,i,property,methodName,value,parsed={};if(!(match=this._formatPattern.exec(str)))return null;for(i=1;ival.length){this._maskPos=i;break}else if(this._mask[i].end===val.length){this._maskPos=i+1;break}}},_finishParsingDate:function(parsed){var year,month,date,hours,minutes,seconds,milliseconds;year=parsed.UTCFullYear;if(parsed.UTCYear)year=2e3+parsed.UTCYear;if(!year)year=1970;if(parsed.UTCMonth)month=parsed.UTCMonth-1;else month=0;date=parsed.UTCDate||1;hours=parsed.UTCHours||0;minutes=parsed.UTCMinutes||0;seconds=parsed.UTCSeconds||0;milliseconds=parsed.UTCMilliseconds||0;if(parsed.Hours12){hours=parsed.Hours12}if(parsed.Period12){if(/pm/i.test(parsed.Period12)){if(hours!=12)hours=(hours+12)%24}else{hours=hours%12}}return UTCDate(year,month,date,hours,minutes,seconds,milliseconds)},_compileFormat:function(){var match,component,components=[],mask=[],str=this.format,propertiesByIndex={},i=0,pos=0;while(match=formatComponent.exec(str)){component=match[0];if(component in dateFormatComponents){i++;propertiesByIndex[i]=dateFormatComponents[component].property;components.push("\\s*"+dateFormatComponents[component].getPattern(this)+"\\s*");mask.push({pattern:new RegExp(dateFormatComponents[component].getPattern(this)),property:dateFormatComponents[component].property,start:pos,end:pos+=component.length})}else{components.push(escapeRegExp(component));mask.push({pattern:new RegExp(escapeRegExp(component)),character:component,start:pos,end:++pos})}str=str.slice(component.length)}this._mask=mask;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+components.join("")+"\\s*$");this._propertiesByIndex=propertiesByIndex},_attachDatePickerEvents:function(){var self=this;this.widget.on("click",".datepicker *",$.proxy(this.click,this));this.widget.on("click","[data-action]",$.proxy(this.doAction,this));this.widget.on("mousedown",$.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(e){e.stopPropagation();var $this=$(this);var $parent=$this.closest("ul");var expanded=$parent.find(".collapse.in");var closed=$parent.find(".collapse:not(.in)");if(expanded&&expanded.length){var collapseData=expanded.data("collapse");if(collapseData&&collapseData.transitioning)return;expanded.collapse("hide");closed.collapse("show");$this.find("i").toggleClass(self.timeIcon+" "+self.dateIcon);self.$element.find(".add-on i").toggleClass(self.timeIcon+" "+self.dateIcon)}})}if(this.isInput){this.$element.on({focus:$.proxy(this.show,this),change:$.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)})}}else{this.$element.on({change:$.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",$.proxy(this.show,this))}else{this.$element.on("click",$.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){$(window).on("resize.datetimepicker"+this.id,$.proxy(this.place,this));if(!this.isInput){$(document).on("mousedown.datetimepicker"+this.id,$.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({focus:this.show,change:this.change});if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress})}}else{this.$element.off({change:this.change},"input");if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){$(window).off("resize.datetimepicker"+this.id);if(!this.isInput){$(document).off("mousedown.datetimepicker"+this.id)}},_isInFixed:function(){if(this.$element){var parents=this.$element.parents();var inFixed=false;for(var i=0;i'+"
      "+""+'
      '+DPGlobal.template+"
      "+""+'
    • '+""+'
      '+TPGlobal.getTemplate(is12Hours,showSeconds)+"
      "+""+"
    "+"
    "}else if(pickTime){return'"}else{return'"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:""+""+'‹'+''+'›'+""+"",contTemplate:''};DPGlobal.template='
    '+''+DPGlobal.headTemplate+""+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    ";var TPGlobal={hourTemplate:'',minuteTemplate:'',secondTemplate:''};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'
    '+'"+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+""+" "+''+" "+(showSeconds?''+"":"")+(is12Hours?''+"":"")+""+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+"
    "+TPGlobal.hourTemplate+":"+TPGlobal.minuteTemplate+":"+TPGlobal.secondTemplate+""+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+(showSeconds?'
    '+''+"
    "+"
    ":"")}})(window.jQuery); \ No newline at end of file diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/css/TableTools.css b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/css/TableTools.css deleted file mode 100755 index 705008b01..000000000 --- a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/css/TableTools.css +++ /dev/null @@ -1,321 +0,0 @@ -/* - * File: TableTools.css - * Description: Styles for TableTools 2 - * Author: Allan Jardine (www.sprymedia.co.uk) - * Language: Javascript - * License: GPL v2 / 3 point BSD - * Project: DataTables - * - * Copyright 2009-2012 Allan Jardine, all rights reserved. - * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * CSS name space: - * DTTT DataTables TableTools - * - * Style sheet provides: - * CONTAINER TableTools container element and styles applying to all components - * BUTTON_STYLES Action specific button styles - * SELECTING Row selection styles - * COLLECTIONS Drop down list (collection) styles - * PRINTING Print display styles - */ - - -/* - * CONTAINER - * TableTools container element and styles applying to all components - */ -div.DTTT_container { - position: relative; - float: right; - margin-bottom: 1em; -} - -button.DTTT_button, -div.DTTT_button, -a.DTTT_button { - position: relative; - float: left; - margin-right: 3px; - padding: 5px 8px; - border: 1px solid #999; - cursor: pointer; - *cursor: hand; - font-size: 0.88em; - color: black !important; - - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - -ms-border-radius: 2px; - -o-border-radius: 2px; - border-radius: 2px; - - -webkit-box-shadow: 1px 1px 3px #ccc; - -moz-box-shadow: 1px 1px 3px #ccc; - -ms-box-shadow: 1px 1px 3px #ccc; - -o-box-shadow: 1px 1px 3px #ccc; - box-shadow: 1px 1px 3px #ccc; - - /* Generated by http://www.colorzilla.com/gradient-editor/ */ - background: #ffffff; /* Old browsers */ - background: -webkit-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* FF3.6+ */ - background: -ms-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* IE10+ */ - background: -o-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Opera 11.10+ */ - background: linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */ -} - - -/* Buttons are cunning border-box sizing - we can't just use that for A and DIV due to IE6/7 */ -button.DTTT_button { - height: 30px; - padding: 3px 8px; -} - -.DTTT_button embed { - outline: none; -} - -button.DTTT_button:hover, -div.DTTT_button:hover, -a.DTTT_button:hover { - border: 1px solid #666; - text-decoration: none !important; - - -webkit-box-shadow: 1px 1px 3px #999; - -moz-box-shadow: 1px 1px 3px #999; - -ms-box-shadow: 1px 1px 3px #999; - -o-box-shadow: 1px 1px 3px #999; - box-shadow: 1px 1px 3px #999; - - background: #f3f3f3; /* Old browsers */ - background: -webkit-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* FF3.6+ */ - background: -ms-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* IE10+ */ - background: -o-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* Opera 11.10+ */ - background: linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3f3f3', endColorstr='#f4f4f4',GradientType=0 ); /* IE6-9 */ -} - -button.DTTT_disabled, -div.DTTT_disabled, -a.DTTT_disabled { - color: #999; - border: 1px solid #d0d0d0; - - background: #ffffff; /* Old browsers */ - background: -webkit-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* FF3.6+ */ - background: -ms-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* IE10+ */ - background: -o-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* Opera 11.10+ */ - background: linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fafafa',GradientType=0 ); /* IE6-9 */ -} - - - -/* - * BUTTON_STYLES - * Action specific button styles - * If you want images - comment this back in - -a.DTTT_button_csv, -a.DTTT_button_xls, -a.DTTT_button_copy, -a.DTTT_button_pdf, -a.DTTT_button_print { - padding-right: 0px; -} - -a.DTTT_button_csv span, -a.DTTT_button_xls span, -a.DTTT_button_copy span, -a.DTTT_button_pdf span, -a.DTTT_button_print span { - display: inline-block; - height: 24px; - line-height: 24px; - padding-right: 30px; -} - - -a.DTTT_button_csv span { background: url(../images/csv.png) no-repeat bottom right; } -a.DTTT_button_csv:hover span { background: url(../images/csv_hover.png) no-repeat center right; } - -a.DTTT_button_xls span { background: url(../images/xls.png) no-repeat center right; } -a.DTTT_button_xls:hover span { background: #f0f0f0 url(../images/xls_hover.png) no-repeat center right; } - -a.DTTT_button_copy span { background: url(../images/copy.png) no-repeat center right; } -a.DTTT_button_copy:hover span { background: #f0f0f0 url(../images/copy_hover.png) no-repeat center right; } - -a.DTTT_button_pdf span { background: url(../images/pdf.png) no-repeat center right; } -a.DTTT_button_pdf:hover span { background: #f0f0f0 url(../images/pdf_hover.png) no-repeat center right; } - -a.DTTT_button_print span { background: url(../images/print.png) no-repeat center right; } -a.DTTT_button_print:hover span { background: #f0f0f0 url(../images/print_hover.png) no-repeat center right; } - - */ - -button.DTTT_button_collection span { - padding-right: 17px; - background: url(../images/collection.png) no-repeat center right; -} - -button.DTTT_button_collection:hover span { - padding-right: 17px; - background: #f0f0f0 url(../images/collection_hover.png) no-repeat center right; -} - - -/* - * SELECTING - * Row selection styles - */ -table.DTTT_selectable tbody tr { - cursor: pointer; - *cursor: hand; -} - -table.dataTable tr.DTTT_selected.odd { - background-color: #9FAFD1; -} - -table.dataTable tr.DTTT_selected.odd td.sorting_1 { - background-color: #9FAFD1; -} - -table.dataTable tr.DTTT_selected.odd td.sorting_2 { - background-color: #9FAFD1; -} - -table.dataTable tr.DTTT_selected.odd td.sorting_3 { - background-color: #9FAFD1; -} - - -table.dataTable tr.DTTT_selected.even { - background-color: #B0BED9; -} - -table.dataTable tr.DTTT_selected.even td.sorting_1 { - background-color: #B0BED9; -} - -table.dataTable tr.DTTT_selected.even td.sorting_2 { - background-color: #B0BED9; -} - -table.dataTable tr.DTTT_selected.even td.sorting_3 { - background-color: #B0BED9; -} - - -/* - * COLLECTIONS - * Drop down list (collection) styles - */ - -div.DTTT_collection { - width: 150px; - padding: 8px 8px 4px 8px; - border: 1px solid #ccc; - border: 1px solid rgba( 0, 0, 0, 0.4 ); - background-color: #f3f3f3; - background-color: rgba( 255, 255, 255, 0.3 ); - overflow: hidden; - z-index: 2002; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - -ms-border-radius: 5px; - -o-border-radius: 5px; - border-radius: 5px; - - -webkit-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); - -ms-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); - -o-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); - box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); -} - -div.DTTT_collection_background { - background: transparent url(../images/background.png) repeat top left; - z-index: 2001; -} - -div.DTTT_collection button.DTTT_button, -div.DTTT_collection div.DTTT_button, -div.DTTT_collection a.DTTT_button { - position: relative; - left: 0; - right: 0; - - display: block; - float: none; - margin-bottom: 4px; - - -webkit-box-shadow: 1px 1px 3px #999; - -moz-box-shadow: 1px 1px 3px #999; - -ms-box-shadow: 1px 1px 3px #999; - -o-box-shadow: 1px 1px 3px #999; - box-shadow: 1px 1px 3px #999; -} - - -/* - * PRINTING - * Print display styles - */ - -.DTTT_print_info { - position: fixed; - top: 50%; - left: 50%; - width: 400px; - height: 150px; - margin-left: -200px; - margin-top: -75px; - text-align: center; - color: #333; - padding: 10px 30px; - - background: #ffffff; /* Old browsers */ - background: -webkit-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* FF3.6+ */ - background: -ms-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* IE10+ */ - background: -o-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Opera 11.10+ */ - background: linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */ - - opacity: 0.95; - - border: 1px solid black; - border: 1px solid rgba(0, 0, 0, 0.5); - - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - -ms-border-radius: 6px; - -o-border-radius: 6px; - border-radius: 6px; - - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); - -ms-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); - -o-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); -} - -.DTTT_print_info h6 { - font-weight: normal; - font-size: 28px; - line-height: 28px; - margin: 1em; -} - -.DTTT_print_info p { - font-size: 14px; - line-height: 20px; -} - diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/copy document.psd b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/copy document.psd deleted file mode 100755 index ca207adc608751b51eb5265bda2b7392889305a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 104729 zcmeFa34C1DdGLMZeT6_E%bPS&Ac>R4izHi?<$%E}&|)CiCLwK_%93nUWXX}_u;fdj z?c4Tie_c|Nrh5nwXMqqBb}+^Zwk%mAjb^zscfWIIWU~Yt?`E^-{Xb`Bw0L*GG|P-M zbMHO(+_OCA*`IUInKkc*C0dD=`;6dFroLme;kl$QyfkaxHH$~c9ZmbuM~7+JFm2dJ zhuyA~?s)xAH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uky_k8PUDN_w7Hh|IGtO50aVYj$GTjv#Kh8QIfBo+NGR> zM-RPypk#k8*Gp9oRUOG)scfU^JzY6KN!bIX2M-45o=$24QL+F4jwr?;`PI?zj62| znf5IkQw0?BRgO??%jFq!=)j>j4pKb@l~hq?pgckORcbVjzE*M%?H_Z`?%m)7ojY=H#DRSWUO({GzHy+*?t3CTs+KLQdVAkUbw$>a zd!T}`d&qiF!R6?oEJMgp?j1+=C_t1(%Jp!rd0^r_6iwOt_Nxbu(2@_+PspOG>Ymt3 zj3oKh^=_4aEcqFyy#OBI9MS|t`)Leh#(2hFmel=Y)OGHG59AsTUJITGY!B=MO0ON= zJwZnF#eMnfw|A?)js+&tBKmuD|1dCH#`Ap-Rqa&>O1coQG+evq=&q98djQcMAV|)t z|JTmhw6qa~aeQ}u+mK?sRm~inCkjrG$h$JmjBepPB#8^J6bjepimz|Pva2rw;U-Ya<8F7}WWxDaRy%g6YR1Cz6u_c5n-7CdBD+Op~Jm<^x+-e@3@ zLUNmN!F=cNOeAUE-^sDSg2S1gc7V35AVjYTPguY2yg$X|I+^9Gy(l=$_nFd)nD?L& zD4z(<8S|T|8oB+DLvK6yhN<#*yr*$`(To|IPW*o7!&&`zihVQNw{^#Q{pRhhW3%+BO3g{ z1*jg!AKbKv27jny5H0>-W{Kp$pYk&Y{@`au{K3vH{<`?dHq+&-EWf7Eqp4*XG9HJJ&2 zlmdTnGBf_*XFmKXNA>uFpF;=So?waRT|Ik5Wh&{`8}d5jTbTEXKB1l5I;%lm4WzC znrjFrQYHVxr)d|l47+R>OXcB_(XsJ~$*Gyyx%q{~rR9~?_-T1{WqE0FVSa9QW@>U` Td~9@NxLhjQ$40|Q%*gl&pqPNb diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js deleted file mode 100644 index e580c9936..000000000 --- a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js +++ /dev/null @@ -1,77 +0,0 @@ -// Simple Set Clipboard System -// Author: Joseph Huckaby -var ZeroClipboard_TableTools={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=document.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){this.className=this.className.replace(RegExp("\\s*"+a+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(a){return!!this.className.match(RegExp("\\s*"+ -a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){(a=this.clients[a])&&a.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a){var b={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};""!=a.style.width&&(b.width=a.style.width.replace("px",""));""!=a.style.height&&(b.height=a.style.height.replace("px",""));for(;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;return b}, -Client:function(a){this.handlers={};this.id=ZeroClipboard_TableTools.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;ZeroClipboard_TableTools.register(this.id,this);a&&this.glue(a)}}; -ZeroClipboard_TableTools.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"",action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,glue:function(a,b){this.domElement=ZeroClipboard_TableTools.$(a);var c=99;this.domElement.style.zIndex&&(c=parseInt(this.domElement.style.zIndex)+1);var d=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);this.div=document.createElement("div");var e=this.div.style;e.position="absolute";e.left="0px";e.top="0px";e.width=d.width+ -"px";e.height=d.height+"px";e.zIndex=c;"undefined"!=typeof b&&""!=b&&(this.div.title=b);0!=d.width&&0!=d.height&&(this.sized=!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(d.width,d.height))},positionElement:function(){var a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.width=a.width+"px";b.height=a.height+"px";0!=a.width&&0!=a.height&&(this.sized=!0,b=this.div.childNodes[0],b.width=a.width,b.height= -a.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var e=location.href.match(/^https/i)?"https://":"http://",c=c+('');else c+='';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.div=this.domElement=null}},reposition:function(a){a&&((this.domElement=ZeroClipboard_TableTools.$(a))||this.hide());if(this.domElement&&this.div){var a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement), -b=this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+=a;this.ready&&this.movie.appendText(a)},setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},setCharSet:function(a){this.charSet=a;this.ready&&this.movie.setCharSet(a)},setBomInc:function(a){this.incBom=a;this.ready&&this.movie.setBomInc(a)},setFileName:function(a){this.fileName=a;this.ready&&this.movie.setFileName(a)}, -setAction:function(a){this.action=a;this.ready&&this.movie.setAction(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=document.getElementById(this.movieId); -if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;this.movie.clearText();this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setCharSet(this.charSet);this.movie.setBomInc(this.incBom);this.movie.setHandCursor(this.handCursorEnabled); -break;case "mouseover":this.domElement&&this.cssEffects&&this.recoverActive&&this.domElement.addClass("active");break;case "mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0));break;case "mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var d= -0,e=this.handlers[a].length;d"\u00a1".toString().length?b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""):b.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"")},fnCalcColRatios:function(a){var b=this.s.dt.aoColumns, -a=this._fnColumnTargets(a.mColumns),c=[],d=0,f=0,e,g;e=0;for(g=a.length;eh?m:h)+"px";l.style.width=(k>o?k:o)+"px";l.className=this.classes.collection.background;e(l).css("opacity",0);g.body.appendChild(l);g.body.appendChild(f);m=e(f).outerWidth();k=e(f).outerHeight(); -j+m>o&&(f.style.left=o-m+"px");d+k>h&&(f.style.top=d-k-e(a).outerHeight()+"px");this.dom.collection.collection=f;this.dom.collection.background=l;setTimeout(function(){e(f).animate({opacity:1},500);e(l).animate({opacity:0.25},500)},10);this.fnResizeButtons();e(l).click(function(){c._fnCollectionHide.call(c,null,null)})},_fnCollectionHide:function(a,b){!(null!==b&&"collection"==b.sExtends)&&null!==this.dom.collection.collection&&(e(this.dom.collection.collection).animate({opacity:0},500,function(){this.style.display= -"none"}),e(this.dom.collection.background).animate({opacity:0},500,function(){this.parentNode.removeChild(this)}),this.dom.collection.collection=null,this.dom.collection.background=null)},_fnRowSelectConfig:function(){if(this.s.master){var a=this,b=this.s.dt;e(b.nTable).addClass(this.classes.select.table);e(b.nTBody).on("click.DTTT_Select","tr",function(c){this.parentNode==b.nTBody&&null!==b.oInstance.fnGetData(this)&&(a.fnIsSelected(this)?a._fnRowDeselect(this,c):"single"==a.s.select.type?(a.fnSelectNone(), -a._fnRowSelect(this,c)):"multi"==a.s.select.type&&a._fnRowSelect(this,c))});b.oApi._fnCallbackReg(b,"aoRowCreatedCallback",function(c,d,f){b.aoData[f]._DTTT_selected&&e(c).addClass(a.classes.select.row)},"TableTools-SelectAll")}},_fnRowSelect:function(a,b){var c=this._fnSelectData(a),d=[],f,j;f=0;for(j=c.length;f/g, -"").replace(/^\s+|\s+$/g,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));g.push(j.join(a.sFieldSeperator))}var p=k.aiDisplay;f=this.fnGetSelected();if("none"!==this.s.select.type&&d&&0!==f.length){p=[];b=0;for(c=f.length;b]+)).*?>/gi,"$1$2$3"),h=h.replace(/<.*?>/g,"")):h+="",h=h.replace(/^\s+/,"").replace(/\s+$/,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));g.push(j.join(a.sFieldSeperator));a.bOpenRows&&(b=e.grep(k.aoOpenRows,function(a){return a.nParent===o}),1===b.length&&(h=this._fnBoundData(e("td",b[0].nTr).html(),a.sFieldBoundary,l),g.push(h)))}if(a.bFooter&&null!==k.nTFoot){j=[];b=0;for(c=k.aoColumns.length;b< -c;b++)n[b]&&null!==k.aoColumns[b].nTf&&(h=k.aoColumns[b].nTf.innerHTML.replace(/\n/g," ").replace(/<.*?>/g,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));g.push(j.join(a.sFieldSeperator))}return _sLastData=g.join(this._fnNewline(a))},_fnBoundData:function(a,b,c){return""===b?a:b+a.replace(c,b+b)+b},_fnChunkData:function(a,b){for(var c=[],d=a.length,f=0;fTable copied

    Copied "+a+" row"+(1==a?"":"s")+ -" to the clipboard.

    ",1500)}}),pdf:e.extend({},TableTools.buttonBase,{sAction:"flash_pdf",sNewLine:"\n",sFileName:"*.pdf",sButtonClass:"DTTT_button_pdf",sButtonText:"PDF",sPdfOrientation:"portrait",sPdfSize:"A4",sPdfMessage:"",fnClick:function(a,b,c){this.fnSetText(c,"title:"+this.fnGetTitle(b)+"\nmessage:"+b.sPdfMessage+"\ncolWidth:"+this.fnCalcColRatios(b)+"\norientation:"+b.sPdfOrientation+"\nsize:"+b.sPdfSize+"\n--/TableToolsOpts--\n"+this.fnGetTableData(b))}}),print:e.extend({},TableTools.buttonBase, -{sInfo:"
    Print view

    Please use your browser's print function to print this table. Press escape when finished.",sMessage:null,bShowAll:!0,sToolTip:"View print view",sButtonClass:"DTTT_button_print",sButtonText:"Print",fnClick:function(a,b){this.fnPrint(!0,b)}}),text:e.extend({},TableTools.buttonBase),select:e.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)}, -fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),select_single:e.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(a){1==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),select_all:e.extend({},TableTools.buttonBase,{sButtonText:"Select all",fnClick:function(){this.fnSelectAll()},fnSelect:function(a){this.fnGetSelected().length== -this.s.dt.fnRecordsDisplay()?e(a).addClass(this.classes.buttons.disabled):e(a).removeClass(this.classes.buttons.disabled)}}),select_none:e.extend({},TableTools.buttonBase,{sButtonText:"Deselect all",fnClick:function(){this.fnSelectNone()},fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),ajax:e.extend({},TableTools.buttonBase,{sAjaxUrl:"/xhr.php", -sButtonText:"Ajax button",fnClick:function(a,b){var c=this.fnGetTableData(b);e.ajax({url:b.sAjaxUrl,data:[{name:"tableData",value:c}],success:b.fnAjaxComplete,dataType:"json",type:"POST",cache:!1,error:function(){alert("Error detected when sending table data to server")}})},fnAjaxComplete:function(){alert("Ajax complete")}}),div:e.extend({},TableTools.buttonBase,{sAction:"div",sTag:"div",sButtonClass:"DTTT_nonbutton",sButtonText:"Text button"}),collection:e.extend({},TableTools.buttonBase,{sAction:"collection", -sButtonClass:"DTTT_button_collection",sButtonText:"Collection",fnClick:function(a,b){this._fnCollectionShow(a,b)}})};TableTools.classes={container:"DTTT_container",buttons:{normal:"DTTT_button",disabled:"DTTT_disabled"},collection:{container:"DTTT_collection",background:"DTTT_collection_background",buttons:{normal:"DTTT_button",disabled:"DTTT_disabled"}},select:{table:"DTTT_selectable",row:"DTTT_selected"},print:{body:"DTTT_Print",info:"DTTT_print_info",message:"DTTT_PrintMessage"}};TableTools.classes_themeroller= -{container:"DTTT_container ui-buttonset ui-buttonset-multi",buttons:{normal:"DTTT_button ui-button ui-state-default"},collection:{container:"DTTT_collection ui-buttonset ui-buttonset-multi"}};TableTools.DEFAULTS={sSwfPath:"media/swf/copy_csv_xls_pdf.swf",sRowSelect:"none",sSelectedClass:null,fnPreRowSelect:null,fnRowSelected:null,fnRowDeselected:null,aButtons:["copy","csv","xls","pdf","print"],oTags:{container:"div",button:"a",liner:"span",collection:{container:"div",button:"a",liner:"span"}}};TableTools.prototype.CLASS= -"TableTools";TableTools.VERSION="2.1.5";TableTools.prototype.VERSION=TableTools.VERSION;"function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.9.0")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(a){a=new TableTools(a.oInstance,"undefined"!=typeof a.oInit.oTableTools?a.oInit.oTableTools:{});TableTools._aInstances.push(a);return a.dom.container},cFeature:"T",sFeature:"TableTools"}):alert("Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download"); -e.fn.DataTable.TableTools=TableTools})(jQuery,window,document); diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js.gz b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.min.js.gz deleted file mode 100644 index 01ce7c041bcdb1df5cec281dd4dc639362beda8d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8785 zcmV-XBCg#ZiwFqdO*Byg15{yRY-Ln$Z)|feZE0>UYI6Y8JZW>=MzY`eD?zq7*^?Wtdx9|B(EzgDXIZ5AYp+37XT$IGXMMQo&y*hq!cH$RjX7iV$jpm(|7j_ zH5_VZ(R>k8?Ti-MK^!f-lw^T+cApn?-Wv|Jy=5^=vx)X=n$yKhd%N^+hvQ78^gK=D+X~l&aYU0MpFFIrd3qbskEEDQblpnm z*Wx&sjIAFg;WF_Hm~RmCLC=dUN~XH&7WWI9h8pSj4dMo=znlXedrFI=nBvF%`{Mv+ zm=3W?5FErL&%b>$h&_t}>XsC$@zjwuN zcuvC*_W2o~tQn1_vjPVBhh6!h1bfRKSB|c4xkP9bLj>yV@lW;fQeyhztB&$AYjZhz zHkp5Hyy=)8rkUXo$MkI6-oTZloxqdj*|6Da>^xmqqHthnY!fxFI6*xcj?1Em0=nk36OMu)aIhn=7k3!|8#vEXOII5W}x zbaAg+$e4p=mZ#ZKg3APxt&!#D`B4~xF6Q_odB@S_(H{sjwvgN|%?{GJ@O>FAX!e2!LBwznu9UNxk0jBcGg5HTw@U3R^HqP1{YKS z7&^Su`C7sc!T_hmq4q-Hb#>z9X}m0`4x^~ru08^#hX+vU@-sKFfd3x!bUrFFgPRdU!}(x=zWfp1>C;Crw=?Q3XO!^MpIIxnZ3+uwl_ry@{l=vcXoUiMM{?@w+XFh-4$`|MPDua+ z_*puqK}2jn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kUAW=MG)fo9VN^q1$&DDCu!l?14ZF?42 zXZYg*eYFbx7^O*P4-z`_gF||%5@mCBF}r2;S_>&H=t6)6^$M#lXT;~zR|t`2XK#MM zc#A;QAn$oHc!9VPJYlH`=$fl;M1JXL*x6z*PCk5ul#^s|yg<}SBtABuEtZRDv=mvV zqklo=@BS>Fq!)vj>9-w2!5tCGfE)+VQHM?_P99bV`_y~_v--0Mof6Eu4yl8zU}iU7 zR$_Gsi)7RZnTI{X#71M!$o+V}%o+_4X??>o5qv^hEqw}nrzu3nTlL#0y;T$FWRfEN z8z|!H{cHsm2}~k5neAp(`ao4l6sM6$A+jmjF`Lzs1qi5`X8mZMR&R&tv^p3~N7*n< znlMJcS`0^AxkO2`=>6+6G)2~nt=c$cge%gWG}1lk8Gb$ZR0esDVv-x~rB913P^?qi ztPHzFV%w5|o6Jw{vac>Sb2p!glZ1e2rRY!<=>|r-U{MUIyx(zIC`_~xw0qhudR7f< zC7ervO#iRQsP(@T(f5-O@{GMuJY;DVX11l%BqF|6#v!ypeuh>E_8knT>CYBPCY^V+ zp!b~KhR+-eOFDSme71NLw0S!LiNJ{U|KmdZ4zny8M|az8-ca!Gi%H1#?uLuzd^pFm zfGt%lV68}>KDE$ig)OO_HnAbQL!~;AR`Q~ zr)E^Kdfe2A`f|asHpOygv&q=7^A;jq1u!#r;8z@m7IUI#g??7_i&^*}g1en&GOiYc zOjeI9 QN-gLsESIlQ#n!FdcV{I5Li4Kxk@ga1vz`^EnQmOTlFcPn1Li-kmkI0;( z6e@Fx2~6`zT4kjH#@0TO+q{n5O1b>2t5HMtJY6~u4G~nfQ7+~M{FQ+joHmp%WZMyX zvITDc6hBS(K@re|j7W0v&%Es6IS|k7c!2No%*;DI zPg;nSW+ndLTyRk2GE2eYkrP(}xkf diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls.swf b/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls.swf deleted file mode 100644 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QV@J%=irmP;7@i5{+9?o5y4vvf=})oe2N!*NSEOM9l<9d_|$^n(>e!#%?tiim*77` z@Kyw$UJ!gn=ioEF;6u9vzYoDDBlxU>;IlgipW_7|)+P8~A@~#opIZ=oUgzMid%>UX z68wGypNin~DToxbgWp*;kUFfQfFAhuZ-4o<`d|IcqYwV(fz;Phzy3cDH-7C0zkcAs zpVa^I!C(B~Ctttqo3{l*U+wAZ0rAzIz7bHr+SBcU;1xanu;$)x|11#xYDWD7+E+6A yX+ZgEM&As`U+wAJ0qLtfeJcM`kUV*e_j9E2Ldz<4*XwpXInCMli1M! diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboard.as b/airtime_mvc/public/js/datatables/plugin/TableTools/as3/ZeroClipboard.as old mode 100755 new mode 100644 similarity index 88% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboard.as rename to airtime_mvc/public/js/datatables/plugin/TableTools/as3/ZeroClipboard.as index d6b9c072d..367b0497d --- a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboard.as +++ b/airtime_mvc/public/js/datatables/plugin/TableTools/as3/ZeroClipboard.as @@ -32,7 +32,7 @@ package { // import flashvars var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters; - domId = flashvars.id.split("\\").join("\\\\"); + domId = flashvars.id; // invisible button covers entire stage button = new Sprite(); @@ -45,16 +45,16 @@ package { button.addEventListener(MouseEvent.CLICK, clickHandler); button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOver', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOver', null ); } ); button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOut', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOut', null ); } ); button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseDown', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseDown', null ); } ); button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseUp', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseUp', null ); } ); // External functions - readd whenever the stage is made active for IE @@ -62,10 +62,10 @@ package { stage.addEventListener(Event.ACTIVATE, addCallbacks); // signal to the browser that we are ready - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'load', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'load', null ); } - public function addCallbacks (evt:Event = null):void { + public function addCallbacks ():void { ExternalInterface.addCallback("setHandCursor", setHandCursor); ExternalInterface.addCallback("clearText", clearText); ExternalInterface.addCallback("setText", setText); @@ -133,13 +133,13 @@ package { } else { /* Copy the text to the clipboard. Note charset and BOM have no effect here */ System.setClipboard( clipText ); - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'complete', clipText ); } } private function saveComplete(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'complete', clipText ); } diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboardPdf.as b/airtime_mvc/public/js/datatables/plugin/TableTools/as3/ZeroClipboardPdf.as old mode 100755 new mode 100644 similarity index 91% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboardPdf.as rename to airtime_mvc/public/js/datatables/plugin/TableTools/as3/ZeroClipboardPdf.as index 158d5f188..937187e43 --- a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/ZeroClipboardPdf.as +++ b/airtime_mvc/public/js/datatables/plugin/TableTools/as3/ZeroClipboardPdf.as @@ -46,7 +46,7 @@ package { // import flashvars var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters; - domId = flashvars.id.split("\\").join("\\\\"); + domId = flashvars.id; // invisible button covers entire stage button = new Sprite(); @@ -61,16 +61,16 @@ package { clickHandler(event); } ); button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOver', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOver', null ); } ); button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOut', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOut', null ); } ); button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseDown', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseDown', null ); } ); button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseUp', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseUp', null ); } ); // External functions - readd whenever the stage is made active for IE @@ -78,10 +78,10 @@ package { stage.addEventListener(Event.ACTIVATE, addCallbacks); // signal to the browser that we are ready - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'load', null ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'load', null ); } - public function addCallbacks (evt:Event = null):void { + public function addCallbacks ():void { ExternalInterface.addCallback("setHandCursor", setHandCursor); ExternalInterface.addCallback("clearText", clearText); ExternalInterface.addCallback("setText", setText); @@ -150,13 +150,13 @@ package { } else { /* Copy the text to the clipboard. Note charset and BOM have no effect here */ System.setClipboard( clipText ); - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'complete', clipText ); } } private function saveComplete(event:Event):void { - ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText ); + ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'complete', clipText ); } diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/lib/AlivePDF.swc b/airtime_mvc/public/js/datatables/plugin/TableTools/as3/lib/AlivePDF.swc similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/as3/lib/AlivePDF.swc rename to airtime_mvc/public/js/datatables/plugin/TableTools/as3/lib/AlivePDF.swc diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools/css/TableTools.css b/airtime_mvc/public/js/datatables/plugin/TableTools/css/TableTools.css new file mode 100644 index 000000000..4f3dd532e --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/TableTools/css/TableTools.css @@ -0,0 +1,264 @@ +/* + * File: TableTools.css + * Description: Styles for TableTools 2 + * Author: Allan Jardine (www.sprymedia.co.uk) + * Language: Javascript + * License: LGPL / 3 point BSD + * Project: DataTables + * + * Copyright 2010 Allan Jardine, all rights reserved. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * CSS name space: + * DTTT DataTables TableTools + * + * Colour dictionary: + * Button border #d0d0d0 + * Button border hover #999999 + * Hover background #f0f0f0 + * Action blue #4b66d9 + * + * Style sheet provides: + * CONTAINER TableTools container element and styles applying to all components + * BUTTON_STYLES Action specific button styles + * SELECTING Row selection styles + * COLLECTIONS Drop down list (collection) styles + * PRINTING Print display styles + * MISC Minor misc styles + */ + + +/* + * CONTAINER + * TableTools container element and styles applying to all components + */ +div.DTTT_container { + position: relative; + float: right; + margin-bottom: 1em; +} + +button.DTTT_button { + position: relative; + float: left; + height: 30px; + margin-right: 3px; + padding: 3px 5px; + border: 1px solid #d0d0d0; + background-color: #fff; + cursor: pointer; + *cursor: hand; +} + +button.DTTT_button::-moz-focus-inner { + border: none !important; + padding: 0; +} + + +/* + * BUTTON_STYLES + * Action specific button styles + */ + +button.DTTT_button_csv { + padding-right: 30px; + background: #6E6E6E url(../images/csv.png) no-repeat center right !important; +} + +button.DTTT_button_csv_hover { + padding-right: 30px; + background: #868686 url(../images/csv_hover.png) no-repeat center right !important; +} + + +button.DTTT_button_xls { + padding-right: 30px; + background: #6E6E6E url(../images/xls.png) no-repeat center right !important; +} + +button.DTTT_button_xls_hover { + padding-right: 30px; + border: 1px solid #999; + background: #868686 url(../images/xls_hover.png) no-repeat center right !important; +} + + +button.DTTT_button_copy { + padding-right: 30px; + background: #6E6E6E url(../images/copy.png) no-repeat center right !important; +} + +button.DTTT_button_copy_hover { + padding-right: 30px; + border: 1px solid #999; + background: #868686 url(../images/copy_hover.png) no-repeat center right !important; +} + + +button.DTTT_button_pdf { + padding-right: 30px; + background: #6E6E6E url(../images/pdf.png) no-repeat center right !important; +} + +button.DTTT_button_pdf_hover { + padding-right: 30px; + border: 1px solid #999; + background: #868686 url(../images/pdf_hover.png) no-repeat center right !important; +} + + +button.DTTT_button_print { + padding-right: 30px; + background: #6E6E6E url(../images/print.png) no-repeat center right !important; +} + +button.DTTT_button_print_hover { + padding-right: 30px; + border: 1px solid #999; + background: #868686 url(../images/print_hover.png) no-repeat center right !important; +} + + +button.DTTT_button_text { +} + +button.DTTT_button_text_hover { + border: 1px solid #999; + background-color: #f0f0f0; +} + + +button.DTTT_button_collection { + padding-right: 17px; + background: url(../images/collection.png) no-repeat center right; +} + +button.DTTT_button_collection_hover { + padding-right: 17px; + border: 1px solid #999; + background: #f0f0f0 url(../images/collection_hover.png) no-repeat center right; +} + + +/* + * SELECTING + * Row selection styles + */ +table.DTTT_selectable tbody tr { + cursor: pointer; + *cursor: hand; +} + +tr.DTTT_selected.odd { + background-color: #9FAFD1; +} + +tr.DTTT_selected.odd td.sorting_1 { + background-color: #9FAFD1; +} + +tr.DTTT_selected.odd td.sorting_2 { + background-color: #9FAFD1; +} + +tr.DTTT_selected.odd td.sorting_3 { + background-color: #9FAFD1; +} + + +tr.DTTT_selected.even { + background-color: #B0BED9; +} + +tr.DTTT_selected.even td.sorting_1 { + background-color: #B0BED9; +} + +tr.DTTT_selected.even td.sorting_2 { + background-color: #B0BED9; +} + +tr.DTTT_selected.even td.sorting_3 { + background-color: #B0BED9; +} + + +/* + * COLLECTIONS + * Drop down list (collection) styles + */ + +div.DTTT_collection { + width: 150px; + padding: 3px; + border: 1px solid #ccc; + background-color: #f3f3f3; + overflow: hidden; + z-index: 2002; +} + +div.DTTT_collection_background { + background: transparent url(../images/background.png) repeat top left; + z-index: 2001; +} + +div.DTTT_collection button.DTTT_button { + float: none; + width: 100%; + margin-bottom: 2px; + background-color: white; +} + + +/* + * PRINTING + * Print display styles + */ + +.DTTT_print_info { + position: absolute; + top: 50%; + left: 50%; + width: 400px; + height: 150px; + margin-left: -200px; + margin-top: -75px; + text-align: center; + background-color: #3f3f3f; + color: white; + padding: 10px 30px; + + opacity: 0.9; + + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); +} + +.DTTT_print_info h6 { + font-weight: normal; + font-size: 28px; + line-height: 28px; + margin: 1em; +} + +.DTTT_print_info p { + font-size: 14px; + line-height: 20px; +} + + +/* + * MISC + * Minor misc styles + */ + +.DTTT_disabled { + color: #999; +} diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/css/TableTools_JUI.css b/airtime_mvc/public/js/datatables/plugin/TableTools/css/TableTools_JUI.css old mode 100755 new mode 100644 similarity index 83% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/css/TableTools_JUI.css rename to airtime_mvc/public/js/datatables/plugin/TableTools/css/TableTools_JUI.css index 4c41138ee..95996ed2b --- a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/css/TableTools_JUI.css +++ b/airtime_mvc/public/js/datatables/plugin/TableTools/css/TableTools_JUI.css @@ -41,19 +41,19 @@ div.DTTT_container { float: left; } -.DTTT_button { +button.DTTT_button { position: relative; float: left; + height: 24px; margin-right: 3px; padding: 3px 10px; border: 1px solid #d0d0d0; background-color: #fff; - color: #333 !important; cursor: pointer; *cursor: hand; } -.DTTT_button::-moz-focus-inner { +button.DTTT_button::-moz-focus-inner { border: none !important; padding: 0; } @@ -69,36 +69,36 @@ table.DTTT_selectable tbody tr { *cursor: hand; } -table.dataTable tr.DTTT_selected.odd { +tr.DTTT_selected.odd { background-color: #9FAFD1; } -table.dataTable tr.DTTT_selected.odd td.sorting_1 { +tr.DTTT_selected.odd td.sorting_1 { background-color: #9FAFD1; } -table.dataTable tr.DTTT_selected.odd td.sorting_2 { +tr.DTTT_selected.odd td.sorting_2 { background-color: #9FAFD1; } -table.dataTable tr.DTTT_selected.odd td.sorting_3 { +tr.DTTT_selected.odd td.sorting_3 { background-color: #9FAFD1; } -table.dataTable tr.DTTT_selected.even { +tr.DTTT_selected.even { background-color: #B0BED9; } -table.dataTable tr.DTTT_selected.even td.sorting_1 { +tr.DTTT_selected.even td.sorting_1 { background-color: #B0BED9; } -table.dataTable tr.DTTT_selected.even td.sorting_2 { +tr.DTTT_selected.even td.sorting_2 { background-color: #B0BED9; } -table.dataTable tr.DTTT_selected.even td.sorting_3 { +tr.DTTT_selected.even td.sorting_3 { background-color: #B0BED9; } @@ -124,9 +124,7 @@ div.DTTT_collection_background { z-index: 2001; } -div.DTTT_collection button.DTTT_button, -div.DTTT_collection div.DTTT_button, -div.DTTT_collection a.DTTT_button { +div.DTTT_collection button.DTTT_button { float: none; width: 100%; margin-bottom: -0.1em; @@ -139,7 +137,7 @@ div.DTTT_collection a.DTTT_button { */ .DTTT_print_info { - position: fixed; + position: absolute; top: 50%; left: 50%; width: 400px; diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/background.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/background.png similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/background.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/background.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/collection.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/collection.png similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/collection.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/collection.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/collection_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/collection_hover.png similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/collection_hover.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/collection_hover.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/copy.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/copy.png old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/copy.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/copy.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/copy_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/copy_hover.png old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/copy_hover.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/copy_hover.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/csv.png old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/csv.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/csv_hover.png old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/csv_hover.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/csv_hover.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/pdf.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/pdf.png similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/pdf.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/pdf.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/pdf_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/pdf_hover.png similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/pdf_hover.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/pdf_hover.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/print.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/print.png old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/print.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/print.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/print_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/print_hover.png old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/print_hover.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/print_hover.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/collection.psd b/airtime_mvc/public/js/datatables/plugin/TableTools/images/psd/collection.psd similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/collection.psd rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/psd/collection.psd diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/file_types.psd b/airtime_mvc/public/js/datatables/plugin/TableTools/images/psd/file_types.psd old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/file_types.psd rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/psd/file_types.psd diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/printer.psd b/airtime_mvc/public/js/datatables/plugin/TableTools/images/psd/printer.psd old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/psd/printer.psd rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/psd/printer.psd diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/xls.png old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/xls.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls_hover.png b/airtime_mvc/public/js/datatables/plugin/TableTools/images/xls_hover.png old mode 100755 new mode 100644 similarity index 100% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/images/xls_hover.png rename to airtime_mvc/public/js/datatables/plugin/TableTools/images/xls_hover.png diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.js b/airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.js old mode 100755 new mode 100644 similarity index 66% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.js rename to airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.js index 3c3ae9115..3e02c2c08 --- a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/TableTools.js +++ b/airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.js @@ -1,13 +1,13 @@ /* * File: TableTools.js - * Version: 2.1.5 + * Version: 2.0.2 * Description: Tools and buttons for DataTables * Author: Allan Jardine (www.sprymedia.co.uk) * Language: Javascript * License: GPL v2 or BSD 3 point style * Project: DataTables * - * Copyright 2009-2013 Allan Jardine, all rights reserved. + * Copyright 2009-2012 Allan Jardine, all rights reserved. * * This source file is free software, under either the GPL v2 license or a * BSD style license, available at: @@ -36,7 +36,7 @@ var TableTools; TableTools = function( oDT, oOpts ) { /* Santiy check that we are a new instance */ - if ( ! this instanceof TableTools ) + if ( !this.CLASS || this.CLASS != "TableTools" ) { alert( "Warning: TableTools must be initialised with the keyword 'new'" ); } @@ -51,7 +51,7 @@ TableTools = function( oDT, oOpts ) */ this.s = { /** - * Store 'this' so the instance can be retrieved from the settings object + * Store 'this' so the instance can be retreieved from the settings object * @property that * @type object * @default this @@ -62,9 +62,9 @@ TableTools = function( oDT, oOpts ) * DataTables settings objects * @property dt * @type object - * @default From the oDT init option + * @default null */ - "dt": oDT.fnSettings(), + "dt": null, /** * @namespace Print specific information @@ -204,13 +204,7 @@ TableTools = function( oDT, oOpts ) * @type boolean * @default false */ - "master": false, - - /** - * Tag names that are used for creating collections and buttons - * @namesapce - */ - "tags": {} + "master": false }; @@ -247,7 +241,7 @@ TableTools = function( oDT, oOpts ) "hidden": [], /** - * The information display saying telling the user about the print display + * The information display saying tellng the user about the print display * @property message * @type node * @default null @@ -276,16 +270,7 @@ TableTools = function( oDT, oOpts ) "background": null } }; - - /** - * @namespace Name space for the classes that this TableTools instance will use - * @extends TableTools.classes - */ - this.classes = $.extend( true, {}, TableTools.classes ); - if ( this.s.dt.bJUI ) - { - $.extend( true, this.classes, TableTools.classes_themeroller ); - } + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -308,6 +293,7 @@ TableTools = function( oDT, oOpts ) oOpts = {}; } + this.s.dt = oDT.fnSettings(); this._fnConstruct( oOpts ); return this; @@ -322,64 +308,31 @@ TableTools.prototype = { /** * Retreieve the settings object from an instance + * @method fnGetSelected * @returns {array} List of TR nodes which are currently selected - * @param {boolean} [filtered=false] Get only selected rows which are - * available given the filtering applied to the table. By default - * this is false - i.e. all rows, regardless of filtering are - selected. */ - "fnGetSelected": function ( filtered ) + "fnGetSelected": function () { - var - out = [], - data = this.s.dt.aoData, - displayed = this.s.dt.aiDisplay, - i, iLen; - - if ( filtered ) - { - // Only consider filtered rows - for ( i=0, iLen=displayed.length ; i

    Copied '+len+' row'+plural+' to the clipboard.

    ', - 1500 - ); - } - } ), - - "pdf": $.extend( {}, TableTools.buttonBase, { + alert( 'Copied '+len+' row'+plural+' to the clipboard' ); + }, + "fnInit": null, + "fnCellRender": null + }, + "pdf": { "sAction": "flash_pdf", + "sFieldBoundary": "", + "sFieldSeperator": "\t", "sNewLine": "\n", "sFileName": "*.pdf", + "sToolTip": "", + "sTitle": "", "sButtonClass": "DTTT_button_pdf", + "sButtonClassHover": "DTTT_button_pdf_hover", "sButtonText": "PDF", + "mColumns": "all", + "bHeader": true, + "bFooter": false, + "bSelectedOnly": false, + "fnMouseover": null, + "fnMouseout": null, "sPdfOrientation": "portrait", "sPdfSize": "A4", "sPdfMessage": "", @@ -2221,87 +2275,167 @@ TableTools.BUTTONS = { "--/TableToolsOpts--\n" + this.fnGetTableData(oConfig) ); - } - } ), - - "print": $.extend( {}, TableTools.buttonBase, { + }, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "fnCellRender": null + }, + "print": { + "sAction": "print", "sInfo": "
    Print view

    Please use your browser's print function to "+ "print this table. Press escape when finished.", - "sMessage": null, + "sMessage": "", "bShowAll": true, "sToolTip": "View print view", "sButtonClass": "DTTT_button_print", + "sButtonClassHover": "DTTT_button_print_hover", "sButtonText": "Print", - "fnClick": function ( nButton, oConfig ) { - this.fnPrint( true, oConfig ); - } - } ), - - "text": $.extend( {}, TableTools.buttonBase ), - - "select": $.extend( {}, TableTools.buttonBase, { + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "fnCellRender": null + }, + "text": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", + "sButtonText": "Text button", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "bSelectedOnly": false, + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "fnCellRender": null + }, + "select": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", "sButtonText": "Select button", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, "fnSelect": function( nButton, oConfig ) { if ( this.fnGetSelected().length !== 0 ) { - $(nButton).removeClass( this.classes.buttons.disabled ); + $(nButton).removeClass('DTTT_disabled'); } else { - $(nButton).addClass( this.classes.buttons.disabled ); + $(nButton).addClass('DTTT_disabled'); } }, + "fnComplete": null, "fnInit": function( nButton, oConfig ) { - $(nButton).addClass( this.classes.buttons.disabled ); - } - } ), - - "select_single": $.extend( {}, TableTools.buttonBase, { + $(nButton).addClass('DTTT_disabled'); + }, + "fnCellRender": null + }, + "select_single": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", "sButtonText": "Select button", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, "fnSelect": function( nButton, oConfig ) { var iSelected = this.fnGetSelected().length; if ( iSelected == 1 ) { - $(nButton).removeClass( this.classes.buttons.disabled ); + $(nButton).removeClass('DTTT_disabled'); } else { - $(nButton).addClass( this.classes.buttons.disabled ); + $(nButton).addClass('DTTT_disabled'); } }, + "fnComplete": null, "fnInit": function( nButton, oConfig ) { - $(nButton).addClass( this.classes.buttons.disabled ); - } - } ), - - "select_all": $.extend( {}, TableTools.buttonBase, { + $(nButton).addClass('DTTT_disabled'); + }, + "fnCellRender": null + }, + "select_all": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", "sButtonText": "Select all", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "fnMouseover": null, + "fnMouseout": null, "fnClick": function( nButton, oConfig ) { this.fnSelectAll(); }, "fnSelect": function( nButton, oConfig ) { if ( this.fnGetSelected().length == this.s.dt.fnRecordsDisplay() ) { - $(nButton).addClass( this.classes.buttons.disabled ); + $(nButton).addClass('DTTT_disabled'); } else { - $(nButton).removeClass( this.classes.buttons.disabled ); + $(nButton).removeClass('DTTT_disabled'); } - } - } ), - - "select_none": $.extend( {}, TableTools.buttonBase, { + }, + "fnComplete": null, + "fnInit": null, + "fnCellRender": null + }, + "select_none": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", "sButtonText": "Deselect all", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "fnMouseover": null, + "fnMouseout": null, "fnClick": function( nButton, oConfig ) { this.fnSelectNone(); }, "fnSelect": function( nButton, oConfig ) { if ( this.fnGetSelected().length !== 0 ) { - $(nButton).removeClass( this.classes.buttons.disabled ); + $(nButton).removeClass('DTTT_disabled'); } else { - $(nButton).addClass( this.classes.buttons.disabled ); + $(nButton).addClass('DTTT_disabled'); } }, + "fnComplete": null, "fnInit": function( nButton, oConfig ) { - $(nButton).addClass( this.classes.buttons.disabled ); - } - } ), - - "ajax": $.extend( {}, TableTools.buttonBase, { + $(nButton).addClass('DTTT_disabled'); + }, + "fnCellRender": null + }, + "ajax": { + "sAction": "text", + "sFieldBoundary": "", + "sFieldSeperator": "\t", + "sNewLine": "\n", "sAjaxUrl": "/xhr.php", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", "sButtonText": "Ajax button", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "bSelectedOnly": false, + "fnMouseover": null, + "fnMouseout": null, "fnClick": function( nButton, oConfig ) { var sData = this.fnGetTableData(oConfig); $.ajax( { @@ -2318,26 +2452,45 @@ TableTools.BUTTONS = { } } ); }, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, "fnAjaxComplete": function( json ) { alert( 'Ajax complete' ); - } - } ), - - "div": $.extend( {}, TableTools.buttonBase, { + }, + "fnCellRender": null + }, + "div": { "sAction": "div", - "sTag": "div", + "sToolTip": "", "sButtonClass": "DTTT_nonbutton", - "sButtonText": "Text button" - } ), - - "collection": $.extend( {}, TableTools.buttonBase, { + "sButtonClassHover": "", + "sButtonText": "Text button", + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "nContent": null, + "fnCellRender": null + }, + "collection": { "sAction": "collection", + "sToolTip": "", "sButtonClass": "DTTT_button_collection", + "sButtonClassHover": "DTTT_button_collection_hover", "sButtonText": "Collection", + "fnMouseover": null, + "fnMouseout": null, "fnClick": function( nButton, oConfig ) { this._fnCollectionShow(nButton, oConfig); - } - } ) + }, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "fnCellRender": null + } }; /* * on* callback parameters: @@ -2348,75 +2501,17 @@ TableTools.BUTTONS = { */ - -/** - * @namespace Classes used by TableTools - allows the styles to be override easily. - * Note that when TableTools initialises it will take a copy of the classes object - * and will use its internal copy for the remainder of its run time. - */ -TableTools.classes = { - "container": "DTTT_container", - "buttons": { - "normal": "DTTT_button", - "disabled": "DTTT_disabled" - }, - "collection": { - "container": "DTTT_collection", - "background": "DTTT_collection_background", - "buttons": { - "normal": "DTTT_button", - "disabled": "DTTT_disabled" - } - }, - "select": { - "table": "DTTT_selectable", - "row": "DTTT_selected" - }, - "print": { - "body": "DTTT_Print", - "info": "DTTT_print_info", - "message": "DTTT_PrintMessage" - } -}; - - -/** - * @namespace ThemeRoller classes - built in for compatibility with DataTables' - * bJQueryUI option. - */ -TableTools.classes_themeroller = { - "container": "DTTT_container ui-buttonset ui-buttonset-multi", - "buttons": { - "normal": "DTTT_button ui-button ui-state-default" - }, - "collection": { - "container": "DTTT_collection ui-buttonset ui-buttonset-multi" - } -}; - - /** * @namespace TableTools default settings for initialisation */ TableTools.DEFAULTS = { - "sSwfPath": "media/swf/copy_csv_xls_pdf.swf", - "sRowSelect": "none", - "sSelectedClass": null, - "fnPreRowSelect": null, - "fnRowSelected": null, - "fnRowDeselected": null, - "aButtons": [ "copy", "csv", "xls", "pdf", "print" ], - "oTags": { - "container": "div", - "button": "a", // We really want to use buttons here, but Firefox and IE ignore the - // click on the Flash element in the button (but not mouse[in|out]). - "liner": "span", - "collection": { - "container": "div", - "button": "a", - "liner": "span" - } - } + "sSwfPath": "media/swf/copy_cvs_xls_pdf.swf", + "sRowSelect": "none", + "sSelectedClass": "DTTT_selected", + "fnPreRowSelect": null, + "fnRowSelected": null, + "fnRowDeselected": null, + "aButtons": [ "copy", "csv", "xls", "pdf", "print" ] }; @@ -2433,9 +2528,9 @@ TableTools.prototype.CLASS = "TableTools"; * TableTools version * @constant VERSION * @type String - * @default See code + * @default 2.0.2 */ -TableTools.VERSION = "2.1.5"; +TableTools.VERSION = "2.0.2"; TableTools.prototype.VERSION = TableTools.VERSION; @@ -2450,7 +2545,7 @@ TableTools.prototype.VERSION = TableTools.VERSION; */ if ( typeof $.fn.dataTable == "function" && typeof $.fn.dataTableExt.fnVersionCheck == "function" && - $.fn.dataTableExt.fnVersionCheck('1.9.0') ) + $.fn.dataTableExt.fnVersionCheck('1.8.2') ) { $.fn.dataTableExt.aoFeatures.push( { "fnInit": function( oDTSettings ) { @@ -2468,9 +2563,7 @@ if ( typeof $.fn.dataTable == "function" && } else { - alert( "Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download"); + alert( "Warning: TableTools 2 requires DataTables 1.8.2 or newer - www.datatables.net/download"); } -$.fn.DataTable.TableTools = TableTools; - })(jQuery, window, document); diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.min.js b/airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.min.js new file mode 100644 index 000000000..3455faf03 --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.min.js @@ -0,0 +1,81 @@ +// Simple Set Clipboard System +// Author: Joseph Huckaby +var ZeroClipboard={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=document.getElementById(a));if(!a.addClass)a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){this.className=this.className.replace(RegExp("\\s*"+a+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(a){return!!this.className.match(RegExp("\\s*"+ +a+"\\s*"))};return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){(a=this.clients[a])&&a.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a){var b={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};if(""!=a.style.width)b.width=a.style.width.replace("px","");if(""!=a.style.height)b.height=a.style.height.replace("px","");for(;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;return b}, +Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);a&&this.glue(a)}}; +ZeroClipboard.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"",action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,glue:function(a,b){this.domElement=ZeroClipboard.$(a);var c=99;this.domElement.style.zIndex&&(c=parseInt(this.domElement.style.zIndex)+1);var d=ZeroClipboard.getDOMObjectPosition(this.domElement);this.div=document.createElement("div");var e=this.div.style;e.position="absolute";e.left=this.domElement.offsetLeft+"px";e.top=this.domElement.offsetTop+ +"px";e.width=d.width+"px";e.height=d.height+"px";e.zIndex=c;if("undefined"!=typeof b&&""!=b)this.div.title=b;if(0!=d.width&&0!=d.height)this.sized=!0;this.domElement.parentNode.appendChild(this.div);this.div.innerHTML=this.getHTML(d.width,d.height)},positionElement:function(){var a=ZeroClipboard.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.left=this.domElement.offsetLeft+"px";b.top=this.domElement.offsetTop+"px";b.width=a.width+"px";b.height=a.height+"px";if(0!=a.width&& +0!=a.height)this.sized=!0,b=this.div.childNodes[0],b.width=a.width,b.height=a.height},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var e=location.href.match(/^https/i)?"https://":"http://",c=c+('');else c+='';return c},hide:function(){if(this.div)this.div.style.left="-2000px"},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.div=this.domElement=null}},reposition:function(a){if(a)(this.domElement=ZeroClipboard.$(a))||this.hide();if(this.domElement&&this.div){var a=ZeroClipboard.getDOMObjectPosition(this.domElement),b= +this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+=a;this.ready&&this.movie.appendText(a)},setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},setCharSet:function(a){this.charSet=a;this.ready&&this.movie.setCharSet(a)},setBomInc:function(a){this.incBom=a;this.ready&&this.movie.setBomInc(a)},setFileName:function(a){this.fileName=a;this.ready&&this.movie.setFileName(a)}, +setAction:function(a){this.action=a;this.ready&&this.movie.setAction(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=document.getElementById(this.movieId); +if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;this.movie.clearText();this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setCharSet(this.charSet);this.movie.setBomInc(this.incBom);this.movie.setHandCursor(this.handCursorEnabled); +break;case "mouseover":this.domElement&&this.cssEffects&&this.recoverActive&&this.domElement.addClass("active");break;case "mouseout":if(this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")))this.domElement.removeClass("active"),this.recoverActive=!0;break;case "mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":if(this.domElement&&this.cssEffects)this.domElement.removeClass("active"),this.recoverActive=!1}if(this.handlers[a])for(var d= +0,e=this.handlers[a].length;d"\u00a1".toString().length?b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""):b.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"")},fnCalcColRatios:function(a){var b=this.s.dt.aoColumns,a=this._fnColumnTargets(a.mColumns),c=[],d=0,e=0,f,g;for(f=0,g=a.length;fl?g:l)+"px";k.style.width=(m>o?m:o)+"px";k.className="DTTT_collection_background";e(k).css("opacity",0);h.body.appendChild(k);h.body.appendChild(j); +g=e(j).outerWidth();m=e(j).outerHeight();if(f+g>o)j.style.left=o-g+"px";if(d+m>l)j.style.top=d-m-e(a).outerHeight()+"px";this.dom.collection.collection=j;this.dom.collection.background=k;setTimeout(function(){e(j).animate({opacity:1},500);e(k).animate({opacity:0.25},500)},10);e(k).click(function(){c._fnCollectionHide.call(c,null,null)})},_fnCollectionHide:function(a,b){if(!(null!==b&&"collection"==b.sExtends)&&null!==this.dom.collection.collection)e(this.dom.collection.collection).animate({opacity:0}, +500,function(){this.style.display="none"}),e(this.dom.collection.background).animate({opacity:0},500,function(){this.parentNode.removeChild(this)}),this.dom.collection.collection=null,this.dom.collection.background=null},_fnRowSelectConfig:function(){if(this.s.master){var a=this;e(a.s.dt.nTable).addClass("DTTT_selectable");e("tr",a.s.dt.nTBody).live("click",function(b){if(this.parentNode==a.s.dt.nTBody){var c=a.s.dt.oInstance.fnGetNodes();-1===e.inArray(this,c)||null!==a.s.select.preRowSelect&&!a.s.select.preRowSelect.call(a, +b)||("single"==a.s.select.type?a._fnRowSelectSingle.call(a,this):a._fnRowSelectMulti.call(a,this))}});a.s.dt.aoDrawCallback.push({fn:function(){a.s.select.all&&a.s.dt.oFeatures.bServerSide&&a.fnSelectAll()},sName:"TableTools_select"})}},_fnRowSelectSingle:function(a){this.s.master&&!e("td",a).hasClass(this.s.dt.oClasses.sRowEmpty)&&(e(a).hasClass(this.s.select.selectedClass)?this._fnRowDeselect(a):(0!==this.s.select.selected.length&&this._fnRowDeselectAll(),this.s.select.selected.push(a),e(a).addClass(this.s.select.selectedClass), +null!==this.s.select.postSelected&&this.s.select.postSelected.call(this,a)),TableTools._fnEventDispatch(this,"select",a))},_fnRowSelectMulti:function(a){this.s.master&&!e("td",a).hasClass(this.s.dt.oClasses.sRowEmpty)&&(e(a).hasClass(this.s.select.selectedClass)?this._fnRowDeselect(a):(this.s.select.selected.push(a),e(a).addClass(this.s.select.selectedClass),null!==this.s.select.postSelected&&this.s.select.postSelected.call(this,a)),TableTools._fnEventDispatch(this,"select",a))},_fnRowSelectAll:function(){if(this.s.master){for(var a, +b=0,c=this.s.dt.aiDisplayMaster.length;b/g, +"").replace(/^\s+|\s+$/g,""),g=this._fnHtmlDecode(g),f+=this._fnBoundData(g,a.sFieldBoundary,m)+a.sFieldSeperator);f=f.slice(0,-1*a.sFieldSeperator.length);f+=k}for(d=0,j=h.aiDisplay.length;d]+)).*?>/gi,"$1$2$3"),g=g.replace(/<.*?>/g,"")):g+="",g=g.replace(/^\s+/,"").replace(/\s+$/,""),g=this._fnHtmlDecode(g),f+=this._fnBoundData(g,a.sFieldBoundary,m)+a.sFieldSeperator);f=f.slice(0,-1*a.sFieldSeperator.length);f+=k}f.slice(0,-1);if(a.bFooter){for(b=0,c=h.aoColumns.length;b/g,""),g=this._fnHtmlDecode(g),f+=this._fnBoundData(g, +a.sFieldBoundary,m)+a.sFieldSeperator);f=f.slice(0,-1*a.sFieldSeperator.length)}return _sLastData=f},_fnBoundData:function(a,b,c){return""===b?a:b+a.replace(c,b+b)+b},_fnChunkData:function(a,b){for(var c=[],d=a.length,e=0;ea[c].length- +8&&(a[c].substr(e),a[c]=a[c].substr(0,e)),b.innerHTML=a[c],f+=b.childNodes[0].nodeValue;return f},_fnPrintConfig:function(a,b){var c=this;null!==b.fnInit&&b.fnInit.call(this,a,b);if(""!==b.sToolTip)a.title=b.sToolTip;e(a).hover(function(){e(a).addClass(b.sButtonClassHover)},function(){e(a).removeClass(b.sButtonClassHover)});null!==b.fnSelect&&TableTools._fnEventListen(this,"select",function(d){b.fnSelect.call(c,a,b,d)});e(a).click(function(d){d.preventDefault();c._fnPrintStart.call(c,d,b);null!== +b.fnClick&&b.fnClick.call(c,a,b,null);null!==b.fnComplete&&b.fnComplete.call(c,a,b,null,null);c._fnCollectionHide(a,b)})},_fnPrintStart:function(a,b){var c=this,d=this.s.dt;this._fnPrintHideNodes(d.nTable);this.s.print.saveStart=d._iDisplayStart;this.s.print.saveLength=d._iDisplayLength;if(b.bShowAll)d._iDisplayStart=0,d._iDisplayLength=-1,d.oApi._fnCalculateEnd(d),d.oApi._fnDraw(d);(""!==d.oScroll.sX||""!==d.oScroll.sY)&&this._fnPrintScrollStart(d);var d=d.aanFeatures,j;for(j in d)if("i"!=j&&"t"!= +j&&1==j.length)for(var f=0,g=d[j].length;fPrint view

    Please use your browser's print function to print this table. Press escape when finished.", +sMessage:"",bShowAll:!0,sToolTip:"View print view",sButtonClass:"DTTT_button_print",sButtonClassHover:"DTTT_button_print_hover",sButtonText:"Print",fnMouseover:null,fnMouseout:null,fnClick:null,fnSelect:null,fnComplete:null,fnInit:null,fnCellRender:null},text:{sAction:"text",sToolTip:"",sButtonClass:"DTTT_button_text",sButtonClassHover:"DTTT_button_text_hover",sButtonText:"Text button",mColumns:"all",bHeader:!0,bFooter:!0,bSelectedOnly:!1,fnMouseover:null,fnMouseout:null,fnClick:null,fnSelect:null, +fnComplete:null,fnInit:null,fnCellRender:null},select:{sAction:"text",sToolTip:"",sButtonClass:"DTTT_button_text",sButtonClassHover:"DTTT_button_text_hover",sButtonText:"Select button",mColumns:"all",bHeader:!0,bFooter:!0,fnMouseover:null,fnMouseout:null,fnClick:null,fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass("DTTT_disabled"):e(a).addClass("DTTT_disabled")},fnComplete:null,fnInit:function(a){e(a).addClass("DTTT_disabled")},fnCellRender:null},select_single:{sAction:"text", +sToolTip:"",sButtonClass:"DTTT_button_text",sButtonClassHover:"DTTT_button_text_hover",sButtonText:"Select button",mColumns:"all",bHeader:!0,bFooter:!0,fnMouseover:null,fnMouseout:null,fnClick:null,fnSelect:function(a){1==this.fnGetSelected().length?e(a).removeClass("DTTT_disabled"):e(a).addClass("DTTT_disabled")},fnComplete:null,fnInit:function(a){e(a).addClass("DTTT_disabled")},fnCellRender:null},select_all:{sAction:"text",sToolTip:"",sButtonClass:"DTTT_button_text",sButtonClassHover:"DTTT_button_text_hover", +sButtonText:"Select all",mColumns:"all",bHeader:!0,bFooter:!0,fnMouseover:null,fnMouseout:null,fnClick:function(){this.fnSelectAll()},fnSelect:function(a){this.fnGetSelected().length==this.s.dt.fnRecordsDisplay()?e(a).addClass("DTTT_disabled"):e(a).removeClass("DTTT_disabled")},fnComplete:null,fnInit:null,fnCellRender:null},select_none:{sAction:"text",sToolTip:"",sButtonClass:"DTTT_button_text",sButtonClassHover:"DTTT_button_text_hover",sButtonText:"Deselect all",mColumns:"all",bHeader:!0,bFooter:!0, +fnMouseover:null,fnMouseout:null,fnClick:function(){this.fnSelectNone()},fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass("DTTT_disabled"):e(a).addClass("DTTT_disabled")},fnComplete:null,fnInit:function(a){e(a).addClass("DTTT_disabled")},fnCellRender:null},ajax:{sAction:"text",sFieldBoundary:"",sFieldSeperator:"\t",sNewLine:"\n",sAjaxUrl:"/xhr.php",sToolTip:"",sButtonClass:"DTTT_button_text",sButtonClassHover:"DTTT_button_text_hover",sButtonText:"Ajax button",mColumns:"all",bHeader:!0, +bFooter:!0,bSelectedOnly:!1,fnMouseover:null,fnMouseout:null,fnClick:function(a,b){var c=this.fnGetTableData(b);e.ajax({url:b.sAjaxUrl,data:[{name:"tableData",value:c}],success:b.fnAjaxComplete,dataType:"json",type:"POST",cache:!1,error:function(){alert("Error detected when sending table data to server")}})},fnSelect:null,fnComplete:null,fnInit:null,fnAjaxComplete:function(){alert("Ajax complete")},fnCellRender:null},div:{sAction:"div",sToolTip:"",sButtonClass:"DTTT_nonbutton",sButtonClassHover:"", +sButtonText:"Text button",fnMouseover:null,fnMouseout:null,fnClick:null,fnSelect:null,fnComplete:null,fnInit:null,nContent:null,fnCellRender:null},collection:{sAction:"collection",sToolTip:"",sButtonClass:"DTTT_button_collection",sButtonClassHover:"DTTT_button_collection_hover",sButtonText:"Collection",fnMouseover:null,fnMouseout:null,fnClick:function(a,b){this._fnCollectionShow(a,b)},fnSelect:null,fnComplete:null,fnInit:null,fnCellRender:null}};TableTools.DEFAULTS={sSwfPath:"media/swf/copy_cvs_xls_pdf.swf", +sRowSelect:"none",sSelectedClass:"DTTT_selected",fnPreRowSelect:null,fnRowSelected:null,fnRowDeselected:null,aButtons:["copy","csv","xls","pdf","print"]};TableTools.prototype.CLASS="TableTools";TableTools.VERSION="2.0.2";TableTools.prototype.VERSION=TableTools.VERSION;"function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.8.2")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(a){a=new TableTools(a.oInstance,"undefined"!=typeof a.oInit.oTableTools? +a.oInit.oTableTools:{});TableTools._aInstances.push(a);return a.dom.container},cFeature:"T",sFeature:"TableTools"}):alert("Warning: TableTools 2 requires DataTables 1.8.2 or newer - www.datatables.net/download")})(jQuery,window,document); diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.min.js.gz b/airtime_mvc/public/js/datatables/plugin/TableTools/js/TableTools.min.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..6ec0fb9cb581015e8add0d5258dc87f2e68ce6db GIT binary patch literal 8635 zcmV;sAw=FEiwFoU10PQU15{yRY-Ln$Z)|feZE0>UYI6Y0JZW>=MzY`eD-( zy-r?C7*^@Bt(1I}D6cD#6x9G2l8``v3xJ{-ng4ye=Kux=DJAySTcu(FGu?CaHGK@! z>uIB4HV>&bqM3FS26HziiLZ@TX+~$QUQat%WYahqYQM%Qolmv53-6A&tJXb9wBKnG z=P1s@Jx$Uej)wZc>RZpd7sL(eMI49eGu`yUfJRw5d{~>a_&%T?Nj4qox*5?g*{MGq zm_H21i^$6WzfFt>J!cyYh-t~O&mY=7Bd*fn$YYdr1*HaI`sj=u!C`X zhgih-k3y2B2C=4rPn~>F;~|>{sg-7{kXn9_&O@?t^eB#~zBY-KPUGcczzk4M;Hb-G z&%j-zXOhu{bbTz!xn!70B27A(S}?Q=Rg`7&?oS6AteFkpv2 z7$yvFY$M>>Oz0#4DNRa4 zRvow=_YRW zXpy9GauT79^M^Zq(@WEn@fhSQ#WzV0K5QENi9iDr*VrVjemoQAtU|RP(2}5Vdd`a% zb_G`O{m;|Lr(eK6dd{3ADLn-R*#>EJ27Jsai<-2gI+Cz!esEtHV-HA~Q324_p-<-% z2qOj!d;vDK=3-n&CvF;ti;U{fih}7>*IYmLt0ng(gqCO~_ICk9KT~s~S$TyM&Sx6lh5&AoFmfcl?jzh2K++&8%u@`V$~?{hA{o$PFHIa!H{v0!k@o3j|JtlfXVz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`qs<+A`$Gb*Hj8?Dy7>nWAw>odL?i#^2D7Tk%+;k z=mSnqeGG!L`X}T0!n-*87~IKQ{=oED;L7hHKyQR2koOX(5ix0Us73YyR_;f}ZDU=q z%XWFe5*IKI#pH!aAcQ0r_X32NBh4fD+cQlWff>arw2AYvGlxZXgdcxgDLpM|RsZa57H+#7v|ub#F3DI*q$u^-P`IKlv?yn~#V`VzNUv5gsYC7Ixi252jLK#Iz&m!dM zZJbX2siZ__m=Z0;=MElCn@uPpU$JIsK_U0rqS{YH5$_2}VmHYXgdP=slFK^Y@+u6O zc0|XvFtm^fa8%u>c@RX+!?p~>hN(bgHUgfnEoPrsqmDNCE?s^xP@d6q1HCq4<@O=q zV^(s-Jn5I10==-d=Lr~-z3fFZCXeW~T*)n>(rRXbGEQE3^Xi9g>T|XMU`_mooB*0-X`o2ArLDvl`W|shP*+AyNo!k+hmt z?acxvvX*9XG*4@vhUv7{A5BNuFil#xJs6Z!)^Xb3a<+a8J(0~~r&jW|9LyT-COfW^ zzeW9xHyZiy2grc{0R}Y)FJMElFUzhTD;9DN75_?Xi6`HW9n<7(IZq0v@hi-f==OGV z^~k9)4|92tR{`QrA)}S<5yfcW98Cbo%n$5~$zt|H6|0(^*q{kFrLIN1V2NPfKbT?% ze`|svXz8D{ygV1Rh&ErARK-B!LL}%aa7h;hO$8F+-{RRK$>hyM-S4iR`d}^jANZqW z;x!t~zKUQ}F+*FB&ili(LtN2H;{9D^W;Bj&%Orf%`QRlq_20!LV0*X2MQc8s|2e#X zuiZf4dSCo}Z~3g3wB>f%!nv*A-N2M!OpKTvo}km$<=vDHQcG2Var$sm5I34rsuu(nJ*WhEaJ`NIvxTUq=@g}prXXLbkC*Jqq(#2;kzShCjXN&x{ N_kY^c0R$j?002l1z+wOZ literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js b/airtime_mvc/public/js/datatables/plugin/TableTools/js/ZeroClipboard.js old mode 100755 new mode 100644 similarity index 86% rename from airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js rename to airtime_mvc/public/js/datatables/plugin/TableTools/js/ZeroClipboard.js index de0f6b67b..73707f024 --- a/airtime_mvc/public/js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js +++ b/airtime_mvc/public/js/datatables/plugin/TableTools/js/ZeroClipboard.js @@ -1,7 +1,7 @@ // Simple Set Clipboard System // Author: Joseph Huckaby -var ZeroClipboard_TableTools = { +var ZeroClipboard = { version: "1.0.4-TableTools2", clients: {}, // registered upload clients on page, indexed by id @@ -73,18 +73,18 @@ var ZeroClipboard_TableTools = { this.handlers = {}; // unique ID - this.id = ZeroClipboard_TableTools.nextId++; - this.movieId = 'ZeroClipboard_TableToolsMovie_' + this.id; + this.id = ZeroClipboard.nextId++; + this.movieId = 'ZeroClipboardMovie_' + this.id; // register client with singleton to receive flash events - ZeroClipboard_TableTools.register(this.id, this); + ZeroClipboard.register(this.id, this); // create movie if (elem) this.glue(elem); } }; -ZeroClipboard_TableTools.Client.prototype = { +ZeroClipboard.Client.prototype = { id: 0, // unique ID for us ready: false, // whether movie is ready to receive events or not @@ -100,7 +100,7 @@ ZeroClipboard_TableTools.Client.prototype = { glue: function(elem, title) { // glue to DOM element // elem can be ID or actual DOM element object - this.domElement = ZeroClipboard_TableTools.$(elem); + this.domElement = ZeroClipboard.$(elem); // float just above object, or zIndex 99 if dom element isn't set var zIndex = 99; @@ -109,18 +109,19 @@ ZeroClipboard_TableTools.Client.prototype = { } // find X/Y position of domElement - var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); + var box = ZeroClipboard.getDOMObjectPosition(this.domElement); // create floating DIV above element this.div = document.createElement('div'); var style = this.div.style; style.position = 'absolute'; - style.left = '0px'; - style.top = '0px'; + style.left = (this.domElement.offsetLeft)+'px'; + //style.left = (this.domElement.offsetLeft+2)+'px'; + style.top = this.domElement.offsetTop+'px'; style.width = (box.width) + 'px'; + //style.width = (box.width-4) + 'px'; style.height = box.height + 'px'; style.zIndex = zIndex; - if ( typeof title != "undefined" && title != "" ) { this.div.title = title; } @@ -129,19 +130,18 @@ ZeroClipboard_TableTools.Client.prototype = { } // style.backgroundColor = '#f00'; // debug - if ( this.domElement ) { - this.domElement.appendChild(this.div); - this.div.innerHTML = this.getHTML( box.width, box.height ); - } + this.domElement.parentNode.appendChild(this.div); + + this.div.innerHTML = this.getHTML( box.width, box.height ); }, positionElement: function() { - var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); + var box = ZeroClipboard.getDOMObjectPosition(this.domElement); var style = this.div.style; style.position = 'absolute'; - //style.left = (this.domElement.offsetLeft)+'px'; - //style.top = this.domElement.offsetTop+'px'; + style.left = (this.domElement.offsetLeft)+'px'; + style.top = this.domElement.offsetTop+'px'; style.width = box.width + 'px'; style.height = box.height + 'px'; @@ -166,11 +166,11 @@ ZeroClipboard_TableTools.Client.prototype = { if (navigator.userAgent.match(/MSIE/)) { // IE gets an OBJECT tag var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; - html += ''; + html += ''; } else { // all other browsers get an EMBED tag - html += ''; + html += ''; } return html; }, @@ -205,12 +205,12 @@ ZeroClipboard_TableTools.Client.prototype = { // reposition our floating div, optionally to new container // warning: container CANNOT change size, only position if (elem) { - this.domElement = ZeroClipboard_TableTools.$(elem); + this.domElement = ZeroClipboard.$(elem); if (!this.domElement) this.hide(); } if (this.domElement && this.div) { - var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); + var box = ZeroClipboard.getDOMObjectPosition(this.domElement); var style = this.div.style; style.left = '' + box.left + 'px'; style.top = '' + box.top + 'px'; diff --git a/airtime_mvc/public/js/datatables/plugin/TableTools/swf/copy_cvs_xls.swf b/airtime_mvc/public/js/datatables/plugin/TableTools/swf/copy_cvs_xls.swf new file mode 100644 index 0000000000000000000000000000000000000000..4c0156d5e4722fb91b293e0c28d757d0dadf0938 GIT binary patch literal 2125 zcmV-T2(tG>S5pcs4FCX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i!sHQZL|G1cVO1+5v9Bmo)qysKF&}uORrig5cvj z2cO^tf1*q9pCEWMg1=Z0{H4ypU-p6z>=OJh5PTwnzfusqxpVM|UhqL(g8vl3TM)dZ zAo!%t!6$pc2X_hnmk2%y!CMQ0Pw5$!6zg5w1VK%I|qN&3;tx6;6Fp~ zRs^3>5PW9m;Iq8oPjv}?KY~v|@Yw~y=X4G}*9$(hOYpx!@Tmy?T0!u6orAyb1s~QW z_yY(&4Z-JA5GiN}zpHEjby!6KJ@D(_{_<<}zxtcU9{SCLsjsDe{eK>5{MrwG{oq4C zssH6ezxcsVzJB{RZx4jN+SAtq;;TJRv-}g`9r_`^$&jaH@`{#y8gEh251-@_`m##Os-|iAr}Au literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.TableTools.js b/airtime_mvc/public/js/datatables/plugin/dataTables.TableTools.js new file mode 100644 index 000000000..3e02c2c08 --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/dataTables.TableTools.js @@ -0,0 +1,2569 @@ +/* + * File: TableTools.js + * Version: 2.0.2 + * Description: Tools and buttons for DataTables + * Author: Allan Jardine (www.sprymedia.co.uk) + * Language: Javascript + * License: GPL v2 or BSD 3 point style + * Project: DataTables + * + * Copyright 2009-2012 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + */ + +/* Global scope for TableTools */ +var TableTools; + +(function($, window, document) { + +/** + * TableTools provides flexible buttons and other tools for a DataTables enhanced table + * @class TableTools + * @constructor + * @param {Object} oDT DataTables instance + * @param {Object} oOpts TableTools options + * @param {String} oOpts.sSwfPath ZeroClipboard SWF path + * @param {String} oOpts.sRowSelect Row selection options - 'none', 'single' or 'multi' + * @param {Function} oOpts.fnPreRowSelect Callback function just prior to row selection + * @param {Function} oOpts.fnRowSelected Callback function just after row selection + * @param {Function} oOpts.fnRowDeselected Callback function when row is deselected + * @param {Array} oOpts.aButtons List of buttons to be used + */ +TableTools = function( oDT, oOpts ) +{ + /* Santiy check that we are a new instance */ + if ( !this.CLASS || this.CLASS != "TableTools" ) + { + alert( "Warning: TableTools must be initialised with the keyword 'new'" ); + } + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public class variables + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * @namespace Settings object which contains customisable information for TableTools instance + */ + this.s = { + /** + * Store 'this' so the instance can be retreieved from the settings object + * @property that + * @type object + * @default this + */ + "that": this, + + /** + * DataTables settings objects + * @property dt + * @type object + * @default null + */ + "dt": null, + + /** + * @namespace Print specific information + */ + "print": { + /** + * DataTables draw 'start' point before the printing display was shown + * @property saveStart + * @type int + * @default -1 + */ + "saveStart": -1, + + /** + * DataTables draw 'length' point before the printing display was shown + * @property saveLength + * @type int + * @default -1 + */ + "saveLength": -1, + + /** + * Page scrolling point before the printing display was shown so it can be restored + * @property saveScroll + * @type int + * @default -1 + */ + "saveScroll": -1, + + /** + * Wrapped function to end the print display (to maintain scope) + * @property funcEnd + * @type Function + * @default function () {} + */ + "funcEnd": function () {} + }, + + /** + * A unique ID is assigned to each button in each instance + * @property buttonCounter + * @type int + * @default 0 + */ + "buttonCounter": 0, + + /** + * @namespace Select rows specific information + */ + "select": { + /** + * Select type - can be 'none', 'single' or 'multi' + * @property type + * @type string + * @default "" + */ + "type": "", + + /** + * Array of nodes which are currently selected + * @property selected + * @type array + * @default [] + */ + "selected": [], + + /** + * Function to run before the selection can take place. Will cancel the select if the + * function returns false + * @property preRowSelect + * @type Function + * @default null + */ + "preRowSelect": null, + + /** + * Function to run when a row is selected + * @property postSelected + * @type Function + * @default null + */ + "postSelected": null, + + /** + * Function to run when a row is deselected + * @property postDeselected + * @type Function + * @default null + */ + "postDeselected": null, + + /** + * Indicate if all rows are selected (needed for server-side processing) + * @property all + * @type boolean + * @default false + */ + "all": false, + + /** + * Class name to add to selected TR nodes + * @property selectedClass + * @type String + * @default "" + */ + "selectedClass": "" + }, + + /** + * Store of the user input customisation object + * @property custom + * @type object + * @default {} + */ + "custom": {}, + + /** + * SWF movie path + * @property swfPath + * @type string + * @default "" + */ + "swfPath": "", + + /** + * Default button set + * @property buttonSet + * @type array + * @default [] + */ + "buttonSet": [], + + /** + * When there is more than one TableTools instance for a DataTable, there must be a + * master which controls events (row selection etc) + * @property master + * @type boolean + * @default false + */ + "master": false + }; + + + /** + * @namespace Common and useful DOM elements for the class instance + */ + this.dom = { + /** + * DIV element that is create and all TableTools buttons (and their children) put into + * @property container + * @type node + * @default null + */ + "container": null, + + /** + * The table node to which TableTools will be applied + * @property table + * @type node + * @default null + */ + "table": null, + + /** + * @namespace Nodes used for the print display + */ + "print": { + /** + * Nodes which have been removed from the display by setting them to display none + * @property hidden + * @type array + * @default [] + */ + "hidden": [], + + /** + * The information display saying tellng the user about the print display + * @property message + * @type node + * @default null + */ + "message": null + }, + + /** + * @namespace Nodes used for a collection display. This contains the currently used collection + */ + "collection": { + /** + * The div wrapper containing the buttons in the collection (i.e. the menu) + * @property collection + * @type node + * @default null + */ + "collection": null, + + /** + * Background display to provide focus and capture events + * @property background + * @type node + * @default null + */ + "background": null + } + }; + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public class methods + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Retreieve the settings object from an instance + * @method fnSettings + * @returns {object} TableTools settings object + */ + this.fnSettings = function () { + return this.s; + }; + + + /* Constructor logic */ + if ( typeof oOpts == 'undefined' ) + { + oOpts = {}; + } + + this.s.dt = oDT.fnSettings(); + this._fnConstruct( oOpts ); + + return this; +}; + + + +TableTools.prototype = { + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public methods + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Retreieve the settings object from an instance + * @method fnGetSelected + * @returns {array} List of TR nodes which are currently selected + */ + "fnGetSelected": function () + { + var masterS = this._fnGetMasterSettings(); + return masterS.select.selected; + }, + + + /** + * Get the data source objects/arrays from DataTables for the selected rows (same as + * fnGetSelected followed by fnGetData on each row from the table) + * @method fnGetSelectedData + * @returns {array} Data from the TR nodes which are currently selected + */ + "fnGetSelectedData": function () + { + var masterS = this._fnGetMasterSettings(); + var selected = masterS.select.selected; + var out = []; + + for ( var i=0, iLen=selected.length ; i 0 ) + { + sTitle = anTitle[0].innerHTML; + } + } + + /* Strip characters which the OS will object to - checking for UTF8 support in the scripting + * engine + */ + if ( "\u00A1".toString().length < 4 ) { + return sTitle.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g, ""); + } else { + return sTitle.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g, ""); + } + }, + + + /** + * Calculate a unity array with the column width by proportion for a set of columns to be + * included for a button. This is particularly useful for PDF creation, where we can use the + * column widths calculated by the browser to size the columns in the PDF. + * @method fnCalcColRations + * @param {Object} oConfig Button configuration object + * @returns {Array} Unity array of column ratios + */ + "fnCalcColRatios": function ( oConfig ) + { + var + aoCols = this.s.dt.aoColumns, + aColumnsInc = this._fnColumnTargets( oConfig.mColumns ), + aColWidths = [], + iWidth = 0, iTotal = 0, i, iLen; + + for ( i=0, iLen=aColumnsInc.length ; i

    Please use your browser's print function to "+ + "print this table. Press escape when finished.", + "sMessage": "", + "bShowAll": true, + "sToolTip": "View print view", + "sButtonClass": "DTTT_button_print", + "sButtonClassHover": "DTTT_button_print_hover", + "sButtonText": "Print", + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "fnCellRender": null + }, + "text": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", + "sButtonText": "Text button", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "bSelectedOnly": false, + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "fnCellRender": null + }, + "select": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", + "sButtonText": "Select button", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, + "fnSelect": function( nButton, oConfig ) { + if ( this.fnGetSelected().length !== 0 ) { + $(nButton).removeClass('DTTT_disabled'); + } else { + $(nButton).addClass('DTTT_disabled'); + } + }, + "fnComplete": null, + "fnInit": function( nButton, oConfig ) { + $(nButton).addClass('DTTT_disabled'); + }, + "fnCellRender": null + }, + "select_single": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", + "sButtonText": "Select button", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, + "fnSelect": function( nButton, oConfig ) { + var iSelected = this.fnGetSelected().length; + if ( iSelected == 1 ) { + $(nButton).removeClass('DTTT_disabled'); + } else { + $(nButton).addClass('DTTT_disabled'); + } + }, + "fnComplete": null, + "fnInit": function( nButton, oConfig ) { + $(nButton).addClass('DTTT_disabled'); + }, + "fnCellRender": null + }, + "select_all": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", + "sButtonText": "Select all", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "fnMouseover": null, + "fnMouseout": null, + "fnClick": function( nButton, oConfig ) { + this.fnSelectAll(); + }, + "fnSelect": function( nButton, oConfig ) { + if ( this.fnGetSelected().length == this.s.dt.fnRecordsDisplay() ) { + $(nButton).addClass('DTTT_disabled'); + } else { + $(nButton).removeClass('DTTT_disabled'); + } + }, + "fnComplete": null, + "fnInit": null, + "fnCellRender": null + }, + "select_none": { + "sAction": "text", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", + "sButtonText": "Deselect all", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "fnMouseover": null, + "fnMouseout": null, + "fnClick": function( nButton, oConfig ) { + this.fnSelectNone(); + }, + "fnSelect": function( nButton, oConfig ) { + if ( this.fnGetSelected().length !== 0 ) { + $(nButton).removeClass('DTTT_disabled'); + } else { + $(nButton).addClass('DTTT_disabled'); + } + }, + "fnComplete": null, + "fnInit": function( nButton, oConfig ) { + $(nButton).addClass('DTTT_disabled'); + }, + "fnCellRender": null + }, + "ajax": { + "sAction": "text", + "sFieldBoundary": "", + "sFieldSeperator": "\t", + "sNewLine": "\n", + "sAjaxUrl": "/xhr.php", + "sToolTip": "", + "sButtonClass": "DTTT_button_text", + "sButtonClassHover": "DTTT_button_text_hover", + "sButtonText": "Ajax button", + "mColumns": "all", + "bHeader": true, + "bFooter": true, + "bSelectedOnly": false, + "fnMouseover": null, + "fnMouseout": null, + "fnClick": function( nButton, oConfig ) { + var sData = this.fnGetTableData(oConfig); + $.ajax( { + "url": oConfig.sAjaxUrl, + "data": [ + { "name": "tableData", "value": sData } + ], + "success": oConfig.fnAjaxComplete, + "dataType": "json", + "type": "POST", + "cache": false, + "error": function () { + alert( "Error detected when sending table data to server" ); + } + } ); + }, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "fnAjaxComplete": function( json ) { + alert( 'Ajax complete' ); + }, + "fnCellRender": null + }, + "div": { + "sAction": "div", + "sToolTip": "", + "sButtonClass": "DTTT_nonbutton", + "sButtonClassHover": "", + "sButtonText": "Text button", + "fnMouseover": null, + "fnMouseout": null, + "fnClick": null, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "nContent": null, + "fnCellRender": null + }, + "collection": { + "sAction": "collection", + "sToolTip": "", + "sButtonClass": "DTTT_button_collection", + "sButtonClassHover": "DTTT_button_collection_hover", + "sButtonText": "Collection", + "fnMouseover": null, + "fnMouseout": null, + "fnClick": function( nButton, oConfig ) { + this._fnCollectionShow(nButton, oConfig); + }, + "fnSelect": null, + "fnComplete": null, + "fnInit": null, + "fnCellRender": null + } +}; +/* + * on* callback parameters: + * 1. node - button element + * 2. object - configuration object for this button + * 3. object - ZeroClipboard reference (flash button only) + * 4. string - Returned string from Flash (flash button only - and only on 'complete') + */ + + +/** + * @namespace TableTools default settings for initialisation + */ +TableTools.DEFAULTS = { + "sSwfPath": "media/swf/copy_cvs_xls_pdf.swf", + "sRowSelect": "none", + "sSelectedClass": "DTTT_selected", + "fnPreRowSelect": null, + "fnRowSelected": null, + "fnRowDeselected": null, + "aButtons": [ "copy", "csv", "xls", "pdf", "print" ] +}; + + +/** + * Name of this class + * @constant CLASS + * @type String + * @default TableTools + */ +TableTools.prototype.CLASS = "TableTools"; + + +/** + * TableTools version + * @constant VERSION + * @type String + * @default 2.0.2 + */ +TableTools.VERSION = "2.0.2"; +TableTools.prototype.VERSION = TableTools.VERSION; + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Initialisation + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Register a new feature with DataTables + */ +if ( typeof $.fn.dataTable == "function" && + typeof $.fn.dataTableExt.fnVersionCheck == "function" && + $.fn.dataTableExt.fnVersionCheck('1.8.2') ) +{ + $.fn.dataTableExt.aoFeatures.push( { + "fnInit": function( oDTSettings ) { + var oOpts = typeof oDTSettings.oInit.oTableTools != 'undefined' ? + oDTSettings.oInit.oTableTools : {}; + + var oTT = new TableTools( oDTSettings.oInstance, oOpts ); + TableTools._aInstances.push( oTT ); + + return oTT.dom.container; + }, + "cFeature": "T", + "sFeature": "TableTools" + } ); +} +else +{ + alert( "Warning: TableTools 2 requires DataTables 1.8.2 or newer - www.datatables.net/download"); +} + +})(jQuery, window, document); diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.ZeroClipboard.js b/airtime_mvc/public/js/datatables/plugin/dataTables.ZeroClipboard.js new file mode 100644 index 000000000..73707f024 --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/dataTables.ZeroClipboard.js @@ -0,0 +1,367 @@ +// Simple Set Clipboard System +// Author: Joseph Huckaby + +var ZeroClipboard = { + + version: "1.0.4-TableTools2", + clients: {}, // registered upload clients on page, indexed by id + moviePath: '', // URL to movie + nextId: 1, // ID of next movie + + $: function(thingy) { + // simple DOM lookup utility function + if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); + if (!thingy.addClass) { + // extend element with a few useful methods + thingy.hide = function() { this.style.display = 'none'; }; + thingy.show = function() { this.style.display = ''; }; + thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; }; + thingy.removeClass = function(name) { + this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, ''); + }; + thingy.hasClass = function(name) { + return !!this.className.match( new RegExp("\\s*" + name + "\\s*") ); + } + } + return thingy; + }, + + setMoviePath: function(path) { + // set path to ZeroClipboard.swf + this.moviePath = path; + }, + + dispatch: function(id, eventName, args) { + // receive event from flash movie, send to client + var client = this.clients[id]; + if (client) { + client.receiveEvent(eventName, args); + } + }, + + register: function(id, client) { + // register new client to receive events + this.clients[id] = client; + }, + + getDOMObjectPosition: function(obj) { + // get absolute coordinates for dom element + var info = { + left: 0, + top: 0, + width: obj.width ? obj.width : obj.offsetWidth, + height: obj.height ? obj.height : obj.offsetHeight + }; + + if ( obj.style.width != "" ) + info.width = obj.style.width.replace("px",""); + + if ( obj.style.height != "" ) + info.height = obj.style.height.replace("px",""); + + while (obj) { + info.left += obj.offsetLeft; + info.top += obj.offsetTop; + obj = obj.offsetParent; + } + + return info; + }, + + Client: function(elem) { + // constructor for new simple upload client + this.handlers = {}; + + // unique ID + this.id = ZeroClipboard.nextId++; + this.movieId = 'ZeroClipboardMovie_' + this.id; + + // register client with singleton to receive flash events + ZeroClipboard.register(this.id, this); + + // create movie + if (elem) this.glue(elem); + } +}; + +ZeroClipboard.Client.prototype = { + + id: 0, // unique ID for us + ready: false, // whether movie is ready to receive events or not + movie: null, // reference to movie object + clipText: '', // text to copy to clipboard + fileName: '', // default file save name + action: 'copy', // action to perform + handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor + cssEffects: true, // enable CSS mouse effects on dom container + handlers: null, // user event handlers + sized: false, + + glue: function(elem, title) { + // glue to DOM element + // elem can be ID or actual DOM element object + this.domElement = ZeroClipboard.$(elem); + + // float just above object, or zIndex 99 if dom element isn't set + var zIndex = 99; + if (this.domElement.style.zIndex) { + zIndex = parseInt(this.domElement.style.zIndex) + 1; + } + + // find X/Y position of domElement + var box = ZeroClipboard.getDOMObjectPosition(this.domElement); + + // create floating DIV above element + this.div = document.createElement('div'); + var style = this.div.style; + style.position = 'absolute'; + style.left = (this.domElement.offsetLeft)+'px'; + //style.left = (this.domElement.offsetLeft+2)+'px'; + style.top = this.domElement.offsetTop+'px'; + style.width = (box.width) + 'px'; + //style.width = (box.width-4) + 'px'; + style.height = box.height + 'px'; + style.zIndex = zIndex; + if ( typeof title != "undefined" && title != "" ) { + this.div.title = title; + } + if ( box.width != 0 && box.height != 0 ) { + this.sized = true; + } + + // style.backgroundColor = '#f00'; // debug + this.domElement.parentNode.appendChild(this.div); + + this.div.innerHTML = this.getHTML( box.width, box.height ); + }, + + positionElement: function() { + var box = ZeroClipboard.getDOMObjectPosition(this.domElement); + var style = this.div.style; + + style.position = 'absolute'; + style.left = (this.domElement.offsetLeft)+'px'; + style.top = this.domElement.offsetTop+'px'; + style.width = box.width + 'px'; + style.height = box.height + 'px'; + + if ( box.width != 0 && box.height != 0 ) { + this.sized = true; + } else { + return; + } + + var flash = this.div.childNodes[0]; + flash.width = box.width; + flash.height = box.height; + }, + + getHTML: function(width, height) { + // return HTML for movie + var html = ''; + var flashvars = 'id=' + this.id + + '&width=' + width + + '&height=' + height; + + if (navigator.userAgent.match(/MSIE/)) { + // IE gets an OBJECT tag + var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; + html += ''; + } + else { + // all other browsers get an EMBED tag + html += ''; + } + return html; + }, + + hide: function() { + // temporarily hide floater offscreen + if (this.div) { + this.div.style.left = '-2000px'; + } + }, + + show: function() { + // show ourselves after a call to hide() + this.reposition(); + }, + + destroy: function() { + // destroy control and floater + if (this.domElement && this.div) { + this.hide(); + this.div.innerHTML = ''; + + var body = document.getElementsByTagName('body')[0]; + try { body.removeChild( this.div ); } catch(e) {;} + + this.domElement = null; + this.div = null; + } + }, + + reposition: function(elem) { + // reposition our floating div, optionally to new container + // warning: container CANNOT change size, only position + if (elem) { + this.domElement = ZeroClipboard.$(elem); + if (!this.domElement) this.hide(); + } + + if (this.domElement && this.div) { + var box = ZeroClipboard.getDOMObjectPosition(this.domElement); + var style = this.div.style; + style.left = '' + box.left + 'px'; + style.top = '' + box.top + 'px'; + } + }, + + clearText: function() { + // clear the text to be copy / saved + this.clipText = ''; + if (this.ready) this.movie.clearText(); + }, + + appendText: function(newText) { + // append text to that which is to be copied / saved + this.clipText += newText; + if (this.ready) { this.movie.appendText(newText) ;} + }, + + setText: function(newText) { + // set text to be copied to be copied / saved + this.clipText = newText; + if (this.ready) { this.movie.setText(newText) ;} + }, + + setCharSet: function(charSet) { + // set the character set (UTF16LE or UTF8) + this.charSet = charSet; + if (this.ready) { this.movie.setCharSet(charSet) ;} + }, + + setBomInc: function(bomInc) { + // set if the BOM should be included or not + this.incBom = bomInc; + if (this.ready) { this.movie.setBomInc(bomInc) ;} + }, + + setFileName: function(newText) { + // set the file name + this.fileName = newText; + if (this.ready) this.movie.setFileName(newText); + }, + + setAction: function(newText) { + // set action (save or copy) + this.action = newText; + if (this.ready) this.movie.setAction(newText); + }, + + addEventListener: function(eventName, func) { + // add user event listener for event + // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + if (!this.handlers[eventName]) this.handlers[eventName] = []; + this.handlers[eventName].push(func); + }, + + setHandCursor: function(enabled) { + // enable hand cursor (true), or default arrow cursor (false) + this.handCursorEnabled = enabled; + if (this.ready) this.movie.setHandCursor(enabled); + }, + + setCSSEffects: function(enabled) { + // enable or disable CSS effects on DOM container + this.cssEffects = !!enabled; + }, + + receiveEvent: function(eventName, args) { + // receive event from flash + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + + // special behavior for certain events + switch (eventName) { + case 'load': + // movie claims it is ready, but in IE this isn't always the case... + // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function + this.movie = document.getElementById(this.movieId); + if (!this.movie) { + var self = this; + setTimeout( function() { self.receiveEvent('load', null); }, 1 ); + return; + } + + // firefox on pc needs a "kick" in order to set these in certain cases + if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { + var self = this; + setTimeout( function() { self.receiveEvent('load', null); }, 100 ); + this.ready = true; + return; + } + + this.ready = true; + this.movie.clearText(); + this.movie.appendText( this.clipText ); + this.movie.setFileName( this.fileName ); + this.movie.setAction( this.action ); + this.movie.setCharSet( this.charSet ); + this.movie.setBomInc( this.incBom ); + this.movie.setHandCursor( this.handCursorEnabled ); + break; + + case 'mouseover': + if (this.domElement && this.cssEffects) { + //this.domElement.addClass('hover'); + if (this.recoverActive) this.domElement.addClass('active'); + } + break; + + case 'mouseout': + if (this.domElement && this.cssEffects) { + this.recoverActive = false; + if (this.domElement.hasClass('active')) { + this.domElement.removeClass('active'); + this.recoverActive = true; + } + //this.domElement.removeClass('hover'); + } + break; + + case 'mousedown': + if (this.domElement && this.cssEffects) { + this.domElement.addClass('active'); + } + break; + + case 'mouseup': + if (this.domElement && this.cssEffects) { + this.domElement.removeClass('active'); + this.recoverActive = false; + } + break; + } // switch eventName + + if (this.handlers[eventName]) { + for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { + var func = this.handlers[eventName][idx]; + + if (typeof(func) == 'function') { + // actual function reference + func(this, args); + } + else if ((typeof(func) == 'object') && (func.length == 2)) { + // PHP style object + method, i.e. [myObject, 'myMethod'] + func[0][ func[1] ](this, args); + } + else if (typeof(func) == 'string') { + // name of function + window[func](this, args); + } + } // foreach event handler defined + } // user defined handler for event + } + +}; diff --git a/airtime_mvc/public/js/fullcalendar/AIRTIME_DEV_README b/airtime_mvc/public/js/fullcalendar/AIRTIME_DEV_README index 5b10a3157..ffa4294a0 100644 --- a/airtime_mvc/public/js/fullcalendar/AIRTIME_DEV_README +++ b/airtime_mvc/public/js/fullcalendar/AIRTIME_DEV_README @@ -3,14 +3,14 @@ in this file. Running a diff between the original fullcalendar.js and our modified one: -denise@denise-desktop:~/airtime/airtime_mvc/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js ---- fullcalendar_orig.js 2013-05-24 08:33:54.462735215 -0400 -+++ fullcalendar.js 2013-07-19 12:42:37.274284180 -0400 +martin@Thinkpad-T410:~/workspace/airtime/airtime_mvc/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js +--- fullcalendar_orig.js 2011-04-09 17:13:15.000000000 -0400 ++++ fullcalendar.js 2011-11-18 17:03:57.000000000 -0500 @@ -1,6 +1,6 @@ /** * @preserve -- * FullCalendar v1.5.3 -+ * FullCalendar v1.5.3-CUSTOM (Changes by Martin Konecny -added primitive support for timezones) +- * FullCalendar v1.5.1 ++ * FullCalendar v1.5.1-CUSTOM (Changes by Martin Konecny -added primitive support for timezones) * http://arshaw.com/fullcalendar/ * * Use fullcalendar.css for basic styling. @@ -23,7 +23,7 @@ denise@denise-desktop:~/airtime/airtime_mvc/public/js/fullcalendar$ diff -u full var events = []; var _dragElement; -@@ -2277,7 +2277,7 @@ +@@ -2275,7 +2275,7 @@ function updateCells(firstTime) { var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating? var month = t.start.getMonth(); @@ -32,7 +32,7 @@ denise@denise-desktop:~/airtime/airtime_mvc/public/js/fullcalendar$ diff -u full var cell; var date; var row; -@@ -3110,7 +3110,7 @@ +@@ -3108,7 +3108,7 @@ var headCell; var bodyCell; var date; @@ -41,16 +41,9 @@ denise@denise-desktop:~/airtime/airtime_mvc/public/js/fullcalendar$ diff -u full for (i=0; i type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.10.2", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler - completed = function( event ) { - - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } - }, - // Clean-up method for dom ready events - detach = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - /* jshint eqeqeq: false */ - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - var key; - - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Support: IE<9 - // Handle iteration over inherited properties before own properties. - if ( jQuery.support.ownLast ) { - for ( key in obj ) { - return core_hasOwn.call( obj, key ); - } - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations. - // Note: this method belongs to the css module but it's needed here for the support module. - // If support gets modularized, this method should be moved back to the css module. - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // detach all dom ready events - detach(); - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -/*! - * Sizzle CSS Selector Engine v1.10.2 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-07-03 - */ -(function( window, undefined ) { - -var i, - support, - cachedruns, - Expr, - getText, - isXML, - compile, - outermostContext, - sortInput, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - hasDuplicate = false, - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rsibling = new RegExp( whitespace + "*[+~]" ), - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent.attachEvent && parent !== parent.top ) { - parent.attachEvent( "onbeforeunload", function() { - setDocument(); - }); - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = assert(function( div ) { - div.innerHTML = "

    "; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Support: Opera 10-12/IE8 - // ^= $= *= and empty values - // Should not select anything - // Support: Windows 8 Native Apps - // The type attribute is restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "t", "" ); - - if ( div.querySelectorAll("[t^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); - - if ( compare ) { - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } - - // Not directly comparable, sort on existence of method - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val === undefined ? - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null : - val; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] && match[4] !== undefined ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - } - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) - ); - return results; -} - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome<14 -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = "
    "; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - elem[ name ] === true ? name.toLowerCase() : null; - } - }); -} - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function( support ) { - - var all, a, input, select, fragment, opt, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = "
    a"; - - // Finish early in limited (non-browser) environments - all = div.getElementsByTagName("*") || []; - a = div.getElementsByTagName("a")[ 0 ]; - if ( !a || !a.style || !all.length ) { - return support; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - support.getSetAttribute = div.className !== "t"; - - // IE strips leading whitespace when .innerHTML is used - support.leadingWhitespace = div.firstChild.nodeType === 3; - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - support.tbody = !div.getElementsByTagName("tbody").length; - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - support.htmlSerialize = !!div.getElementsByTagName("link").length; - - // Get the style information from getAttribute - // (IE uses .cssText instead) - support.style = /top/.test( a.getAttribute("style") ); - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - support.hrefNormalized = a.getAttribute("href") === "/a"; - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - support.opacity = /^0.5/.test( a.style.opacity ); - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - support.cssFloat = !!a.style.cssFloat; - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - support.checkOn = !!input.value; - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - support.optSelected = opt.selected; - - // Tests for enctype support on a form (#6743) - support.enctype = !!document.createElement("form").enctype; - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>"; - - // Will be defined later - support.inlineBlockNeedsLayout = false; - support.shrinkWrapBlocks = false; - support.pixelPosition = false; - support.deleteExpando = true; - support.noCloneEvent = true; - support.reliableMarginRight = true; - support.boxSizingReliable = true; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Support: IE<9 - // Iteration over object's inherited properties before its own. - for ( i in jQuery( support ) ) { - break; - } - support.ownLast = i !== "0"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "
    t
    "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior. - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - - // Workaround failing boxSizing test due to offsetWidth returning wrong value - // with some non-1 values of body zoom, ticket #13543 - jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { - support.boxSizing = div.offsetWidth === 4; - }); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== core_strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "
    "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - if ( support.inlineBlockNeedsLayout ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; - } - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})({}); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var ret, thisCache, - internalKey = jQuery.expando, - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - // Avoid exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( typeof name === "string" ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - i = name.length; - while ( i-- ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - /* jshint eqeqeq: false */ - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - /* jshint eqeqeq: true */ - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "applet": true, - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - // Do not set data on non-element because it will not be cleared (#8335). - if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { - return false; - } - - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - data = null, - i = 0, - elem = this[0]; - - // Special expections of .data basically thwart jQuery.access, - // so implement the relevant behavior ourselves - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( name.indexOf("data-") === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return arguments.length > 1 ? - - // Sets one value - this.each(function() { - jQuery.data( this, key, value ); - }) : - - // Gets one value - // Try to fetch any internally stored data first - elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n\f]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value; - - if ( typeof stateVal === "boolean" && type === "string" ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( type === core_strundefined || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var ret, hooks, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // Use proper attribute retrieval(#6932, #12072) - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { - optionSet = true; - } - } - - // force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var hooks, ret, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === core_strundefined ) { - return jQuery.prop( elem, name, value ); - } - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( jQuery.expr.match.bool.test( name ) ) { - // Set corresponding property to false - if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - elem[ propName ] = false; - // Support: IE<9 - // Also clear defaultChecked/defaultSelected (if appropriate) - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? - ret : - ( elem[ name ] = value ); - - } else { - return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? - ret : - elem[ name ]; - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - return tabindex ? - parseInt( tabindex, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - -1; - } - } - } -}); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; - - jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? - function( elem, name, isXML ) { - var fn = jQuery.expr.attrHandle[ name ], - ret = isXML ? - undefined : - /* jshint eqeqeq: false */ - (jQuery.expr.attrHandle[ name ] = undefined) != - getter( elem, name, isXML ) ? - - name.toLowerCase() : - null; - jQuery.expr.attrHandle[ name ] = fn; - return ret; - } : - function( elem, name, isXML ) { - return isXML ? - undefined : - elem[ jQuery.camelCase( "default-" + name ) ] ? - name.toLowerCase() : - null; - }; -}); - -// fix oldIE attroperties -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = { - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = - // Some attributes are constructed with empty-string values when not defined - function( elem, name, isXML ) { - var ret; - return isXML ? - undefined : - (ret = elem.getAttributeNode( name )) && ret.value !== "" ? - ret.value : - null; - }; - jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ret.specified ? - ret.value : - undefined; - }, - set: nodeHook.set - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }; - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }; -} - -jQuery.each([ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -}); - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }; - if ( !jQuery.support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - // Support: Webkit - // "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - }; - } -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, - eventPath = [ elem || document ], - type = core_hasOwn.call( event, "type" ) ? event.type : event, - namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, ret, handleObj, matched, j, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var sel, handleObj, matches, i, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - /* jshint eqeqeq: false */ - for ( ; cur != this; cur = cur.parentNode || this ) { - /* jshint eqeqeq: true */ - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === core_strundefined ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); -var isSimple = /^.[^:#\[\.,]*$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - ret = [], - self = this, - len = self.length; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - cur = ret.push( cur ); - break; - } - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - ret = jQuery.unique( ret ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( isSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
    ", "
    " ], - area: [ 1, "", "" ], - param: [ 1, "", "" ], - thead: [ 1, "", "
    " ], - tr: [ 2, "", "
    " ], - col: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
    ", "
    " ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var - // Snapshot the DOM in case .domManip sweeps something relevant into its fragment - args = jQuery.map( this, function( elem ) { - return [ elem.nextSibling, elem.parentNode ]; - }), - i = 0; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - var next = args[ i++ ], - parent = args[ i++ ]; - - if ( parent ) { - // Don't use the snapshot next if it has moved (#13810) - if ( next && next.parentNode !== parent ) { - next = this.nextSibling; - } - jQuery( this ).remove(); - parent.insertBefore( elem, next ); - } - // Allow new content to include elements from the context set - }, true ); - - // Force removal if there was no new content (e.g., from empty arguments) - return i ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback, allowIntersection ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var first, node, hasScripts, - scripts, doc, fragment, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, self.html() ); - } - self.domManip( args, callback, allowIntersection ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[i], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery._evalUrl( node.src ); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -// Support: IE<8 -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare or - wrap[1] === "
    " && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== core_strundefined ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - }, - - _evalUrl: function( url ) { - return jQuery.ajax({ - url: url, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } -}); -jQuery.fn.extend({ - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - } -}); -var iframe, getStyles, curCSS, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - values[ index ] = jQuery._data( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - - if ( !values[ index ] ) { - hidden = isHidden( elem ); - - if ( display && display !== "none" || !hidden ) { - jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); - } - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var len, styles, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each(function() { - if ( isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var num, val, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='
    ',m="";if(f||!i)m+=''+g[b]+"";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='"}k||(l+=m+(f||!i||!j?" ":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+=''+c+"";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?" ":"")+m),l+="
    ",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&bd?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.24",window["DP_jQuery_"+dpuuid]=$}(jQuery),function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||" ",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("
    ")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){d.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("
    ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){return b.close(a),!1}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),l=a("").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);a.isFunction(d.beforeclose)&&!a.isFunction(d.beforeClose)&&(d.beforeClose=d.beforeclose),i.find("*").add(i).disableSelection(),d.draggable&&a.fn.draggable&&b._makeDraggable(),d.resizable&&a.fn.resizable&&b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;return a.overlay&&a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&&a.element.attr("title",a.originalTitle),a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1===c._trigger("beforeClose",b))return;return c.overlay&&c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d),c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;return e.modal&&!b||!e.stack&&!e.modal?d._trigger("focus",c):(e.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=e.zIndex),d.overlay&&(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c),d)},open:function(){if(this._isOpen)return;var b=this,c=b.options,d=b.uiDialog;return b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&&d.bind("keydown.ui-dialog",function(b){if(b.keyCode!==a.ui.keyCode.TAB)return;var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&&!b.shiftKey)return d.focus(1),!1;if(b.target===d[0]&&b.shiftKey)return e.focus(1),!1}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open"),b},_createButtons:function(b){var c=this,d=!1,e=a("
    ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),f=a("
    ").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=!0)}),d&&(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(f);a.each(d,function(a,b){if(a==="click")return;a in e?e[a](b):e.attr(a,b)}),a.fn.button&&e.button()}),e.appendTo(c.uiDialog))},_makeDraggable:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(e),b._trigger("dragStop",g,f(h)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing"),d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),e.height=a(this).height(),e.width=a(this).width(),d._trigger("resizeStop",b,h(c)),a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&&"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var c=this,f={},g=!1;a.each(b,function(a,b){c._setOption(a,b),a in d&&(g=!0),a in e&&(f[a]=b)}),g&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":d?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case"draggable":var g=f.is(":data(draggable)");g&&!d&&f.draggable("destroy"),!g&&d&&e._makeDraggable();break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");h&&!d&&f.resizable("destroy"),h&&typeof d=="string"&&f.resizable("option","handles",d),!h&&d!==!1&&e._makeResizable(d);break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||" "))}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth>b.width&&(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c);if(b.height==="auto")if(a.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();var f=this.element.css("height","auto").height();e||this.uiDialog.hide(),this.element.height(Math.max(f,d))}else this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.24",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");return b||(this.uuid+=1,b=this.uuid),"ui-dialog-title-"+b},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){this.instances.length===0&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return a.fn.bgiframe&&c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&&this.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&&a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;return a.browser.msie&&a.browser.version<7?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),a.curCSS||(a.curCSS=a.css),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()}(jQuery),function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("
    ").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.24"})}(jQuery),function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("
    ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;ic&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c1){this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.24"})}(jQuery),function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
    ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
  • #{label}
  • "},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.24"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++au;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(j.has(n,a)&&t.call(e,n[a],a,n)===r)return};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var E="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduce===v)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(E);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduceRight===h)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(E);return r},j.find=j.detect=function(n,t,r){var e;return O(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:g&&n.every===g?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var O=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:O(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,function(n){return n[t]})},j.where=function(n,t,r){return j.isEmpty(t)?r?void 0:[]:j[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},j.findWhere=function(n,t){return j.where(n,t,!0)},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&j.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>e.computed&&(e={value:n,computed:a})}),e.value},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&j.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;ae||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.indexi;){var o=i+a>>>1;r.call(e,n[o])=0})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var M=function(){};j.bind=function(n,t){var r,e;if(w&&n.bind===w)return w.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));M.prototype=n.prototype;var u=new M;M.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},j.bindAll=function(n){var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?0:new Date,a=null,i=n.apply(e,u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u=null;return function(){var i=this,a=arguments,o=function(){u=null,r||(e=n.apply(i,a))},c=r&&!u;return clearTimeout(u),u=setTimeout(o,t),c&&(e=n.apply(i,a)),e}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push(n[r]);return t},j.pairs=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push([r,n[r]]);return t},j.invert=function(n){var t={};for(var r in n)j.has(n,r)&&(t[n[r]]=r);return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var I={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};I.unescape=j.invert(I.escape);var T={escape:new RegExp("["+j.keys(I.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(I.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){return I[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this); -//# sourceMappingURL=underscore-min.map \ No newline at end of file diff --git a/airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js b/airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js deleted file mode 100644 index 6f35ee532..000000000 --- a/airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js +++ /dev/null @@ -1,2128 +0,0 @@ -/* - * jQuery timepicker addon - * By: Trent Richardson [http://trentrichardson.com] - * Version 1.3.1 - * Last Modified: 07/07/2013 - * - * Copyright 2013 Trent Richardson - * You may use this project under MIT or GPL licenses. - * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt - * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt - */ - -/*jslint evil: true, white: false, undef: false, nomen: false */ - -(function($) { - - /* - * Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded" - */ - $.ui.datetimepicker = $.ui.datetimepicker || {}; - if ($.ui.datetimepicker.version) { - return; - } - - /* - * Extend jQueryUI, get it started with our version number - */ - $.extend($.ui, { - datetimepicker: { - version: "1.3.1" - } - }); - - /* - * Timepicker manager. - * Use the singleton instance of this class, $.datetimepicker, to interact with the time picker. - * Settings for (groups of) time pickers are maintained in an instance object, - * allowing multiple different settings on the same page. - */ - var Timepicker = function() { - this.regional = []; // Available regional settings, indexed by language code - this.regional[''] = { // Default regional settings - currentText: 'Now', - closeText: 'Done', - amNames: ['AM', 'A'], - pmNames: ['PM', 'P'], - timeFormat: 'HH:mm', - timeSuffix: '', - timeOnlyTitle: 'Choose Time', - timeText: 'Time', - hourText: 'Hour', - minuteText: 'Minute', - secondText: 'Second', - millisecText: 'Millisecond', - microsecText: 'Microsecond', - timezoneText: 'Time Zone', - isRTL: false - }; - this._defaults = { // Global defaults for all the datetime picker instances - showButtonPanel: true, - timeOnly: false, - showHour: null, - showMinute: null, - showSecond: null, - showMillisec: null, - showMicrosec: null, - showTimezone: null, - showTime: true, - stepHour: 1, - stepMinute: 1, - stepSecond: 1, - stepMillisec: 1, - stepMicrosec: 1, - hour: 0, - minute: 0, - second: 0, - millisec: 0, - microsec: 0, - timezone: null, - hourMin: 0, - minuteMin: 0, - secondMin: 0, - millisecMin: 0, - microsecMin: 0, - hourMax: 23, - minuteMax: 59, - secondMax: 59, - millisecMax: 999, - microsecMax: 999, - minDateTime: null, - maxDateTime: null, - onSelect: null, - hourGrid: 0, - minuteGrid: 0, - secondGrid: 0, - millisecGrid: 0, - microsecGrid: 0, - alwaysSetTime: true, - separator: ' ', - altFieldTimeOnly: true, - altTimeFormat: null, - altSeparator: null, - altTimeSuffix: null, - pickerTimeFormat: null, - pickerTimeSuffix: null, - showTimepicker: true, - timezoneList: null, - addSliderAccess: false, - sliderAccessArgs: null, - controlType: 'slider', - defaultValue: null, - parse: 'strict' - }; - $.extend(this._defaults, this.regional['']); - }; - - $.extend(Timepicker.prototype, { - $input: null, - $altInput: null, - $timeObj: null, - inst: null, - hour_slider: null, - minute_slider: null, - second_slider: null, - millisec_slider: null, - microsec_slider: null, - timezone_select: null, - hour: 0, - minute: 0, - second: 0, - millisec: 0, - microsec: 0, - timezone: null, - hourMinOriginal: null, - minuteMinOriginal: null, - secondMinOriginal: null, - millisecMinOriginal: null, - microsecMinOriginal: null, - hourMaxOriginal: null, - minuteMaxOriginal: null, - secondMaxOriginal: null, - millisecMaxOriginal: null, - microsecMaxOriginal: null, - ampm: '', - formattedDate: '', - formattedTime: '', - formattedDateTime: '', - timezoneList: null, - units: ['hour','minute','second','millisec', 'microsec'], - support: {}, - control: null, - - /* - * Override the default settings for all instances of the time picker. - * @param settings object - the new settings to use as defaults (anonymous object) - * @return the manager object - */ - setDefaults: function(settings) { - extendRemove(this._defaults, settings || {}); - return this; - }, - - /* - * Create a new Timepicker instance - */ - _newInst: function($input, opts) { - var tp_inst = new Timepicker(), - inlineSettings = {}, - fns = {}, - overrides, i; - - for (var attrName in this._defaults) { - if(this._defaults.hasOwnProperty(attrName)){ - var attrValue = $input.attr('time:' + attrName); - if (attrValue) { - try { - inlineSettings[attrName] = eval(attrValue); - } catch (err) { - inlineSettings[attrName] = attrValue; - } - } - } - } - - overrides = { - beforeShow: function (input, dp_inst) { - if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) { - return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst); - } - }, - onChangeMonthYear: function (year, month, dp_inst) { - // Update the time as well : this prevents the time from disappearing from the $input field. - tp_inst._updateDateTime(dp_inst); - if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) { - tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst); - } - }, - onClose: function (dateText, dp_inst) { - if (tp_inst.timeDefined === true && $input.val() !== '') { - tp_inst._updateDateTime(dp_inst); - } - if ($.isFunction(tp_inst._defaults.evnts.onClose)) { - tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst); - } - } - }; - for (i in overrides) { - if (overrides.hasOwnProperty(i)) { - fns[i] = opts[i] || null; - } - } - - tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, { - evnts:fns, - timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker'); - }); - tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) { - return val.toUpperCase(); - }); - tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) { - return val.toUpperCase(); - }); - - // detect which units are supported - tp_inst.support = detectSupport( - tp_inst._defaults.timeFormat + - (tp_inst._defaults.pickerTimeFormat? tp_inst._defaults.pickerTimeFormat:'') + - (tp_inst._defaults.altTimeFormat? tp_inst._defaults.altTimeFormat:'')); - - // controlType is string - key to our this._controls - if(typeof(tp_inst._defaults.controlType) === 'string'){ - if(tp_inst._defaults.controlType == 'slider' && typeof(jQuery.ui.slider) === 'undefined'){ - tp_inst._defaults.controlType = 'select'; - } - tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType]; - } - // controlType is an object and must implement create, options, value methods - else{ - tp_inst.control = tp_inst._defaults.controlType; - } - - // prep the timezone options - var timezoneList = [-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60, - 0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840]; - if (tp_inst._defaults.timezoneList !== null) { - timezoneList = tp_inst._defaults.timezoneList; - } - var tzl=timezoneList.length,tzi=0,tzv=null; - if (tzl > 0 && typeof timezoneList[0] !== 'object') { - for(; tzi tp_inst._defaults.hourMax? tp_inst._defaults.hourMax : tp_inst._defaults.hour; - tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin? tp_inst._defaults.minuteMin : - tp_inst._defaults.minute > tp_inst._defaults.minuteMax? tp_inst._defaults.minuteMax : tp_inst._defaults.minute; - tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin? tp_inst._defaults.secondMin : - tp_inst._defaults.second > tp_inst._defaults.secondMax? tp_inst._defaults.secondMax : tp_inst._defaults.second; - tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin? tp_inst._defaults.millisecMin : - tp_inst._defaults.millisec > tp_inst._defaults.millisecMax? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec; - tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin? tp_inst._defaults.microsecMin : - tp_inst._defaults.microsec > tp_inst._defaults.microsecMax? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec; - tp_inst.ampm = ''; - tp_inst.$input = $input; - - if (tp_inst._defaults.altField) { - tp_inst.$altInput = $(tp_inst._defaults.altField).css({ - cursor: 'pointer' - }).focus(function() { - $input.trigger("focus"); - }); - } - - if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) { - tp_inst._defaults.minDate = new Date(); - } - if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) { - tp_inst._defaults.maxDate = new Date(); - } - - // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime.. - if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) { - tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime()); - } - if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) { - tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime()); - } - if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) { - tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime()); - } - if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) { - tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime()); - } - tp_inst.$input.bind('focus', function() { - tp_inst._onFocus(); - }); - - return tp_inst; - }, - - /* - * add our sliders to the calendar - */ - _addTimePicker: function(dp_inst) { - var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val(); - - this.timeDefined = this._parseTime(currDT); - this._limitMinMaxDateTime(dp_inst, false); - this._injectTimePicker(); - }, - - /* - * parse the time string from input value or _setTime - */ - _parseTime: function(timeString, withDate) { - if (!this.inst) { - this.inst = $.datepicker._getInst(this.$input[0]); - } - - if (withDate || !this._defaults.timeOnly) { - var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat'); - try { - var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults); - if (!parseRes.timeObj) { - return false; - } - $.extend(this, parseRes.timeObj); - } catch (err) { - $.datetimepicker.log("Error parsing the date/time string: " + err + - "\ndate/time string = " + timeString + - "\ntimeFormat = " + this._defaults.timeFormat + - "\ndateFormat = " + dp_dateFormat); - return false; - } - return true; - } else { - var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults); - if (!timeObj) { - return false; - } - $.extend(this, timeObj); - return true; - } - }, - - /* - * generate and inject html for timepicker into ui datepicker - */ - _injectTimePicker: function() { - var $dp = this.inst.dpDiv, - o = this.inst.settings, - tp_inst = this, - litem = '', - uitem = '', - show = null, - max = {}, - gridSize = {}, - size = null, - i=0, - l=0; - - // Prevent displaying twice - if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) { - var noDisplay = ' style="display:none;"', - html = '
    ' + '
    ' + o.timeText + '
    ' + - '
    '; - - // Create the markup - for(i=0,l=this.units.length; i' + o[litem +'Text'] + '' + - '
    '; - - if (show && o[litem+'Grid'] > 0) { - html += '
    '; - - if(litem == 'hour'){ - for (var h = o[litem+'Min']; h <= max[litem]; h += parseInt(o[litem+'Grid'], 10)) { - gridSize[litem]++; - var tmph = $.datepicker.formatTime(this.support.ampm? 'hht':'HH', {hour:h}, o); - html += ''; - } - } - else{ - for (var m = o[litem+'Min']; m <= max[litem]; m += parseInt(o[litem+'Grid'], 10)) { - gridSize[litem]++; - html += ''; - } - } - - html += '
    ' + tmph + '' + ((m < 10) ? '0' : '') + m + '
    '; - } - html += ''; - } - - // Timezone - var showTz = o.showTimezone !== null? o.showTimezone : this.support.timezone; - html += '
    ' + o.timezoneText + '
    '; - html += '
    '; - - // Create the elements from string - html += '
    '; - var $tp = $(html); - - // if we only want time picker... - if (o.timeOnly === true) { - $tp.prepend('
    ' + '
    ' + o.timeOnlyTitle + '
    ' + '
    '); - $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); - } - - // add sliders, adjust grids, add events - for(i=0,l=tp_inst.units.length; i 0) { - size = 100 * gridSize[litem] * o[litem+'Grid'] / (max[litem] - o[litem+'Min']); - $tp.find('.ui_tpicker_'+litem+' table').css({ - width: size + "%", - marginLeft: o.isRTL? '0' : ((size / (-2 * gridSize[litem])) + "%"), - marginRight: o.isRTL? ((size / (-2 * gridSize[litem])) + "%") : '0', - borderCollapse: 'collapse' - }).find("td").click(function(e){ - var $t = $(this), - h = $t.html(), - n = parseInt(h.replace(/[^0-9]/g),10), - ap = h.replace(/[^apm]/ig), - f = $t.data('for'); // loses scope, so we use data-for - - if(f == 'hour'){ - if(ap.indexOf('p') !== -1 && n < 12){ - n += 12; - } - else{ - if(ap.indexOf('a') !== -1 && n === 12){ - n = 0; - } - } - } - - tp_inst.control.value(tp_inst, tp_inst[f+'_slider'], litem, n); - - tp_inst._onTimeChange(); - tp_inst._onSelectHandler(); - }).css({ - cursor: 'pointer', - width: (100 / gridSize[litem]) + '%', - textAlign: 'center', - overflow: 'hidden' - }); - } // end if grid > 0 - } // end for loop - - // Add timezone options - this.timezone_select = $tp.find('.ui_tpicker_timezone').append('').find("select"); - $.fn.append.apply(this.timezone_select, - $.map(o.timezoneList, function(val, idx) { - return $("


    From 59f6578e2e590a7d7364bec062ccffe0b6cadd56 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 24 Sep 2013 09:58:53 +0200 Subject: [PATCH 147/181] CC-5334 : Localize Ryerson History Feature adding string "New log sheet template" --- .../locale/cs_CZ/LC_MESSAGES/airtime.po | 6 +- .../locale/de_AT/LC_MESSAGES/airtime.po | 6 +- .../locale/de_DE/LC_MESSAGES/airtime.po | 6 +- .../locale/el_GR/LC_MESSAGES/airtime.po | 6 +- .../locale/en_CA/LC_MESSAGES/airtime.po | 6 +- .../locale/en_GB/LC_MESSAGES/airtime.po | 6 +- .../locale/en_US/LC_MESSAGES/airtime.po | 6 +- .../locale/es_ES/LC_MESSAGES/airtime.po | 6 +- .../locale/fr_FR/LC_MESSAGES/airtime.po | 6 +- .../locale/hu_HU/LC_MESSAGES/airtime.po | 6 +- .../locale/it_IT/LC_MESSAGES/airtime.po | 6 +- .../locale/ko_KR/LC_MESSAGES/airtime.po | 6 +- .../locale/pl_PL/LC_MESSAGES/airtime.po | 6 +- .../locale/pt_BR/LC_MESSAGES/airtime.po | 6 +- .../locale/ru_RU/LC_MESSAGES/airtime.po | 6 +- airtime_mvc/locale/template/airtime.po | 6 +- .../locale/zh_CN/LC_MESSAGES/airtime.po | 297 +++++------------- 17 files changed, 154 insertions(+), 239 deletions(-) diff --git a/airtime_mvc/locale/cs_CZ/LC_MESSAGES/airtime.po b/airtime_mvc/locale/cs_CZ/LC_MESSAGES/airtime.po index 3b3bd8b0e..349b15225 100644 --- a/airtime_mvc/locale/cs_CZ/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/cs_CZ/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-05-22 10:43+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Sourcefabric \n" @@ -1024,6 +1024,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po b/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po index c405de0b0..45b07506f 100644 --- a/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-05-30 14:55+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Austrian Localization \n" @@ -1029,6 +1029,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.po b/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.po index 0d595e9f2..6de24d3dc 100644 --- a/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-06-11 18:04+0100\n" "Last-Translator: Denise Rigato \n" "Language-Team: German Localization \n" @@ -1029,6 +1029,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/el_GR/LC_MESSAGES/airtime.po b/airtime_mvc/locale/el_GR/LC_MESSAGES/airtime.po index dd2bae78d..e2381b1bf 100644 --- a/airtime_mvc/locale/el_GR/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/el_GR/LC_MESSAGES/airtime.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-06-13 14:06+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Greek Localization \n" @@ -1018,6 +1018,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/en_CA/LC_MESSAGES/airtime.po b/airtime_mvc/locale/en_CA/LC_MESSAGES/airtime.po index fa6755b8b..5a3f3cb73 100644 --- a/airtime_mvc/locale/en_CA/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/en_CA/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-06-11 17:00+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Canadian Localization \n" @@ -1023,6 +1023,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po b/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po index 5dc92ce7e..936a8223c 100644 --- a/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-06-11 16:58+0100\n" "Last-Translator: Daniel James \n" "Language-Team: British Localization \n" @@ -1023,6 +1023,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/en_US/LC_MESSAGES/airtime.po b/airtime_mvc/locale/en_US/LC_MESSAGES/airtime.po index 90b5cfd9b..47a675504 100644 --- a/airtime_mvc/locale/en_US/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/en_US/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-06-11 16:59+0100\n" "Last-Translator: Daniel James \n" "Language-Team: United States Localization \n" @@ -1023,6 +1023,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/es_ES/LC_MESSAGES/airtime.po b/airtime_mvc/locale/es_ES/LC_MESSAGES/airtime.po index 97b713c1e..e71d335f6 100644 --- a/airtime_mvc/locale/es_ES/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/es_ES/LC_MESSAGES/airtime.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-05-22 10:49+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Spanish Localization \n" @@ -1022,6 +1022,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.po b/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.po index c7b3d7624..932f966e8 100644 --- a/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-05-30 11:58-0500\n" "Last-Translator: Denise Rigato \n" "Language-Team: French Localization \n" @@ -1023,6 +1023,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/hu_HU/LC_MESSAGES/airtime.po b/airtime_mvc/locale/hu_HU/LC_MESSAGES/airtime.po index 7520b6c1f..91d7e7d4a 100644 --- a/airtime_mvc/locale/hu_HU/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/hu_HU/LC_MESSAGES/airtime.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-06-13 16:46+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Hungarian Localization \n" @@ -1021,6 +1021,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/it_IT/LC_MESSAGES/airtime.po b/airtime_mvc/locale/it_IT/LC_MESSAGES/airtime.po index e48f87f63..e956a955e 100644 --- a/airtime_mvc/locale/it_IT/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/it_IT/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-05-22 10:51+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Italian Localization \n" @@ -1024,6 +1024,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/ko_KR/LC_MESSAGES/airtime.po b/airtime_mvc/locale/ko_KR/LC_MESSAGES/airtime.po index 2dfae9ba8..36a454ece 100644 --- a/airtime_mvc/locale/ko_KR/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/ko_KR/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-05-22 10:51+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Korean Localization \n" @@ -1022,6 +1022,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/pl_PL/LC_MESSAGES/airtime.po b/airtime_mvc/locale/pl_PL/LC_MESSAGES/airtime.po index 9d960075d..2f4589e91 100644 --- a/airtime_mvc/locale/pl_PL/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/pl_PL/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-05-22 10:52+0100\n" "Last-Translator: Daniel James \n" "Language-Team: SEMATpl (licencjonuj.eu) & PallottiFM (pallotti.fm) + radioaktywne.pl \n" @@ -1023,6 +1023,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.po b/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.po index 825239d3e..004ab9ac6 100644 --- a/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-05-22 10:52+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Brazilian Localization \n" @@ -1024,6 +1024,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/ru_RU/LC_MESSAGES/airtime.po b/airtime_mvc/locale/ru_RU/LC_MESSAGES/airtime.po index a66f5da2b..48671f78a 100644 --- a/airtime_mvc/locale/ru_RU/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/ru_RU/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-05-22 10:53+0100\n" "Last-Translator: Daniel James \n" "Language-Team: Russian Localization \n" @@ -1025,6 +1025,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/template/airtime.po b/airtime_mvc/locale/template/airtime.po index c6c2934b5..2706c5bcb 100644 --- a/airtime_mvc/locale/template/airtime.po +++ b/airtime_mvc/locale/template/airtime.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1023,6 +1023,10 @@ msgstr "" msgid "Set Default" msgstr "" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "" diff --git a/airtime_mvc/locale/zh_CN/LC_MESSAGES/airtime.po b/airtime_mvc/locale/zh_CN/LC_MESSAGES/airtime.po index 3c135d25d..9b7e41aa3 100644 --- a/airtime_mvc/locale/zh_CN/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/zh_CN/LC_MESSAGES/airtime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-23 14:48+0200\n" +"POT-Creation-Date: 2013-09-24 09:58+0200\n" "PO-Revision-Date: 2013-09-23 11:57-0500\n" "Last-Translator: Cliff Wang \n" "Language-Team: Chinese Localization \n" @@ -468,9 +468,7 @@ msgid "Add" msgstr "添加" #: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:43 -msgid "" -"Rescan watched directory (This is useful if it is network mount and may be " -"out of sync with Airtime)" +msgid "Rescan watched directory (This is useful if it is network mount and may be out of sync with Airtime)" msgstr "重新扫描监控的文件夹(针对于需要手动更新的网络存储路径)" #: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:44 @@ -499,8 +497,7 @@ msgid "Additional Options" msgstr "附属选项" #: airtime_mvc/application/views/scripts/form/stream-setting-form.phtml:137 -msgid "" -"The following info will be displayed to listeners in their media player:" +msgid "The following info will be displayed to listeners in their media player:" msgstr "以下内容将会在听众的媒体播放器上显示:" #: airtime_mvc/application/views/scripts/form/stream-setting-form.phtml:170 @@ -535,15 +532,8 @@ msgstr "移除" #: airtime_mvc/application/views/scripts/form/support-setting.phtml:5 #, php-format -msgid "" -"Help Airtime improve by letting Sourcefabric know how you are using it. This " -"information will be collected regularly in order to enhance your user " -"experience.%sClick the 'Send support feedback' box and we'll make sure the " -"features you use are constantly improving." -msgstr "" -"通过告诉Sourcefabric您是如何使用Airtime的,可以帮助我们改进Airtime。这些信息" -"将会被手机起来用于提高您的客户体验。%s只要勾选‘发送支持反馈’,就能确保让我们" -"持续改进您所使用" +msgid "Help Airtime improve by letting Sourcefabric know how you are using it. This information will be collected regularly in order to enhance your user experience.%sClick the 'Send support feedback' box and we'll make sure the features you use are constantly improving." +msgstr "通过告诉Sourcefabric您是如何使用Airtime的,可以帮助我们改进Airtime。这些信息将会被手机起来用于提高您的客户体验。%s只要勾选‘发送支持反馈’,就能确保让我们持续改进您所使用" #: airtime_mvc/application/views/scripts/form/support-setting.phtml:23 #, php-format @@ -551,8 +541,7 @@ msgid "Click the box below to promote your station on %sSourcefabric.org%s." msgstr "勾选随后的选项就可以在%sSourcefabric.org%s上推广您的电台。" #: airtime_mvc/application/views/scripts/form/support-setting.phtml:41 -msgid "" -"(In order to promote your station, 'Send support feedback' must be enabled)." +msgid "(In order to promote your station, 'Send support feedback' must be enabled)." msgstr "(为了推广您的电台,请启用‘发送支持反馈’)" #: airtime_mvc/application/views/scripts/form/support-setting.phtml:61 @@ -611,25 +600,13 @@ msgstr "注册Airtime" #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:6 #, php-format -msgid "" -"Help Airtime improve by letting us know how you are using it. This info will " -"be collected regularly in order to enhance your user experience.%sClick " -"'Yes, help Airtime' and we'll make sure the features you use are constantly " -"improving." -msgstr "" -"通过告诉我们您使用Airtime的方式,可以帮助我们改进Airtime。这些信息会周期性的" -"收集起来,并且提高您的用户体验。%s点击‘是的,帮助Airtime’,就能让我们确保你所" -"使用的功能持续地得到改进。" +msgid "Help Airtime improve by letting us know how you are using it. This info will be collected regularly in order to enhance your user experience.%sClick 'Yes, help Airtime' and we'll make sure the features you use are constantly improving." +msgstr "通过告诉我们您使用Airtime的方式,可以帮助我们改进Airtime。这些信息会周期性的收集起来,并且提高您的用户体验。%s点击‘是的,帮助Airtime’,就能让我们确保你所使用的功能持续地得到改进。" #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:25 #, php-format -msgid "" -"Click the box below to advertise your station on %sSourcefabric.org%s. In " -"order to promote your station, 'Send support feedback' must be enabled. This " -"data will be collected in addition to the support feedback." -msgstr "" -"勾选下面的选项,就可以在%sSourcefabric.org%s上推广您的电台。前提是‘发送支持反" -"馈’选项已经启用。这些数据将会被收集起来以作为支持反馈的信息。" +msgid "Click the box below to advertise your station on %sSourcefabric.org%s. In order to promote your station, 'Send support feedback' must be enabled. This data will be collected in addition to the support feedback." +msgstr "勾选下面的选项,就可以在%sSourcefabric.org%s上推广您的电台。前提是‘发送支持反馈’选项已经启用。这些数据将会被收集起来以作为支持反馈的信息。" #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:178 msgid "Terms and Conditions" @@ -809,12 +786,8 @@ msgid "Please enter and confirm your new password in the fields below." msgstr "请再次输入你的新密码。" #: airtime_mvc/application/views/scripts/login/password-restore.phtml:7 -msgid "" -"Please enter your account e-mail address. You will receive a link to create " -"a new password via e-mail." -msgstr "" -"请输入你帐号的邮件地址,然后你将收到一封邮件,其中有一个链接,用来创建你的新" -"密码。" +msgid "Please enter your account e-mail address. You will receive a link to create a new password via e-mail." +msgstr "请输入你帐号的邮件地址,然后你将收到一封邮件,其中有一个链接,用来创建你的新密码。" #: airtime_mvc/application/views/scripts/login/index.phtml:3 #: airtime_mvc/application/forms/Login.php:65 @@ -822,11 +795,8 @@ msgid "Login" msgstr "登录" #: airtime_mvc/application/views/scripts/login/index.phtml:7 -msgid "" -"Welcome to the online Airtime demo! You can log in using the username " -"'admin' and the password 'admin'." -msgstr "" -"欢迎来到在线Airtime演示!你可以用‘admin’和‘admin’作为用户名和密码登录。" +msgid "Welcome to the online Airtime demo! You can log in using the username 'admin' and the password 'admin'." +msgstr "欢迎来到在线Airtime演示!你可以用‘admin’和‘admin’作为用户名和密码登录。" #: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:2 #: airtime_mvc/application/layouts/scripts/bare.phtml:5 @@ -858,15 +828,12 @@ msgstr "关于" #: airtime_mvc/application/views/scripts/dashboard/about.phtml:5 #, php-format -msgid "" -"%sAirtime%s %s, the open radio software for scheduling and remote station " -"management. %s" +msgid "%sAirtime%s %s, the open radio software for scheduling and remote station management. %s" msgstr "%sAirtime%s %s, 提供内容编排及远程管理的开源电台软件。%s" #: airtime_mvc/application/views/scripts/dashboard/about.phtml:13 #, php-format -msgid "" -"%sSourcefabric%s o.p.s. Airtime is distributed under the %sGNU GPL v.3%s" +msgid "%sSourcefabric%s o.p.s. Airtime is distributed under the %sGNU GPL v.3%s" msgstr "%sSourcefabric%s o.p.s. Airtime遵循%sGNU GPL v.3%s" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:3 @@ -874,39 +841,23 @@ msgid "Welcome to Airtime!" msgstr "欢迎使用Airtime!" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:4 -msgid "" -"Here's how you can get started using Airtime to automate your broadcasts: " +msgid "Here's how you can get started using Airtime to automate your broadcasts: " msgstr "简单介绍如何使用Airtime来自动完成播放:" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:7 -msgid "" -"Begin by adding your files to the library using the 'Add Media' menu button. " -"You can drag and drop your files to this window too." -msgstr "" -"首先把你的媒体文件通过‘添加媒体’导入到媒体库中。你也可以简单的拖拽文件到本窗" -"口" +msgid "Begin by adding your files to the library using the 'Add Media' menu button. You can drag and drop your files to this window too." +msgstr "首先把你的媒体文件通过‘添加媒体’导入到媒体库中。你也可以简单的拖拽文件到本窗口" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:8 -msgid "" -"Create a show by going to 'Calendar' in the menu bar, and then clicking the " -"'+ Show' icon. This can be either a one-time or repeating show. Only admins " -"and program managers can add shows." -msgstr "" -"你可以创建一个节目,从菜单栏打开页面‘日程表’,点击按钮‘+ 节目’。这个节目可以" -"是一次性的,也可以是系列性的。只有系统管理员" +msgid "Create a show by going to 'Calendar' in the menu bar, and then clicking the '+ Show' icon. This can be either a one-time or repeating show. Only admins and program managers can add shows." +msgstr "你可以创建一个节目,从菜单栏打开页面‘日程表’,点击按钮‘+ 节目’。这个节目可以是一次性的,也可以是系列性的。只有系统管理员" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:9 -msgid "" -"Add media to the show by going to your show in the Schedule calendar, left-" -"clicking on it and selecting 'Add / Remove Content'" -msgstr "" -"然后给你的节目添加内容,在日程表页面中选中节目,左键单击,在出现的菜单上选" -"择‘添加/删除内容’" +msgid "Add media to the show by going to your show in the Schedule calendar, left-clicking on it and selecting 'Add / Remove Content'" +msgstr "然后给你的节目添加内容,在日程表页面中选中节目,左键单击,在出现的菜单上选择‘添加/删除内容’" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:10 -msgid "" -"Select your media from the left pane and drag them to your show in the right " -"pane." +msgid "Select your media from the left pane and drag them to your show in the right pane." msgstr "在页面左半部分选择媒体文件,然后拖拽到右半部分。" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:12 @@ -1001,11 +952,8 @@ msgstr "需要更新升级" #: airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml:80 #, php-format -msgid "" -"To play the media you will need to either update your browser to a recent " -"version or update your %sFlash plugin%s." -msgstr "" -"想要播放媒体,需要更新你的浏览器到最新的版本,或者更新你的%sFalsh插件%s。" +msgid "To play the media you will need to either update your browser to a recent version or update your %sFlash plugin%s." +msgstr "想要播放媒体,需要更新你的浏览器到最新的版本,或者更新你的%sFalsh插件%s。" #: airtime_mvc/application/views/scripts/user/add-user.phtml:3 msgid "Manage Users" @@ -1076,6 +1024,10 @@ msgstr "无历史记录表单模板" msgid "Set Default" msgstr "设为默认" +#: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:31 +msgid "New Log Sheet Template" +msgstr "" + #: airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml:35 msgid "File Summary Templates" msgstr "文件播放记录模板列表" @@ -1446,9 +1398,7 @@ msgstr "‘长度’格式应该为‘00:00:00’" #: airtime_mvc/application/forms/SmartBlockCriteria.php:513 #: airtime_mvc/application/forms/SmartBlockCriteria.php:526 -msgid "" -"The value should be in timestamp format (e.g. 0000-00-00 or 0000-00-00 " -"00:00:00)" +msgid "The value should be in timestamp format (e.g. 0000-00-00 or 0000-00-00 00:00:00)" msgstr "时间格式错误,应该为形如0000-00-00 或 0000-00-00 00:00:00的格式" #: airtime_mvc/application/forms/SmartBlockCriteria.php:540 @@ -1538,8 +1488,7 @@ msgid "Value is required and can't be empty" msgstr "不能为空" #: airtime_mvc/application/forms/helpers/ValidationTypes.php:19 -msgid "" -"'%value%' is no valid email address in the basic format local-part@hostname" +msgid "'%value%' is no valid email address in the basic format local-part@hostname" msgstr "'%value%' 不是合法的电邮地址,应该类似于 local-part@hostname" #: airtime_mvc/application/forms/helpers/ValidationTypes.php:33 @@ -1914,9 +1863,7 @@ msgstr "默认淡出效果(秒):" #: airtime_mvc/application/forms/GeneralPreferences.php:89 #, php-format -msgid "" -"Allow Remote Websites To Access \"Schedule\" Info?%s (Enable this to make " -"front-end widgets work.)" +msgid "Allow Remote Websites To Access \"Schedule\" Info?%s (Enable this to make front-end widgets work.)" msgstr "允许远程访问节目表信息?%s (此项启用后才能使用“小工具”,既widgets)" #: airtime_mvc/application/forms/GeneralPreferences.php:90 @@ -2343,9 +2290,7 @@ msgid "The show %s has been previously updated!" msgstr "节目%s已经更改,需要刷新后再尝试。" #: airtime_mvc/application/models/Scheduler.php:177 -msgid "" -"Content in linked shows must be scheduled before or after any one is " -"broadcasted" +msgid "Content in linked shows must be scheduled before or after any one is broadcasted" msgstr "绑定的节目要么提前设置好,要么等待其中的任何一个节目结束后才能编辑内容" #: airtime_mvc/application/models/Scheduler.php:199 @@ -2388,14 +2333,12 @@ msgstr "%s 不是文件夹。" #: airtime_mvc/application/models/MusicDir.php:232 #, php-format -msgid "" -"%s is already set as the current storage dir or in the watched folders list" +msgid "%s is already set as the current storage dir or in the watched folders list" msgstr "%s 已经设置成媒体存储文件夹,或者监控文件夹。" #: airtime_mvc/application/models/MusicDir.php:386 #, php-format -msgid "" -"%s is already set as the current storage dir or in the watched folders list." +msgid "%s is already set as the current storage dir or in the watched folders list." msgstr "%s 已经设置成媒体存储文件夹,或者监控文件夹。" #: airtime_mvc/application/models/MusicDir.php:429 @@ -2502,21 +2445,15 @@ msgstr "创建‘organize’目录失败" #: airtime_mvc/application/models/StoredFile.php:988 #, php-format -msgid "" -"The file was not uploaded, there is %s MB of disk space left and the file " -"you are uploading has a size of %s MB." +msgid "The file was not uploaded, there is %s MB of disk space left and the file you are uploading has a size of %s MB." msgstr "磁盘空间不足,文件上传失败,剩余空间只有 %s 兆,尝试上传 %s 兆的文件" #: airtime_mvc/application/models/StoredFile.php:997 -msgid "" -"This file appears to be corrupted and will not be added to media library." +msgid "This file appears to be corrupted and will not be added to media library." msgstr "媒体文件不符合媒体库要求或者已经损坏,该文件将不会上传到媒体库" #: airtime_mvc/application/models/StoredFile.php:1036 -msgid "" -"The file was not uploaded, this error can occur if the computer hard drive " -"does not have enough disk space or the stor directory does not have correct " -"write permissions." +msgid "The file was not uploaded, this error can occur if the computer hard drive does not have enough disk space or the stor directory does not have correct write permissions." msgstr "文件上传失败,可能的原因:磁盘空间不足目录权限设置错误" #: airtime_mvc/application/configs/navigation.php:12 @@ -2935,9 +2872,7 @@ msgstr "输入格式应为:时:分:秒 (hh:mm:ss.t)" #: airtime_mvc/application/controllers/LocaleController.php:111 #, php-format -msgid "" -"You are currently uploading files. %sGoing to another screen will cancel the " -"upload process. %sAre you sure you want to leave the page?" +msgid "You are currently uploading files. %sGoing to another screen will cancel the upload process. %sAre you sure you want to leave the page?" msgstr "你正在上传文件。%s如果离开此页,上传过程将被打断。%s确定离开吗?" #: airtime_mvc/application/controllers/LocaleController.php:113 @@ -2973,13 +2908,8 @@ msgid "Playlist shuffled" msgstr "播放列表已经随机化" #: airtime_mvc/application/controllers/LocaleController.php:122 -msgid "" -"Airtime is unsure about the status of this file. This can happen when the " -"file is on a remote drive that is unaccessible or the file is in a directory " -"that isn't 'watched' anymore." -msgstr "" -"文件的状态不可知。这可能是由于文件位于远程存储位置,或者所在的文件夹已经不再" -"监控。" +msgid "Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore." +msgstr "文件的状态不可知。这可能是由于文件位于远程存储位置,或者所在的文件夹已经不再监控。" #: airtime_mvc/application/controllers/LocaleController.php:124 #, php-format @@ -3004,31 +2934,16 @@ msgid "Image must be one of jpg, jpeg, png, or gif" msgstr "图像文件格式只能是jpg,jpeg,png或者gif" #: airtime_mvc/application/controllers/LocaleController.php:132 -msgid "" -"A static smart block will save the criteria and generate the block content " -"immediately. This allows you to edit and view it in the Library before " -"adding it to a show." -msgstr "" -"静态的智能模块将会保存条件设置并且马上生成所有内容。这样就可以让你在添加到节" -"目中前,还可以编辑和预览该智能模块。" +msgid "A static smart block will save the criteria and generate the block content immediately. This allows you to edit and view it in the Library before adding it to a show." +msgstr "静态的智能模块将会保存条件设置并且马上生成所有内容。这样就可以让你在添加到节目中前,还可以编辑和预览该智能模块。" #: airtime_mvc/application/controllers/LocaleController.php:134 -msgid "" -"A dynamic smart block will only save the criteria. The block content will " -"get generated upon adding it to a show. You will not be able to view and " -"edit the content in the Library." -msgstr "" -"动态的智能模块将只保存条件设置。而模块的内容将在每次添加到节目中是动态生成。" -"在媒体库中,你不能直接编辑和预览动态智能模块。" +msgid "A dynamic smart block will only save the criteria. The block content will get generated upon adding it to a show. You will not be able to view and edit the content in the Library." +msgstr "动态的智能模块将只保存条件设置。而模块的内容将在每次添加到节目中是动态生成。在媒体库中,你不能直接编辑和预览动态智能模块。" #: airtime_mvc/application/controllers/LocaleController.php:136 -msgid "" -"The desired block length will not be reached if Airtime cannot find enough " -"unique tracks to match your criteria. Enable this option if you wish to " -"allow tracks to be added multiple times to the smart block." -msgstr "" -"因为满足条件的声音文件数量有限,只能播放列表指定的时长可能无法达成。如果你不" -"介意出现重复的项目,你可以启用此项。" +msgid "The desired block length will not be reached if Airtime cannot find enough unique tracks to match your criteria. Enable this option if you wish to allow tracks to be added multiple times to the smart block." +msgstr "因为满足条件的声音文件数量有限,只能播放列表指定的时长可能无法达成。如果你不介意出现重复的项目,你可以启用此项。" #: airtime_mvc/application/controllers/LocaleController.php:137 msgid "Smart block shuffled" @@ -3072,11 +2987,8 @@ msgstr "指定的路径无法访问。" #: airtime_mvc/application/controllers/LocaleController.php:160 #, php-format -msgid "" -"Some stream types require extra configuration. Details about enabling %sAAC+ " -"Support%s or %sOpus Support%s are provided." -msgstr "" -"某些类型的输出流需要第三方软件的设置,具体步骤如下:%sAAC+%s 和 %sOpus%s。" +msgid "Some stream types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided." +msgstr "某些类型的输出流需要第三方软件的设置,具体步骤如下:%sAAC+%s 和 %sOpus%s。" #: airtime_mvc/application/controllers/LocaleController.php:161 msgid "Connected to the streaming server" @@ -3091,17 +3003,8 @@ msgid "Can not connect to the streaming server" msgstr "无法连接流服务器" #: airtime_mvc/application/controllers/LocaleController.php:166 -msgid "" -"If Airtime is behind a router or firewall, you may need to configure port " -"forwarding and this field information will be incorrect. In this case you " -"will need to manually update this field so it shows the correct host/port/" -"mount that your DJ's need to connect to. The allowed range is between 1024 " -"and 49151." -msgstr "" -"如果Airtime配置在路由器或者防火墙之后,你可能需要配置端口转发,所以当前文本框" -"内的信息需要调整。在这种情况下,就需要人工指定该信息以确定所显示的主机名/端" -"口/加载点的正确性,从而让节目编辑能连接的上。端口所允许的范围,介于1024到" -"49151之间。" +msgid "If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151." +msgstr "如果Airtime配置在路由器或者防火墙之后,你可能需要配置端口转发,所以当前文本框内的信息需要调整。在这种情况下,就需要人工指定该信息以确定所显示的主机名/端口/加载点的正确性,从而让节目编辑能连接的上。端口所允许的范围,介于1024到49151之间。" #: airtime_mvc/application/controllers/LocaleController.php:167 #, php-format @@ -3109,78 +3012,40 @@ msgid "For more details, please read the %sAirtime Manual%s" msgstr "更多的细节可以参阅%sAirtime用户手册%s" #: airtime_mvc/application/controllers/LocaleController.php:169 -msgid "" -"Check this option to enable metadata for OGG streams (stream metadata is the " -"track title, artist, and show name that is displayed in an audio player). " -"VLC and mplayer have a serious bug when playing an OGG/VORBIS stream that " -"has metadata information enabled: they will disconnect from the stream after " -"every song. If you are using an OGG stream and your listeners do not require " -"support for these audio players, then feel free to enable this option." -msgstr "" -"勾选此项会启用OGG格式流媒体的元数据(流的元数据包括歌曲名,歌手/作者,节目" -"名,这些都会显示在音频播放器中。)VLC和mplayer有个已知的问题,他们在播放OGG/" -"VORBIS媒体流时,如果该流已启用元数据,那么在每首歌的间隙都会断开流。所以,如" -"果你使用OGG媒体流,同时你的听众不使用上述媒体播放器的话,你可以随意地勾选此" -"项。" +msgid "Check this option to enable metadata for OGG streams (stream metadata is the track title, artist, and show name that is displayed in an audio player). VLC and mplayer have a serious bug when playing an OGG/VORBIS stream that has metadata information enabled: they will disconnect from the stream after every song. If you are using an OGG stream and your listeners do not require support for these audio players, then feel free to enable this option." +msgstr "勾选此项会启用OGG格式流媒体的元数据(流的元数据包括歌曲名,歌手/作者,节目名,这些都会显示在音频播放器中。)VLC和mplayer有个已知的问题,他们在播放OGG/VORBIS媒体流时,如果该流已启用元数据,那么在每首歌的间隙都会断开流。所以,如果你使用OGG媒体流,同时你的听众不使用上述媒体播放器的话,你可以随意地勾选此项。" #: airtime_mvc/application/controllers/LocaleController.php:170 -msgid "" -"Check this box to automatically switch off Master/Show source upon source " -"disconnection." -msgstr "" -"勾选此项后,在输入流断开时,主输入源和节目定制输入源将会自动切换为关闭状态。" +msgid "Check this box to automatically switch off Master/Show source upon source disconnection." +msgstr "勾选此项后,在输入流断开时,主输入源和节目定制输入源将会自动切换为关闭状态。" #: airtime_mvc/application/controllers/LocaleController.php:171 -msgid "" -"Check this box to automatically switch on Master/Show source upon source " -"connection." -msgstr "" -"勾选此项后,在输入流连接上时,主输入源和节目定制输入源将会自动切换到开启状" -"态。" +msgid "Check this box to automatically switch on Master/Show source upon source connection." +msgstr "勾选此项后,在输入流连接上时,主输入源和节目定制输入源将会自动切换到开启状态。" #: airtime_mvc/application/controllers/LocaleController.php:172 -msgid "" -"If your Icecast server expects a username of 'source', this field can be " -"left blank." +msgid "If your Icecast server expects a username of 'source', this field can be left blank." msgstr "如果你的Icecast服务器所要求的用户名是‘source’,那么当前项可以留空。" #: airtime_mvc/application/controllers/LocaleController.php:173 #: airtime_mvc/application/controllers/LocaleController.php:183 -msgid "" -"If your live streaming client does not ask for a username, this field should " -"be 'source'." +msgid "If your live streaming client does not ask for a username, this field should be 'source'." msgstr "如果你的流客户端不需要用户名,那么当前项可以留空" #: airtime_mvc/application/controllers/LocaleController.php:175 -msgid "" -"If you change the username or password values for an enabled stream the " -"playout engine will be rebooted and your listeners will hear silence for " -"5-10 seconds. Changing the following fields will NOT cause a reboot: Stream " -"Label (Global Settings), and Switch Transition Fade(s), Master Username, and " -"Master Password (Input Stream Settings). If Airtime is recording, and if the " -"change causes a playout engine restart, the recording will be interrupted." -msgstr "" -"如果你更改了一个已经启用了的输出流的用户名或者密码,那么内置的播放输出引擎模" -"块将会重启,你的听众将会听到一段时间的空白,大概持续5到10秒。而改变如下的模块" -"将不会导致该模块重启:流标签(全局设置里)和流切换淡入淡出效果(秒),主输入" -"流用户名和密码(输入流设置)。如果Airtime正在录制过程中,而且改变设置导致引擎" -"模块重启后,当前的录制进程将会被打断。" +msgid "If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted." +msgstr "如果你更改了一个已经启用了的输出流的用户名或者密码,那么内置的播放输出引擎模块将会重启,你的听众将会听到一段时间的空白,大概持续5到10秒。而改变如下的模块将不会导致该模块重启:流标签(全局设置里)和流切换淡入淡出效果(秒),主输入流用户名和密码(输入流设置)。如果Airtime正在录制过程中,而且改变设置导致引擎模块重启后,当前的录制进程将会被打断。" #: airtime_mvc/application/controllers/LocaleController.php:176 -msgid "" -"This is the admin username and password for Icecast/SHOUTcast to get " -"listener statistics." -msgstr "" -"此处填写Icecast或者SHOUTcast的管理员用户名和密码,用于获取收听数据的统计。" +msgid "This is the admin username and password for Icecast/SHOUTcast to get listener statistics." +msgstr "此处填写Icecast或者SHOUTcast的管理员用户名和密码,用于获取收听数据的统计。" #: airtime_mvc/application/controllers/LocaleController.php:180 msgid "No result found" msgstr "搜索无结果" #: airtime_mvc/application/controllers/LocaleController.php:181 -msgid "" -"This follows the same security pattern for the shows: only users assigned to " -"the show can connect." +msgid "This follows the same security pattern for the shows: only users assigned to the show can connect." msgstr "当前遵循与节目同样的安全模式:只有指定到当前节目的用户才能连接的上。" #: airtime_mvc/application/controllers/LocaleController.php:182 @@ -3196,12 +3061,8 @@ msgid "Warning: Shows cannot be re-linked" msgstr "注意:节目取消绑定后无法再次绑定" #: airtime_mvc/application/controllers/LocaleController.php:186 -msgid "" -"By linking your repeating shows any media items scheduled in any repeat show " -"will also get scheduled in the other repeat shows" -msgstr "" -"系列节目勾选绑定后,所有节目的内容都会一模一样,对任何未开始节目的更改都会影" -"响到其他节目。" +msgid "By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows" +msgstr "系列节目勾选绑定后,所有节目的内容都会一模一样,对任何未开始节目的更改都会影响到其他节目。" #: airtime_mvc/application/controllers/LocaleController.php:190 msgid "Show" @@ -3357,8 +3218,7 @@ msgid "month" msgstr "月" #: airtime_mvc/application/controllers/LocaleController.php:252 -msgid "" -"Shows longer than their scheduled time will be cut off by a following show." +msgid "Shows longer than their scheduled time will be cut off by a following show." msgstr "超出的节目内容将被随后的节目所取代。" #: airtime_mvc/application/controllers/LocaleController.php:253 @@ -3438,8 +3298,7 @@ msgid "Cue Editor" msgstr "切入切出编辑器" #: airtime_mvc/application/controllers/LocaleController.php:287 -msgid "" -"Waveform features are available in a browser supporting the Web Audio API" +msgid "Waveform features are available in a browser supporting the Web Audio API" msgstr "想要启用波形图功能,需要支持Web Audio API的浏览器。" #: airtime_mvc/application/controllers/LocaleController.php:290 @@ -3737,11 +3596,8 @@ msgstr "复制%s行%s到剪贴板" #: airtime_mvc/application/controllers/LocaleController.php:392 #, php-format -msgid "" -"%sPrint view%sPlease use your browser's print function to print this table. " -"Press escape when finished." -msgstr "" -"%s打印预览%s请使用浏览器的打印功能进行打印。按下Esc键可以退出当前状态。" +msgid "%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished." +msgstr "%s打印预览%s请使用浏览器的打印功能进行打印。按下Esc键可以退出当前状态。" #: airtime_mvc/application/controllers/PreferenceController.php:74 msgid "Preferences updated." @@ -3774,8 +3630,7 @@ msgid "Download" msgstr "下载" #: airtime_mvc/application/controllers/ListenerstatController.php:56 -msgid "" -"Please make sure admin user/password is correct on System->Streams page." +msgid "Please make sure admin user/password is correct on System->Streams page." msgstr "请检查系统->媒体流设置中,管理员用户/密码的设置是否正确。" #: airtime_mvc/application/controllers/DashboardController.php:36 @@ -3877,9 +3732,7 @@ msgid "Wrong username or password provided. Please try again." msgstr "用户名或密码错误,请重试。" #: airtime_mvc/application/controllers/LoginController.php:142 -msgid "" -"Email could not be sent. Check your mail server settings and ensure it has " -"been configured properly." +msgid "Email could not be sent. Check your mail server settings and ensure it has been configured properly." msgstr "邮件发送失败。请检查邮件服务器设置,并确定设置无误。" #: airtime_mvc/application/controllers/LoginController.php:145 @@ -3900,9 +3753,7 @@ msgstr "设置更新成功!" #: airtime_mvc/application/layouts/scripts/login.phtml:16 #, php-format -msgid "" -"Airtime Copyright ©Sourcefabric o.p.s. All rights reserved.%sMaintained " -"and distributed under GNU GPL v.3 by %sSourcefabric o.p.s%s" +msgid "Airtime Copyright ©Sourcefabric o.p.s. All rights reserved.%sMaintained and distributed under GNU GPL v.3 by %sSourcefabric o.p.s%s" msgstr "Airtime 遵循GPL第三版协议,%s由%sSourcefabric o.p.s%s版权所有。" #: airtime_mvc/application/layouts/scripts/layout.phtml:27 From 71001480d2e349ff9e020555b646ec60c82668dd Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 24 Sep 2013 11:47:20 +0200 Subject: [PATCH 148/181] CC-5335 : I18N: Calendar picker strings are not translated. loading the same strings as the jquery calendar. --- .../public/js/airtime/common/common.js | 15 +++++++++++ .../js/airtime/playouthistory/historytable.js | 7 +++++ .../bootstrap-datetimepicker.js | 11 ++++---- .../bootstrap-datetimepicker.min.js | 26 ------------------- 4 files changed, 28 insertions(+), 31 deletions(-) delete mode 100644 airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js diff --git a/airtime_mvc/public/js/airtime/common/common.js b/airtime_mvc/public/js/airtime/common/common.js index 0a79ebab1..7a043c286 100644 --- a/airtime_mvc/public/js/airtime/common/common.js +++ b/airtime_mvc/public/js/airtime/common/common.js @@ -30,6 +30,21 @@ var i18n_months = [ $.i18n._("December") ]; +var i18n_months_short = [ + $.i18n._("Jan"), + $.i18n._("Feb"), + $.i18n._("Mar"), + $.i18n._("Apr"), + $.i18n._("May"), + $.i18n._("Jun"), + $.i18n._("Jul"), + $.i18n._("Aug"), + $.i18n._("Sep"), + $.i18n._("Oct"), + $.i18n._("Nov"), + $.i18n._("Dec") +]; + var i18n_days_short = [ $.i18n._("Su"), $.i18n._("Mo"), diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 8cf00fc15..056de9a30 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -466,6 +466,13 @@ var AIRTIME = (function(AIRTIME) { } ]; + //set the locale names for the bootstrap calendar. + $.fn.datetimepicker.dates = { + daysMin: i18n_days_short, + months: i18n_months, + monthsShort: i18n_months_short + }; + $historyContentDiv = $("#history_content"); diff --git a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js index 7e600784a..d26ecc7e1 100644 --- a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js +++ b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js @@ -44,6 +44,9 @@ constructor: DateTimePicker, init: function(element, options) { + + dates = $.fn.datetimepicker.dates; + var icon; if (!(options.pickTime || options.pickDate)) throw new Error('Must choose at least one picker'); @@ -340,7 +343,7 @@ var dowCnt = this.weekStart; var html = $(''); while (dowCnt < this.weekStart + 7) { - html.append('' + dates[this.language].daysMin[(dowCnt++) % 7] + ''); + html.append('' + dates.daysMin[(dowCnt++) % 7] + ''); } this.widget.find('.datepicker-days thead').append(html); }, @@ -349,7 +352,7 @@ var html = ''; var i = 0 while (i < 12) { - html += '' + dates[this.language].monthsShort[i++] + ''; + html += '' + dates.monthsShort[i++] + ''; } this.widget.find('.datepicker-months td').append(html); }, @@ -373,7 +376,7 @@ this.widget.find('.datepicker-years').find('.disabled').removeClass('disabled'); this.widget.find('.datepicker-days th:eq(1)').text( - dates[this.language].months[month] + ' ' + year); + dates.months[month] + ' ' + year); var prevMonth = UTCDate(year, month-1, 28, 0, 0, 0, 0); var day = DPGlobal.getDaysInMonth( @@ -1103,7 +1106,6 @@ $.fn.datetimepicker.Constructor = DateTimePicker; var dpgId = 0; var dates = $.fn.datetimepicker.dates = { - en: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], @@ -1112,7 +1114,6 @@ "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] - } }; var dateFormatComponents = { diff --git a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js deleted file mode 100644 index a30f77645..000000000 --- a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.min.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * ========================================================= - * bootstrap-datetimepicker.js - * http://www.eyecon.ro/bootstrap-datepicker - * ========================================================= - * Copyright 2012 Stefan Petre - * - * Contributions: - * - Andrew Rowls - * - Thiago de Arruda - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= - */ -(function($){var smartPhone=window.orientation!=undefined;var DateTimePicker=function(element,options){this.id=dpgId++;this.init(element,options)};var dateToDate=function(dt){if(typeof dt==="string"){return new Date(dt)}return dt};DateTimePicker.prototype={constructor:DateTimePicker,init:function(element,options){var icon;if(!(options.pickTime||options.pickDate))throw new Error("Must choose at least one picker");this.options=options;this.$element=$(element);this.language=options.language in dates?options.language:"en";this.pickDate=options.pickDate;this.pickTime=options.pickTime;this.isInput=this.$element.is("input");this.component=false;if(this.$element.find(".input-append")||this.$element.find(".input-prepend"))this.component=this.$element.find(".add-on");this.format=options.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"}this._compileFormat();if(this.component){icon=this.component.find("i")}if(this.pickTime){if(icon&&icon.length)this.timeIcon=icon.data("time-icon");if(!this.timeIcon)this.timeIcon="icon-time";icon.addClass(this.timeIcon)}if(this.pickDate){if(icon&&icon.length)this.dateIcon=icon.data("date-icon");if(!this.dateIcon)this.dateIcon="icon-calendar";icon.removeClass(this.timeIcon);icon.addClass(this.dateIcon)}this.widget=$(getTemplate(this.timeIcon,options.pickDate,options.pickTime,options.pick12HourFormat,options.pickSeconds,options.collapse)).appendTo("body");this.minViewMode=options.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=options.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=options.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(options.startDate||this.$element.data("date-startdate"));this.setEndDate(options.endDate||this.$element.data("date-enddate"));this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e){e.stopPropagation();e.preventDefault()}},disable:function(){this.$element.find("input").prop("disabled",true);this._detachDatePickerEvents()},enable:function(){this.$element.find("input").prop("disabled",false);this._attachDatePickerEvents()},hide:function(){var collapse=this.widget.find(".collapse");for(var i=0;i");while(dowCnt'+dates[this.language].daysMin[dowCnt++%7]+"")}this.widget.find(".datepicker-days thead").append(html)},fillMonths:function(){var html="";var i=0;while(i<12){html+=''+dates[this.language].monthsShort[i++]+""}this.widget.find(".datepicker-months td").append(html)},fillDate:function(){var year=this.viewDate.getUTCFullYear();var month=this.viewDate.getUTCMonth();var currentDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);var startYear=typeof this.startDate==="object"?this.startDate.getUTCFullYear():-Infinity;var startMonth=typeof this.startDate==="object"?this.startDate.getUTCMonth():-1;var endYear=typeof this.endDate==="object"?this.endDate.getUTCFullYear():Infinity;var endMonth=typeof this.endDate==="object"?this.endDate.getUTCMonth():12;this.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-days th:eq(1)").text(dates[this.language].months[month]+" "+year);var prevMonth=UTCDate(year,month-1,28,0,0,0,0);var day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);if(year==startYear&&month<=startMonth||year=endMonth||year>endYear){this.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var row;var clsName;while(prevMonth.valueOf()");html.push(row)}clsName="";if(prevMonth.getUTCFullYear()year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month){clsName+=" new"}if(prevMonth.valueOf()===currentDate.valueOf()){clsName+=" active"}if(prevMonth.valueOf()+864e5<=this.startDate){clsName+=" disabled"}if(prevMonth.valueOf()>this.endDate){clsName+=" disabled"}row.append(''+prevMonth.getUTCDate()+"");prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(html);var currentYear=this._date.getUTCFullYear();var months=this.widget.find(".datepicker-months").find("th:eq(1)").text(year).end().find("span").removeClass("active");if(currentYear===year){months.eq(this._date.getUTCMonth()).addClass("active")}if(currentYear-1endYear){this.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(var i=0;i<12;i++){if(year==startYear&&startMonth>i||yearendYear){$(months[i]).addClass("disabled")}}html="";year=parseInt(year/10,10)*10;var yearCont=this.widget.find(".datepicker-years").find("th:eq(1)").text(year+"-"+(year+9)).end().find("td");this.widget.find(".datepicker-years").find("th").removeClass("disabled");if(startYear>year){this.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(endYearendYear?" disabled":"")+'">'+year+"";year+=1}yearCont.html(html)},fillHours:function(){var table=this.widget.find(".timepicker .timepicker-hours table");table.parent().hide();var html="";if(this.options.pick12HourFormat){var current=1;for(var i=0;i<3;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}else{var current=0;for(var i=0;i<6;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}table.html(html)},fillMinutes:function(){var table=this.widget.find(".timepicker .timepicker-minutes table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillSeconds:function(){var table=this.widget.find(".timepicker .timepicker-seconds table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillTime:function(){if(!this._date)return;var timeComponents=this.widget.find(".timepicker span[data-time-component]");var table=timeComponents.closest("table");var is12HourFormat=this.options.pick12HourFormat;var hour=this._date.getUTCHours();var period="AM";if(is12HourFormat){if(hour>=12)period="PM";if(hour===0)hour=12;else if(hour!=12)hour=hour%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(period)}hour=padLeft(hour.toString(),2,"0");var minute=padLeft(this._date.getUTCMinutes().toString(),2,"0");var second=padLeft(this._date.getUTCSeconds().toString(),2,"0");timeComponents.filter("[data-time-component=hours]").text(hour);timeComponents.filter("[data-time-component=minutes]").text(minute);timeComponents.filter("[data-time-component=seconds]").text(second)},click:function(e){e.stopPropagation();e.preventDefault();this._unset=false;var target=$(e.target).closest("span, td, th");if(target.length===1){if(!target.is(".disabled")){switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var vd=this.viewDate;var navFnc=DPGlobal.modes[this.viewMode].navFnc;var step=DPGlobal.modes[this.viewMode].navStep;if(target[0].className==="prev")step=step*-1;vd["set"+navFnc](vd["get"+navFnc]()+step);this.fillDate();this.set();break}break;case"span":if(target.is(".month")){var month=target.parent().find("span").index(target);this.viewDate.setUTCMonth(month)}else{var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year)}if(this.viewMode!==0){this._date=UTCDate(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();this.set();break;case"td":if(target.is(".day")){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getUTCMonth();var year=this.viewDate.getUTCFullYear();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}this._date=UTCDate(year,month,day,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=UTCDate(year,month,Math.min(28,day),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}}},actions:{incrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e){var hour=this._date.getUTCHours();if(hour>=12)hour-=12;else hour+=12;this._date.setUTCHours(hour)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);if(this.options.pick12HourFormat){var current=this._date.getUTCHours();if(current>=12){if(value!=12)value=(value+12)%24}else{if(value===12)value=0;else value=value%12}}this._date.setUTCHours(value);this.actions.showPicker.call(this)},selectMinute:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCMinutes(value);this.actions.showPicker.call(this)},selectSecond:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCSeconds(value);this.actions.showPicker.call(this)}},doAction:function(e){e.stopPropagation();e.preventDefault();if(!this._date)this._date=UTCDate(1970,0,0,0,0,0,0);var action=$(e.currentTarget).data("action");var rv=this.actions[action].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return rv},stopEvent:function(e){e.stopPropagation();e.preventDefault()},keydown:function(e){var self=this,k=e.which,input=$(e.target);if(k==8||k==46){setTimeout(function(){self._resetMaskPos(input)})}},keypress:function(e){var k=e.which;if(k==8||k==46){return}var input=$(e.target);var c=String.fromCharCode(k);var val=input.val()||"";val+=c;var mask=this._mask[this._maskPos];if(!mask){return false}if(mask.end!=val.length){return}if(!mask.pattern.test(val.slice(mask.start))){val=val.slice(0,val.length-1);while((mask=this._mask[this._maskPos])&&mask.character){val+=mask.character;this._maskPos++}val+=c;if(mask.end!=val.length){input.val(val);return false}else{if(!mask.pattern.test(val.slice(mask.start))){input.val(val.slice(0,mask.start));return false}else{input.val(val);this._maskPos++;return false}}}else{this._maskPos++}},change:function(e){var input=$(e.target);var val=input.val();if(this._formatPattern.test(val)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(val&&val.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else input.val("")}else{if(this._date){this.setValue(null);this.notifyChange();this._unset=true}}this._resetMaskPos(input)},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+DPGlobal.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(d){return this.format.replace(formatReplacer,function(match){var methodName,property,rv,len=match.length;if(match==="ms")len=1;property=dateFormatComponents[match].property;if(property==="Hours12"){rv=d.getUTCHours();if(rv===0)rv=12;else if(rv!==12)rv=rv%12}else if(property==="Period12"){if(d.getUTCHours()>=12)return"PM";else return"AM"}else{methodName="get"+property;rv=d[methodName]()}if(methodName==="getUTCMonth")rv=rv+1;if(methodName==="getUTCYear")rv=rv+1900-2e3;return padLeft(rv.toString(),len,"0")})},parseDate:function(str){var match,i,property,methodName,value,parsed={};if(!(match=this._formatPattern.exec(str)))return null;for(i=1;ival.length){this._maskPos=i;break}else if(this._mask[i].end===val.length){this._maskPos=i+1;break}}},_finishParsingDate:function(parsed){var year,month,date,hours,minutes,seconds,milliseconds;year=parsed.UTCFullYear;if(parsed.UTCYear)year=2e3+parsed.UTCYear;if(!year)year=1970;if(parsed.UTCMonth)month=parsed.UTCMonth-1;else month=0;date=parsed.UTCDate||1;hours=parsed.UTCHours||0;minutes=parsed.UTCMinutes||0;seconds=parsed.UTCSeconds||0;milliseconds=parsed.UTCMilliseconds||0;if(parsed.Hours12){hours=parsed.Hours12}if(parsed.Period12){if(/pm/i.test(parsed.Period12)){if(hours!=12)hours=(hours+12)%24}else{hours=hours%12}}return UTCDate(year,month,date,hours,minutes,seconds,milliseconds)},_compileFormat:function(){var match,component,components=[],mask=[],str=this.format,propertiesByIndex={},i=0,pos=0;while(match=formatComponent.exec(str)){component=match[0];if(component in dateFormatComponents){i++;propertiesByIndex[i]=dateFormatComponents[component].property;components.push("\\s*"+dateFormatComponents[component].getPattern(this)+"\\s*");mask.push({pattern:new RegExp(dateFormatComponents[component].getPattern(this)),property:dateFormatComponents[component].property,start:pos,end:pos+=component.length})}else{components.push(escapeRegExp(component));mask.push({pattern:new RegExp(escapeRegExp(component)),character:component,start:pos,end:++pos})}str=str.slice(component.length)}this._mask=mask;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+components.join("")+"\\s*$");this._propertiesByIndex=propertiesByIndex},_attachDatePickerEvents:function(){var self=this;this.widget.on("click",".datepicker *",$.proxy(this.click,this));this.widget.on("click","[data-action]",$.proxy(this.doAction,this));this.widget.on("mousedown",$.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(e){e.stopPropagation();var $this=$(this);var $parent=$this.closest("ul");var expanded=$parent.find(".collapse.in");var closed=$parent.find(".collapse:not(.in)");if(expanded&&expanded.length){var collapseData=expanded.data("collapse");if(collapseData&&collapseData.transitioning)return;expanded.collapse("hide");closed.collapse("show");$this.find("i").toggleClass(self.timeIcon+" "+self.dateIcon);self.$element.find(".add-on i").toggleClass(self.timeIcon+" "+self.dateIcon)}})}if(this.isInput){this.$element.on({focus:$.proxy(this.show,this),change:$.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)})}}else{this.$element.on({change:$.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",$.proxy(this.show,this))}else{this.$element.on("click",$.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){$(window).on("resize.datetimepicker"+this.id,$.proxy(this.place,this));if(!this.isInput){$(document).on("mousedown.datetimepicker"+this.id,$.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({focus:this.show,change:this.change});if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress})}}else{this.$element.off({change:this.change},"input");if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){$(window).off("resize.datetimepicker"+this.id);if(!this.isInput){$(document).off("mousedown.datetimepicker"+this.id)}},_isInFixed:function(){if(this.$element){var parents=this.$element.parents();var inFixed=false;for(var i=0;i'+"
      "+""+'
      '+DPGlobal.template+"
      "+""+'
    • '+""+'
      '+TPGlobal.getTemplate(is12Hours,showSeconds)+"
      "+""+"
    "+"
    "}else if(pickTime){return'"}else{return'"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:""+""+'‹'+''+'›'+""+"",contTemplate:''};DPGlobal.template='
    '+''+DPGlobal.headTemplate+""+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    ";var TPGlobal={hourTemplate:'',minuteTemplate:'',secondTemplate:''};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'
    '+'"+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+""+" "+''+" "+(showSeconds?''+"":"")+(is12Hours?''+"":"")+""+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+"
    "+TPGlobal.hourTemplate+":"+TPGlobal.minuteTemplate+":"+TPGlobal.secondTemplate+""+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+(showSeconds?'
    '+''+"
    "+"
    ":"")}})(window.jQuery); \ No newline at end of file From 7e96828cddf2a6c669f8dfc0faea86695f9c0801 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 24 Sep 2013 12:21:04 +0200 Subject: [PATCH 149/181] CC-5317 : Guest user can't see Now playing page removed the library module completely from page if the user does not have permission to view it. --- .../controllers/ShowbuilderController.php | 50 ++++++++++--------- .../public/js/airtime/showbuilder/builder.js | 7 ++- .../js/airtime/showbuilder/main_builder.js | 6 ++- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/airtime_mvc/application/controllers/ShowbuilderController.php b/airtime_mvc/application/controllers/ShowbuilderController.php index ec34f68f2..c47f5486d 100644 --- a/airtime_mvc/application/controllers/ShowbuilderController.php +++ b/airtime_mvc/application/controllers/ShowbuilderController.php @@ -20,31 +20,15 @@ class ShowbuilderController extends Zend_Controller_Action { $CC_CONFIG = Config::getConfig(); - + $request = $this->getRequest(); - + $baseUrl = Application_Common_OsPath::getBaseDir(); - + $user = Application_Model_User::GetCurrentUser(); $userType = $user->getType(); $this->view->headScript()->appendScript("localStorage.setItem( 'user-type', '$userType' );"); - $data = Application_Model_Preference::getCurrentLibraryTableSetting(); - if (!is_null($data)) { - $libraryTable = json_encode($data); - $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', JSON.stringify($libraryTable) );"); - } else { - $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', '' );"); - } - - $data = Application_Model_Preference::getTimelineDatatableSetting(); - if (!is_null($data)) { - $timelineTable = json_encode($data); - $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', JSON.stringify($timelineTable) );"); - } else { - $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', '' );"); - } - $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); @@ -57,14 +41,12 @@ class ShowbuilderController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headLink()->appendStylesheet($baseUrl.'css/media_library.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']); - $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $refer_sses = new Zend_Session_Namespace('referrer'); if ($request->isPost()) { @@ -141,6 +123,28 @@ class ShowbuilderController extends Zend_Controller_Action $this->view->disableLib = $disableLib; $this->view->showLib = $showLib; + //only include library things on the page if the user can see it. + if (!$disableLib) { + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + + $data = Application_Model_Preference::getCurrentLibraryTableSetting(); + if (!is_null($data)) { + $libraryTable = json_encode($data); + $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', JSON.stringify($libraryTable) );"); + } else { + $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', '' );"); + } + } + + $data = Application_Model_Preference::getTimelineDatatableSetting(); + if (!is_null($data)) { + $timelineTable = json_encode($data); + $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', JSON.stringify($timelineTable) );"); + } else { + $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', '' );"); + } + //populate date range form for show builder. $now = time(); $from = $request->getParam("from", $now); @@ -270,8 +274,8 @@ class ShowbuilderController extends Zend_Controller_Action $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - $opts = array("myShows" => $my_shows, - "showFilter" => $show_filter, + $opts = array("myShows" => $my_shows, + "showFilter" => $show_filter, "showInstanceFilter" => $show_instance_filter); $showBuilder = new Application_Model_ShowBuilder($startsDT, $endsDT, $opts); diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index e3b18b19f..4f03e6dfa 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -178,7 +178,12 @@ var AIRTIME = (function(AIRTIME){ }; mod.checkToolBarIcons = function() { - AIRTIME.library.checkAddButton(); + + //library may not be on the page. + if (AIRTIME.library !== undefined) { + AIRTIME.library.checkAddButton(); + } + mod.checkSelectButton(); mod.checkTrimButton(); mod.checkDeleteButton(); diff --git a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js index e411a4c1d..c2210a3ae 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js @@ -186,7 +186,11 @@ AIRTIME = (function(AIRTIME) { AIRTIME.showbuilder.fnServerData.start = oRange.start; AIRTIME.showbuilder.fnServerData.end = oRange.end; - AIRTIME.library.libraryInit(); + //the user might not have the library on the page (guest user) + if (AIRTIME.library !== undefined) { + AIRTIME.library.libraryInit(); + } + AIRTIME.showbuilder.builderDataTable(); setWidgetSize(); From 24861545ce1e24d744a80ab8b9fef6a566b332ef Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 24 Sep 2013 12:24:13 +0200 Subject: [PATCH 150/181] crlf fix --- .../controllers/ShowbuilderController.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/airtime_mvc/application/controllers/ShowbuilderController.php b/airtime_mvc/application/controllers/ShowbuilderController.php index c47f5486d..55b9ac9a9 100644 --- a/airtime_mvc/application/controllers/ShowbuilderController.php +++ b/airtime_mvc/application/controllers/ShowbuilderController.php @@ -126,23 +126,23 @@ class ShowbuilderController extends Zend_Controller_Action //only include library things on the page if the user can see it. if (!$disableLib) { $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $data = Application_Model_Preference::getCurrentLibraryTableSetting(); - if (!is_null($data)) { - $libraryTable = json_encode($data); - $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', JSON.stringify($libraryTable) );"); - } else { - $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', '' );"); + $data = Application_Model_Preference::getCurrentLibraryTableSetting(); + if (!is_null($data)) { + $libraryTable = json_encode($data); + $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', JSON.stringify($libraryTable) );"); + } else { + $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', '' );"); } - } - - $data = Application_Model_Preference::getTimelineDatatableSetting(); - if (!is_null($data)) { - $timelineTable = json_encode($data); - $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', JSON.stringify($timelineTable) );"); - } else { - $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', '' );"); + } + + $data = Application_Model_Preference::getTimelineDatatableSetting(); + if (!is_null($data)) { + $timelineTable = json_encode($data); + $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', JSON.stringify($timelineTable) );"); + } else { + $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', '' );"); } //populate date range form for show builder. From e47b44680427894a1e7a1ac5f3d8611f316c5e7e Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 24 Sep 2013 18:50:41 +0200 Subject: [PATCH 151/181] CC-5338 : Uncaught SyntaxError: audio resources unavailable for AudioContext construction creating a single global audio context to avoid resource problems. --- airtime_mvc/public/js/waveformplaylist/config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/waveformplaylist/config.js b/airtime_mvc/public/js/waveformplaylist/config.js index 9cc888371..292903ed2 100644 --- a/airtime_mvc/public/js/waveformplaylist/config.js +++ b/airtime_mvc/public/js/waveformplaylist/config.js @@ -3,6 +3,8 @@ A container object (ex a div) must be passed in, the playlist will be built on this element. */ +var waveformPlaylistAudio = waveformPlaylistAudio || new (window.AudioContext || window.webkitAudioContext); + var Config = function(params) { var that = this, @@ -10,7 +12,7 @@ var Config = function(params) { defaultParams = { - ac: new (window.AudioContext || window.webkitAudioContext), + ac: waveformPlaylistAudio, resolution: 4096, //resolution - samples per pixel to draw. timeFormat: 'hh:mm:ss.uuu', From 9e8fdb50cae79de630f5b0165dd1e294afc12720 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 24 Sep 2013 15:04:25 -0400 Subject: [PATCH 152/181] CC-5323: User's Timezone Can Improperly Edit Show --- .../controllers/ScheduleController.php | 21 +++++++++++++++ airtime_mvc/application/forms/AddShowWhen.php | 9 +++++++ .../application/models/airtime/CcShowDays.php | 9 ++++--- .../application/services/ShowFormService.php | 27 ++++++++++++++++++- .../views/scripts/form/add-show-when.phtml | 10 +++++++ airtime_mvc/public/css/styles.css | 4 +++ .../public/js/airtime/schedule/add-show.js | 24 +++++++++++++++++ 7 files changed, 99 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index e13547c88..0fc7a1f3a 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -35,6 +35,7 @@ class ScheduleController extends Zend_Controller_Action ->addActionContext('calculate-duration', 'json') ->addActionContext('get-current-show', 'json') ->addActionContext('update-future-is-scheduled', 'json') + ->addActionContext('localize-start-end-time', 'json') ->initContext(); $this->sched_sess = new Zend_Session_Namespace("schedule"); @@ -641,4 +642,24 @@ class ScheduleController extends Zend_Controller_Action $redrawLibTable = Application_Model_StoredFile::setIsScheduled($schedId, false); $this->_helper->json->sendJson(array("redrawLibTable" => $redrawLibTable)); } + + /** + * When the timezone is changed in add-show form this function + * applies the new timezone to the start and end time + */ + public function localizeStartEndTimeAction() + { + $service_showForm = new Application_Service_ShowFormService( + $this->_getParam("showId")); + $timezone = $this->_getParam('timezone'); + $localTime = array(); + + $localTime["start"] = $service_showForm->localizeDateTime( + $this->_getParam('startDate'), $this->_getParam('startTime'), $timezone); + + $localTime["end"] = $service_showForm->localizeDateTime( + $this->_getParam('endDate'), $this->_getParam('endTime'), $timezone); + + $this->_helper->json->sendJson($localTime); + } } diff --git a/airtime_mvc/application/forms/AddShowWhen.php b/airtime_mvc/application/forms/AddShowWhen.php index 007852ba4..9be8aa218 100644 --- a/airtime_mvc/application/forms/AddShowWhen.php +++ b/airtime_mvc/application/forms/AddShowWhen.php @@ -78,6 +78,15 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm 'decorators' => array('ViewHelper') )); + $timezone = new Zend_Form_Element_Select('add_show_timezone'); + $timezone->setRequired(true) + ->setLabel(_("Timezone:")) + ->setMultiOptions(Application_Common_Timezone::getTimezones()) + ->setValue(Application_Model_Preference::GetDefaultTimezone()) + ->setAttrib('class', 'input_select add_show_input_select') + ->setDecorators(array('ViewHelper')); + $this->addElement($timezone); + // Add repeats element $this->addElement('checkbox', 'add_show_repeats', array( 'label' => _('Repeats?'), diff --git a/airtime_mvc/application/models/airtime/CcShowDays.php b/airtime_mvc/application/models/airtime/CcShowDays.php index 7b08204a2..215ebdcf8 100644 --- a/airtime_mvc/application/models/airtime/CcShowDays.php +++ b/airtime_mvc/application/models/airtime/CcShowDays.php @@ -31,6 +31,7 @@ class CcShowDays extends BaseCcShowDays { return $dt; } + // Returns the start of a show in the timezone it was created in public function getLocalStartDateAndTime() { $dt = new DateTime( @@ -38,16 +39,16 @@ class CcShowDays extends BaseCcShowDays { new DateTimeZone($this->getDbTimezone()) ); - //make timezone current user specific - $dt->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); + //set timezone to that of the show + $dt->setTimezone(new DateTimeZone($this->getDbTimezone())); return $dt; } /** * - * Enter description here ... - * @param DateTime $startDateTime first show in user's local time + * Returns the end of a show in the timezone it was created in + * @param DateTime $startDateTime first show in show's local time */ public function getLocalEndDateAndTime($showStart) { diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index c651c8ebd..5c7c4c0c1 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -150,6 +150,7 @@ class Application_Service_ShowFormService 'add_show_end_date_no_repeat' => $showEnd->format("Y-m-d"), 'add_show_end_time' => $showEnd->format("H:i"), 'add_show_duration' => $ccShowDay->formatDuration(true), + 'add_show_timezone' => $ccShowDay->getDbTimezone(), 'add_show_repeats' => $ccShowDay->isRepeating() ? 1 : 0)); return $showStart; @@ -159,7 +160,10 @@ class Application_Service_ShowFormService { $ccShowInstance = CcShowInstancesQuery::create()->findPk($this->instanceId); - $timezone = new DateTimeZone(Application_Model_Preference::GetTimezone()); + //get timezone the show is created in + $timezone = $ccShowInstance->getCcShow()->getFirstCcShowDay()->getDbTimezone(); + //$timezone = new DateTimeZone(Application_Model_Preference::GetDefaultTimezone()); + //DateTime object in UTC $showStart = $ccShowInstance->getDbStarts(null); $showStart->setTimezone($timezone); @@ -180,6 +184,7 @@ class Application_Service_ShowFormService 'add_show_end_time' => $showEnd->format("H:i"), 'add_show_duration' => $this->calculateDuration( $showStart->format("Y-m-d H:i:s"), $showEnd->format("Y-m-d H:i:s")), + 'add_show_timezone' => $timezone, 'add_show_repeats' => 0)); $form->getElement('add_show_repeats')->setOptions(array("disabled" => true)); @@ -482,4 +487,24 @@ class Application_Service_ShowFormService return "Invalid Date"; } } + + /** + * + * Enter description here ... + * @param $date String + * @param $time String + * @param $timezone String + */ + public function localizeDateTime($date, $time, $timezone) + { + $dt = new DateTime($date." ".$time, new DateTimeZone( + $this->ccShow->getFirstCcShowDay()->getDbTimezone())); + + $dt->setTimeZone(new DateTimeZone($timezone)); + + return array( + "date" => $dt->format("Y-m-d"), + "time" => $dt->format("h:i") + ); + } } \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/form/add-show-when.phtml b/airtime_mvc/application/views/scripts/form/add-show-when.phtml index 3a4d3f99d..f0569ce28 100644 --- a/airtime_mvc/application/views/scripts/form/add-show-when.phtml +++ b/airtime_mvc/application/views/scripts/form/add-show-when.phtml @@ -55,6 +55,16 @@ + +
    + +
    +
    + element->getElement('add_show_timezone') ?> +
    +
    diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 2d9ac34b7..14d27f775 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -445,6 +445,10 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus, .input_t vertical-align: top; } +.add_show_input_select{ + width: 150px; +} + /***** LIBRARY QTIP METADATA SPECIFIC STYLES BEGIN *****/ table.library-track-md{ width: 280px; diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index fd2625559..d44e6f563 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -227,6 +227,30 @@ function setAddShowEvents() { } }); + form.find("#add_show_timezone").change(function(){ + var startDateField = form.find("#add_show_start_date"), + startTimeField = form.find("#add_show_start_time"), + endDateField = form.find("#add_show_end_date_no_repeat"), + endTimeField = form.find("#add_show_end_time"), + timezone = form.find("#add_show_timezone").val(), + showId = form.find("#add_show_id").val(); + + $.post(baseUrl+"Schedule/localize-start-end-time", + {format: "json", + startDate: startDateField.val(), + startTime: startTimeField.val(), + endDate: endDateField.val(), + endTime: endTimeField.val(), + timezone: timezone, + showId: showId}, function(json){ + + startDateField.val(json.start.date); + startTimeField.val(json.start.time); + endDateField.val(json.end.date); + endTimeField.val(json.end.time); + }); + }); + form.find("#add_show_repeat_type").change(function(){ toggleRepeatDays(); toggleMonthlyRepeatType(); From ad778ec971811a1da750a31e1c2f0f89d806cb66 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 24 Sep 2013 16:23:45 -0400 Subject: [PATCH 153/181] CC-5323: User's Timezone Can Improperly Edit Show --- .../application/controllers/ScheduleController.php | 10 +++++----- .../application/services/ShowFormService.php | 9 ++++----- airtime_mvc/application/services/ShowService.php | 2 +- airtime_mvc/public/js/airtime/schedule/add-show.js | 13 +++++++++---- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 0fc7a1f3a..87f142d4f 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -649,16 +649,16 @@ class ScheduleController extends Zend_Controller_Action */ public function localizeStartEndTimeAction() { - $service_showForm = new Application_Service_ShowFormService( - $this->_getParam("showId")); - $timezone = $this->_getParam('timezone'); + $service_showForm = new Application_Service_ShowFormService(); + $newTimezone = $this->_getParam('newTimezone'); + $oldTimezone = $this->_getParam('oldTimezone'); $localTime = array(); $localTime["start"] = $service_showForm->localizeDateTime( - $this->_getParam('startDate'), $this->_getParam('startTime'), $timezone); + $this->_getParam('startDate'), $this->_getParam('startTime'), $newTimezone, $oldTimezone); $localTime["end"] = $service_showForm->localizeDateTime( - $this->_getParam('endDate'), $this->_getParam('endTime'), $timezone); + $this->_getParam('endDate'), $this->_getParam('endTime'), $newTimezone, $oldTimezone); $this->_helper->json->sendJson($localTime); } diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index 5c7c4c0c1..4e8d49f44 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -495,16 +495,15 @@ class Application_Service_ShowFormService * @param $time String * @param $timezone String */ - public function localizeDateTime($date, $time, $timezone) + public function localizeDateTime($date, $time, $newTimezone, $oldTimezone) { - $dt = new DateTime($date." ".$time, new DateTimeZone( - $this->ccShow->getFirstCcShowDay()->getDbTimezone())); + $dt = new DateTime($date." ".$time, new DateTimeZone($oldTimezone)); - $dt->setTimeZone(new DateTimeZone($timezone)); + $dt->setTimeZone(new DateTimeZone($newTimezone)); return array( "date" => $dt->format("Y-m-d"), - "time" => $dt->format("h:i") + "time" => $dt->format("H:i") ); } } \ No newline at end of file diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 6bb492f1a..6576d4f7e 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -1330,7 +1330,7 @@ SQL; $showDay->setDbFirstShow($startDateTime->format("Y-m-d")); $showDay->setDbLastShow($endDate); $showDay->setDbStartTime($startDateTime->format("H:i:s")); - $showDay->setDbTimezone(Application_Model_Preference::GetTimezone()); + $showDay->setDbTimezone($showData['add_show_timezone']); $showDay->setDbDuration($showData['add_show_duration']); $showDay->setDbRepeatType($this->repeatType); $showDay->setDbShowId($showId); diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index d44e6f563..088601e8e 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -227,13 +227,18 @@ function setAddShowEvents() { } }); + // in case user is creating a new show, there will be + // no show_id so we have to store the default timezone + // to be able to do the conversion when the timezone + // setting changes + var currentTimezone = form.find("#add_show_timezone").val(); + form.find("#add_show_timezone").change(function(){ var startDateField = form.find("#add_show_start_date"), startTimeField = form.find("#add_show_start_time"), endDateField = form.find("#add_show_end_date_no_repeat"), endTimeField = form.find("#add_show_end_time"), - timezone = form.find("#add_show_timezone").val(), - showId = form.find("#add_show_id").val(); + newTimezone = form.find("#add_show_timezone").val(); $.post(baseUrl+"Schedule/localize-start-end-time", {format: "json", @@ -241,8 +246,8 @@ function setAddShowEvents() { startTime: startTimeField.val(), endDate: endDateField.val(), endTime: endTimeField.val(), - timezone: timezone, - showId: showId}, function(json){ + newTimezone: newTimezone, + oldTimezone: currentTimezone}, function(json){ startDateField.val(json.start.date); startTimeField.val(json.start.time); From 58ad52f93fb8bc1eed04815c4a44c38386b49b01 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 12 Sep 2013 16:14:55 +0100 Subject: [PATCH 154/181] CC-5328 Fix virtualenv version check for newer distros --- python_apps/python-virtualenv/virtualenv-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python_apps/python-virtualenv/virtualenv-install.sh b/python_apps/python-virtualenv/virtualenv-install.sh index 30991faab..8d2764786 100755 --- a/python_apps/python-virtualenv/virtualenv-install.sh +++ b/python_apps/python-virtualenv/virtualenv-install.sh @@ -14,12 +14,11 @@ fi #Check whether version of virtualenv is <= 1.4.8. If so exit install. BAD_VERSION="1.4.8" VERSION=$(virtualenv --version) -NEWEST_VERSION=$(echo -e "$BAD_VERSION\n$VERSION\n'" | sort -t '.' -g | tail -n 1) +NEWEST_VERSION=$(echo -e "$BAD_VERSION\n$VERSION\n" | sort -t '.' -V | tail -n 1) echo -n "Ensuring python-virtualenv version > $BAD_VERSION..." if [[ "$NEWEST_VERSION" = "$BAD_VERSION" ]]; then - URL="http://apt.sourcefabric.org/pool/main/p/python-virtualenv/python-virtualenv_1.4.9-3_all.deb" echo "Failed!" - echo "You have version $BAD_VERSION or older installed. Please install package at $URL first and then try installing Airtime again." + echo "You have version $BAD_VERSION or older installed. Please upgrade python-virtualenv and install Airtime again." exit 1 else echo "Success!" From 8dc100126a4caa05d3bfb71b0e8e2bd95e7ee36c Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 25 Sep 2013 17:36:50 +0100 Subject: [PATCH 155/181] Alert icon for missing file in Now Playing should be orange, to match Media Builder --- airtime_mvc/public/css/redmond/jquery-ui-1.8.8.custom.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airtime_mvc/public/css/redmond/jquery-ui-1.8.8.custom.css b/airtime_mvc/public/css/redmond/jquery-ui-1.8.8.custom.css index 3ac07ab95..a5dc00619 100644 --- a/airtime_mvc/public/css/redmond/jquery-ui-1.8.8.custom.css +++ b/airtime_mvc/public/css/redmond/jquery-ui-1.8.8.custom.css @@ -214,6 +214,9 @@ .ui-widget-content .ui-icon { background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-widget-content .ui-icon-alert { + background-image: url(images/ui-icons_ff5d1a_256x240.png); +} .ui-widget-header .ui-icon { background-image: url(images/ui-icons_ffffff_256x240.png); } From 002a80ee6c4d8e9a53ddc4a4db055d2d42c02163 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 14:32:16 -0400 Subject: [PATCH 156/181] CC-5323: User's Timezone Can Improperly Edit Show -made localizeDate a static function in ShowFormService --- .../application/controllers/ScheduleController.php | 9 ++------- airtime_mvc/application/services/ShowFormService.php | 7 ++++--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 87f142d4f..d8d5d6d30 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -643,21 +643,16 @@ class ScheduleController extends Zend_Controller_Action $this->_helper->json->sendJson(array("redrawLibTable" => $redrawLibTable)); } - /** - * When the timezone is changed in add-show form this function - * applies the new timezone to the start and end time - */ public function localizeStartEndTimeAction() { - $service_showForm = new Application_Service_ShowFormService(); $newTimezone = $this->_getParam('newTimezone'); $oldTimezone = $this->_getParam('oldTimezone'); $localTime = array(); - $localTime["start"] = $service_showForm->localizeDateTime( + $localTime["start"] = Application_Service_ShowFormService::localizeDateTime( $this->_getParam('startDate'), $this->_getParam('startTime'), $newTimezone, $oldTimezone); - $localTime["end"] = $service_showForm->localizeDateTime( + $localTime["end"] = Application_Service_ShowFormService::localizeDateTime( $this->_getParam('endDate'), $this->_getParam('endTime'), $newTimezone, $oldTimezone); $this->_helper->json->sendJson($localTime); diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index 4e8d49f44..2ef3b3c3d 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -489,13 +489,14 @@ class Application_Service_ShowFormService } /** - * - * Enter description here ... + * When the timezone is changed in add-show form this function + * applies the new timezone to the start and end time + * * @param $date String * @param $time String * @param $timezone String */ - public function localizeDateTime($date, $time, $newTimezone, $oldTimezone) + public static function localizeDateTime($date, $time, $newTimezone, $oldTimezone) { $dt = new DateTime($date." ".$time, new DateTimeZone($oldTimezone)); From 2666e97b7e161c53360e9e6a0e59eae3dc0072cf Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 14:33:43 -0400 Subject: [PATCH 157/181] CC-5323: User's Timezone Can Improperly Edit Show -added comments to timezone getters and setters in Prefences model to reduce confusion on station timezone and user timezone --- airtime_mvc/application/models/Preference.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 9edf53755..1097a3d29 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -505,12 +505,14 @@ class Application_Model_Preference return self::getValue("description"); } + // Sets station default timezone (from preferences) public static function SetDefaultTimezone($timezone) { self::setValue("timezone", $timezone); date_default_timezone_set($timezone); } + // Returns station default timezone (from preferences) public static function GetDefaultTimezone() { return self::getValue("timezone"); @@ -536,6 +538,7 @@ class Application_Model_Preference } } + // Always attempts to returns the current user's personal timezone setting public static function GetTimezone() { $auth = Zend_Auth::getInstance(); From 3439611ef33d82aa1a1583c93842ef81d81605f0 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 14:40:09 -0400 Subject: [PATCH 158/181] CC-5323: User's Timezone Can Improperly Edit Show -overlapping show check was using the user's local timezone to compare new shows instead of the show's timezone --- airtime_mvc/application/forms/AddShowWhen.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/forms/AddShowWhen.php b/airtime_mvc/application/forms/AddShowWhen.php index 9be8aa218..3ca08b99e 100644 --- a/airtime_mvc/application/forms/AddShowWhen.php +++ b/airtime_mvc/application/forms/AddShowWhen.php @@ -167,7 +167,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm */ if ($valid) { $utc = new DateTimeZone('UTC'); - $localTimezone = new DateTimeZone(Application_Model_Preference::GetTimezone()); + $showTimezone = new DateTimeZone($formData["add_show_timezone"]); $show_start = new DateTime($start_time); $show_start->setTimezone($utc); $show_end = new DateTime($end_time); @@ -233,8 +233,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm * adding the interval for the next repeating show */ - $repeatShowStart->setTimezone($localTimezone); - $repeatShowEnd->setTimezone($localTimezone); + $repeatShowStart->setTimezone($showTimezone); + $repeatShowEnd->setTimezone($showTimezone); $repeatShowStart->add(new DateInterval("P".$daysAdd."D")); $repeatShowEnd->add(new DateInterval("P".$daysAdd."D")); //set back to UTC @@ -273,8 +273,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm $this->getElement('add_show_duration')->setErrors(array(_('Cannot schedule overlapping shows'))); break 1; } else { - $repeatShowStart->setTimezone($localTimezone); - $repeatShowEnd->setTimezone($localTimezone); + $repeatShowStart->setTimezone($showTimezone); + $repeatShowEnd->setTimezone($showTimezone); $repeatShowStart->add(new DateInterval($interval)); $repeatShowEnd->add(new DateInterval($interval)); $repeatShowStart->setTimezone($utc); @@ -337,7 +337,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm * show start back to local time */ $rebroadcastShowStart->setTimezone(new DateTimeZone( - Application_Model_Preference::GetTimezone())); + $formData["add_show_timezone"])); $rebroadcastWhenDays = explode(" ", $formData["add_show_rebroadcast_date_".$i]); $rebroadcastWhenTime = explode(":", $formData["add_show_rebroadcast_time_".$i]); $rebroadcastShowStart->add(new DateInterval("P".$rebroadcastWhenDays[0]."D")); From 7fa3fe9a4900a02005e4a344d52a1160588b4fe0 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 14:44:08 -0400 Subject: [PATCH 159/181] CC-5323: User's Timezone Can Improperly Edit Show - fixed to use show's timezone instead of user's timezone when updating a show's start and end time after a show has been edited --- airtime_mvc/application/services/ShowService.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 6576d4f7e..6018cb5b5 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -740,10 +740,10 @@ SQL; //CcShowDay object $currentShowDay = $this->ccShow->getFirstCcShowDay(); - //DateTime in user's local time + //DateTime in show's local time $newStartDateTime = new DateTime($showData["add_show_start_date"]." ". $showData["add_show_start_time"], - new DateTimeZone(Application_Model_Preference::GetTimezone())); + new DateTimeZone($showData["add_show_timezone"])); $diff = $this->calculateShowStartDiff($newStartDateTime, $currentShowDay->getLocalStartDateAndTime()); @@ -1152,6 +1152,7 @@ SQL; do { $nextDT = date_create($weekNumberOfMonth." ".$dayOfWeek. " of ".$tempDT->format("F")." ".$tempDT->format("Y")); + $nextDT->setTimezone(new DateTimeZone($timezone)); /* We have to check if the next date is in the same month in case * the repeat day is in the fifth week of the month. @@ -1356,7 +1357,7 @@ SQL; $showDay->setDbFirstShow($startDateTimeClone->format("Y-m-d")); $showDay->setDbLastShow($endDate); $showDay->setDbStartTime($startDateTimeClone->format("H:i")); - $showDay->setDbTimezone(Application_Model_Preference::GetTimezone()); + $showDay->setDbTimezone($showData['add_show_timezone']); $showDay->setDbDuration($showData['add_show_duration']); $showDay->setDbDay($day); $showDay->setDbRepeatType($this->repeatType); @@ -1481,12 +1482,13 @@ SQL; private function createUTCStartEndDateTime($showStart, $duration, $offset=null) { $startDateTime = clone $showStart; + $timezone = $startDateTime->getTimezone(); if (isset($offset)) { //$offset["hours"] and $offset["mins"] represents the start time //of a rebroadcast show $startDateTime = new DateTime($startDateTime->format("Y-m-d")." ". - $offset["hours"].":".$offset["mins"]); + $offset["hours"].":".$offset["mins"], $timezone); $startDateTime->add(new DateInterval("P{$offset["days"]}D")); } //convert time to UTC From 2ab5e6b26a73e1149e58d74067ce72cd355156e1 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 16:17:20 -0400 Subject: [PATCH 160/181] CC-5344: Edit Recorded Show -> Rebroadcasts get deleted When editing a show the record option was getting posted with a false value even if the value was true. This was caused because on show-edit action the record form field is disabled --- airtime_mvc/public/js/airtime/schedule/add-show.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index fd2625559..7921dfd9a 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -481,6 +481,13 @@ function setAddShowEvents() { event.preventDefault(); + //when editing a show, the record option is disabled + //we have to enable it to get the correct value when + //we call serializeArray() + if (form.find("#add_show_record").attr("disabled", true)) { + form.find("#add_show_record").attr("disabled", false); + } + var data = $("form").serializeArray(); var hosts = $('#add_show_hosts-element input').map(function() { @@ -504,7 +511,7 @@ function setAddShowEvents() { }); var action = baseUrl+"Schedule/"+String(addShowButton.attr("data-action")); - + $.post(action, {format: "json", data: data, hosts: hosts, days: days}, function(json){ //addShowButton.removeClass("disabled"); $('#schedule-add-show').unblock(); From 107263ae2048a8ceca9debadb083461bf861f55f Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 24 Sep 2013 15:04:25 -0400 Subject: [PATCH 161/181] CC-5323: User's Timezone Can Improperly Edit Show --- .../controllers/ScheduleController.php | 21 +++++++++++++++ airtime_mvc/application/forms/AddShowWhen.php | 9 +++++++ .../application/models/airtime/CcShowDays.php | 9 ++++--- .../application/services/ShowFormService.php | 27 ++++++++++++++++++- .../views/scripts/form/add-show-when.phtml | 10 +++++++ airtime_mvc/public/css/styles.css | 4 +++ .../public/js/airtime/schedule/add-show.js | 24 +++++++++++++++++ 7 files changed, 99 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index e13547c88..0fc7a1f3a 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -35,6 +35,7 @@ class ScheduleController extends Zend_Controller_Action ->addActionContext('calculate-duration', 'json') ->addActionContext('get-current-show', 'json') ->addActionContext('update-future-is-scheduled', 'json') + ->addActionContext('localize-start-end-time', 'json') ->initContext(); $this->sched_sess = new Zend_Session_Namespace("schedule"); @@ -641,4 +642,24 @@ class ScheduleController extends Zend_Controller_Action $redrawLibTable = Application_Model_StoredFile::setIsScheduled($schedId, false); $this->_helper->json->sendJson(array("redrawLibTable" => $redrawLibTable)); } + + /** + * When the timezone is changed in add-show form this function + * applies the new timezone to the start and end time + */ + public function localizeStartEndTimeAction() + { + $service_showForm = new Application_Service_ShowFormService( + $this->_getParam("showId")); + $timezone = $this->_getParam('timezone'); + $localTime = array(); + + $localTime["start"] = $service_showForm->localizeDateTime( + $this->_getParam('startDate'), $this->_getParam('startTime'), $timezone); + + $localTime["end"] = $service_showForm->localizeDateTime( + $this->_getParam('endDate'), $this->_getParam('endTime'), $timezone); + + $this->_helper->json->sendJson($localTime); + } } diff --git a/airtime_mvc/application/forms/AddShowWhen.php b/airtime_mvc/application/forms/AddShowWhen.php index 007852ba4..9be8aa218 100644 --- a/airtime_mvc/application/forms/AddShowWhen.php +++ b/airtime_mvc/application/forms/AddShowWhen.php @@ -78,6 +78,15 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm 'decorators' => array('ViewHelper') )); + $timezone = new Zend_Form_Element_Select('add_show_timezone'); + $timezone->setRequired(true) + ->setLabel(_("Timezone:")) + ->setMultiOptions(Application_Common_Timezone::getTimezones()) + ->setValue(Application_Model_Preference::GetDefaultTimezone()) + ->setAttrib('class', 'input_select add_show_input_select') + ->setDecorators(array('ViewHelper')); + $this->addElement($timezone); + // Add repeats element $this->addElement('checkbox', 'add_show_repeats', array( 'label' => _('Repeats?'), diff --git a/airtime_mvc/application/models/airtime/CcShowDays.php b/airtime_mvc/application/models/airtime/CcShowDays.php index 7b08204a2..215ebdcf8 100644 --- a/airtime_mvc/application/models/airtime/CcShowDays.php +++ b/airtime_mvc/application/models/airtime/CcShowDays.php @@ -31,6 +31,7 @@ class CcShowDays extends BaseCcShowDays { return $dt; } + // Returns the start of a show in the timezone it was created in public function getLocalStartDateAndTime() { $dt = new DateTime( @@ -38,16 +39,16 @@ class CcShowDays extends BaseCcShowDays { new DateTimeZone($this->getDbTimezone()) ); - //make timezone current user specific - $dt->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); + //set timezone to that of the show + $dt->setTimezone(new DateTimeZone($this->getDbTimezone())); return $dt; } /** * - * Enter description here ... - * @param DateTime $startDateTime first show in user's local time + * Returns the end of a show in the timezone it was created in + * @param DateTime $startDateTime first show in show's local time */ public function getLocalEndDateAndTime($showStart) { diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index c651c8ebd..5c7c4c0c1 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -150,6 +150,7 @@ class Application_Service_ShowFormService 'add_show_end_date_no_repeat' => $showEnd->format("Y-m-d"), 'add_show_end_time' => $showEnd->format("H:i"), 'add_show_duration' => $ccShowDay->formatDuration(true), + 'add_show_timezone' => $ccShowDay->getDbTimezone(), 'add_show_repeats' => $ccShowDay->isRepeating() ? 1 : 0)); return $showStart; @@ -159,7 +160,10 @@ class Application_Service_ShowFormService { $ccShowInstance = CcShowInstancesQuery::create()->findPk($this->instanceId); - $timezone = new DateTimeZone(Application_Model_Preference::GetTimezone()); + //get timezone the show is created in + $timezone = $ccShowInstance->getCcShow()->getFirstCcShowDay()->getDbTimezone(); + //$timezone = new DateTimeZone(Application_Model_Preference::GetDefaultTimezone()); + //DateTime object in UTC $showStart = $ccShowInstance->getDbStarts(null); $showStart->setTimezone($timezone); @@ -180,6 +184,7 @@ class Application_Service_ShowFormService 'add_show_end_time' => $showEnd->format("H:i"), 'add_show_duration' => $this->calculateDuration( $showStart->format("Y-m-d H:i:s"), $showEnd->format("Y-m-d H:i:s")), + 'add_show_timezone' => $timezone, 'add_show_repeats' => 0)); $form->getElement('add_show_repeats')->setOptions(array("disabled" => true)); @@ -482,4 +487,24 @@ class Application_Service_ShowFormService return "Invalid Date"; } } + + /** + * + * Enter description here ... + * @param $date String + * @param $time String + * @param $timezone String + */ + public function localizeDateTime($date, $time, $timezone) + { + $dt = new DateTime($date." ".$time, new DateTimeZone( + $this->ccShow->getFirstCcShowDay()->getDbTimezone())); + + $dt->setTimeZone(new DateTimeZone($timezone)); + + return array( + "date" => $dt->format("Y-m-d"), + "time" => $dt->format("h:i") + ); + } } \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/form/add-show-when.phtml b/airtime_mvc/application/views/scripts/form/add-show-when.phtml index 3a4d3f99d..f0569ce28 100644 --- a/airtime_mvc/application/views/scripts/form/add-show-when.phtml +++ b/airtime_mvc/application/views/scripts/form/add-show-when.phtml @@ -55,6 +55,16 @@ + +
    + +
    +
    + element->getElement('add_show_timezone') ?> +
    +
    diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 2d9ac34b7..14d27f775 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -445,6 +445,10 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus, .input_t vertical-align: top; } +.add_show_input_select{ + width: 150px; +} + /***** LIBRARY QTIP METADATA SPECIFIC STYLES BEGIN *****/ table.library-track-md{ width: 280px; diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index 7921dfd9a..754b6da16 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -227,6 +227,30 @@ function setAddShowEvents() { } }); + form.find("#add_show_timezone").change(function(){ + var startDateField = form.find("#add_show_start_date"), + startTimeField = form.find("#add_show_start_time"), + endDateField = form.find("#add_show_end_date_no_repeat"), + endTimeField = form.find("#add_show_end_time"), + timezone = form.find("#add_show_timezone").val(), + showId = form.find("#add_show_id").val(); + + $.post(baseUrl+"Schedule/localize-start-end-time", + {format: "json", + startDate: startDateField.val(), + startTime: startTimeField.val(), + endDate: endDateField.val(), + endTime: endTimeField.val(), + timezone: timezone, + showId: showId}, function(json){ + + startDateField.val(json.start.date); + startTimeField.val(json.start.time); + endDateField.val(json.end.date); + endTimeField.val(json.end.time); + }); + }); + form.find("#add_show_repeat_type").change(function(){ toggleRepeatDays(); toggleMonthlyRepeatType(); From 8ddb2974f17d0a362f2eef47fb03aab316f65759 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 24 Sep 2013 16:23:45 -0400 Subject: [PATCH 162/181] CC-5323: User's Timezone Can Improperly Edit Show --- .../application/controllers/ScheduleController.php | 10 +++++----- .../application/services/ShowFormService.php | 9 ++++----- airtime_mvc/application/services/ShowService.php | 2 +- airtime_mvc/public/js/airtime/schedule/add-show.js | 13 +++++++++---- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 0fc7a1f3a..87f142d4f 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -649,16 +649,16 @@ class ScheduleController extends Zend_Controller_Action */ public function localizeStartEndTimeAction() { - $service_showForm = new Application_Service_ShowFormService( - $this->_getParam("showId")); - $timezone = $this->_getParam('timezone'); + $service_showForm = new Application_Service_ShowFormService(); + $newTimezone = $this->_getParam('newTimezone'); + $oldTimezone = $this->_getParam('oldTimezone'); $localTime = array(); $localTime["start"] = $service_showForm->localizeDateTime( - $this->_getParam('startDate'), $this->_getParam('startTime'), $timezone); + $this->_getParam('startDate'), $this->_getParam('startTime'), $newTimezone, $oldTimezone); $localTime["end"] = $service_showForm->localizeDateTime( - $this->_getParam('endDate'), $this->_getParam('endTime'), $timezone); + $this->_getParam('endDate'), $this->_getParam('endTime'), $newTimezone, $oldTimezone); $this->_helper->json->sendJson($localTime); } diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index 5c7c4c0c1..4e8d49f44 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -495,16 +495,15 @@ class Application_Service_ShowFormService * @param $time String * @param $timezone String */ - public function localizeDateTime($date, $time, $timezone) + public function localizeDateTime($date, $time, $newTimezone, $oldTimezone) { - $dt = new DateTime($date." ".$time, new DateTimeZone( - $this->ccShow->getFirstCcShowDay()->getDbTimezone())); + $dt = new DateTime($date." ".$time, new DateTimeZone($oldTimezone)); - $dt->setTimeZone(new DateTimeZone($timezone)); + $dt->setTimeZone(new DateTimeZone($newTimezone)); return array( "date" => $dt->format("Y-m-d"), - "time" => $dt->format("h:i") + "time" => $dt->format("H:i") ); } } \ No newline at end of file diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 6bb492f1a..6576d4f7e 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -1330,7 +1330,7 @@ SQL; $showDay->setDbFirstShow($startDateTime->format("Y-m-d")); $showDay->setDbLastShow($endDate); $showDay->setDbStartTime($startDateTime->format("H:i:s")); - $showDay->setDbTimezone(Application_Model_Preference::GetTimezone()); + $showDay->setDbTimezone($showData['add_show_timezone']); $showDay->setDbDuration($showData['add_show_duration']); $showDay->setDbRepeatType($this->repeatType); $showDay->setDbShowId($showId); diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index 754b6da16..8d4fe48d1 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -227,13 +227,18 @@ function setAddShowEvents() { } }); + // in case user is creating a new show, there will be + // no show_id so we have to store the default timezone + // to be able to do the conversion when the timezone + // setting changes + var currentTimezone = form.find("#add_show_timezone").val(); + form.find("#add_show_timezone").change(function(){ var startDateField = form.find("#add_show_start_date"), startTimeField = form.find("#add_show_start_time"), endDateField = form.find("#add_show_end_date_no_repeat"), endTimeField = form.find("#add_show_end_time"), - timezone = form.find("#add_show_timezone").val(), - showId = form.find("#add_show_id").val(); + newTimezone = form.find("#add_show_timezone").val(); $.post(baseUrl+"Schedule/localize-start-end-time", {format: "json", @@ -241,8 +246,8 @@ function setAddShowEvents() { startTime: startTimeField.val(), endDate: endDateField.val(), endTime: endTimeField.val(), - timezone: timezone, - showId: showId}, function(json){ + newTimezone: newTimezone, + oldTimezone: currentTimezone}, function(json){ startDateField.val(json.start.date); startTimeField.val(json.start.time); From 6aa6d576cd04a45ab9968ec375700ac189517f5a Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 14:32:16 -0400 Subject: [PATCH 163/181] CC-5323: User's Timezone Can Improperly Edit Show -made localizeDate a static function in ShowFormService --- .../application/controllers/ScheduleController.php | 9 ++------- airtime_mvc/application/services/ShowFormService.php | 7 ++++--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 87f142d4f..d8d5d6d30 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -643,21 +643,16 @@ class ScheduleController extends Zend_Controller_Action $this->_helper->json->sendJson(array("redrawLibTable" => $redrawLibTable)); } - /** - * When the timezone is changed in add-show form this function - * applies the new timezone to the start and end time - */ public function localizeStartEndTimeAction() { - $service_showForm = new Application_Service_ShowFormService(); $newTimezone = $this->_getParam('newTimezone'); $oldTimezone = $this->_getParam('oldTimezone'); $localTime = array(); - $localTime["start"] = $service_showForm->localizeDateTime( + $localTime["start"] = Application_Service_ShowFormService::localizeDateTime( $this->_getParam('startDate'), $this->_getParam('startTime'), $newTimezone, $oldTimezone); - $localTime["end"] = $service_showForm->localizeDateTime( + $localTime["end"] = Application_Service_ShowFormService::localizeDateTime( $this->_getParam('endDate'), $this->_getParam('endTime'), $newTimezone, $oldTimezone); $this->_helper->json->sendJson($localTime); diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index 4e8d49f44..2ef3b3c3d 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -489,13 +489,14 @@ class Application_Service_ShowFormService } /** - * - * Enter description here ... + * When the timezone is changed in add-show form this function + * applies the new timezone to the start and end time + * * @param $date String * @param $time String * @param $timezone String */ - public function localizeDateTime($date, $time, $newTimezone, $oldTimezone) + public static function localizeDateTime($date, $time, $newTimezone, $oldTimezone) { $dt = new DateTime($date." ".$time, new DateTimeZone($oldTimezone)); From af035025923a449c34ed085fcd66952c17bb0ec8 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 14:33:43 -0400 Subject: [PATCH 164/181] CC-5323: User's Timezone Can Improperly Edit Show -added comments to timezone getters and setters in Prefences model to reduce confusion on station timezone and user timezone --- airtime_mvc/application/models/Preference.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 9edf53755..1097a3d29 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -505,12 +505,14 @@ class Application_Model_Preference return self::getValue("description"); } + // Sets station default timezone (from preferences) public static function SetDefaultTimezone($timezone) { self::setValue("timezone", $timezone); date_default_timezone_set($timezone); } + // Returns station default timezone (from preferences) public static function GetDefaultTimezone() { return self::getValue("timezone"); @@ -536,6 +538,7 @@ class Application_Model_Preference } } + // Always attempts to returns the current user's personal timezone setting public static function GetTimezone() { $auth = Zend_Auth::getInstance(); From 21143835193d9a8656990af24a3eb0ad931dcd32 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 14:40:09 -0400 Subject: [PATCH 165/181] CC-5323: User's Timezone Can Improperly Edit Show -overlapping show check was using the user's local timezone to compare new shows instead of the show's timezone --- airtime_mvc/application/forms/AddShowWhen.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/forms/AddShowWhen.php b/airtime_mvc/application/forms/AddShowWhen.php index 9be8aa218..3ca08b99e 100644 --- a/airtime_mvc/application/forms/AddShowWhen.php +++ b/airtime_mvc/application/forms/AddShowWhen.php @@ -167,7 +167,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm */ if ($valid) { $utc = new DateTimeZone('UTC'); - $localTimezone = new DateTimeZone(Application_Model_Preference::GetTimezone()); + $showTimezone = new DateTimeZone($formData["add_show_timezone"]); $show_start = new DateTime($start_time); $show_start->setTimezone($utc); $show_end = new DateTime($end_time); @@ -233,8 +233,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm * adding the interval for the next repeating show */ - $repeatShowStart->setTimezone($localTimezone); - $repeatShowEnd->setTimezone($localTimezone); + $repeatShowStart->setTimezone($showTimezone); + $repeatShowEnd->setTimezone($showTimezone); $repeatShowStart->add(new DateInterval("P".$daysAdd."D")); $repeatShowEnd->add(new DateInterval("P".$daysAdd."D")); //set back to UTC @@ -273,8 +273,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm $this->getElement('add_show_duration')->setErrors(array(_('Cannot schedule overlapping shows'))); break 1; } else { - $repeatShowStart->setTimezone($localTimezone); - $repeatShowEnd->setTimezone($localTimezone); + $repeatShowStart->setTimezone($showTimezone); + $repeatShowEnd->setTimezone($showTimezone); $repeatShowStart->add(new DateInterval($interval)); $repeatShowEnd->add(new DateInterval($interval)); $repeatShowStart->setTimezone($utc); @@ -337,7 +337,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm * show start back to local time */ $rebroadcastShowStart->setTimezone(new DateTimeZone( - Application_Model_Preference::GetTimezone())); + $formData["add_show_timezone"])); $rebroadcastWhenDays = explode(" ", $formData["add_show_rebroadcast_date_".$i]); $rebroadcastWhenTime = explode(":", $formData["add_show_rebroadcast_time_".$i]); $rebroadcastShowStart->add(new DateInterval("P".$rebroadcastWhenDays[0]."D")); From e8dc1c57290dce4e874feee34b835a5091044f30 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 14:44:08 -0400 Subject: [PATCH 166/181] CC-5323: User's Timezone Can Improperly Edit Show - fixed to use show's timezone instead of user's timezone when updating a show's start and end time after a show has been edited --- airtime_mvc/application/services/ShowService.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 6576d4f7e..6018cb5b5 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -740,10 +740,10 @@ SQL; //CcShowDay object $currentShowDay = $this->ccShow->getFirstCcShowDay(); - //DateTime in user's local time + //DateTime in show's local time $newStartDateTime = new DateTime($showData["add_show_start_date"]." ". $showData["add_show_start_time"], - new DateTimeZone(Application_Model_Preference::GetTimezone())); + new DateTimeZone($showData["add_show_timezone"])); $diff = $this->calculateShowStartDiff($newStartDateTime, $currentShowDay->getLocalStartDateAndTime()); @@ -1152,6 +1152,7 @@ SQL; do { $nextDT = date_create($weekNumberOfMonth." ".$dayOfWeek. " of ".$tempDT->format("F")." ".$tempDT->format("Y")); + $nextDT->setTimezone(new DateTimeZone($timezone)); /* We have to check if the next date is in the same month in case * the repeat day is in the fifth week of the month. @@ -1356,7 +1357,7 @@ SQL; $showDay->setDbFirstShow($startDateTimeClone->format("Y-m-d")); $showDay->setDbLastShow($endDate); $showDay->setDbStartTime($startDateTimeClone->format("H:i")); - $showDay->setDbTimezone(Application_Model_Preference::GetTimezone()); + $showDay->setDbTimezone($showData['add_show_timezone']); $showDay->setDbDuration($showData['add_show_duration']); $showDay->setDbDay($day); $showDay->setDbRepeatType($this->repeatType); @@ -1481,12 +1482,13 @@ SQL; private function createUTCStartEndDateTime($showStart, $duration, $offset=null) { $startDateTime = clone $showStart; + $timezone = $startDateTime->getTimezone(); if (isset($offset)) { //$offset["hours"] and $offset["mins"] represents the start time //of a rebroadcast show $startDateTime = new DateTime($startDateTime->format("Y-m-d")." ". - $offset["hours"].":".$offset["mins"]); + $offset["hours"].":".$offset["mins"], $timezone); $startDateTime->add(new DateInterval("P{$offset["days"]}D")); } //convert time to UTC From 99669c78a0bed4cf51d94298fb2e092fd65db68b Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Wed, 25 Sep 2013 16:40:20 -0400 Subject: [PATCH 167/181] Fixed CC-5045 and Now Playing time remaining style improvements --- .../application/views/scripts/partialviews/header.phtml | 4 ++-- airtime_mvc/public/css/styles.css | 7 ++++++- airtime_mvc/public/js/airtime/dashboard/dashboard.js | 2 +- airtime_mvc/public/js/airtime/dashboard/helperfunctions.js | 5 +---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/views/scripts/partialviews/header.phtml b/airtime_mvc/application/views/scripts/partialviews/header.phtml index 0432dcee9..29931f8f8 100644 --- a/airtime_mvc/application/views/scripts/partialviews/header.phtml +++ b/airtime_mvc/application/views/scripts/partialviews/header.phtml @@ -2,8 +2,8 @@
    -
    -
    +
    +
    diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 2d9ac34b7..a209b1e59 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -246,7 +246,7 @@ select { margin-bottom:3px; } .time-elapsed { - color:#9b9b9b; + color:#c4c4c4; padding-right:6px; } .time-remaining { @@ -274,6 +274,11 @@ select { padding-left:6px; } +.now-playing-info .song-length { + color:#9b9b9b; + padding-right:6px; +} + .on-air-block { padding:0 12px 0 0; background:url(images/masterpanel_spacer.png) no-repeat right 0; diff --git a/airtime_mvc/public/js/airtime/dashboard/dashboard.js b/airtime_mvc/public/js/airtime/dashboard/dashboard.js index 80a9521d5..e4ffc1faf 100644 --- a/airtime_mvc/public/js/airtime/dashboard/dashboard.js +++ b/airtime_mvc/public/js/airtime/dashboard/dashboard.js @@ -172,7 +172,7 @@ function updatePlaybar(){ $('#time-elapsed').text(convertToHHMMSS(approximateServerTime - songStartRoughly)); $('#time-remaining').text(convertToHHMMSS(songEndRoughly - approximateServerTime)); - $('#song-length').text(convertToHHMMSSmm(currentSong.songLengthMs)); + $('#song-length').text(convertToHHMMSS(currentSong.songLengthMs)); } /* Column 1 update */ $('#playlist').text($.i18n._("Current Show:")); diff --git a/airtime_mvc/public/js/airtime/dashboard/helperfunctions.js b/airtime_mvc/public/js/airtime/dashboard/helperfunctions.js index 87a50796f..bccef632b 100644 --- a/airtime_mvc/public/js/airtime/dashboard/helperfunctions.js +++ b/airtime_mvc/public/js/airtime/dashboard/helperfunctions.js @@ -73,10 +73,7 @@ function convertToHHMMSS(timeInMS){ minutes = "0" + minutes; if (seconds.length == 1) seconds = "0" + seconds; - if (hours == "00") - return minutes + ":" + seconds; - else - return hours + ":" + minutes + ":" + seconds; + return hours + ":" + minutes + ":" + seconds; } function convertToHHMMSSmm(timeInMS){ From 3e5a6b2a3d715f2cb80d2c6b9483037f08cae8af Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 16:40:55 -0400 Subject: [PATCH 168/181] CC-5323: User's Timezone Can Improperly Edit Show Edit show from was displaying rebroadcast dates in user's timezone instead of in the show's timezone --- airtime_mvc/application/services/ShowFormService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index 2ef3b3c3d..2cd85ae85 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -305,13 +305,14 @@ class Application_Service_ShowFormService private function populateFormRebroadcastAbsolute($form) { $absolutRebroadcasts = $this->ccShow->getRebroadcastsAbsolute(); + $timezone = $this->ccShow->getFirstCcShowDay()->getDbTimezone(); $formValues = array(); $i = 1; foreach ($absolutRebroadcasts as $ar) { //convert dates to user's local time $start = new DateTime($ar->getDbStarts(), new DateTimeZone("UTC")); - $start->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); + $start->setTimezone(new DateTimeZone($timezone)); $formValues["add_show_rebroadcast_date_absolute_$i"] = $start->format("Y-m-d"); $formValues["add_show_rebroadcast_time_absolute_$i"] = $start->format("H:i"); $i++; From 34e2344100a6f6e317564640cded08b944800a71 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 17:18:23 -0400 Subject: [PATCH 169/181] CC-5323: User's Timezone Can Improperly Edit Show Sometimes show form would populate the start/end time with wrong timezone --- airtime_mvc/application/services/ShowFormService.php | 10 +++++----- airtime_mvc/application/services/ShowService.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index 2cd85ae85..7cd3d586d 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -166,10 +166,10 @@ class Application_Service_ShowFormService //DateTime object in UTC $showStart = $ccShowInstance->getDbStarts(null); - $showStart->setTimezone($timezone); + $showStart->setTimezone(new DateTimeZone($timezone)); $showEnd = $ccShowInstance->getDbEnds(null); - $showEnd->setTimezone($timezone); + $showEnd->setTimezone(new DateTimeZone($timezone)); //if the show has started, do not allow editing on the start time if ($showStart->getTimestamp() <= time()) { @@ -395,10 +395,10 @@ class Application_Service_ShowFormService $starts = new DateTime($ccShowInstance->getDbStarts(), new DateTimeZone("UTC")); $ends = new DateTime($ccShowInstance->getDbEnds(), new DateTimeZone("UTC")); - $userTimezone = Application_Model_Preference::GetTimezone(); + $showTimezone = $this->ccShow->getFirstCcShowDay()->getDbTimezone(); - $starts->setTimezone(new DateTimeZone($userTimezone)); - $ends->setTimezone(new DateTimeZone($userTimezone)); + $starts->setTimezone(new DateTimeZone($showTimezone)); + $ends->setTimezone(new DateTimeZone($showTimezone)); return array($starts, $ends); } diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 6018cb5b5..c3f4af401 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -54,10 +54,10 @@ class Application_Service_ShowService $oldCcShow = CcShowQuery::create() ->findPk($showData["add_show_id"]); - //DateTime in user's local time + //DateTime in shows's local time $newStartDateTime = new DateTime($showData["add_show_start_date"]." ". $showData["add_show_start_time"], - new DateTimeZone(Application_Model_Preference::GetTimezone())); + new DateTimeZone($showData["add_show_timezone"])); $ccShowInstanceOrig = CcShowInstancesQuery::create() ->findPk($showData["add_show_instance_id"]); From 28a032388bfe8205e3273ee8fad71a7094e64eaf Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 26 Sep 2013 15:18:41 -0400 Subject: [PATCH 170/181] Start of bugfixing for SAAS-349. * Also identity verification for erry on Freenode. --- airtime_mvc/application/forms/EditUser.php | 4 +++- .../application/validate/NotDemoValidate.php | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 airtime_mvc/application/validate/NotDemoValidate.php diff --git a/airtime_mvc/application/forms/EditUser.php b/airtime_mvc/application/forms/EditUser.php index cff9dfdda..853e8c479 100644 --- a/airtime_mvc/application/forms/EditUser.php +++ b/airtime_mvc/application/forms/EditUser.php @@ -16,7 +16,8 @@ class Application_Form_EditUser extends Zend_Form $userData = Application_Model_User::GetUserData($currentUserId); $notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator(); $emailValidator = Application_Form_Helper_ValidationTypes::overrideEmailAddressValidator(); - + $notDemoValidator = new Application_Validate_NotDemoValidate(); + $this->setDecorators(array( array('ViewScript', array('viewScript' => 'form/edit-user.phtml', "currentUser" => $currentUser->getLogin())))); $this->setAttrib('id', 'current-user-form'); @@ -52,6 +53,7 @@ class Application_Form_EditUser extends Zend_Form $passwordVerify->setRequired(true); $passwordVerify->addFilter('StringTrim'); $passwordVerify->addValidator($notEmptyValidator); + $passwordVerify->addValidator($notDemoValidator); $passwordVerify->setDecorators(array('viewHelper')); $this->addElement($passwordVerify); diff --git a/airtime_mvc/application/validate/NotDemoValidate.php b/airtime_mvc/application/validate/NotDemoValidate.php new file mode 100644 index 000000000..2d9cc0953 --- /dev/null +++ b/airtime_mvc/application/validate/NotDemoValidate.php @@ -0,0 +1,24 @@ + "Cannot be changed in demo mode" + ); + + public function isValid($value) + { + $this->_setValue($value); + + $CC_CONFIG = Config::getConfig(); + if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1) { + $this->_error(self::NOTDEMO); + return false; + } else { + return false; + } + } +} + From c8bb12ca45047020999855ffc84065a847bdd411 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 26 Sep 2013 15:23:02 -0400 Subject: [PATCH 171/181] Freenode identity verification for #airtime --- freenode.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 freenode.txt diff --git a/freenode.txt b/freenode.txt new file mode 100644 index 000000000..05924a820 --- /dev/null +++ b/freenode.txt @@ -0,0 +1 @@ +e7Y4a8H6 From 11ae76beb87dfd8bda4fcdedfff76e8ec8190a0d Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 26 Sep 2013 16:23:22 -0400 Subject: [PATCH 172/181] Fix SAAS-349 by preventing password changes in demo mode. * Added a NotDemoValidate validator class to ensure no changes to a field in demo mode. * Prevent the user from changing the password of any user in demo mode. * Fixes SAAS-349. --- airtime_mvc/application/forms/AddUser.php | 5 ++++- airtime_mvc/application/forms/EditUser.php | 1 + airtime_mvc/application/validate/NotDemoValidate.php | 6 +++--- freenode.txt | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 freenode.txt diff --git a/airtime_mvc/application/forms/AddUser.php b/airtime_mvc/application/forms/AddUser.php index 75a8f659c..1d3835ae7 100644 --- a/airtime_mvc/application/forms/AddUser.php +++ b/airtime_mvc/application/forms/AddUser.php @@ -1,4 +1,5 @@ setAttrib('id', 'user_form'); $hidden = new Zend_Form_Element_Hidden('user_id'); @@ -42,6 +44,7 @@ class Application_Form_AddUser extends Zend_Form $passwordVerify->setRequired(true); $passwordVerify->addFilter('StringTrim'); $passwordVerify->addValidator($notEmptyValidator); + $passwordVerify->addValidator($notDemoValidator); $this->addElement($passwordVerify); $firstName = new Zend_Form_Element_Text('first_name'); diff --git a/airtime_mvc/application/forms/EditUser.php b/airtime_mvc/application/forms/EditUser.php index 853e8c479..2711bb334 100644 --- a/airtime_mvc/application/forms/EditUser.php +++ b/airtime_mvc/application/forms/EditUser.php @@ -1,4 +1,5 @@ _setValue($value); - + $this->_setValue($value); + $CC_CONFIG = Config::getConfig(); if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1) { $this->_error(self::NOTDEMO); return false; } else { - return false; + return true; } } } diff --git a/freenode.txt b/freenode.txt deleted file mode 100644 index 05924a820..000000000 --- a/freenode.txt +++ /dev/null @@ -1 +0,0 @@ -e7Y4a8H6 From 9f38e5a9c61dbb45a61fc1e131ce0990fe0fc6aa Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 26 Sep 2013 17:03:18 -0400 Subject: [PATCH 173/181] CC-5342 : Pypo: Webstream disconnection happens when any changes on Now playing page --- python_apps/pypo/pypoliquidsoap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/pypo/pypoliquidsoap.py b/python_apps/pypo/pypoliquidsoap.py index 50a47db94..96c0eca0f 100644 --- a/python_apps/pypo/pypoliquidsoap.py +++ b/python_apps/pypo/pypoliquidsoap.py @@ -181,7 +181,7 @@ class PypoLiquidsoap(): #handle webstreams current_stream_id = self.telnet_liquidsoap.get_current_stream_id() if scheduled_now_webstream: - if current_stream_id != scheduled_now_webstream[0]: + if int(current_stream_id) != int(scheduled_now_webstream[0]["row_id"]): self.play(scheduled_now_webstream[0]) elif current_stream_id != "-1": #something is playing and it shouldn't be. From 7d739a0f66d1a4b382a8a59a0a0396943b3df749 Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 30 Sep 2013 13:56:27 -0400 Subject: [PATCH 174/181] CC-5316 : Playout History: Doesn't support webstream adding the webstream metadata to the history table. --- .../application/controllers/ApiController.php | 29 ++++++---- .../application/forms/EditHistoryItem.php | 2 +- .../airtime/CcPlayoutHistoryMetaData.php | 16 ++++++ .../airtime/map/CcPlayoutHistoryTableMap.php | 2 +- .../application/services/HistoryService.php | 53 +++++++++++++++++-- airtime_mvc/build/schema.xml | 2 +- airtime_mvc/build/sql/schema.sql | 2 +- 7 files changed, 87 insertions(+), 19 deletions(-) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index ac32ae832..c48e82b0c 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -1042,12 +1042,15 @@ class ApiController extends Zend_Controller_Action { $request = $this->getRequest(); $data = $request->getParam("data"); - $media_id = $request->getParam("media_id"); + $media_id = intval($request->getParam("media_id")); $data_arr = json_decode($data); + + //$media_id is -1 sometimes when a stream has stopped playing + if (!is_null($media_id) && $media_id > 0) { - if (!is_null($media_id)) { - if (isset($data_arr->title) && - strlen($data_arr->title) < 1024) { + if (isset($data_arr->title)) { + + $data_title = substr($data_arr->title, 0, 1024); $previous_metadata = CcWebstreamMetadataQuery::create() ->orderByDbStartTime('desc') @@ -1056,23 +1059,27 @@ class ApiController extends Zend_Controller_Action $do_insert = true; if ($previous_metadata) { - if ($previous_metadata->getDbLiquidsoapData() == $data_arr->title) { - Logging::debug("Duplicate found: ".$data_arr->title); + if ($previous_metadata->getDbLiquidsoapData() == $data_title) { + Logging::debug("Duplicate found: ". $data_title); $do_insert = false; } } if ($do_insert) { + + $startDT = new DateTime("now", new DateTimeZone("UTC")); + $webstream_metadata = new CcWebstreamMetadata(); $webstream_metadata->setDbInstanceId($media_id); - $webstream_metadata->setDbStartTime(new DateTime("now", new DateTimeZone("UTC"))); - $webstream_metadata->setDbLiquidsoapData($data_arr->title); + $webstream_metadata->setDbStartTime($startDT); + $webstream_metadata->setDbLiquidsoapData($data_title); $webstream_metadata->save(); + + $historyService = new Application_Service_HistoryService(); + $historyService->insertWebstreamMetadata($media_id, $startDT, $data_arr); } } - } else { - throw new Exception("Null value of media_id"); - } + } $this->view->response = $data; $this->view->media_id = $media_id; diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php index 16ba5ded5..2f6f38043 100644 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -43,7 +43,7 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory $ends->addFilter('StringTrim'); $ends->setLabel(_('End Time')); $ends->setDecorators(array('ViewHelper')); - $ends->setRequired(true); + //$ends->setRequired(true); $this->addElement($ends); } diff --git a/airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php b/airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php index 890a4ca05..b55de6043 100644 --- a/airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php +++ b/airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php @@ -14,5 +14,21 @@ * @package propel.generator.airtime */ class CcPlayoutHistoryMetaData extends BaseCcPlayoutHistoryMetaData { + + /** + * Set the value of [value] column. + * + * @param string $v new value + * @return CcPlayoutHistoryMetaData The current object (for fluent API support) + */ + public function setDbValue($v) + { + //make sure the metadata isn't longer than the DB field. + $v = substr($v, 0, 128); + + parent::setDbValue($v); + + return $this; + } // setDbValue() } // CcPlayoutHistoryMetaData diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php index 6c365d7bb..23696f18d 100644 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php @@ -41,7 +41,7 @@ class CcPlayoutHistoryTableMap extends TableMap { $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); $this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null); $this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null); - $this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null); + $this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', false, null, null); $this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', false, null, null); // validators } // initialize() diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 4477e28ff..d273e1fb9 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -290,9 +290,12 @@ class Application_Service_HistoryService $dateTime->setTimezone($timezoneLocal); $result["starts"] = $dateTime->format("Y-m-d H:i:s"); - $dateTime = new DateTime($result["ends"], $timezoneUTC); - $dateTime->setTimezone($timezoneLocal); - $result["ends"] = $dateTime->format("Y-m-d H:i:s"); + //if ends is null we don't want it to default to "now" + if (isset($result["ends"])) { + $dateTime = new DateTime($result["ends"], $timezoneUTC); + $dateTime->setTimezone($timezoneLocal); + $result["ends"] = $dateTime->format("Y-m-d H:i:s"); + } if (isset($result[MDATA_KEY_DURATION])) { $formatter = new LengthFormatter($result[MDATA_KEY_DURATION]); @@ -505,6 +508,48 @@ class Application_Service_HistoryService return $filteredShows; } + + public function insertWebstreamMetadata($schedId, $startDT, $data) { + + $this->con->beginTransaction(); + + try { + + $item = CcScheduleQuery::create()->findPK($schedId, $this->con); + + //TODO figure out how to combine these all into 1 query. + $showInstance = $item->getCcShowInstances($this->con); + $show = $showInstance->getCcShow($this->con); + + $webstream = $item->getCcWebstream($this->con); + + $metadata = array(); + $metadata["showname"] = $show->getDbName(); + $metadata[MDATA_KEY_TITLE] = $data->title; + $metadata[MDATA_KEY_CREATOR] = $webstream->getDbName(); + + $history = new CcPlayoutHistory(); + $history->setDbStarts($startDT); + $history->setDbEnds(null); + $history->setDbInstanceId($item->getDbInstanceId()); + + foreach ($metadata as $key => $val) { + $meta = new CcPlayoutHistoryMetaData(); + $meta->setDbKey($key); + $meta->setDbValue($val); + + $history->addCcPlayoutHistoryMetaData($meta); + } + + $history->save($this->con); + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + throw $e; + } + } public function insertPlayedItem($schedId) { @@ -611,7 +656,7 @@ class Application_Service_HistoryService } //need to convert to the station's local time first. - if ($field["type"] == TEMPLATE_DATETIME) { + if ($field["type"] == TEMPLATE_DATETIME && !is_null($value)) { $timezoneUTC = new DateTimeZone("UTC"); $timezoneLocal = new DateTimeZone($this->timezone); diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index f2a393f1f..d5ba76516 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -483,7 +483,7 @@ - + diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index 8269fec2a..13d1654a5 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -765,7 +765,7 @@ CREATE TABLE "cc_playout_history" "id" serial NOT NULL, "file_id" INTEGER, "starts" TIMESTAMP NOT NULL, - "ends" TIMESTAMP NOT NULL, + "ends" TIMESTAMP, "instance_id" INTEGER, PRIMARY KEY ("id") ); From 1fa13eed13f8029361a6c9f1854ab41a44eb868c Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 30 Sep 2013 13:59:08 -0400 Subject: [PATCH 175/181] CRLF --- .../application/controllers/ApiController.php | 2 +- .../airtime/CcPlayoutHistoryMetaData.php | 22 ++++----- .../application/services/HistoryService.php | 48 +++++++++---------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index c48e82b0c..992408bf3 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -1075,7 +1075,7 @@ class ApiController extends Zend_Controller_Action $webstream_metadata->setDbLiquidsoapData($data_title); $webstream_metadata->save(); - $historyService = new Application_Service_HistoryService(); + $historyService = new Application_Service_HistoryService(); $historyService->insertWebstreamMetadata($media_id, $startDT, $data_arr); } } diff --git a/airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php b/airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php index b55de6043..9eb4958a2 100644 --- a/airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php +++ b/airtime_mvc/application/models/airtime/CcPlayoutHistoryMetaData.php @@ -15,20 +15,20 @@ */ class CcPlayoutHistoryMetaData extends BaseCcPlayoutHistoryMetaData { - /** - * Set the value of [value] column. - * - * @param string $v new value - * @return CcPlayoutHistoryMetaData The current object (for fluent API support) - */ - public function setDbValue($v) + /** + * Set the value of [value] column. + * + * @param string $v new value + * @return CcPlayoutHistoryMetaData The current object (for fluent API support) + */ + public function setDbValue($v) { - //make sure the metadata isn't longer than the DB field. + //make sure the metadata isn't longer than the DB field. $v = substr($v, 0, 128); - parent::setDbValue($v); - - return $this; + parent::setDbValue($v); + + return $this; } // setDbValue() } // CcPlayoutHistoryMetaData diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index d273e1fb9..5566a1acd 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -511,43 +511,43 @@ class Application_Service_HistoryService public function insertWebstreamMetadata($schedId, $startDT, $data) { - $this->con->beginTransaction(); - + $this->con->beginTransaction(); + try { $item = CcScheduleQuery::create()->findPK($schedId, $this->con); - //TODO figure out how to combine these all into 1 query. - $showInstance = $item->getCcShowInstances($this->con); + //TODO figure out how to combine these all into 1 query. + $showInstance = $item->getCcShowInstances($this->con); $show = $showInstance->getCcShow($this->con); $webstream = $item->getCcWebstream($this->con); - $metadata = array(); + $metadata = array(); $metadata["showname"] = $show->getDbName(); $metadata[MDATA_KEY_TITLE] = $data->title; - $metadata[MDATA_KEY_CREATOR] = $webstream->getDbName(); - - $history = new CcPlayoutHistory(); + $metadata[MDATA_KEY_CREATOR] = $webstream->getDbName(); + + $history = new CcPlayoutHistory(); $history->setDbStarts($startDT); - $history->setDbEnds(null); - $history->setDbInstanceId($item->getDbInstanceId()); - - foreach ($metadata as $key => $val) { - $meta = new CcPlayoutHistoryMetaData(); - $meta->setDbKey($key); - $meta->setDbValue($val); - - $history->addCcPlayoutHistoryMetaData($meta); - } - + $history->setDbEnds(null); + $history->setDbInstanceId($item->getDbInstanceId()); + + foreach ($metadata as $key => $val) { + $meta = new CcPlayoutHistoryMetaData(); + $meta->setDbKey($key); + $meta->setDbValue($val); + + $history->addCcPlayoutHistoryMetaData($meta); + } + $history->save($this->con); - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - throw $e; + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + throw $e; } } From 8a354a8c4590af8cc7790a62318ce0a028beb2e9 Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 30 Sep 2013 14:25:51 -0400 Subject: [PATCH 176/181] CC-5316 : Playout History: Doesn't support webstream --- install_minimal/upgrades/airtime-2.5.0/data/schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_minimal/upgrades/airtime-2.5.0/data/schema.sql b/install_minimal/upgrades/airtime-2.5.0/data/schema.sql index 253021b24..a6424446c 100644 --- a/install_minimal/upgrades/airtime-2.5.0/data/schema.sql +++ b/install_minimal/upgrades/airtime-2.5.0/data/schema.sql @@ -31,7 +31,7 @@ CREATE TABLE cc_playout_history ( id integer DEFAULT nextval('cc_playout_history_id_seq'::regclass) NOT NULL, file_id integer, starts timestamp without time zone NOT NULL, - ends timestamp without time zone NOT NULL, + ends timestamp without time zone, instance_id integer ); From a34ae69d4b48da246078154ad9b6924f54650acb Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 30 Sep 2013 15:56:26 -0400 Subject: [PATCH 177/181] CC-5347 : Random Error think to do with updating is scheduled status of a webstream not sending a notify message if webstream source is -1 --- python_apps/pypo/liquidsoap_scripts/ls_lib.liq | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq index e2123e26d..e4459600d 100644 --- a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq +++ b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq @@ -16,8 +16,11 @@ def notify_stream(m) #escaping the apostrophe, and then starting a new string right after it. This is why we use 3 apostrophes. json_str = string.replace(pattern="'",(fun (s) -> "'\''"), json_str) command = "/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --webstream='#{json_str}' --media-id=#{!current_dyn_id} &" - log(command) - system(command) + + if !current_dyn_id != "-1" then + log(command) + system(command) + end end # A function applied to each metadata chunk From 1e59ab836d14a2b79d300100e9a0a7e2b4480e33 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 1 Oct 2013 14:19:02 -0400 Subject: [PATCH 178/181] CC-5277: Selecting weekly repeat without selecting days fails silently - added a check in the 'when' form since the validation there relies on the repeat form being valid - added validation for this in the 'repeat' form --- airtime_mvc/application/forms/AddShowRepeats.php | 4 ++++ airtime_mvc/application/forms/AddShowWhen.php | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/forms/AddShowRepeats.php b/airtime_mvc/application/forms/AddShowRepeats.php index d09b5284a..814102878 100644 --- a/airtime_mvc/application/forms/AddShowRepeats.php +++ b/airtime_mvc/application/forms/AddShowRepeats.php @@ -104,6 +104,10 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm } } + if (!isset($formData['add_show_day_check'])) { + $this->getElement('add_show_day_check')->setErrors(array(_('Please select a repeat day'))); + } + return true; } diff --git a/airtime_mvc/application/forms/AddShowWhen.php b/airtime_mvc/application/forms/AddShowWhen.php index 3ca08b99e..62b8004c5 100644 --- a/airtime_mvc/application/forms/AddShowWhen.php +++ b/airtime_mvc/application/forms/AddShowWhen.php @@ -211,13 +211,17 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm $overlapping = Application_Model_Schedule::checkOverlappingShows( $show_start, $show_end); } - //$overlapping = Application_Model_Schedule::checkOverlappingShows($show_start, $show_end, $update, $instanceId); /* Check if repeats overlap with previously scheduled shows * Do this for each show day */ if (!$overlapping) { $startDow = date("w", $show_start->getTimestamp()); + + if (!isset($formData['add_show_day_check'])) { + return false; + } + foreach ($formData["add_show_day_check"] as $day) { $repeatShowStart = clone $show_start; $repeatShowEnd = clone $show_end; From 632b11c0ab038d92c5304166f0c326abf1afdc2b Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 1 Oct 2013 16:49:08 -0400 Subject: [PATCH 179/181] CC-5331: Now Playing keeps refreshing sometimes - typo in GET request parameters causing overriding of data --- airtime_mvc/public/js/airtime/showbuilder/main_builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js index c2210a3ae..f59d0f32a 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js @@ -312,7 +312,7 @@ AIRTIME = (function(AIRTIME) { if (fn.hasOwnProperty("ops")) { data["myShows"] = fn.ops.myShows; data["showFilter"] = fn.ops.showFilter; - data["showFilter"] = fn.ops.showInstanceFilter; + data["showInstanceFilter"] = fn.ops.showInstanceFilter; } $.ajax( { From 4d01e3b11f6f5ee71112ce5da3d19296bfd436ff Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 2 Oct 2013 11:24:48 -0400 Subject: [PATCH 180/181] CC-5347 : isScheduled doesn't work for webstreams --- .../controllers/ScheduleController.php | 5 ++++- airtime_mvc/application/models/StoredFile.php | 10 ++-------- airtime_mvc/application/models/Webstream.php | 17 ++++++++++++++++ .../application/services/SchedulerService.php | 20 +++++++++++++++++++ 4 files changed, 43 insertions(+), 9 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index e13547c88..bf44a8030 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -638,7 +638,10 @@ class ScheduleController extends Zend_Controller_Action public function updateFutureIsScheduledAction() { $schedId = $this->_getParam('schedId'); - $redrawLibTable = Application_Model_StoredFile::setIsScheduled($schedId, false); + + $scheduleService = new Application_Service_SchedulerService(); + $redrawLibTable = $scheduleService->updateFutureIsScheduled($schedId, false); + $this->_helper->json->sendJson(array("redrawLibTable" => $redrawLibTable)); } } diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 6f0a98cce..d37f77bc1 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -1325,20 +1325,14 @@ SQL; } } - public static function setIsScheduled($p_scheduleItem, $p_status, - $p_fileId=null) { + public static function setIsScheduled($fileId, $status) { - if (is_null($p_fileId)) { - $fileId = Application_Model_Schedule::GetFileId($p_scheduleItem); - } else { - $fileId = $p_fileId; - } $file = self::RecallById($fileId); $updateIsScheduled = false; if (!is_null($fileId) && !in_array($fileId, Application_Model_Schedule::getAllFutureScheduledFiles())) { - $file->_file->setDbIsScheduled($p_status)->save(); + $file->_file->setDbIsScheduled($status)->save(); $updateIsScheduled = true; } diff --git a/airtime_mvc/application/models/Webstream.php b/airtime_mvc/application/models/Webstream.php index a39b26bde..c79fa9ca1 100644 --- a/airtime_mvc/application/models/Webstream.php +++ b/airtime_mvc/application/models/Webstream.php @@ -408,6 +408,23 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable return $webstream->getDbId(); } + + /* + * method is not used, webstreams aren't currently kept track of for isScheduled. + */ + public static function setIsScheduled($p_webstreamId, $p_status) { + + $webstream = CcWebstreamQuery::create()->findPK($p_webstreamId); + $updateIsScheduled = false; + + if (isset($webstream) && !in_array($p_webstreamId, + Application_Model_Schedule::getAllFutureScheduledWebstreams())) { + //$webstream->setDbIsScheduled($p_status)->save(); + $updateIsScheduled = true; + } + + return $updateIsScheduled; + } } class WebstreamNoPermissionException extends Exception {} diff --git a/airtime_mvc/application/services/SchedulerService.php b/airtime_mvc/application/services/SchedulerService.php index c1dd6fc1f..712ea6205 100644 --- a/airtime_mvc/application/services/SchedulerService.php +++ b/airtime_mvc/application/services/SchedulerService.php @@ -407,4 +407,24 @@ class Application_Service_SchedulerService return false; } } + + /* + * TODO in the future this should probably support webstreams. + */ + public function updateFutureIsScheduled($scheduleId, $status) + { + $sched = CcScheduleQuery::create()->findPk($scheduleId); + $redraw = false; + + if (isset($sched)) { + + $fileId = $sched->getDbFileId(); + + if (isset($fileId)) { + $redraw = Application_Model_StoredFile::setIsScheduled($fileId, $status); + } + } + + return $redraw; + } } \ No newline at end of file From c7079675675a3f9786ebf969626fdba97b5e03bf Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 2 Oct 2013 11:25:40 -0400 Subject: [PATCH 181/181] CRLF --- airtime_mvc/application/models/Webstream.php | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/airtime_mvc/application/models/Webstream.php b/airtime_mvc/application/models/Webstream.php index c79fa9ca1..693a08146 100644 --- a/airtime_mvc/application/models/Webstream.php +++ b/airtime_mvc/application/models/Webstream.php @@ -412,18 +412,18 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable /* * method is not used, webstreams aren't currently kept track of for isScheduled. */ - public static function setIsScheduled($p_webstreamId, $p_status) { - - $webstream = CcWebstreamQuery::create()->findPK($p_webstreamId); - $updateIsScheduled = false; - - if (isset($webstream) && !in_array($p_webstreamId, - Application_Model_Schedule::getAllFutureScheduledWebstreams())) { - //$webstream->setDbIsScheduled($p_status)->save(); - $updateIsScheduled = true; - } - - return $updateIsScheduled; + public static function setIsScheduled($p_webstreamId, $p_status) { + + $webstream = CcWebstreamQuery::create()->findPK($p_webstreamId); + $updateIsScheduled = false; + + if (isset($webstream) && !in_array($p_webstreamId, + Application_Model_Schedule::getAllFutureScheduledWebstreams())) { + //$webstream->setDbIsScheduled($p_status)->save(); + $updateIsScheduled = true; + } + + return $updateIsScheduled; } }