Improvements to study list selection, study/timepoint association UI (LT-116 and LT-60)

This commit is contained in:
Erik Ziegler committed 2016-01-13 11:50:07 +01:00
1 parent 41b75de814
commit cb8672576e
8 files changed
+179 -24

No files matched your search

@@ -20,8 +20,10 @@
</span> Anonymize
</a>
<a><i class="fa fa-trash fa-lg"></i> Delete</a>
<a><i class="fa fa-share fa-lg"></i> Share</a>
<a><i class="fa fa-send-o fa-lg"></i> Send</a>
<a><i class="fa fa-exchange fa-lg"></i> Export</a>
<a><i class="fa fa-download fa-lg"></i> Download</a>
<a><i class="fa fa-photo fa-lg"></i> View Series Details</a>
</li>
</ul>
</div>
@@ -36,11 +36,11 @@ openStudyContextMenu = function(e, template) {
dialogProperty.top = e.pageY;// - dialog.outerHeight() - 40;
dialogProperty.left = e.pageX;// - dialog.outerWidth() / 2;
var pageHeight = $(window).height();
var pageHeight = $(document.body).height();
dialogProperty.top = Math.max(dialogProperty.top, 0);
dialogProperty.top = Math.min(dialogProperty.top, pageHeight - dialog.outerHeight());
var pageWidth = $(window).width();
var pageWidth = $(document.body).width();
dialogProperty.left = Math.max(dialogProperty.left, 0);
dialogProperty.left = Math.min(dialogProperty.left, pageWidth - dialog.outerWidth());
}
@@ -33,21 +33,28 @@ function handleShiftClick(studyRow, data) {
}
// Loop through the rows in between current and previous selected studies
rowsInBetween.each(function(index, row) {
if ($(row).is(studyRow)) {
// When we reach the currently clicked-on row, stop
return false;
} else if ($(row).hasClass('active')) {
rowsInBetween.each(function() {
var row = $(this);
if (row.hasClass('active')) {
// If we find one that is already selected, do nothing
return;
}
// Get the relevant studyInstanceUid
var studyInstanceUid = $(row).attr('studyInstanceUid');
var studyInstanceUid = row.attr('studyInstanceUid');
// Retrieve the data context through Blaze
var data = Blaze.getData(this);
// Set the current study as selected
WorklistSelectedStudies.insert(data);
studyRow.addClass('active');
row.addClass('active');
// When we reach the currently clicked-on row, stop the loop
if (row.is(studyRow)) {
return false;
}
return true;
});
@@ -77,6 +84,7 @@ function handleCtrlClick(studyRow, data) {
// Set this as the previously selected row, so the user can
// use Shift to select from this point onwards
Worklist.previouslySelected = studyRow;
log.info('Worklist PreviouslySelected set: ' + studyRow.index());
}
}
@@ -102,6 +110,7 @@ Template.worklistStudy.events({
// Set the previous study to the currently clicked-on study
Worklist.previouslySelected = studyRow;
log.info('Worklist PreviouslySelected set: ' + studyRow.index());
// Set the current study as selected
WorklistSelectedStudies.insert(data);