LT-92: Displaying the criteria nonconformities when clicking the warning icon
This commit is contained in:
1 parent
65b867d1b0
commit
db4792b3de
21 files changed
+137
-54
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<template name="dialogSimple">
|
||||
<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>
|
||||
<div class="modal-body">
|
||||
{{>UI.contentBlock}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,44 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Template.dialogSimple.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
instance.close = () => {
|
||||
const $modal = instance.$('.modal');
|
||||
$modal.on('hidden.bs.modal', () => instance.data.promiseResolve()).modal('hide');
|
||||
};
|
||||
});
|
||||
|
||||
Template.dialogSimple.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
// Allow options ovewrite
|
||||
const modalOptions = _.extend({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
}, instance.data.modalOptions);
|
||||
|
||||
const $modal = instance.$('.modal');
|
||||
|
||||
// Create the bootstrap modal
|
||||
$modal.modal(modalOptions);
|
||||
|
||||
const position = instance.data.position;
|
||||
if (position) {
|
||||
OHIF.ui.repositionDialog($modal, position.x, position.y);
|
||||
}
|
||||
});
|
||||
|
||||
Template.dialogSimple.events({
|
||||
keydown(event) {
|
||||
const instance = Template.instance();
|
||||
const keyCode = event.keyCode || event.which;
|
||||
|
||||
if (keyCode === 27) {
|
||||
instance.close();
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -5,6 +5,8 @@ import './dialog/form.html';
|
||||
import './dialog/form.js';
|
||||
import './dialog/login.html';
|
||||
import './dialog/login.js';
|
||||
import './dialog/simple.html';
|
||||
import './dialog/simple.js';
|
||||
import './dialog/unsavedChangesDialog.html';
|
||||
import './dialog/unsavedChangesDialog.js';
|
||||
|
||||
|
||||
Reference in new issue
Block a user