comparison WebApplication/viewer.js @ 2:c919d488471f

throbber to reflect the receiving of instances
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 26 Feb 2015 11:35:04 +0100
parents 02f7a0400a91
children ca16691db433
comparison
equal deleted inserted replaced
1:828c61fc8253 2:c919d488471f
344 $('#open-toolbar').button({ 344 $('#open-toolbar').button({
345 icons: { primary: 'ui-icon-custom-orthanc' }, 345 icons: { primary: 'ui-icon-custom-orthanc' },
346 text: false 346 text: false
347 }); 347 });
348 348
349 $('#unstable').tooltip();
350
349 var series = window.url('?series', window.location.search); 351 var series = window.url('?series', window.location.search);
350 if (series == null) 352 if (series == null)
351 return; 353 return;
352 354
353 console.log('Displaying series: ' + series); 355 console.log('Displaying series: ' + series);
379 { 381 {
380 console.log('No image in this series'); 382 console.log('No image in this series');
381 return; 383 return;
382 } 384 }
383 385
386
387 $.ajax({
388 type: 'GET',
389 url: '../../series/' + series,
390 dataType: 'json',
391 cache: false,
392 async: true,
393 success: function(series) {
394 var unstable = !series.IsStable;
395
396 if (unstable &&
397 'Status' in series &&
398 series.Status == 'Complete') {
399 // The series is not tagged as stable by Orthanc, but all the
400 // expected instances are already available.
401 unstable = false;
402 }
403
404 if (unstable) {
405 $('#unstable').show();
406 }
407 }
408 });
409
384 410
385 var currentImageIndex = 0; 411 var currentImageIndex = 0;
386 412
387 // updates the image display 413 // updates the image display
388 function updateTheImage(imageIndex) { 414 function updateTheImage(imageIndex) {