Skip to content

Commit

Permalink
[#ARCH-51] Web front-end to browse archive content
Browse files Browse the repository at this point in the history
  • Loading branch information
gunterze committed Sep 17, 2013
1 parent 6cfb676 commit f943bfc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dcm4chee-arc-service/src/main/webapp/browse.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<span>Browse</span>
<a href="upload.html">Upload</a>
</div>
<form>
<form id="form"><input type="submit" style="display:none"/>
<table>
<thead>
<tr class="study">
Expand Down
22 changes: 14 additions & 8 deletions dcm4chee-arc-service/src/main/webapp/browse.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(function () {
var query = document.getElementById("query"),
var form = document.getElementById("form"),
query = document.getElementById("query"),
back = document.getElementById("back"),
next = document.getElementById("next"),
aetField = document.getElementById("aet"),
Expand Down Expand Up @@ -171,14 +172,14 @@
addStudyRow = function (list, n, study) {
var row = document.createElement("tr"),
studyUID = study.StudyInstanceUID.Value[0],
retrieveURI = study.RetrieveURI.Value[0],
RetrieveURL = study.RetrieveURL.Value[0],
studyExpand, cell, showAttributesLink, searchSeriesLink;

row.className = "study";
studyExpand = row.insertCell(-1),
cell = row.insertCell(-1),
cell.innerHTML = SHOW_ATTRS
+ "&nbsp;<a href='" + retrieveURI + "' title='Download Study'>D</a>&nbsp;"
+ "&nbsp;<a href='" + RetrieveURL + "' title='Download Study'>D</a>&nbsp;"
+ SEARCH_SERIES;
showAttributesLink = cell.firstChild;
searchSeriesLink = cell.lastChild;
Expand Down Expand Up @@ -265,14 +266,14 @@
var row = document.createElement("tr"),
studyUID = series.StudyInstanceUID.Value[0],
seriesUID = series.SeriesInstanceUID.Value[0],
retrieveURI = series.RetrieveURI.Value[0],
RetrieveURL = series.RetrieveURL.Value[0],
seriesExpand, cell, showAttributesLink, searchInstancesLink;

row.className = "series";
seriesExpand = row.insertCell(-1),
cell = row.insertCell(-1),
cell.innerHTML = SHOW_ATTRS
+ "&nbsp;<a href='" + retrieveURI + "' title='Download Series'>D</a>&nbsp;"
+ "&nbsp;<a href='" + RetrieveURL + "' title='Download Series'>D</a>&nbsp;"
+ SEARCH_INSTANCES;
showAttributesLink = cell.firstChild;
searchInstancesLink = cell.lastChild;;
Expand Down Expand Up @@ -374,7 +375,7 @@
},

wadoURIofGSPS = function (inst, index) {
var rsuri = inst.RetrieveURI.Value[0],
var rsuri = inst.RetrieveURL.Value[0],
refSeriesSeq = inst.ReferencedSeriesSequence.Sequence,
i, imax = refSeriesSeq.length,
refSeries, refImageSeq;
Expand Down Expand Up @@ -431,7 +432,7 @@
? createSelect("Referenced Image",
numberOfRefImages(inst.ReferencedSeriesSequence.Sequence))
: createSelect("Frame", intOf(inst.NumberOfFrames)),
wadouri = wadoURIof(inst.RetrieveURI.Value[0]),
wadouri = wadoURIof(inst.RetrieveURL.Value[0]),
cell, showAttributesLink, viewLink;

row.className = "instance";
Expand Down Expand Up @@ -650,11 +651,16 @@
|| attr.Sequence && (attr.Sequence.length + " Item")
|| "&nbsp";
};

query.onclick = function () {
offset = 0;
searchStudies();
};
form.onsubmit = function (e) {
offset = 0;
searchStudies();
e.preventDefault();
};
back.onclick = function () {
offset = Math.max(0, offset - parseInt(limitField.value,10));
searchStudies();
Expand Down

0 comments on commit f943bfc

Please sign in to comment.