remove bootstrap fade from dialog component

This was breaking the fixed positioning of help popovers for form inputs
nested within the dialog so I'm replacing it.
This commit is contained in:
Jake McDermott 2019-03-18 08:09:02 -04:00
parent 8180a2060a
commit 73c9d1b7a9
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7
3 changed files with 29 additions and 8 deletions

View File

@ -1,3 +1,19 @@
.at-Dialog {
display: block;
border: none;
opacity: 1;
background: rgba(0, 0, 0, 0.3);
animation-name: at-DialogFadeIn;
animation-iteration-count: 1;
animation-timing-function: ease-in;
animation-duration: 0.3s;
}
@keyframes at-DialogFadeIn {
0% { opacity: 0; background: rgba(0, 0, 0, 0); }
100% { opacity: 1; background: rgba(0, 0, 0, 0.3); }
}
.at-Dialog-body {
font-size: @at-font-size;
padding: @at-padding-panel 0;

View File

@ -1,15 +1,20 @@
const templateUrl = require('~components/dialog/dialog.partial.html');
const overlaySelector = '.at-Dialog';
const overlayClass = 'at-Dialog';
function DialogController ($element) {
function DialogController () {
const vm = this || {};
vm.$onInit = () => {
const [el] = $element;
const overlay = el.querySelector(overlaySelector);
overlay.style.display = 'block';
overlay.style.opacity = 1;
vm.handleClick = ({ target }) => {
if (!vm.onClose) {
return;
}
const targetElement = $(target);
if (targetElement.hasClass(overlayClass)) {
vm.onClose();
}
};
}

View File

@ -1,4 +1,4 @@
<div class="modal at-Dialog fade" tabindex="-1" role="dialog">
<div class="modal at-Dialog" ng-click="vm.handleClick($event)" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content at-Dialog-window">
<div class="Modal-header">