diff 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
line wrap: on
line diff
--- a/WebApplication/viewer.js	Thu Feb 26 10:26:51 2015 +0100
+++ b/WebApplication/viewer.js	Thu Feb 26 11:35:04 2015 +0100
@@ -346,6 +346,8 @@
     text: false
   });
 
+  $('#unstable').tooltip();
+
   var series = window.url('?series', window.location.search);
   if (series == null)
     return;
@@ -382,6 +384,30 @@
   }
 
 
+  $.ajax({
+    type: 'GET',
+    url: '../../series/' + series,
+    dataType: 'json',
+    cache: false,
+    async: true,
+    success: function(series) {
+      var unstable = !series.IsStable;
+
+      if (unstable &&
+          'Status' in series &&
+          series.Status == 'Complete') {
+        // The series is not tagged as stable by Orthanc, but all the
+        // expected instances are already available.
+        unstable = false;
+      }
+
+      if (unstable) {
+        $('#unstable').show();
+      }
+    }
+  });
+  
+
   var currentImageIndex = 0;
 
   // updates the image display