Removing lastLoginModal from DOM
This commit is contained in:
parent
91abaf8a60
commit
c3afd068a4
@ -28,7 +28,6 @@
|
||||
<div class="tab-pane" id="viewerTab">
|
||||
</div>
|
||||
</div>
|
||||
{{>lastLoginModal}}
|
||||
{{>progressDialog}}
|
||||
{{>viewSeriesDetailsModal}}
|
||||
</template>
|
||||
|
||||
@ -17,7 +17,6 @@ Router.onBeforeAction('loading');
|
||||
|
||||
const data = {
|
||||
additionalTemplates: [
|
||||
'lastLoginModal',
|
||||
'viewSeriesDetailsModal'
|
||||
]
|
||||
};
|
||||
|
||||
@ -1,2 +1,14 @@
|
||||
.modal .modal-footer:empty
|
||||
display: none
|
||||
.modal
|
||||
.modal-header:empty, .modal-footer:empty
|
||||
display: none
|
||||
|
||||
.modal-blank
|
||||
|
||||
.modal-content
|
||||
border: 0
|
||||
|
||||
.modal-header, .modal-footer
|
||||
display: none
|
||||
|
||||
.modal-body
|
||||
padding: 0
|
||||
|
||||
@ -4,21 +4,12 @@
|
||||
{{#form class='modal-content' hideValidationBox=true
|
||||
api=(extend instance.api instance.data.api) schema=this.schema
|
||||
}}
|
||||
<div class="modal-header">
|
||||
{{#button class='close' action='cancel'
|
||||
tagAttributes=(extend this.tagAttributes
|
||||
data-dismiss='modal' aria-label='Close'
|
||||
)
|
||||
}}<span aria-hidden="true">×</span>{{/button}}
|
||||
<h4 class="modal-title">
|
||||
{{#if this.titleIcon}}<i class="{{this.titleIcon}}"></i>{{/if}}
|
||||
<span>{{this.title}}</span>
|
||||
</h4>
|
||||
</div>
|
||||
{{>dialogHeader this}}
|
||||
<div class="modal-body">
|
||||
{{>UI.contentBlock}}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{{>section 'dialogFooter'}}
|
||||
{{#button action='cancel'
|
||||
class=(concat 'btn btn-cancel ' (choose this.cancelClass 'btn-default'))
|
||||
tagAttributes=(extend this.tagAttributes data-dismiss='modal')
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
<template name="dialogHeader">
|
||||
<div class="modal-header">
|
||||
{{>section 'dialogHeader'}}
|
||||
{{#if this.title}}
|
||||
{{#button class='close' action='cancel'
|
||||
tagAttributes=(extend this.tagAttributes
|
||||
data-dismiss='modal' aria-label='Close'
|
||||
)
|
||||
}}<span aria-hidden="true">×</span>{{/button}}
|
||||
<h4 class="modal-title">
|
||||
{{#if this.titleIcon}}<i class="{{this.titleIcon}}"></i>{{/if}}
|
||||
<span>{{this.title}}</span>
|
||||
</h4>
|
||||
{{/if}}
|
||||
</div>
|
||||
</template>
|
||||
@ -2,14 +2,7 @@
|
||||
<div id="{{this.id}}" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog {{this.dialogClass}}" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
{{#button class='close' action='cancel'
|
||||
tagAttributes=(extend this.tagAttributes
|
||||
data-dismiss='modal' aria-label='Close'
|
||||
)
|
||||
}}<span aria-hidden="true">×</span>{{/button}}
|
||||
<h4 class="modal-title">{{this.title}}</h4>
|
||||
</div>
|
||||
{{>dialogHeader this}}
|
||||
<div class="modal-body">
|
||||
{{>UI.contentBlock}}
|
||||
</div>
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
@ -9,6 +10,11 @@ Template.dialogSimple.onCreated(() => {
|
||||
const $modal = instance.$('.modal');
|
||||
$modal.on('hidden.bs.modal', () => instance.data.promiseResolve()).modal('hide');
|
||||
};
|
||||
|
||||
// Automatically close the modal if a timeout value was given
|
||||
if (instance.data.timeout) {
|
||||
Meteor.setTimeout(instance.close, instance.data.timeout);
|
||||
}
|
||||
});
|
||||
|
||||
Template.dialogSimple.onRendered(() => {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import './dialog/confirm.html';
|
||||
import './dialog/form.html';
|
||||
import './dialog/form.js';
|
||||
import './dialog/header.html';
|
||||
import './dialog/info.html';
|
||||
import './dialog/info.js';
|
||||
import './dialog/loading.html';
|
||||
|
||||
@ -46,6 +46,7 @@ OHIF.blaze.getParentTemplateView = view => {
|
||||
let currentView = view;
|
||||
while (currentView) {
|
||||
currentView = currentView.originalParentView || currentView.parentView;
|
||||
if (!currentView || !currentView.name) return;
|
||||
if (currentView.name.indexOf('Template.') > -1) {
|
||||
return currentView;
|
||||
}
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
<template name="lastLoginModal">
|
||||
<div class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body" style="padding: 0;">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
{{#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>
|
||||
</div>
|
||||
</template>
|
||||
{{/dialogSimple}}
|
||||
</template>
|
||||
|
||||
@ -111,16 +111,11 @@ Template.userAccountMenu.onCreated(function userAccountMenuCreated() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Displaye the modal
|
||||
Modal.show('lastLoginModal', {
|
||||
lastLoginDate: lastLoginDate
|
||||
});
|
||||
|
||||
// Hide the modal after 5sec
|
||||
Meteor.setTimeout(() => {
|
||||
Modal.hide('lastLoginModal');
|
||||
Session.setPersistent('displayLastLoginModal', false);
|
||||
}, 5000);
|
||||
// Display the modal and hide it after 5 seconds
|
||||
OHIF.ui.showDialog('lastLoginModal', {
|
||||
lastLoginDate,
|
||||
timeout: 5000
|
||||
}).then(() => Session.setPersistent('displayLastLoginModal', false));
|
||||
|
||||
// Log signin
|
||||
HipaaLogger.logEvent({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user