CC-3820 : when using reupload to soundcloud on calendar, progress icon never goes away unless you refresh the page
This commit is contained in:
parent
803c44611a
commit
71c279a2f9
2 changed files with 51 additions and 18 deletions
|
@ -79,6 +79,34 @@ function uploadToSoundCloud(show_instance_id){
|
|||
}
|
||||
}
|
||||
|
||||
function checkCalendarSCUploadStatus(){
|
||||
|
||||
var url = '/Library/get-upload-to-soundcloud-status',
|
||||
span,
|
||||
id;
|
||||
|
||||
function checkSCUploadStatusCallback(json) {
|
||||
|
||||
if (json.sc_id > 0) {
|
||||
span.removeClass("progress").addClass("soundcloud");
|
||||
|
||||
}
|
||||
else if (json.sc_id == "-3") {
|
||||
span.removeClass("progress").addClass("sc-error");
|
||||
}
|
||||
}
|
||||
|
||||
function checkSCUploadStatusRequest() {
|
||||
|
||||
span = $(this);
|
||||
id = span.parents("div.fc-event").data("event").id;
|
||||
|
||||
$.post(url, {format: "json", id: id, type:"show"}, checkSCUploadStatusCallback);
|
||||
}
|
||||
|
||||
$("#schedule_calendar span.progress").each(checkSCUploadStatusRequest);
|
||||
}
|
||||
|
||||
function findViewportDimensions() {
|
||||
var viewportwidth,
|
||||
viewportheight;
|
||||
|
@ -254,6 +282,7 @@ $(document).ready(function() {
|
|||
$.ajax({ url: "/Api/calendar-init/format/json", dataType:"json", success:createFullCalendar
|
||||
, error:function(jqXHR, textStatus, errorThrown){}});
|
||||
|
||||
setInterval(checkCalendarSCUploadStatus, 5000);
|
||||
|
||||
$.contextMenu({
|
||||
selector: 'div.fc-event',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue