Mercurial > hg > orthanc
diff OrthancExplorer/explorer.js @ 152:4829c054751a
improved navigation in Orthanc Explorer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 23 Oct 2012 15:02:54 +0200 |
parents | 11e48e70c039 |
children | 5b6b5c9f280f |
line wrap: on
line diff
--- a/OrthancExplorer/explorer.js Tue Oct 23 14:34:57 2012 +0200 +++ b/OrthancExplorer/explorer.js Tue Oct 23 15:02:54 2012 +0200 @@ -319,19 +319,20 @@ } +$('[data-role="page"]').live('pagebeforeshow', function() { + $.ajax({ + url: '/system', + dataType: 'json', + async: false, + success: function(s) { + $('.orthanc-name').html('<a class="ui-link" href="explorer.html">' + s.Name + '</a> » '); + } + }); +}); + $('#find-patients').live('pagebeforeshow', function() { - //$('.orthanc-name').each( - - $.ajax({ - url: '/system', - dataType: 'json', - success: function(s) { - $('.orthanc-name').html(s.Name + ' » '); - } - }); - GetMultipleResources('patients', null, function(patients) { var target = $('#all-patients'); $('li', target).remove(); @@ -388,6 +389,7 @@ GetMultipleResources('series', study.Series, function(series) { SortOnDicomTag(series, 'SeriesDate', false, true); + $('#study .patient-link').attr('href', '#patient?uuid=' + patient.ID); $('#study-info li').remove(); $('#study-info') .append('<li data-role="list-divider">Patient</li>') @@ -422,6 +424,9 @@ GetMultipleResources('instances', series.Instances, function(instances) { Sort(instances, function(x) { return x.IndexInSeries; }, true, false); + $('#series .patient-link').attr('href', '#patient?uuid=' + patient.ID); + $('#series .study-link').attr('href', '#study?uuid=' + study.ID); + $('#series-info li').remove(); $('#series-info') .append('<li data-role="list-divider">Patient</li>') @@ -504,6 +509,10 @@ GetSingleResource('series', instance.ParentSeries, function(series) { GetSingleResource('studies', series.ParentStudy, function(study) { GetSingleResource('patients', study.ParentPatient, function(patient) { + + $('#instance .patient-link').attr('href', '#patient?uuid=' + patient.ID); + $('#instance .study-link').attr('href', '#study?uuid=' + study.ID); + $('#instance .series-link').attr('href', '#series?uuid=' + series.ID); $('#instance-info li').remove(); $('#instance-info')