CC-3174 : showbuilder/library
soundcloud icon stuff is back.
This commit is contained in:
parent
072e13a943
commit
fbec92cb0d
|
@ -187,21 +187,24 @@ class LibraryController extends Zend_Controller_Action
|
|||
$params = $this->getRequest()->getParams();
|
||||
$datatables = Application_Model_StoredFile::searchFilesForPlaylistBuilder($params);
|
||||
|
||||
/*
|
||||
foreach($datatables["aaData"] as &$data){
|
||||
if($data['ftype'] == 'audioclip'){
|
||||
//TODO move this to the datatables row callback.
|
||||
foreach ($datatables["aaData"] as &$data) {
|
||||
|
||||
if ($data['ftype'] == 'audioclip'){
|
||||
$file = Application_Model_StoredFile::Recall($data['id']);
|
||||
$scid = $file->getSoundCloudId();
|
||||
if($scid == "-2"){
|
||||
$data['track_title'] .= '<span id="'.$data['id'].'" class="small-icon progress"></span>';
|
||||
}else if($scid == "-3"){
|
||||
$data['track_title'] .= '<span id="'.$data['id'].'" class="small-icon sc-error"></span>';
|
||||
}else if(!is_null($scid)){
|
||||
$data['track_title'] .= '<span id="'.$data['id'].'" class="small-icon soundcloud"></span>';
|
||||
|
||||
if ($scid == "-2"){
|
||||
$data['track_title'] .= '<span class="small-icon progress"/>';
|
||||
}
|
||||
else if ($scid == "-3"){
|
||||
$data['track_title'] .= '<span class="small-icon sc-error"/>';
|
||||
}
|
||||
else if (!is_null($scid)){
|
||||
$data['track_title'] .= '<span class="small-icon soundcloud"/>';
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
die(json_encode($datatables));
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ function disableGroupBtn(btnId) {
|
|||
function checkImportStatus(){
|
||||
$.getJSON('/Preference/is-import-in-progress', function(data){
|
||||
var div = $('#import_status');
|
||||
if(data == true){
|
||||
if (data == true){
|
||||
div.css('visibility', 'visible');
|
||||
}else{
|
||||
div.css('visibility', 'hidden');
|
||||
|
@ -114,7 +114,7 @@ function checkSCUploadStatus(){
|
|||
var span, id;
|
||||
|
||||
span = $(this);
|
||||
id = span.parentsUntil('tr').attr("id").split("_").pop();
|
||||
id = span.parent().parent().data("aData").id;
|
||||
|
||||
$.post(url, {format: "json", id: id, type:"file"}, function(json){
|
||||
if (json.sc_id > 0) {
|
||||
|
@ -132,8 +132,10 @@ function checkSCUploadStatus(){
|
|||
|
||||
function addQtipToSCIcons(){
|
||||
$(".progress, .soundcloud, .sc-error").live('mouseover', function(){
|
||||
var id = $(this).attr("id");
|
||||
if($(this).hasClass("progress")){
|
||||
|
||||
var id = $(this).parent().parent().data("aData").id;
|
||||
|
||||
if ($(this).hasClass("progress")){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "Uploading in progress..."
|
||||
|
@ -151,7 +153,8 @@ function addQtipToSCIcons(){
|
|||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
}else if($(this).hasClass("soundcloud")){
|
||||
}
|
||||
else if($(this).hasClass("soundcloud")){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "Retreiving data from the server...",
|
||||
|
@ -383,8 +386,8 @@ $(document).ready(function() {
|
|||
error:function(jqXHR, textStatus, errorThrown){}});
|
||||
|
||||
checkImportStatus();
|
||||
//setInterval( "checkImportStatus()", 5000 );
|
||||
//setInterval( "checkSCUploadStatus()", 5000 );
|
||||
setInterval( checkImportStatus, 5000 );
|
||||
setInterval( checkSCUploadStatus, 5000 );
|
||||
|
||||
addQtipToSCIcons();
|
||||
|
||||
|
|
Loading…
Reference in New Issue