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