Skip to content

Instantly share code, notes, and snippets.

@phillipsm
Created July 3, 2014 19:43
Show Gist options
  • Save phillipsm/ad7981ed6bf8571e0c5b to your computer and use it in GitHub Desktop.
Save phillipsm/ad7981ed6bf8571e0c5b to your computer and use it in GitHub Desktop.
function check_status() {
// Check our status service to see if we have archivng jobs pending
var request = $.ajax({
url: status_url + newLinky.linky_id,
type: "GET",
dataType: "json",
cache: false
});
request.done(function(data) {
// if no status is pending
if (data.image_capture !== 'pending') {
$('#spinner').slideUp();
$('.thumbnail-placeholder').append('<div class="library-thumbnail"><img src="' +
MEDIA_URL + data.path + '/' + data.image_capture + '"></div>');
$.each(refreshIntervalIds, function(ndx, id) {
clearInterval(id);
});
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment