Lesion Tracker Redesign so far
This commit is contained in:
1 parent
b247e89d8b
commit
a9a4f3f82b
109 files changed
+2972
-936
No files matched your search
@@ -1,12 +1,3 @@
|
||||
<template name="lesionTrackerLayout">
|
||||
<div class="logoContainer">
|
||||
{{>userAccountMenu}}
|
||||
<a class="navbar-brand" href="http://ohif.org">
|
||||
<img src="/images/logo.png">
|
||||
<h4 class="name">Open Health Imaging Foundation</h4>
|
||||
</a>
|
||||
</div>
|
||||
{{>timeoutCountdownDialog}}
|
||||
{{>progressDialog}}
|
||||
{{>yield }}
|
||||
</template>
|
||||
@@ -1,126 +0,0 @@
|
||||
Session.set('defaultSignInMessage', 'Tumor tracking in your browser.');
|
||||
|
||||
Template.lesionTrackerLayout.helpers({
|
||||
fullName: function() {
|
||||
return Meteor.user().profile.fullName;
|
||||
},
|
||||
|
||||
showWorklistMenu: function() {
|
||||
return Template.instance().showWorklistMenu.get();
|
||||
},
|
||||
|
||||
currentUser: function() {
|
||||
var verifyEmail = Meteor.settings && Meteor.settings.public && Meteor.settings.public.verifyEmail || false;
|
||||
|
||||
if (!Meteor.user() || !Meteor.userId()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!verifyEmail) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Meteor.user().emails[0].verified) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Template.lesionTrackerLayout.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);
|
||||
}
|
||||
|
||||
// Show countdown dialog
|
||||
var handle;
|
||||
$(document).on('TriggerOpenTimeoutCountdownDialog', function(e, leftTime) {
|
||||
// Show modal dialog
|
||||
handle = setInterval(function() {
|
||||
leftTime--;
|
||||
// Set countdownDialogLeftTime session
|
||||
Session.set('countdownDialogLeftTime', leftTime);
|
||||
|
||||
// Show dialog
|
||||
var dialog = $('#timeoutCountdownDialog');
|
||||
if (dialog.css('display') === 'none') {
|
||||
dialog.css('display', 'block');
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
});
|
||||
|
||||
$(document).on('TriggerCloseTimeoutCountdownDialog', function(e) {
|
||||
var dialog = $('#timeoutCountdownDialog');
|
||||
dialog.css('display', 'none');
|
||||
if (handle) {
|
||||
clearInterval(handle);
|
||||
// Close the dialog
|
||||
dialog.css('display', 'none');
|
||||
|
||||
// Remove reviewers info for the user
|
||||
Meteor.call('removeUserFromReviewers', Meteor.userId());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Template.lesionTrackerLayout.onRendered(function() {
|
||||
var oldUserId = undefined;
|
||||
var userName;
|
||||
var lastLoginModalInterval;
|
||||
|
||||
Tracker.autorun(function() {
|
||||
// Hook login/logout
|
||||
var newUserId = Meteor.userId();
|
||||
if (oldUserId === null && newUserId) {
|
||||
Session.set('showLastLoginModal', true);
|
||||
userName = Meteor.user().profile.fullName;
|
||||
// Log
|
||||
HipaaLogger.logEvent({
|
||||
eventType: 'init',
|
||||
userId: Meteor.userId(),
|
||||
userName: userName
|
||||
});
|
||||
} else if (newUserId === null && oldUserId) {
|
||||
// Set showLastLoginModal as null
|
||||
Session.set('showLastLoginModal', null);
|
||||
// Destroy interval for last login modal
|
||||
Meteor.clearInterval(lastLoginModalInterval);
|
||||
console.log('The user logged out');
|
||||
|
||||
// Log
|
||||
// TODO: eventype is not defined for logout in hipaa-audit-log
|
||||
/*HipaaLogger.logEvent({
|
||||
eventType: 'logout',
|
||||
userId: oldUserId,
|
||||
userName: userName
|
||||
});*/
|
||||
|
||||
// Remove the user from Reviewers
|
||||
Meteor.call('removeUserFromReviewers', oldUserId);
|
||||
}
|
||||
oldUserId = Meteor.userId();
|
||||
|
||||
// Trigger last login date popup
|
||||
if (Session.get('showLastLoginModal')) {
|
||||
Modal.show('lastLoginModal');
|
||||
lastLoginModalInterval = Meteor.setInterval( function() {
|
||||
Modal.hide('lastLoginModal');
|
||||
Session.set("showLastLoginModal", null);
|
||||
}, 3000);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
.logoContainer
|
||||
position: absolute
|
||||
height: 40px
|
||||
top: 0
|
||||
right: 0
|
||||
padding: 0 10px
|
||||
color: white
|
||||
@media only screen and (min-device-width : 375px) and (max-device-width : 667px) and (orientation : portrait)
|
||||
width: 15%
|
||||
|
||||
.navbar-brand
|
||||
display: inline-block
|
||||
padding: 0
|
||||
margin-right: 5px
|
||||
height: 100%
|
||||
|
||||
img
|
||||
height: 30px
|
||||
float: left
|
||||
margin-right: 10px
|
||||
margin-top: 5px
|
||||
/* Media queries for iPhone6*/
|
||||
@media only screen and (min-device-width : 375px) and (max-device-width : 667px) and (orientation : portrait)
|
||||
height: 20px
|
||||
margin-top: 10px
|
||||
margin-bottom: 10px
|
||||
margin-right: 5px
|
||||
|
||||
h4.name
|
||||
float: left
|
||||
margin: 10px 0
|
||||
font-family: "Sanchez"
|
||||
color: white
|
||||
@media only screen and (min-device-width : 375px) and (max-device-width : 667px) and (orientation : portrait)
|
||||
font-size: 0.3em
|
||||
font-size: 0.3em
|
||||
width: 50%
|
||||
|
||||
Reference in new issue
Block a user