Mercurial > hg > orthanc-stl
comparison Sources/OrthancExplorer.js @ 46:9b2a2fcc9878 nexus
added option to disable Nexus support
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Apr 2024 07:49:45 +0200 |
parents | 967f947014ac |
children | 83b1abee3ece |
comparison
equal
deleted
inserted
replaced
45:967f947014ac | 46:9b2a2fcc9878 |
---|---|
393 } | 393 } |
394 } | 394 } |
395 | 395 |
396 | 396 |
397 function AddOpenStlNexusButton(instanceId, id, parent) { | 397 function AddOpenStlNexusButton(instanceId, id, parent) { |
398 $.ajax({ | 398 if (${IS_NEXUS_ENABLED}) { |
399 url: '/instances/' + instanceId + '/content/0008,9123', | 399 $.ajax({ |
400 success: function(creatorVersionUid) { | 400 url: '/instances/' + instanceId + '/content/0008,9123', |
401 if (creatorVersionUid == STL_PLUGIN_NEXUS_CREATOR_VERSION_UID) { | 401 success: function(creatorVersionUid) { |
402 var b = $('<a>') | 402 if (creatorVersionUid == STL_PLUGIN_NEXUS_CREATOR_VERSION_UID) { |
403 .attr('id', id) | 403 var b = $('<a>') |
404 .attr('data-role', 'button') | 404 .attr('id', id) |
405 .attr('href', '#') | 405 .attr('data-role', 'button') |
406 .attr('data-icon', 'search') | 406 .attr('href', '#') |
407 .attr('data-theme', 'e') | 407 .attr('data-icon', 'search') |
408 .text('Nexus 3D viewer') | 408 .attr('data-theme', 'e') |
409 .button(); | 409 .text('Nexus 3D viewer') |
410 | 410 .button(); |
411 b.insertAfter($('#' + parent)); | 411 |
412 | 412 b.insertAfter($('#' + parent)); |
413 b.click(function() { | 413 |
414 window.open('../stl/nexus/threejs.html?model=../../instances/' + instanceId + '/nexus'); | 414 b.click(function() { |
415 }); | 415 window.open('../stl/nexus/threejs.html?model=../../instances/' + instanceId + '/nexus'); |
416 }); | |
417 } | |
416 } | 418 } |
417 } | 419 }); |
418 }); | 420 } |
419 } | 421 } |
420 | 422 |
421 | 423 |
422 $('#series').live('pagebeforeshow', function() { | 424 $('#series').live('pagebeforeshow', function() { |
423 var seriesId = $.mobile.pageData.uuid; | 425 var seriesId = $.mobile.pageData.uuid; |