WIP reorganization
This commit is contained in:
1 parent
6706dfe634
commit
054e37dfb7
266 files changed
+98
-620
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Meteor.startup(function() {
|
||||
if (Meteor.isClient){
|
||||
ActiveEntry.configure({
|
||||
logo: {
|
||||
url: OHIF.utils.absoluteUrl('/images/logo.png'),
|
||||
displayed: true
|
||||
},
|
||||
signIn: {
|
||||
displayFullName: true,
|
||||
destination: '/'
|
||||
},
|
||||
signUp: {
|
||||
destination: '/'
|
||||
},
|
||||
themeColors: {
|
||||
primary: ''
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
@import "{ohif:design}/app.styl"
|
||||
|
||||
#entrySignIn.entryPage,
|
||||
#entrySignUp.entryPage,
|
||||
#changePassword,
|
||||
#forgotPassword,
|
||||
#resetPassword
|
||||
.wrapper-auth
|
||||
.title-auth
|
||||
color: white
|
||||
|
||||
.entryLogo
|
||||
margin-top: 50px
|
||||
height: 50px
|
||||
width: 50px
|
||||
|
||||
.input-symbol
|
||||
.fa
|
||||
color: #333333
|
||||
|
||||
button
|
||||
&.btn-main
|
||||
padding-left: 0
|
||||
|
||||
.entryPage .wrapper-auth,.subtitle-auth
|
||||
theme('color', '$textPrimaryColor')
|
||||
@@ -0,0 +1,29 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ActiveEntry } from 'meteor/clinical:active-entry';
|
||||
|
||||
|
||||
Template.entrySignIn.hooks({
|
||||
|
||||
rendered: function () {
|
||||
if (!Meteor.settings.public.demoUserEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create Test Drive button dynamically
|
||||
let btnTestDrive = $('<button/>', {
|
||||
id: 'btnTestDrive',
|
||||
text: 'Test Drive',
|
||||
class: 'btn btn-primary',
|
||||
style: 'position: absolute; width: 150px; top: 20px; right: 20px; padding-left: 0;',
|
||||
title: 'Login with Demo User',
|
||||
click: function () {
|
||||
// Login with demo user
|
||||
ActiveEntry.signIn('demo@ohif.org', '12345678aA*');
|
||||
}
|
||||
});
|
||||
|
||||
const entrySignIn = this.find('#entrySignIn');
|
||||
$(entrySignIn).append(btnTestDrive);
|
||||
}
|
||||
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
import './activeEntry.styl';
|
||||
import './activeEntry.js';
|
||||
import './activeEntrySignIn.js';
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<template name="emailVerification">
|
||||
<div id="emailVerification">
|
||||
<div id="emailVerificationContent">
|
||||
<h3>Verify Your Email Address</h3>
|
||||
<p>We need to verify your email address. We've sent an email to <b>{{emailAddress}}</b> to verify your address. Please click the link in your email to continue.</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
Template.emailVerification.helpers({
|
||||
emailAddress: function() {
|
||||
return Meteor.user().emails[0].address;
|
||||
}
|
||||
});
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#emailVerification
|
||||
#emailVerificationContent
|
||||
position: absolute
|
||||
top: 0
|
||||
bottom: 0
|
||||
left: 0
|
||||
right: 0
|
||||
margin: auto
|
||||
width: 60%
|
||||
height: 20%
|
||||
z-index: 100
|
||||
border-radius: 5px
|
||||
padding: 10px 20px 10px 20px
|
||||
background-color: rgba(255,255,255,1)
|
||||
outline: none
|
||||
@@ -0,0 +1,12 @@
|
||||
Meteor.startup(() => {
|
||||
// TODO: Configure some settings
|
||||
HipaaAuditLog.configure({
|
||||
classes: {
|
||||
input: 'form-control',
|
||||
select: 'form-control',
|
||||
ribbon: ''
|
||||
},
|
||||
highlightColor: '#006289',
|
||||
closeButton: true
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
#hipaaLogPage
|
||||
margin-top: 40px
|
||||
#hipaaAuditLog
|
||||
.hipaaAuditItem
|
||||
&:nth-child(1)
|
||||
border-top: 1px solid lightgray
|
||||
@@ -0,0 +1,11 @@
|
||||
import './emailVerification/emailVerification.html';
|
||||
import './emailVerification/emailVerification.styl';
|
||||
import './emailVerification/emailVerification.js';
|
||||
|
||||
import './hipaaLogPage/hipaaLogPage.styl';
|
||||
import './hipaaLogPage/hipaaLogPage.js';
|
||||
|
||||
import './lastLoginModal/lastLoginModal.html';
|
||||
|
||||
import './timeoutCountdownDialog/timeoutCountdownDialog.html';
|
||||
import './timeoutCountdownDialog/timeoutCountdownDialog.js';
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<template name="lastLoginModal">
|
||||
{{#dialogSimple (extend this dialogClass='modal-blank')}}
|
||||
<div class="alert alert-info" style="margin: 0 auto;">
|
||||
<a href="#" class="close" data-dismiss="modal">×</a>
|
||||
{{#if lastLoginDate}}
|
||||
<h5>You last logged in on <strong>{{lastLoginDate}}</strong></h5>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/dialogSimple}}
|
||||
</template>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<template name="timeoutCountdownDialog">
|
||||
{{#dialogSimple title='Your session is about to expire'}}
|
||||
<div>You will be logged out in {{timeLeft}}.</div>
|
||||
{{/dialogSimple}}
|
||||
</template>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Session } from 'meteor/session';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Meteor.startup(() => {
|
||||
const closeObserver = new Tracker.Dependency();
|
||||
$.event.add(window, 'TriggerCloseTimeoutCountdownDialog', () => closeObserver.changed());
|
||||
$.event.add(window, 'TriggerOpenTimeoutCountdownDialog', (event, timeLeft) => {
|
||||
OHIF.ui.showDialog('timeoutCountdownDialog', {
|
||||
timeLeft,
|
||||
closeObserver
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Template.timeoutCountdownDialog.helpers({
|
||||
timeLeft() {
|
||||
const timeLeft = Session.get('countdownDialogTimeLeft');
|
||||
const suffix = timeLeft > 1 ? 'seconds': 'second';
|
||||
return `${timeLeft} ${suffix}`;
|
||||
}
|
||||
});
|
||||
|
||||
Template.timeoutCountdownDialog.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
const { timeLeft, closeObserver } = instance.data;
|
||||
|
||||
instance.close = callback => {
|
||||
const $modal = instance.$('.modal');
|
||||
$modal.on('hidden.bs.modal', () => callback()).modal('hide');
|
||||
};
|
||||
|
||||
instance.autorun(computation => {
|
||||
closeObserver.depend();
|
||||
if (computation.firstRun) return;
|
||||
instance.close(instance.data.promiseResolve);
|
||||
});
|
||||
|
||||
Session.set('countdownDialogTimeLeft', timeLeft);
|
||||
});
|
||||
|
||||
Template.timeoutCountdownDialog.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
let timeLeft = instance.data.timeLeft;
|
||||
|
||||
// Update countdownDialogTimeLeft session every second
|
||||
instance.interval = setInterval(() => {
|
||||
Session.set('countdownDialogTimeLeft', --timeLeft);
|
||||
if (!timeLeft) {
|
||||
instance.close(instance.data.promiseReject);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
Template.timeoutCountdownDialog.onDestroyed(() => {
|
||||
const instance = Template.instance();
|
||||
clearInterval(instance.interval);
|
||||
Session.delete('countdownDialogTimeLeft');
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
import { Router } from 'meteor/clinical:router';
|
||||
|
||||
Accounts.onLogout(() => {
|
||||
Router.go('/entrySignIn');
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import './active-entry';
|
||||
import './components';
|
||||
import './lib';
|
||||
import './handlers';
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Router } from 'meteor/clinical:router';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
OHIF.user.audit = () => {
|
||||
Router.go('/audit');
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Router } from 'meteor/clinical:router';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
OHIF.user.changePassword = () => {
|
||||
Router.go('/changePassword');
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
import './audit';
|
||||
import './changePassword';
|
||||
Reference in new issue
Block a user