X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/2a069880cd8ebe6b821fd37a6087b34a6488966b..refs/pull/494/head:/resources/assets/js/components/index.js diff --git a/resources/assets/js/components/index.js b/resources/assets/js/components/index.js index c38e20aa2..988409fbc 100644 --- a/resources/assets/js/components/index.js +++ b/resources/assets/js/components/index.js @@ -6,6 +6,10 @@ let componentMapping = { 'notification': require('./notification'), 'chapter-toggle': require('./chapter-toggle'), 'expand-toggle': require('./expand-toggle'), + 'entity-selector-popup': require('./entity-selector-popup'), + 'entity-selector': require('./entity-selector'), + 'sidebar': require('./sidebar'), + 'page-picker': require('./page-picker'), }; window.components = {}; @@ -21,6 +25,8 @@ for (let i = 0, len = componentNames.length; i < len; i++) { if (typeof window.components[name] === "undefined") window.components[name] = []; for (let j = 0, jLen = elems.length; j < jLen; j++) { let instance = new component(elems[j]); + if (typeof elems[j].components === 'undefined') elems[j].components = {}; + elems[j].components[name] = instance; window.components[name].push(instance); } } \ No newline at end of file