]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/popup.js
CSS: Updated status colors to be CSS variables, Added dark variants
[bookstack] / resources / js / components / popup.js
index 4c20876f854dbfd8441b7cd4d3d8ffb38bc6c28d..6627365483e69f6c90b37d5eac7528f1f0c71be3 100644 (file)
@@ -1,6 +1,6 @@
-import {fadeIn, fadeOut} from "../services/animations";
-import {onSelect} from "../services/dom";
-import {Component} from "./component";
+import {fadeIn, fadeOut} from '../services/animations';
+import {onSelect} from '../services/dom';
+import {Component} from './component';
 
 /**
  * Popup window that will contain other content.
@@ -26,11 +26,11 @@ export class Popup extends Component {
 
         this.container.addEventListener('click', event => {
             if (event.target === this.container && lastMouseDownTarget === this.container) {
-                return this.hide();
+                this.hide();
             }
         });
 
-        onSelect(this.hideButtons, e => this.hide());
+        onSelect(this.hideButtons, () => this.hide());
     }
 
     hide(onComplete = null) {
@@ -47,7 +47,7 @@ export class Popup extends Component {
     show(onComplete = null, onHide = null) {
         fadeIn(this.container, 120, onComplete);
 
-        this.onkeyup = (event) => {
+        this.onkeyup = event => {
             if (event.key === 'Escape') {
                 this.hide();
             }
@@ -56,4 +56,4 @@ export class Popup extends Component {
         this.onHide = onHide;
     }
 
-}
\ No newline at end of file
+}