Fixes legacy usage of $root.$emit in favor of $emitter.emit. #794.
This commit is contained in:
parent
62c1e178c9
commit
91c47add90
|
@ -1035,7 +1035,7 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted(){
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('settings') }]);
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('settings') }]);
|
||||
|
||||
|
||||
if (this.$route.query.fromImporter != undefined)
|
||||
|
|
|
@ -223,7 +223,7 @@ export default {
|
|||
this.cleanFiles();
|
||||
|
||||
// Updates Collection BreadCrumb
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||
{ path: '', label: this.$i18n.get('add_items_bulk') }
|
||||
]);
|
||||
|
|
|
@ -1284,7 +1284,7 @@ export default {
|
|||
this.isLoading = true;
|
||||
|
||||
// Updates Collection BreadCrumb
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||
{ path: '', label: this.$i18n.get('new') }
|
||||
]);
|
||||
|
@ -1722,14 +1722,14 @@ export default {
|
|||
|
||||
// Updates Collection BreadCrumb
|
||||
if (this.isOnSequenceEdit) {
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||
{ path: '', label: this.$i18n.get('sequence') },
|
||||
{ path: '', label: this.item.title },
|
||||
{ path: '', label: this.$i18n.get('edit') }
|
||||
]);
|
||||
} else {
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||
{ path: this.$routerHelper.getItemPath(this.form.collectionId, this.itemId), label: this.item.title },
|
||||
{ path: '', label: this.$i18n.get('edit') }
|
||||
|
|
|
@ -2460,7 +2460,7 @@ export default {
|
|||
groupId: groupId
|
||||
}).then(() => {
|
||||
this.$eventBusSearch.loadItems();
|
||||
this.$root.$emit('openProcessesPopup');
|
||||
this.$emitter.emit('openProcessesPopup');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -2493,7 +2493,7 @@ export default {
|
|||
groupId: groupId
|
||||
}).then(() => {
|
||||
this.$eventBusSearch.loadItems();
|
||||
this.$root.$emit('openProcessesPopup');
|
||||
this.$emitter.emit('openProcessesPopup');
|
||||
});
|
||||
} else {
|
||||
this.trashItemsInBulk({
|
||||
|
@ -2501,7 +2501,7 @@ export default {
|
|||
groupId: groupId
|
||||
}).then(() => {
|
||||
this.$eventBusSearch.loadItems();
|
||||
this.$root.$emit('openProcessesPopup');
|
||||
this.$emitter.emit('openProcessesPopup');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -413,7 +413,7 @@
|
|||
},
|
||||
mounted(){
|
||||
if (!this.isRepositoryLevel)
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('activities') }]);
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('activities') }]);
|
||||
|
||||
if (this.$route.query.tab == 'processes' && this.isRepositoryLevel)
|
||||
this.tab = 'processes';
|
||||
|
|
|
@ -568,7 +568,7 @@ export default {
|
|||
mounted() {
|
||||
|
||||
if (!this.isRepositoryLevel)
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('filter') }]);
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('filter') }]);
|
||||
|
||||
nextTick(() => {
|
||||
this.columnsTopY = this.$refs.filterEditionPageColumns ? this.$refs.filterEditionPageColumns.getBoundingClientRect().top : 0;
|
||||
|
|
|
@ -994,7 +994,7 @@
|
|||
this.localDisplayedMetadata = JSON.parse(JSON.stringify(this.displayedMetadata));
|
||||
|
||||
// Updates Collection Header Breadcrumb
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('items') }]);
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('items') }]);
|
||||
|
||||
// Setting initial view mode
|
||||
let prefsAdminViewMode = !this.isRepositoryLevel ? 'admin_view_mode_' + this.collectionId : 'admin_view_mode';
|
||||
|
|
|
@ -112,7 +112,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
if (!this.isRepositoryLevel)
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('metadata') }]);
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('metadata') }]);
|
||||
},
|
||||
methods: {
|
||||
...mapGetters('collection',[
|
||||
|
|
|
@ -574,7 +574,7 @@
|
|||
})
|
||||
.then((resp) => {
|
||||
resp.request.then((item) => {
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||
{path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items')},
|
||||
{path: '', label: item.title}
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue