Merge branch '2.4.x' of dev.sourcefabric.org:airtime into 2.4.x
This commit is contained in:
commit
866f007c37
6 changed files with 92 additions and 77 deletions
|
@ -322,7 +322,8 @@ SQL;
|
|||
ft.album_title AS file_album_title,
|
||||
ft.length AS file_length,
|
||||
ft.file_exists AS file_exists,
|
||||
ft.mime AS file_mime
|
||||
ft.mime AS file_mime,
|
||||
ft.soundcloud_id AS soundcloud_id
|
||||
SQL;
|
||||
$filesJoin = <<<SQL
|
||||
cc_schedule AS sched
|
||||
|
@ -357,7 +358,8 @@ SQL;
|
|||
ws.description AS file_album_title,
|
||||
ws.length AS file_length,
|
||||
't'::BOOL AS file_exists,
|
||||
ws.mime as file_mime
|
||||
ws.mime AS file_mime,
|
||||
(SELECT NULL::integer AS soundcloud_id)
|
||||
SQL;
|
||||
$streamJoin = <<<SQL
|
||||
cc_schedule AS sched
|
||||
|
|
|
@ -796,7 +796,7 @@ SQL;
|
|||
|
||||
//soundcloud status
|
||||
$file = Application_Model_StoredFile::RecallById($row['id']);
|
||||
$row['soundcloud_status'] = $file->getSoundCloudId();
|
||||
$row['soundcloud_id'] = $file->getSoundCloudId();
|
||||
|
||||
// for audio preview
|
||||
$row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
|
||||
|
|
|
@ -125,7 +125,7 @@ select {
|
|||
|
||||
.airtime_auth_help_icon, .custom_auth_help_icon, .stream_username_help_icon,
|
||||
.playlist_type_help_icon, .master_username_help_icon, .repeat_tracks_help_icon,
|
||||
.admin_username_help_icon, .stream_type_help_icon {
|
||||
.admin_username_help_icon, .stream_type_help_icon, .show_linking_help_icon {
|
||||
cursor: help;
|
||||
position: relative;
|
||||
display:inline-block; zoom:1;
|
||||
|
|
|
@ -593,12 +593,12 @@ var AIRTIME = (function(AIRTIME) {
|
|||
"fnRowCallback": AIRTIME.library.fnRowCallback,
|
||||
"fnCreatedRow": function( nRow, aData, iDataIndex ) {
|
||||
//add soundcloud icon
|
||||
if (aData.soundcloud_status !== undefined) {
|
||||
if (aData.soundcloud_status === "-2") {
|
||||
if (aData.soundcloud_id !== undefined) {
|
||||
if (aData.soundcloud_id === "-2") {
|
||||
$(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"/>');
|
||||
} else if (aData.soundcloud_status !== null) {
|
||||
} else if (aData.soundcloud_id !== null) {
|
||||
$(nRow).find("td.library_title").append('<span class="small-icon soundcloud"/>');
|
||||
}
|
||||
}
|
||||
|
@ -1126,7 +1126,6 @@ function checkLibrarySCUploadStatus(){
|
|||
else if (json.sc_id == "-3") {
|
||||
span.removeClass("progress").addClass("sc-error");
|
||||
}
|
||||
setTimeout(checkLibrarySCUploadStatus, 5000);
|
||||
}
|
||||
|
||||
function checkSCUploadStatusRequest() {
|
||||
|
@ -1138,12 +1137,16 @@ function checkLibrarySCUploadStatus(){
|
|||
}
|
||||
|
||||
$("#library_display span.progress").each(checkSCUploadStatusRequest);
|
||||
setTimeout(checkLibrarySCUploadStatus, 5000);
|
||||
}
|
||||
|
||||
function addQtipToSCIcons(){
|
||||
$(".progress, .soundcloud, .sc-error").live('mouseover', function(){
|
||||
function addQtipToSCIcons() {
|
||||
$("#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")){
|
||||
$(this).qtip({
|
||||
|
@ -1163,24 +1166,15 @@ function addQtipToSCIcons(){
|
|||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
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")){
|
||||
var sc_id = $(this).parent().parent().data("aData").soundcloud_id;
|
||||
else if ($(this).hasClass("soundcloud")){
|
||||
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: $.i18n._("Retrieving data from the server..."),
|
||||
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);
|
||||
}
|
||||
}
|
||||
text: $.i18n._("The soundcloud id for this file is: ") + sc_id
|
||||
},
|
||||
position:{
|
||||
adjust: {
|
||||
|
@ -1195,11 +1189,11 @@ function addQtipToSCIcons(){
|
|||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
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("sc-error")){
|
||||
}
|
||||
else if ($(this).hasClass("sc-error")) {
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: $.i18n._("Retreiving data from the server..."),
|
||||
|
@ -1227,8 +1221,7 @@ function addQtipToSCIcons(){
|
|||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover
|
||||
// event
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -193,6 +193,7 @@ function setAddShowEvents() {
|
|||
}
|
||||
});
|
||||
|
||||
form.find("#add_show_linked-label").before("<span class='show_linking_help_icon'></span>");
|
||||
|
||||
form.find("#add_show_record").click(function(){
|
||||
$(this).blur();
|
||||
|
@ -315,7 +316,26 @@ function setAddShowEvents() {
|
|||
at: "right center"
|
||||
}
|
||||
});
|
||||
|
||||
form.find(".show_linking_help_icon").qtip({
|
||||
content: {
|
||||
text: $.i18n._("By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
fixed: true
|
||||
},
|
||||
style: {
|
||||
border: {
|
||||
width: 0,
|
||||
radius: 4
|
||||
},
|
||||
classes: "ui-tooltip-dark ui-tooltip-rounded"
|
||||
},
|
||||
position: {
|
||||
my: "left bottom",
|
||||
at: "right center"
|
||||
}
|
||||
});
|
||||
function endDateVisibility(){
|
||||
if(form.find("#add_show_no_end").is(':checked')){
|
||||
form.find("#add_show_end_date").hide();
|
||||
|
|
|
@ -546,7 +546,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
cl = 'sb-footer';
|
||||
|
||||
//check the show's content status.
|
||||
if (aData.runtime > 0) {
|
||||
if (aData.runtime >= 0) {
|
||||
$node.html('<span class="ui-icon ui-icon-check"></span>');
|
||||
cl = cl + ' ui-state-highlight';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue