More cleanup for the study list

This commit is contained in:
Erik Ziegler committed 2016-07-22 11:00:16 +02:00
1 parent 093a97f0f3
commit 848251eba9
9 files changed
+30 -51

No files matched your search

@@ -7,10 +7,10 @@ Meteor.startup(function() {
},
signIn: {
displayFullName: true,
destination: '/worklist'
destination: '/'
},
signUp: {
destination: '/worklist'
destination: '/'
},
themeColors: {
primary: ''
@@ -3,20 +3,8 @@
// use this to repopulate the variable
ViewerData = Session.get('ViewerData') || {};
Template.lesionTracker.onCreated(function() {
// showViewer to go to viewer from audit
this.showWorklistMenu = new ReactiveVar(true);
// Get url and check worklist
var currentRoute = Router.current();
if (!currentRoute || !currentRoute.route) {
return;
}
var currentPath = currentRoute.route.path(this);
if (currentPath === '/' || currentPath === '/worklist') {
this.showWorklistMenu.set(false);
}
});
var worklistContentId = 'worklistTab';
var viewerContentId = 'viewerTab';
Template.lesionTracker.onRendered(function() {
var templateData = Template.currentData();
@@ -38,8 +26,6 @@ Template.lesionTracker.onRendered(function() {
Template.lesionTracker.events({
'click .js-toggle-studyList': function() {
var contentId = Session.get('activeContentId');
var worklistContentId = 'worklistTab';
var viewerContentId = 'viewerTab';
if (contentId !== worklistContentId) {
switchToTab(worklistContentId);
@@ -52,18 +38,16 @@ Template.lesionTracker.events({
Session.set('defaultSignInMessage', 'Tumor tracking in your browser.');
Template.lesionTracker.helpers({
showWorklistMenu: function() {
return Template.instance().showWorklistMenu.get();
},
studyListToggleText: function() {
var contentId = Session.get('activeContentId');
if (!contentId) {
// If the Viewer has not been opened yet, 'Back to viewer' should
// not be displayed
var viewerContentExists = !!Object.keys(ViewerData).length;
if (!viewerContentExists) {
return;
}
var worklistContentId = 'worklistTab';
var viewerContentId = 'viewerTab';
if (contentId === worklistContentId) {
return 'Back to viewer';
} else if (contentId === viewerContentId) {
@@ -1,5 +1,7 @@
@import "{design}/app"
$expandedHeight = 160px
.topBar
height: $topBarHeight
color: $textPrimaryColor
@@ -11,6 +13,7 @@
display: inline-block
img.logoImage
display: inline-block
height: 100%
max-height: 50px
margin: 0 5px
@@ -42,11 +45,15 @@
&.studyList
background-color: rgba(21, 25, 30, 0.7)
height: 160px
height: $expandedHeight
.brandSection
margin-top: 50px
margin-left: 50px
width: 80%
padding-left: 50px
line-height: $expandedHeight
img.logoImage
margin: 5px 5px 15px 5px
.logoText
font-size: 30px
@@ -21,12 +21,6 @@ Template.userAccountMenu.helpers({
}
return !!Meteor.user().emails[0].verified;
},
showWorklistMenu: function() {
var currentPath = Router.current().route.path(this);
if (currentPath !== '/' && currentPath !== '/worklist') {
return true;
}
}
});