diff ViewerPlugin/OrthancExplorer.js @ 270:0040ce361d4c iiif

serving openseadragon
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 10 Jul 2023 17:16:32 +0200
parents dab414e5b520
children 801790c81f20
line wrap: on
line diff
--- a/ViewerPlugin/OrthancExplorer.js	Mon Jul 10 16:23:46 2023 +0200
+++ b/ViewerPlugin/OrthancExplorer.js	Mon Jul 10 17:16:32 2023 +0200
@@ -24,6 +24,7 @@
   var seriesId = $.mobile.pageData.uuid;
 
   $('#mirador-button').remove();
+  $('#openseadragon-button').remove();
   $('#wsi-button').remove();
 
   $('#series-iiif-button').remove();
@@ -54,6 +55,23 @@
           }
         });
 
+        if (${SERVE_OPEN_SEADRAGON}) {
+          var b = $('<a>')
+              .attr('id', 'openseadragon-button')
+              .attr('data-role', 'button')
+              .attr('href', '#')
+              .attr('data-icon', 'search')
+              .attr('data-theme', 'e')
+              .text('Test IIIF in OpenSeadragon')
+              .button();
+
+          b.insertAfter($('#series-info'));
+          b.click(function() {
+            if ($.mobile.pageData) {
+              window.open('../wsi/app/openseadragon.html?image=../iiif/tiles/' + seriesId + '/info.json');
+            }
+          });
+        }
       }
 
       if (${SERVE_IIIF}) {
@@ -86,7 +104,7 @@
             .attr('href', '#')
             .attr('data-icon', 'search')
             .attr('data-theme', 'e')
-            .text('Open IIIF in Mirador')
+            .text('Test IIIF in Mirador')
             .button();
 
         b.insertAfter($('#series-info'));