# HG changeset patch # User Sebastien Jodogne # Date 1680718499 -7200 # Node ID efaeec25962317c4f3ef24924aa83d24823843ef # Parent 178b0434256a86fb9e869b3c7bd3ddadd0db7e08 added labels at the study level in orthanc explorer diff -r 178b0434256a -r efaeec259623 OrthancServer/OrthancExplorer/explorer.css --- a/OrthancServer/OrthancExplorer/explorer.css Wed Apr 05 11:31:05 2023 +0200 +++ b/OrthancServer/OrthancExplorer/explorer.css Wed Apr 05 20:14:59 2023 +0200 @@ -63,3 +63,22 @@ .switch-container .ui-slider-switch { width: 100%; } + +.label { + display: inline-block; + background-color: gray; + margin: 5px; + padding: 5px; + border-radius: 10px; +} + +.label button { + background-color: transparent; + border: 0px; + cursor: pointer; + border-radius: 10px; +} + +.label button:hover { + background-color: lightgray; +} diff -r 178b0434256a -r efaeec259623 OrthancServer/OrthancExplorer/explorer.js --- a/OrthancServer/OrthancExplorer/explorer.js Wed Apr 05 11:31:05 2023 +0200 +++ b/OrthancServer/OrthancExplorer/explorer.js Wed Apr 05 20:14:59 2023 +0200 @@ -65,6 +65,12 @@ var MODIFIED_FROM = 'ModifiedFrom'; +function IsAlphanumeric(s) +{ + return s.match(/^[0-9a-zA-Z]+$/); +} + + function DeepCopy(obj) { return jQuery.extend(true, {}, obj); @@ -701,9 +707,82 @@ } target.listview('refresh'); }); +} + + +function RefreshLabels(nodeLabels, resourceLevel, resourceId) +{ + GetResource('/' + resourceLevel + '/' + resourceId + '/labels', function(labels) { + nodeLabels.empty(); + + if (labels.length > 0) { + for (var i = 0; i < labels.length; i++) { + var removeButton = $('