diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue index 95747aedc1..ec64ef3528 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue @@ -28,7 +28,10 @@ No entities found
-
+
@@ -386,6 +389,29 @@ export default { } }, + onModalOpen(modal) { + const group = this.getParentGroup(modal.$el) + if (!group) + return + + group.style.zIndex = '' + (parseInt(group.style.zIndex || 0) + 1) + }, + + onModalClose(modal) { + const group = this.getParentGroup(modal.$el) + if (!group) + return + + group.style.zIndex = '' + Math.max(0, parseInt(group.style.zIndex || 0) - 1) + }, + + getParentGroup(element) { + let parent = element + while (parent && !parent.classList?.contains('group')) + parent = parent.parentElement + return parent + }, + loadCachedEntities() { const cachedEntities = window.localStorage.getItem('entities') if (cachedEntities) { @@ -427,6 +453,9 @@ export default { 'platypush.message.event.entities.EntityDeleteEvent' ) + bus.on('modal-open', this.onModalOpen) + bus.on('modal-close', this.onModalClose) + const hasCachedEntities = this.loadCachedEntities() await this.sync(!hasCachedEntities) await this.refresh(null, !hasCachedEntities)