2017-04-14 13:47:33 -04:00
|
|
|
const Vue = require("vue");
|
2017-04-09 15:59:57 -04:00
|
|
|
|
|
|
|
function exists(id) {
|
|
|
|
return document.getElementById(id) !== null;
|
|
|
|
}
|
|
|
|
|
|
|
|
let vueMapping = {
|
2017-04-15 14:16:07 -04:00
|
|
|
'search-system': require('./search'),
|
2017-08-19 09:04:38 -04:00
|
|
|
'entity-dashboard': require('./entity-dashboard'),
|
2017-08-09 16:33:00 -04:00
|
|
|
'code-editor': require('./code-editor'),
|
|
|
|
'image-manager': require('./image-manager'),
|
2017-08-10 15:11:25 -04:00
|
|
|
'tag-manager': require('./tag-manager'),
|
2017-08-19 08:55:56 -04:00
|
|
|
'attachment-manager': require('./attachment-manager'),
|
2017-04-09 15:59:57 -04:00
|
|
|
};
|
|
|
|
|
2017-07-01 08:23:46 -04:00
|
|
|
window.vues = {};
|
|
|
|
|
2017-08-19 08:55:56 -04:00
|
|
|
let ids = Object.keys(vueMapping);
|
|
|
|
for (let i = 0, len = ids.length; i < len; i++) {
|
|
|
|
if (!exists(ids[i])) continue;
|
|
|
|
let config = vueMapping[ids[i]];
|
|
|
|
config.el = '#' + ids[i];
|
|
|
|
window.vues[ids[i]] = new Vue(config);
|
|
|
|
}
|