Work towards tabbed panels. Still very broken
This commit is contained in:
1 parent
9803046f2d
commit
7217b7c67d
41 files changed
+468
-369
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<template name="studyBrowser">
|
||||
<div class="studyBrowser">
|
||||
{{#each studies}}
|
||||
{{> thumbnails}}
|
||||
{{/each}}
|
||||
{{ #each studies }}
|
||||
{{ >thumbnails }}
|
||||
{{ /each }}
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,6 +1,5 @@
|
||||
Template.studyBrowser.helpers({
|
||||
studies : function() {
|
||||
var studies = Session.get('studies');
|
||||
return studies;
|
||||
return this.studies;
|
||||
}
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
<template name="thumbnailEntry">
|
||||
<div class="thumbnailEntry">
|
||||
{{ > imageThumbnail }}
|
||||
{{ >imageThumbnail }}
|
||||
<div class='seriesDescription noselect'>{{seriesDescription}}</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -17,7 +17,7 @@ function cloneElement(element, targetId) {
|
||||
return clone;
|
||||
}
|
||||
|
||||
function thumbnailDragStartHandler(e) {
|
||||
function thumbnailDragStartHandler(e, studies) {
|
||||
// Prevent any scrolling behaviour normally caused by the original event
|
||||
e.originalEvent.preventDefault();
|
||||
|
||||
@@ -28,7 +28,8 @@ function thumbnailDragStartHandler(e) {
|
||||
// Store this data for use during drag and drop
|
||||
OHIF.viewer.dragAndDropData = {
|
||||
studyInstanceUid: imageThumbnail.data('studyInstanceUid'),
|
||||
seriesInstanceUid: imageThumbnail.data('seriesInstanceUid')
|
||||
seriesInstanceUid: imageThumbnail.data('seriesInstanceUid'),
|
||||
studies: studies
|
||||
};
|
||||
|
||||
// Clone the image thumbnail
|
||||
@@ -201,7 +202,8 @@ Template.thumbnailEntry.onRendered(function() {
|
||||
Template.thumbnailEntry.events({
|
||||
// Touch drag/drop events
|
||||
'touchstart .thumbnailEntry, mousedown .thumbnailEntry': function(e) {
|
||||
thumbnailDragStartHandler(e);
|
||||
var studies = Template.parentData(2).studies;
|
||||
thumbnailDragStartHandler(e, studies);
|
||||
},
|
||||
'touchmove .thumbnailEntry': function(e) {
|
||||
thumbnailDragHandler(e, e.currentTarget);
|
||||
|
||||
Reference in new issue
Block a user