changeset 1860:b8f54ab47b3b

SeriesList: display the SeriesNumber tag in front of image count.
author Alain Mazy <am@osimis.io>
date Tue, 21 Sep 2021 12:29:48 +0200
parents 58681a5c727b
children 9290d2916150
files .hgignore Applications/StoneWebViewer/BuildInstructions.txt Applications/StoneWebViewer/NEWS Applications/StoneWebViewer/Resources/Styles/_serieslist.scss Applications/StoneWebViewer/WebApplication/app.css Applications/StoneWebViewer/WebApplication/index.html
diffstat 6 files changed, 20 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Mon Sep 20 17:08:23 2021 +0200
+++ b/.hgignore	Tue Sep 21 12:29:48 2021 +0200
@@ -22,6 +22,7 @@
 Applications/Samples/Deprecated/WebAssembly/ThirdPartyDownloads/
 Applications/Samples/Deprecated/WebAssembly/installDir/
 StoneWebViewer/Plugin/ThirdPartyDownloads/
+StoneWebViewer/Resources/package-lock.json
 StoneWebViewer/WebAssembly/ThirdPartyDownloads/
 UnitTestsSources/ThirdPartyDownloads/
 node_modules/
--- a/Applications/StoneWebViewer/BuildInstructions.txt	Mon Sep 20 17:08:23 2021 +0200
+++ b/Applications/StoneWebViewer/BuildInstructions.txt	Tue Sep 21 12:29:48 2021 +0200
@@ -65,4 +65,7 @@
 cd ~/dev/build/wasm-stone-viewer && ninja install
 Then, the viewer is available on http://localhost:8043/stone-webviewer-live/index.html?study=1.2.3.4.5
 
-If you modify the plugin code, you must of course rebuild the plugin and restart Orthanc
\ No newline at end of file
+If you modify the plugin code, you must of course rebuild the plugin and restart Orthanc
+
+If you modify the scss files, you'll need to run:
+- Applications/StoneWebViewer/Resources$ ./node_modules/node-sass/bin/node-sass ./Styles/styles.scss > ../WebApplication/app.css as explained in Applications/StoneWebViewer/Resources/Styles.txt
\ No newline at end of file
--- a/Applications/StoneWebViewer/NEWS	Mon Sep 20 17:08:23 2021 +0200
+++ b/Applications/StoneWebViewer/NEWS	Tue Sep 21 12:29:48 2021 +0200
@@ -1,6 +1,7 @@
 Pending changes in the mainline
 ===============================
 
+* SeriesList: display the SeriesNumber tag in front of image count.
 * In the top right overlay, display ContentDate/ContentTime if they are 
   available in the instance.  If not, StudyDate is displayed (previous
   behavior)
--- a/Applications/StoneWebViewer/Resources/Styles/_serieslist.scss	Mon Sep 20 17:08:23 2021 +0200
+++ b/Applications/StoneWebViewer/Resources/Styles/_serieslist.scss	Tue Sep 21 12:29:48 2021 +0200
@@ -80,11 +80,14 @@
     line-height:15px;
     width:15px;
     height:15px;
-    border-radius: 100%;
+    border-radius: 5px;
     background-color: $gray;
     vertical-align: middle;
     text-align: center;
     font-weight: bold;
+    width: max-content;
+    padding: 1px 5px;
+    line-height: 12px;
 }
 .wvSerieslist__information{
     font-size: 14px;
--- a/Applications/StoneWebViewer/WebApplication/app.css	Mon Sep 20 17:08:23 2021 +0200
+++ b/Applications/StoneWebViewer/WebApplication/app.css	Tue Sep 21 12:29:48 2021 +0200
@@ -2330,11 +2330,14 @@
   line-height: 15px;
   width: 15px;
   height: 15px;
-  border-radius: 100%;
+  border-radius: 5px;
   background-color: gray;
   vertical-align: middle;
   text-align: center;
-  font-weight: bold; }
+  font-weight: bold;
+  width: max-content;
+  padding: 1px 5px;
+  line-height: 12px; }
 
 .wvSerieslist__information {
   font-size: 14px;
--- a/Applications/StoneWebViewer/WebApplication/index.html	Mon Sep 20 17:08:23 2021 +0200
+++ b/Applications/StoneWebViewer/WebApplication/index.html	Tue Sep 21 12:29:48 2021 +0200
@@ -243,7 +243,11 @@
                                      />
                                 
                                 <div v-bind:class="'wvSerieslist__badge--' + study.color"
-                                     v-if="series[seriesIndex].numberOfFrames != 0">{{ series[seriesIndex].numberOfFrames }}</div>
+                                     v-if="series[seriesIndex].numberOfFrames != 0 || series[seriesIndex].tags[SERIES_NUMBER] !== undefined">
+                                     <span v-if="series[seriesIndex].tags[SERIES_NUMBER] !== undefined">#{{ series[seriesIndex].tags[SERIES_NUMBER] }}</span>
+                                     <span v-if="series[seriesIndex].numberOfFrames != 0 && series[seriesIndex].tags[SERIES_NUMBER] !== undefined"> - </span>
+                                     <span v-if="series[seriesIndex].numberOfFrames != 0">{{ series[seriesIndex].numberOfFrames }}</span>
+                                </div>
                               </div>
                             </div>