CC-733 : playout history
translating mDataProp values to be able to search table on backend
This commit is contained in:
parent
53b8eb2724
commit
c66b55ec17
|
@ -15,6 +15,15 @@ class Application_Model_PlayoutHistory {
|
|||
private $epoch_now;
|
||||
private $opts;
|
||||
|
||||
private $mDataPropMap = array(
|
||||
"artist" => "file.artist_name",
|
||||
"title" => "file.track_title",
|
||||
"played" => "playout.played",
|
||||
"length" => "file.length",
|
||||
"composer" => "file.composer",
|
||||
"copyright" => "file.copyright",
|
||||
);
|
||||
|
||||
public function __construct($p_startDT, $p_endDT, $p_opts) {
|
||||
|
||||
$this->con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME);
|
||||
|
@ -25,8 +34,21 @@ class Application_Model_PlayoutHistory {
|
|||
$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",
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
table-layout:fixed;
|
||||
}
|
||||
|
||||
#library_display th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#library_content #library_display {
|
||||
width:100%;
|
||||
}
|
||||
|
|
|
@ -510,6 +510,11 @@ dl.inline-list dd {
|
|||
border-width: 1px 1px 1px 1px;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.datatable th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.datatable tr td, .datatable tr th {
|
||||
border-color: #b1b1b1;
|
||||
border-style: solid;
|
||||
|
@ -671,7 +676,6 @@ button.ColVis_Button.ColVis_ShowAll {
|
|||
|
||||
.library_length {
|
||||
text-align: right;
|
||||
padding-right: 1em !important;
|
||||
}
|
||||
|
||||
/*----END Data Table----*/
|
||||
|
|
|
@ -18,7 +18,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
{"sTitle": "Title", "mDataProp": "title", "sClass": "his_title"}, /* Title */
|
||||
{"sTitle": "Artist", "mDataProp": "artist", "sClass": "his_artist"}, /* Creator */
|
||||
{"sTitle": "Played", "mDataProp": "played", "sClass": "his_artist"}, /* times played */
|
||||
{"sTitle": "Length", "mDataProp": "length", "sClass": "his_length"}, /* Length */
|
||||
{"sTitle": "Length", "mDataProp": "length", "sClass": "his_length library_length"}, /* Length */
|
||||
{"sTitle": "Composer", "mDataProp": "composer", "sClass": "his_composer"}, /* Composer */
|
||||
{"sTitle": "Copyright", "mDataProp": "copyright", "sClass": "his_copyright"} /* Copyright */
|
||||
],
|
||||
|
@ -51,6 +51,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
"sDom": 'lfr<"H"><"dataTables_scrolling"t><"F"ip>',
|
||||
});
|
||||
oTable.fnSetFilteringDelay(350);
|
||||
};
|
||||
|
||||
return AIRTIME;
|
||||
|
|
Loading…
Reference in New Issue