]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/entity-selector-popup.js
Updated another set of components
[bookstack] / resources / js / components / entity-selector-popup.js
index e7cb60b1f6c4c05c751033ebec4424b8de7fea1d..69534dea5ec814c820a6c1853a287e6154c9a795 100644 (file)
@@ -1,14 +1,10 @@
-/**
- * Entity Selector Popup
- * @extends {Component}
- */
-class EntitySelectorPopup {
+import {Component} from "./component";
+
+export class EntitySelectorPopup extends Component {
 
     setup() {
-        this.elem = this.$el;
+        this.container = this.$el;
         this.selectButton = this.$refs.select;
-
-        window.EntitySelectorPopup = this;
         this.selectorEl = this.$refs.selector;
 
         this.callback = null;
@@ -21,12 +17,12 @@ class EntitySelectorPopup {
 
     show(callback) {
         this.callback = callback;
-        this.elem.components.popup.show();
+        this.container.components.popup.show();
         this.getSelector().focusSearch();
     }
 
     hide() {
-        this.elem.components.popup.hide();
+        this.container.components.popup.hide();
     }
 
     getSelector() {
@@ -51,6 +47,4 @@ class EntitySelectorPopup {
         this.getSelector().reset();
         if (this.callback && entity) this.callback(entity);
     }
-}
-
-export default EntitySelectorPopup;
\ No newline at end of file
+}
\ No newline at end of file