diff --git a/LesionTracker/client/components/app/app.js b/LesionTracker/client/components/app/app.js index 3fe5f9cf0..4e1cd0f0e 100644 --- a/LesionTracker/client/components/app/app.js +++ b/LesionTracker/client/components/app/app.js @@ -8,6 +8,13 @@ Template.app.onCreated(() => { ViewerData = Session.get('ViewerData') || {}; }); +Template.app.onRendered(() => { + const contentId = Session.get('activeContentId'); + if(contentId === viewerContentId) { + switchToTab(contentId); + } +}); + Template.app.events({ 'click .js-toggle-studyList'() { const contentId = Session.get('activeContentId'); diff --git a/LesionTracker/client/routes.js b/LesionTracker/client/routes.js index e2912152a..74963ad4c 100644 --- a/LesionTracker/client/routes.js +++ b/LesionTracker/client/routes.js @@ -29,12 +29,17 @@ Router.route('/', function() { if (Meteor.user() && Meteor.userId()) { if (verifyEmail && Meteor.user().emails && !Meteor.user().emails[0].verified) { 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); } - } else { + } + else { this.render('entrySignIn', routerOptions); } }); diff --git a/Packages/hipaa-audit-log/components/hipaaCloseButton/hipaaCloseButton.html b/Packages/hipaa-audit-log/components/hipaaCloseButton/hipaaCloseButton.html new file mode 100644 index 000000000..77d2bc419 --- /dev/null +++ b/Packages/hipaa-audit-log/components/hipaaCloseButton/hipaaCloseButton.html @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/Packages/hipaa-audit-log/components/hipaaCloseButton/hipaaCloseButton.js b/Packages/hipaa-audit-log/components/hipaaCloseButton/hipaaCloseButton.js new file mode 100644 index 000000000..96e87225a --- /dev/null +++ b/Packages/hipaa-audit-log/components/hipaaCloseButton/hipaaCloseButton.js @@ -0,0 +1,12 @@ +Template.hipaaCloseButton.events({ + 'click button': function() { + var history = window.history; + + if(history.length > 0) { + history.go(-1); + } + else { + window.location = '/' + } + } +}); \ No newline at end of file diff --git a/Packages/hipaa-audit-log/components/hipaaCloseButton/hipaaCloseButton.less b/Packages/hipaa-audit-log/components/hipaaCloseButton/hipaaCloseButton.less new file mode 100644 index 000000000..1f63706c2 --- /dev/null +++ b/Packages/hipaa-audit-log/components/hipaaCloseButton/hipaaCloseButton.less @@ -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; + } +} \ No newline at end of file diff --git a/Packages/hipaa-audit-log/components/hipaaLogPage/hipaaLogPage.html b/Packages/hipaa-audit-log/components/hipaaLogPage/hipaaLogPage.html index f03f7a5fd..1181ea7cd 100644 --- a/Packages/hipaa-audit-log/components/hipaaLogPage/hipaaLogPage.html +++ b/Packages/hipaa-audit-log/components/hipaaLogPage/hipaaLogPage.html @@ -1,5 +1,9 @@ diff --git a/Packages/hipaa-audit-log/components/hipaaLogPage/hipaaLogPage.js b/Packages/hipaa-audit-log/components/hipaaLogPage/hipaaLogPage.js index 3d1e10c70..07482beb1 100644 --- a/Packages/hipaa-audit-log/components/hipaaLogPage/hipaaLogPage.js +++ b/Packages/hipaa-audit-log/components/hipaaLogPage/hipaaLogPage.js @@ -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() { diff --git a/Packages/hipaa-audit-log/components/hipaaRibbon/hipaaRibbon.js b/Packages/hipaa-audit-log/components/hipaaRibbon/hipaaRibbon.js index fa5dffc3b..b64ba33a9 100644 --- a/Packages/hipaa-audit-log/components/hipaaRibbon/hipaaRibbon.js +++ b/Packages/hipaa-audit-log/components/hipaaRibbon/hipaaRibbon.js @@ -102,4 +102,4 @@ Template.hipaaRibbon.helpers({ getEndDate: function () { return moment(Session.get("endDateFilter")).format("YYYY-MM-DD"); } -}); +}); \ No newline at end of file diff --git a/Packages/hipaa-audit-log/lib/HipaaAuditLog.js b/Packages/hipaa-audit-log/lib/HipaaAuditLog.js index c0a1b0f11..e28aed9ea 100644 --- a/Packages/hipaa-audit-log/lib/HipaaAuditLog.js +++ b/Packages/hipaa-audit-log/lib/HipaaAuditLog.js @@ -14,6 +14,7 @@ if (Meteor.isClient) { select: "", ribbon: "" }, - highlightColor: "" + highlightColor: "", + closeButton: false }); } diff --git a/Packages/hipaa-audit-log/package.js b/Packages/hipaa-audit-log/package.js index bb2ebcd4c..387ca142e 100644 --- a/Packages/hipaa-audit-log/package.js +++ b/Packages/hipaa-audit-log/package.js @@ -37,6 +37,10 @@ Package.on_use(function (api) { api.addFiles('components/hipaaLogPage/hipaaLogPage.js', "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'); }); diff --git a/Packages/ohif-study-list/client/lib/switchToTab.js b/Packages/ohif-study-list/client/lib/switchToTab.js index df121a9eb..59c0760a6 100644 --- a/Packages/ohif-study-list/client/lib/switchToTab.js +++ b/Packages/ohif-study-list/client/lib/switchToTab.js @@ -62,6 +62,7 @@ switchToTab = function(contentId) { } var studies = ViewerData[contentId].studies; + if (studies) { // ViewerData already has the meta data (in cases when studylist is launched externally) viewStudiesInTab(contentId, studies); diff --git a/Packages/ohif-user-management/client/components/hipaaLogPage/hipaaLogPage.js b/Packages/ohif-user-management/client/components/hipaaLogPage/hipaaLogPage.js index 832248371..4d40d731a 100644 --- a/Packages/ohif-user-management/client/components/hipaaLogPage/hipaaLogPage.js +++ b/Packages/ohif-user-management/client/components/hipaaLogPage/hipaaLogPage.js @@ -1,4 +1,4 @@ -Meteor.startup(function() { +Meteor.startup(() => { // TODO: Configure some settings HipaaAuditLog.configure({ classes: { @@ -6,6 +6,7 @@ Meteor.startup(function() { select: 'form-control', ribbon: '' }, - highlightColor: '#006289' + highlightColor: '#006289', + closeButton: true }); -}); +}); \ No newline at end of file diff --git a/Packages/ohif-user-management/client/components/hipaaLogPage/hipaaLogPage.styl b/Packages/ohif-user-management/client/components/hipaaLogPage/hipaaLogPage.styl index 65b1f60e8..aab9da355 100644 --- a/Packages/ohif-user-management/client/components/hipaaLogPage/hipaaLogPage.styl +++ b/Packages/ohif-user-management/client/components/hipaaLogPage/hipaaLogPage.styl @@ -1,2 +1,6 @@ #hipaaLogPage - margin-top: 40px \ No newline at end of file + margin-top: 40px + #hipaaAuditLog + .hipaaAuditItem + &:nth-child(1) + border-top: 1px solid lightgray \ No newline at end of file