Mercurial > hg > orthanc
comparison OrthancExplorer/explorer.js @ 3533:2090ec6a83a5
create a default user if none is provided, while issuing a warning in Orthanc Explorer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 04 Oct 2019 17:41:43 +0200 |
parents | 1a65beb5e52f |
children | cac8ffcb9cef |
comparison
equal
deleted
inserted
replaced
3532:e4b4b4dbef99 | 3533:2090ec6a83a5 |
---|---|
77 $tree.tree('closeNode', event.node, true); | 77 $tree.tree('closeNode', event.node, true); |
78 else | 78 else |
79 $tree.tree('openNode', event.node, true); | 79 $tree.tree('openNode', event.node, true); |
80 } | 80 } |
81 ); | 81 ); |
82 | |
83 // Inject the template of the warning about insecure setup as the | |
84 // first child of each page | |
85 var insecure = $('#template-insecure').html(); | |
86 $('[data-role="page"]>[data-role="content"]').prepend(insecure); | |
82 | 87 |
83 currentPage = $.mobile.pageData.active; | 88 currentPage = $.mobile.pageData.active; |
84 currentUuid = $.mobile.pageData.uuid; | 89 currentUuid = $.mobile.pageData.uuid; |
85 if (!(typeof currentPage === 'undefined') && | 90 if (!(typeof currentPage === 'undefined') && |
86 !(typeof currentUuid === 'undefined') && | 91 !(typeof currentUuid === 'undefined') && |
385 $('.orthanc-name').html($('<a>') | 390 $('.orthanc-name').html($('<a>') |
386 .addClass('ui-link') | 391 .addClass('ui-link') |
387 .attr('href', 'explorer.html') | 392 .attr('href', 'explorer.html') |
388 .text(s.Name) | 393 .text(s.Name) |
389 .append(' » ')); | 394 .append(' » ')); |
395 } | |
396 | |
397 // New in Orthanc 1.5.8 | |
398 if ('IsDefaultUser' in s && | |
399 s.IsDefaultUser) { | |
400 $('.warning-insecure').show(); | |
401 } else { | |
402 $('.warning-insecure').hide(); | |
390 } | 403 } |
391 } | 404 } |
392 }); | 405 }); |
393 }); | 406 }); |
394 | 407 |