LT-302: Adding close buttons to Audit Log screen
This commit is contained in:
1 parent
c004aee40f
commit
3c831c5d5a
13 files changed
+87
-12
No files matched your search
@@ -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">
|
||||
<div id="hipaaLogPage" class="page">
|
||||
{{#if hasCloseButtons}}
|
||||
{{> hipaaCloseButton header="true" }}
|
||||
{{/if}}
|
||||
|
||||
{{> hipaaRibbon }}
|
||||
|
||||
<div class="container">
|
||||
@@ -8,5 +12,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if hasCloseButtons}}
|
||||
{{> hipaaCloseButton }}
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -4,9 +4,12 @@ Router.route("/audit", {
|
||||
});
|
||||
|
||||
|
||||
Template.hipaaLogPage.helpers({});
|
||||
|
||||
Template.hipaaLogPage.events({});
|
||||
Template.hipaaLogPage.helpers({
|
||||
hasCloseButtons: function() {
|
||||
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?
|
||||
Template.hipaaLogPage.onCreated(function() {
|
||||
|
||||
@@ -102,4 +102,4 @@ Template.hipaaRibbon.helpers({
|
||||
getEndDate: function () {
|
||||
return moment(Session.get("endDateFilter")).format("YYYY-MM-DD");
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user