More cleanup for the study list

This commit is contained in:
Erik Ziegler 2016-06-08 17:33:43 +02:00
parent 093a97f0f3
commit 848251eba9
9 changed files with 30 additions and 51 deletions

View File

@ -40,20 +40,7 @@ Router.route('/', function() {
if (verifyEmail && Meteor.user().emails && !Meteor.user().emails[0].verified) {
this.render('emailVerification', routerOptions);
} else {
this.render('lesionTracker', routerOptions);
}
} else {
this.render('entrySignIn', routerOptions);
}
});
Router.route('/worklist', function() {
// Check user is logged in
if (Meteor.user() && Meteor.userId()) {
if (verifyEmail && Meteor.user().emails && !Meteor.user().emails[0].verified) {
this.render('emailVerification', routerOptions);
} else {
Session.set('activeContentId', 'worklistTab');
this.render('lesionTracker', routerOptions);
}

View File

@ -7,10 +7,10 @@ Meteor.startup(function() {
},
signIn: {
displayFullName: true,
destination: '/worklist'
destination: '/'
},
signUp: {
destination: '/worklist'
destination: '/'
},
themeColors: {
primary: ''

View File

@ -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) {

View File

@ -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

View File

@ -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;
}
}
});

View File

@ -4,7 +4,7 @@
Study list
</div>
<div class="studyCount pull-right">
85
{{numberOfStudies}}
</div>
<div class="pull-right">
{{>worklistToolbar}}

View File

@ -24,6 +24,10 @@ Template.worklistResult.helpers({
});
},
numberOfStudies: function() {
return WorklistStudies.find().count();
},
showLoadingText: function() {
return Session.get('searchResults').showLoadingText;
},

View File

@ -5,7 +5,7 @@
<label for="btnImport">
<i class="fa fa-plus"></i> Add new study
</label>
<input id="btnImport" class="inputfile" type="file" webkitdirectory directory multiple>
<input id="btnImport" type="file" webkitdirectory directory multiple>
</div>
{{/if }}
</div>

View File

@ -9,13 +9,16 @@
font-weight: 300
cursor: pointer
*
pointer-events: none
&:hover
color: $hoverColor
&:active
color: $activeColor
.inputfile
input
width: 0.1px;
height: 0.1px
opacity: 0