# HG changeset patch # User Sebastien Jodogne # Date 1355003333 -3600 # Node ID f2286c741109e66d84390161cee861cd68fcdb73 # Parent d384af918264d56cfc234ab7041ea11073f72a0a patient protection in Orthanc Explorer diff -r d384af918264 -r f2286c741109 OrthancExplorer/explorer.css --- a/OrthancExplorer/explorer.css Sat Dec 08 22:34:56 2012 +0100 +++ b/OrthancExplorer/explorer.css Sat Dec 08 22:48:53 2012 +0100 @@ -37,3 +37,7 @@ text-decoration: none; color: white !important; } + +.switch-container .ui-slider-switch { + width: 100%; +} \ No newline at end of file diff -r d384af918264 -r f2286c741109 OrthancExplorer/explorer.html --- a/OrthancExplorer/explorer.html Sat Dec 08 22:34:56 2012 +0100 +++ b/OrthancExplorer/explorer.html Sat Dec 08 22:48:53 2012 +0100 @@ -82,7 +82,13 @@

- Go to patient finder +

+ +
+ Delete this patient Download ZIP

diff -r d384af918264 -r f2286c741109 OrthancExplorer/explorer.js --- a/OrthancExplorer/explorer.js Sat Dec 08 22:34:56 2012 +0100 +++ b/OrthancExplorer/explorer.js Sat Dec 08 22:48:53 2012 +0100 @@ -378,6 +378,18 @@ } target.listview('refresh'); + + // Check whether this patient is protected + $.ajax({ + url: '../patients/' + $.mobile.pageData.uuid + '/protected', + type: 'GET', + dataType: 'text', + async: false, + success: function (s) { + var v = (s == '1') ? 'on' : 'off'; + $('#protection').val(v).slider('refresh'); + } + }); }); }); } @@ -786,3 +798,13 @@ window.location.href = '../series/' + $.mobile.pageData.uuid + '/archive'; }); +$('#protection').live('change', function(e) { + var isProtected = e.target.value == "on"; + $.ajax({ + url: '../patients/' + $.mobile.pageData.uuid + '/protected', + type: 'PUT', + dataType: 'text', + data: isProtected ? '1' : '0', + async: false + }); +});