CC-3817 : Should use soundcloud icon for recorded & uploaded shows in timeline for past shows to match calendar
This commit is contained in:
parent
51573d36c9
commit
4d1a15b7ca
|
@ -322,7 +322,8 @@ SQL;
|
||||||
ft.album_title AS file_album_title,
|
ft.album_title AS file_album_title,
|
||||||
ft.length AS file_length,
|
ft.length AS file_length,
|
||||||
ft.file_exists AS file_exists,
|
ft.file_exists AS file_exists,
|
||||||
ft.mime AS file_mime
|
ft.mime AS file_mime,
|
||||||
|
ft.soundcloud_id AS soundcloud_id
|
||||||
SQL;
|
SQL;
|
||||||
$filesJoin = <<<SQL
|
$filesJoin = <<<SQL
|
||||||
cc_schedule AS sched
|
cc_schedule AS sched
|
||||||
|
@ -357,7 +358,8 @@ SQL;
|
||||||
ws.description AS file_album_title,
|
ws.description AS file_album_title,
|
||||||
ws.length AS file_length,
|
ws.length AS file_length,
|
||||||
't'::BOOL AS file_exists,
|
't'::BOOL AS file_exists,
|
||||||
ws.mime as file_mime
|
ws.mime AS file_mime,
|
||||||
|
(SELECT NULL::integer AS soundcloud_id)
|
||||||
SQL;
|
SQL;
|
||||||
$streamJoin = <<<SQL
|
$streamJoin = <<<SQL
|
||||||
cc_schedule AS sched
|
cc_schedule AS sched
|
||||||
|
|
|
@ -796,7 +796,7 @@ SQL;
|
||||||
|
|
||||||
//soundcloud status
|
//soundcloud status
|
||||||
$file = Application_Model_StoredFile::RecallById($row['id']);
|
$file = Application_Model_StoredFile::RecallById($row['id']);
|
||||||
$row['soundcloud_status'] = $file->getSoundCloudId();
|
$row['soundcloud_id'] = $file->getSoundCloudId();
|
||||||
|
|
||||||
// for audio preview
|
// for audio preview
|
||||||
$row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
|
$row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
|
||||||
|
|
|
@ -593,12 +593,12 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
"fnRowCallback": AIRTIME.library.fnRowCallback,
|
"fnRowCallback": AIRTIME.library.fnRowCallback,
|
||||||
"fnCreatedRow": function( nRow, aData, iDataIndex ) {
|
"fnCreatedRow": function( nRow, aData, iDataIndex ) {
|
||||||
//add soundcloud icon
|
//add soundcloud icon
|
||||||
if (aData.soundcloud_status !== undefined) {
|
if (aData.soundcloud_id !== undefined) {
|
||||||
if (aData.soundcloud_status === "-2") {
|
if (aData.soundcloud_id === "-2") {
|
||||||
$(nRow).find("td.library_title").append('<span class="small-icon progress"/>');
|
$(nRow).find("td.library_title").append('<span class="small-icon progress"/>');
|
||||||
} else if (aData.soundcloud_status === "-3") {
|
} else if (aData.soundcloud_id === "-3") {
|
||||||
$(nRow).find("td.library_title").append('<span class="small-icon sc-error"/>');
|
$(nRow).find("td.library_title").append('<span class="small-icon sc-error"/>');
|
||||||
} else if (aData.soundcloud_status !== null) {
|
} else if (aData.soundcloud_id !== null) {
|
||||||
$(nRow).find("td.library_title").append('<span class="small-icon soundcloud"/>');
|
$(nRow).find("td.library_title").append('<span class="small-icon soundcloud"/>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1141,9 +1141,12 @@ function checkLibrarySCUploadStatus(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function addQtipToSCIcons() {
|
function addQtipToSCIcons() {
|
||||||
$(".progress, .soundcloud, .sc-error").live('mouseover', function(){
|
$("#content")
|
||||||
|
.on('mouseover', ".progress, .soundcloud, .sc-error", function() {
|
||||||
|
|
||||||
var id = $(this).parent().parent().data("aData").id;
|
var aData = $(this).parents("tr").data("aData"),
|
||||||
|
id = aData.id,
|
||||||
|
sc_id = aData.soundcloud_id;
|
||||||
|
|
||||||
if ($(this).hasClass("progress")){
|
if ($(this).hasClass("progress")){
|
||||||
$(this).qtip({
|
$(this).qtip({
|
||||||
|
@ -1163,24 +1166,15 @@ function addQtipToSCIcons(){
|
||||||
classes: "ui-tooltip-dark file-md-long"
|
classes: "ui-tooltip-dark file-md-long"
|
||||||
},
|
},
|
||||||
show: {
|
show: {
|
||||||
ready: true // Needed to make it show on first mouseover
|
ready: true // Needed to make it show on first mouseover event
|
||||||
// event
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if ($(this).hasClass("soundcloud")){
|
else if ($(this).hasClass("soundcloud")){
|
||||||
var sc_id = $(this).parent().parent().data("aData").soundcloud_id;
|
|
||||||
$(this).qtip({
|
$(this).qtip({
|
||||||
content: {
|
content: {
|
||||||
text: $.i18n._("Retrieving data from the server..."),
|
text: $.i18n._("The soundcloud id for this file is: ") + sc_id
|
||||||
ajax: {
|
|
||||||
url: baseUrl+"Library/get-upload-to-soundcloud-status",
|
|
||||||
type: "post",
|
|
||||||
data: ({format: "json", id : id, type: "file"}),
|
|
||||||
success: function(json, status){
|
|
||||||
this.set('content.text', $.i18n._("The soundcloud id for this file is: ")+json.sc_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
position:{
|
position:{
|
||||||
adjust: {
|
adjust: {
|
||||||
|
@ -1195,11 +1189,11 @@ function addQtipToSCIcons(){
|
||||||
classes: "ui-tooltip-dark file-md-long"
|
classes: "ui-tooltip-dark file-md-long"
|
||||||
},
|
},
|
||||||
show: {
|
show: {
|
||||||
ready: true // Needed to make it show on first mouseover
|
ready: true // Needed to make it show on first mouseover event
|
||||||
// event
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else if($(this).hasClass("sc-error")){
|
}
|
||||||
|
else if ($(this).hasClass("sc-error")) {
|
||||||
$(this).qtip({
|
$(this).qtip({
|
||||||
content: {
|
content: {
|
||||||
text: $.i18n._("Retreiving data from the server..."),
|
text: $.i18n._("Retreiving data from the server..."),
|
||||||
|
@ -1227,8 +1221,7 @@ function addQtipToSCIcons(){
|
||||||
classes: "ui-tooltip-dark file-md-long"
|
classes: "ui-tooltip-dark file-md-long"
|
||||||
},
|
},
|
||||||
show: {
|
show: {
|
||||||
ready: true // Needed to make it show on first mouseover
|
ready: true // Needed to make it show on first mouseover event
|
||||||
// event
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -546,7 +546,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
cl = 'sb-footer';
|
cl = 'sb-footer';
|
||||||
|
|
||||||
//check the show's content status.
|
//check the show's content status.
|
||||||
if (aData.runtime > 0) {
|
if (aData.runtime >= 0) {
|
||||||
$node.html('<span class="ui-icon ui-icon-check"></span>');
|
$node.html('<span class="ui-icon ui-icon-check"></span>');
|
||||||
cl = cl + ' ui-state-highlight';
|
cl = cl + ' ui-state-highlight';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue