CC-1986: Configurable columns for media search
- Fixed some hardcoded array access - Fix js error in ColReorder
This commit is contained in:
parent
d1d01e55ce
commit
cf045652ec
|
@ -228,22 +228,22 @@ class LibraryController extends Zend_Controller_Action
|
|||
$post = $this->getRequest()->getPost();
|
||||
Logging::log(print_r($post, true));
|
||||
$datatables = Application_Model_StoredFile::searchFilesForPlaylistBuilder($post);
|
||||
|
||||
|
||||
//format clip lengh to 1 decimal
|
||||
foreach($datatables["aaData"] as &$data){
|
||||
if($data[6] == 'audioclip'){
|
||||
$file = Application_Model_StoredFile::Recall($data[0]);
|
||||
if($data['ftype'] == 'audioclip'){
|
||||
$file = Application_Model_StoredFile::Recall($data['id']);
|
||||
$scid = $file->getSoundCloudId();
|
||||
if($scid == "-2"){
|
||||
$data[1] .= '<span id="'.$data[0].'" class="small-icon progress"></span>';
|
||||
$data['track_title'] .= '<span id="'.$data['id'].'" class="small-icon progress"></span>';
|
||||
}else if($scid == "-3"){
|
||||
$data[1] .= '<span id="'.$data[0].'" class="small-icon sc-error"></span>';
|
||||
$data['track_title'] .= '<span id="'.$data['id'].'" class="small-icon sc-error"></span>';
|
||||
}else if(!is_null($scid)){
|
||||
$data[1] .= '<span id="'.$data[0].'" class="small-icon soundcloud"></span>';
|
||||
$data['track_title'] .= '<span id="'.$data['id'].'" class="small-icon soundcloud"></span>';
|
||||
}
|
||||
}
|
||||
$sec = Application_Model_Playlist::playlistTimeToSeconds($data[5]);
|
||||
$data[5] = Application_Model_Playlist::secondsToPlaylistTime($sec);
|
||||
$sec = Application_Model_Playlist::playlistTimeToSeconds($data['length']);
|
||||
$data['length'] = Application_Model_Playlist::secondsToPlaylistTime($sec);
|
||||
}
|
||||
|
||||
die(json_encode($datatables));
|
||||
|
|
|
@ -524,7 +524,7 @@ function createDataTable(data) {
|
|||
/* Album */ {"sTitle": "Album", "sName": "album_title", "mDataProp": "album_title", "sClass": "library_album"},
|
||||
/* Genre */ {"sTitle": "Genre", "sName": "genre", "mDataProp": "genre", "sWidth": "10%", "sClass": "library_genre"},
|
||||
/* Year */ {"sTitle": "Year", "sName": "year", "mDataProp": "year", "sWidth": "8%", "sClass": "library_year"},
|
||||
/* Length */ {"sTitle": "Length", "sName": "length", "mDataProp": "length", "sWidth": "16%", "sClass": "library_length"},
|
||||
/* Length */ {"sTitle": "Length", "sName": "length", "mDataProp": "length", "sWidth": "10%", "sClass": "library_length"},
|
||||
/* Type */ {"sTitle": "Type", "sName": "ftype", "bSearchable": false, "mDataProp": "ftype", "sWidth": "9%", "sClass": "library_type"},
|
||||
/* Upload Time */ {"sTitle": "Upload Time", "sName": "utime", "mDataProp": "utime", "sClass": "library_upload_time"},
|
||||
/* Last Modified */ {"sTitle": "Last Modified", "sName": "mtime", "bVisible": false, "mDataProp": "mtime", "sClass": "library_modified_time"},
|
||||
|
@ -548,7 +548,7 @@ function createDataTable(data) {
|
|||
"bShowAll": true
|
||||
},
|
||||
"oColReorder": {
|
||||
"aiOrder": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ] /* code this */,
|
||||
"aiOrder": [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] /* code this */,
|
||||
"iFixedColumns": 3
|
||||
}
|
||||
});
|
||||
|
@ -573,6 +573,6 @@ $(document).ready(function() {
|
|||
checkImportStatus();
|
||||
setInterval( "checkImportStatus()", 5000 );
|
||||
setInterval( "checkSCUploadStatus()", 5000 );
|
||||
|
||||
|
||||
addQtipToSCIcons()
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue