Resolved styling issues from Clinical Meteor packages, added HIPAA Audit Log package
This commit is contained in:
1 parent
98222abd0a
commit
2ea9eae0aa
28 files changed
+968
-22
No files matched your search
@@ -0,0 +1,14 @@
|
||||
<template name="hipaaRibbon">
|
||||
<aside id="hipaaRibbon" class="{{getRibbonClass}}">
|
||||
<input type="text" name="hipaaSearchFilter" id="hipaaSearchFilter" class="{{getInputClass}}" value="{{getHipaaSearchFilter}}" placeholder="Search User" style="{{getSearchFilterStyling}}">
|
||||
<input type="date" id="beginDateInput" class="{{getInputClass}}" value="{{getBeginDate}}" style="{{getDateRangeStyling}}">
|
||||
<input type="date" id="endDateInput" class="{{getInputClass}}" value="{{getEndDate}}" style="{{getDateRangeStyling}}">
|
||||
<select id="actionFilter" name="actionFilter" class="{{getSelectClass}}" style="{{getSelectStyling}}">
|
||||
<option id="filterCreatedButton">Created</option>
|
||||
<option id="filterModifiedButton">Modified</option>
|
||||
<option id="filterViewedButton">Viewed</option>
|
||||
<option id="filterAllButton">All</option>
|
||||
</select>
|
||||
</aside>
|
||||
|
||||
</template>
|
||||
@@ -0,0 +1,99 @@
|
||||
Template.hipaaRibbon.events({
|
||||
'keyup #hipaaSearchFilter': function () {
|
||||
Session.set("hipaaSearchFilter", $('#hipaaSearchFilter').val());
|
||||
},
|
||||
"change #beginDateInput": function (event, template) {
|
||||
Session.set("beginDateFilter", $('#beginDateInput').val() + "T00:00:00.000Z");
|
||||
},
|
||||
"change #endDateInput": function (event, template) {
|
||||
Session.set("endDateFilter", $('#endDateInput').val() + "T00:00:00.000Z");
|
||||
},
|
||||
|
||||
'click #filterCreatedButton': function () {
|
||||
Session.set("hipaaTypeFilter", 'create');
|
||||
},
|
||||
'click #filterModifiedButton': function () {
|
||||
Session.set("hipaaTypeFilter", 'modify');
|
||||
},
|
||||
'click #filterViewedButton': function () {
|
||||
Session.set("hipaaTypeFilter", 'viewed');
|
||||
},
|
||||
'click #filterAllButton': function () {
|
||||
Session.set("hipaaTypeFilter", '');
|
||||
}
|
||||
});
|
||||
|
||||
var ribbonBreakPoint = 760;
|
||||
|
||||
|
||||
Meteor.startup(function(){
|
||||
$(window).resize(function(evt) {
|
||||
Session.set("ribbonWidth", $('#hipaaRibbon').width());
|
||||
});
|
||||
});
|
||||
|
||||
Template.hipaaRibbon.helpers({
|
||||
getSearchFilterStyling: function () {
|
||||
// spacing between inputs should be 20px each
|
||||
// if the overall width of the audit log is less than N, show the fullwidth
|
||||
if(Session.get('ribbonWidth') > ribbonBreakPoint){
|
||||
var searchFilterWidth = Session.get('ribbonWidth') - 575;
|
||||
return "margin-left: 10px; margin-right: 5px; width:" + searchFilterWidth + "px;";
|
||||
}else{
|
||||
var ribbonWidth = Session.get('ribbonWidth') - 40;
|
||||
return "width: " + ribbonWidth + "px; margin-left: 10px; margin-right: 10px;";
|
||||
}
|
||||
},
|
||||
getDateRangeStyling: function () {
|
||||
// spacing between inputs should be 20px each
|
||||
// date range inputs shouldn't be less than 170 px
|
||||
// if the overall width of the audit log is less than N, dont even show them
|
||||
if(Session.get('ribbonWidth') > ribbonBreakPoint){
|
||||
return "visbility: visible; margin-left: 5px; margin-right: 5px; width: 170px;";
|
||||
}else{
|
||||
return "display: none; visibility: hidden";
|
||||
}
|
||||
},
|
||||
getSelectStyling: function () {
|
||||
// spacing between inputs should be 20px each
|
||||
// select input should be the same as daterange
|
||||
if(Session.get('ribbonWidth') > ribbonBreakPoint){
|
||||
return "visbility: visible; margin-left: 5px; margin-right: 5px; width: 170px;";
|
||||
}else{
|
||||
return "display: none; visibility: hidden";
|
||||
}
|
||||
},
|
||||
getRibbonClass: function () {
|
||||
var hipaaAuditLog = Session.get('HipaaAuditLogConfig');
|
||||
if (hipaaAuditLog && hipaaAuditLog.classes) {
|
||||
return hipaaAuditLog.classes.ribbon;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getSelectClass: function () {
|
||||
var hipaaAuditLog = Session.get('HipaaAuditLogConfig');
|
||||
if (hipaaAuditLog && hipaaAuditLog.classes) {
|
||||
return hipaaAuditLog.classes.select;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getInputClass: function () {
|
||||
var hipaaAuditLog = Session.get('HipaaAuditLogConfig');
|
||||
if (hipaaAuditLog && hipaaAuditLog.classes) {
|
||||
return hipaaAuditLog.classes.input;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getHipaaSearchFilter: function () {
|
||||
return Session.get('hipaaSearchFilter');
|
||||
},
|
||||
getBeginDate: function () {
|
||||
return moment(Session.get("beginDateFilter")).format("YYYY-MM-DD");
|
||||
},
|
||||
getEndDate: function () {
|
||||
return moment(Session.get("endDateFilter")).format("YYYY-MM-DD");
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
#hipaaRibbon{
|
||||
position: static;
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
height: 60px;
|
||||
//background-color: lightgray;
|
||||
|
||||
input[type="date"]{
|
||||
padding-left: 10px;
|
||||
}
|
||||
input[type="text"]{
|
||||
// padding-left: 10px;
|
||||
// padding-right: 10px;
|
||||
}
|
||||
select{
|
||||
display: inline-block;
|
||||
height: 40px;
|
||||
// padding-left: 10px;
|
||||
// padding-right: 10px;
|
||||
}
|
||||
|
||||
#hipaaSearchFilter{
|
||||
color: black;
|
||||
}
|
||||
//---------------------------------------
|
||||
// Bootstrap users
|
||||
.form-control{
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
|
||||
// @media only screen and (max-width: 850px) {
|
||||
//
|
||||
// }
|
||||
Reference in new issue
Block a user