LT-302: Adding close buttons to Audit Log screen
This commit is contained in:
parent
c004aee40f
commit
3c831c5d5a
@ -8,6 +8,13 @@ Template.app.onCreated(() => {
|
|||||||
ViewerData = Session.get('ViewerData') || {};
|
ViewerData = Session.get('ViewerData') || {};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Template.app.onRendered(() => {
|
||||||
|
const contentId = Session.get('activeContentId');
|
||||||
|
if(contentId === viewerContentId) {
|
||||||
|
switchToTab(contentId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Template.app.events({
|
Template.app.events({
|
||||||
'click .js-toggle-studyList'() {
|
'click .js-toggle-studyList'() {
|
||||||
const contentId = Session.get('activeContentId');
|
const contentId = Session.get('activeContentId');
|
||||||
|
|||||||
@ -29,12 +29,17 @@ Router.route('/', function() {
|
|||||||
if (Meteor.user() && Meteor.userId()) {
|
if (Meteor.user() && Meteor.userId()) {
|
||||||
if (verifyEmail && Meteor.user().emails && !Meteor.user().emails[0].verified) {
|
if (verifyEmail && Meteor.user().emails && !Meteor.user().emails[0].verified) {
|
||||||
this.render('emailVerification', routerOptions);
|
this.render('emailVerification', routerOptions);
|
||||||
} else {
|
}
|
||||||
Session.set('activeContentId', 'studylistTab');
|
else {
|
||||||
|
const contentId = Session.get('activeContentId');
|
||||||
|
if(!contentId) {
|
||||||
|
Session.set('activeContentId', 'studylistTab');
|
||||||
|
}
|
||||||
this.render('app', routerOptions);
|
this.render('app', routerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
this.render('entrySignIn', routerOptions);
|
this.render('entrySignIn', routerOptions);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
<template name="hipaaCloseButton">
|
||||||
|
<div class="close-btn">
|
||||||
|
{{#if header}}
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
{{else}}
|
||||||
|
<button type="button" class="btn btn-default">
|
||||||
|
Close
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
Template.hipaaCloseButton.events({
|
||||||
|
'click button': function() {
|
||||||
|
var history = window.history;
|
||||||
|
|
||||||
|
if(history.length > 0) {
|
||||||
|
history.go(-1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
window.location = '/'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
.close-btn {
|
||||||
|
text-align: right;
|
||||||
|
padding: 5px 5px 0;
|
||||||
|
margin-right: 10px;
|
||||||
|
|
||||||
|
&:before,
|
||||||
|
&:after {
|
||||||
|
display: table;
|
||||||
|
content: " ";
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-default {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,9 @@
|
|||||||
<template name="hipaaLogPage">
|
<template name="hipaaLogPage">
|
||||||
<div id="hipaaLogPage" class="page">
|
<div id="hipaaLogPage" class="page">
|
||||||
|
{{#if hasCloseButtons}}
|
||||||
|
{{> hipaaCloseButton header="true" }}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{> hipaaRibbon }}
|
{{> hipaaRibbon }}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@ -8,5 +12,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#if hasCloseButtons}}
|
||||||
|
{{> hipaaCloseButton }}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -4,9 +4,12 @@ Router.route("/audit", {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Template.hipaaLogPage.helpers({});
|
Template.hipaaLogPage.helpers({
|
||||||
|
hasCloseButtons: function() {
|
||||||
Template.hipaaLogPage.events({});
|
var hipaaAuditLog = Session.get('HipaaAuditLogConfig');
|
||||||
|
return hipaaAuditLog && hipaaAuditLog.closeButton;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// We probably don't need this, but the subscription in subscriptions.js doesn't seem to be working?
|
// We probably don't need this, but the subscription in subscriptions.js doesn't seem to be working?
|
||||||
Template.hipaaLogPage.onCreated(function() {
|
Template.hipaaLogPage.onCreated(function() {
|
||||||
|
|||||||
@ -102,4 +102,4 @@ Template.hipaaRibbon.helpers({
|
|||||||
getEndDate: function () {
|
getEndDate: function () {
|
||||||
return moment(Session.get("endDateFilter")).format("YYYY-MM-DD");
|
return moment(Session.get("endDateFilter")).format("YYYY-MM-DD");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -14,6 +14,7 @@ if (Meteor.isClient) {
|
|||||||
select: "",
|
select: "",
|
||||||
ribbon: ""
|
ribbon: ""
|
||||||
},
|
},
|
||||||
highlightColor: ""
|
highlightColor: "",
|
||||||
|
closeButton: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,6 +37,10 @@ Package.on_use(function (api) {
|
|||||||
api.addFiles('components/hipaaLogPage/hipaaLogPage.js', "client");
|
api.addFiles('components/hipaaLogPage/hipaaLogPage.js', "client");
|
||||||
api.addFiles('components/hipaaLogPage/hipaaLogPage.less', "client");
|
api.addFiles('components/hipaaLogPage/hipaaLogPage.less', "client");
|
||||||
|
|
||||||
|
api.addFiles('components/hipaaCloseButton/hipaaCloseButton.html', "client");
|
||||||
|
api.addFiles('components/hipaaCloseButton/hipaaCloseButton.js', "client");
|
||||||
|
api.addFiles('components/hipaaCloseButton/hipaaCloseButton.less', "client");
|
||||||
|
|
||||||
api.export('HipaaAuditLog');
|
api.export('HipaaAuditLog');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -62,6 +62,7 @@ switchToTab = function(contentId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var studies = ViewerData[contentId].studies;
|
var studies = ViewerData[contentId].studies;
|
||||||
|
|
||||||
if (studies) {
|
if (studies) {
|
||||||
// ViewerData already has the meta data (in cases when studylist is launched externally)
|
// ViewerData already has the meta data (in cases when studylist is launched externally)
|
||||||
viewStudiesInTab(contentId, studies);
|
viewStudiesInTab(contentId, studies);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
Meteor.startup(function() {
|
Meteor.startup(() => {
|
||||||
// TODO: Configure some settings
|
// TODO: Configure some settings
|
||||||
HipaaAuditLog.configure({
|
HipaaAuditLog.configure({
|
||||||
classes: {
|
classes: {
|
||||||
@ -6,6 +6,7 @@ Meteor.startup(function() {
|
|||||||
select: 'form-control',
|
select: 'form-control',
|
||||||
ribbon: ''
|
ribbon: ''
|
||||||
},
|
},
|
||||||
highlightColor: '#006289'
|
highlightColor: '#006289',
|
||||||
|
closeButton: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -1,2 +1,6 @@
|
|||||||
#hipaaLogPage
|
#hipaaLogPage
|
||||||
margin-top: 40px
|
margin-top: 40px
|
||||||
|
#hipaaAuditLog
|
||||||
|
.hipaaAuditItem
|
||||||
|
&:nth-child(1)
|
||||||
|
border-top: 1px solid lightgray
|
||||||
Loading…
Reference in New Issue
Block a user