diff --git a/dev/Common/Globals.js b/dev/Common/Globals.js index c4af0638d..fef50dc64 100644 --- a/dev/Common/Globals.js +++ b/dev/Common/Globals.js @@ -131,15 +131,6 @@ moveAction.subscribe((value) => { } }); -// popups -export const popupVisibilityNames = ko.observableArray([]); - -export const popupVisibility = ko.computed(() => 0 < popupVisibilityNames().length); - -popupVisibility.subscribe((bValue) => { - $htmlCL.toggle('rl-modal', bValue); -}); - // keys export const keyScopeReal = ko.observable(KeyState.All); export const keyScopeFake = ko.observable(KeyState.All); diff --git a/dev/Knoin/Knoin.js b/dev/Knoin/Knoin.js index 2153b5b28..1d5ee33b3 100644 --- a/dev/Knoin/Knoin.js +++ b/dev/Knoin/Knoin.js @@ -1,6 +1,6 @@ import ko from 'ko'; -import { $htmlCL, VIEW_MODELS, popupVisibilityNames } from 'Common/Globals'; +import { $htmlCL, VIEW_MODELS } from 'Common/Globals'; //import { bMobileDevice } from 'Common/Globals'; @@ -8,7 +8,15 @@ let currentScreen = null, defaultScreenName = ''; const SCREENS = {}, $ = jQuery, - isNonEmptyArray = values => Array.isArray(values) && values.length; + isNonEmptyArray = values => Array.isArray(values) && values.length, + + popupVisibilityNames = ko.observableArray([]); + +export const popupVisibility = ko.computed(() => 0 < popupVisibilityNames().length); + +popupVisibility.subscribe((bValue) => { + $htmlCL.toggle('rl-modal', bValue); +}); export const ViewType = { Popup: 'Popups', diff --git a/dev/View/User/MailBox/MessageList.js b/dev/View/User/MailBox/MessageList.js index 9465a0817..35a67cbc7 100644 --- a/dev/View/User/MailBox/MessageList.js +++ b/dev/View/User/MailBox/MessageList.js @@ -13,7 +13,7 @@ import { import { UNUSED_OPTION_VALUE } from 'Common/Consts'; -import { bMobileDevice, popupVisibility, leftPanelDisabled, moveAction } from 'Common/Globals'; +import { bMobileDevice, leftPanelDisabled, moveAction } from 'Common/Globals'; import { computedPagenatorHelper, draggablePlace, friendlySize } from 'Common/Utils'; @@ -40,7 +40,7 @@ import Remote from 'Remote/User/Ajax'; import { getApp } from 'Helper/Apps/User'; -import { view, command, ViewType, showScreenPopup, setHash } from 'Knoin/Knoin'; +import { view, command, ViewType, showScreenPopup, setHash, popupVisibility } from 'Knoin/Knoin'; import { AbstractViewNext } from 'Knoin/AbstractViewNext'; const