diff OrthancServer/OrthancExplorer/explorer.js @ 5245:b2de3a2ad3b9

Orthanc Explorer: buttons to copy the URL of ZIP/DICOM to the clipboard
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 Apr 2023 12:20:27 +0200
parents 0ea402b4d901
children b36f82260f41
line wrap: on
line diff
--- a/OrthancServer/OrthancExplorer/explorer.js	Wed Apr 05 17:54:21 2023 +0200
+++ b/OrthancServer/OrthancExplorer/explorer.js	Fri Apr 07 12:20:27 2023 +0200
@@ -1365,6 +1365,36 @@
   window.location.href = '../series/' + $.mobile.pageData.uuid + '/media';
 });
 
+
+$('#patient-archive-link').live('click', function(e) {
+  e.preventDefault();
+  var url = new URL('../patients/' + $.mobile.pageData.uuid + '/archive', window.location.href);
+  navigator.clipboard.writeText(url.href);
+  $(e.target).closest('li').buttonMarkup({ icon: 'check' });
+});
+
+$('#study-archive-link').live('click', function(e) {
+  e.preventDefault();
+  var url = new URL('../studies/' + $.mobile.pageData.uuid + '/archive', window.location.href);
+  navigator.clipboard.writeText(url.href);
+  $(e.target).closest('li').buttonMarkup({ icon: 'check' });
+});
+
+$('#series-archive-link').live('click', function(e) {
+  e.preventDefault();
+  var url = new URL('../series/' + $.mobile.pageData.uuid + '/archive', window.location.href);
+  navigator.clipboard.writeText(url.href);
+  $(e.target).closest('li').buttonMarkup({ icon: 'check' });
+});
+
+$('#instance-download-link').live('click', function(e) {
+  e.preventDefault();
+  var url = new URL('../instances/' + $.mobile.pageData.uuid + '/file', window.location.href);
+  navigator.clipboard.writeText(url.href);
+  $(e.target).closest('li').buttonMarkup({ icon: 'check' });
+});
+
+
 $('.patient-attachment').live('click', function(e) {
   e.preventDefault();  //stop the browser from following
   window.location.href = '../patients/' + $.mobile.pageData.uuid + '/attachments/' + e.target.id + '/data';