mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Remove rl.showScreenPopup in favour of AbstractViewPopup.showModal
This commit is contained in:
parent
649f74fc51
commit
f6400b6da2
5 changed files with 17 additions and 12 deletions
|
|
@ -56,5 +56,4 @@ rl.pluginSettingsGet = (pluginSection, name) => {
|
||||||
return plugins ? (null == plugins[name] ? null : plugins[name]) : null;
|
return plugins ? (null == plugins[name] ? null : plugins[name]) : null;
|
||||||
};
|
};
|
||||||
|
|
||||||
rl.showPluginPopup = showScreenPopup;
|
|
||||||
rl.pluginPopupView = AbstractViewPopup;
|
rl.pluginPopupView = AbstractViewPopup;
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@ import ko from 'ko';
|
||||||
import { inFocus, addObservablesTo, addComputablesTo, addSubscribablesTo } from 'Common/Utils';
|
import { inFocus, addObservablesTo, addComputablesTo, addSubscribablesTo } from 'Common/Utils';
|
||||||
import { Scope } from 'Common/Enums';
|
import { Scope } from 'Common/Enums';
|
||||||
import { keyScope, Settings, leftPanelDisabled } from 'Common/Globals';
|
import { keyScope, Settings, leftPanelDisabled } from 'Common/Globals';
|
||||||
import { ViewType } from 'Knoin/Knoin';
|
import { ViewType, showScreenPopup } from 'Knoin/Knoin';
|
||||||
//import { showScreenPopup } from 'Knoin/Knoin';
|
|
||||||
|
|
||||||
class AbstractView {
|
class AbstractView {
|
||||||
constructor(templateID, type)
|
constructor(templateID, type)
|
||||||
|
|
@ -88,11 +87,11 @@ export class AbstractViewPopup extends AbstractView
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
AbstractViewPopup.show = function(params = []) {
|
AbstractViewPopup.showModal = function(params = []) {
|
||||||
showScreenPopup(this, params);
|
showScreenPopup(this, params);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
AbstractViewPopup.hidden = function() {
|
AbstractViewPopup.hidden = function() {
|
||||||
return !this.__vm || !this.__vm.modalVisibility();
|
return !this.__vm || !this.__vm.modalVisibility();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -244,10 +244,7 @@ const
|
||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
|
|
||||||
getScreenPopupViewModel = ViewModelClassToShow =>
|
|
||||||
(buildViewModel(ViewModelClassToShow) && ViewModelClassToShow.__dom) && ViewModelClassToShow.__vm;
|
|
||||||
|
|
||||||
|
|
||||||
export const
|
export const
|
||||||
|
|
@ -281,7 +278,8 @@ export const
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
showScreenPopup = (ViewModelClassToShow, params = []) => {
|
showScreenPopup = (ViewModelClassToShow, params = []) => {
|
||||||
const vm = getScreenPopupViewModel(ViewModelClassToShow);
|
const vm = buildViewModel(ViewModelClassToShow) && ViewModelClassToShow.__dom && ViewModelClassToShow.__vm;
|
||||||
|
|
||||||
if (vm) {
|
if (vm) {
|
||||||
params = params || [];
|
params = params || [];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,15 @@ class Plugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
JavaScript
|
||||||
|
```javascript
|
||||||
|
class PluginPopupView extends rl.pluginPopupView
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
PluginPopupView.showModal();
|
||||||
|
```
|
||||||
|
|
||||||
# Hooks
|
# Hooks
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ class TwoFactorAuthSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
testTwoFactor() {
|
testTwoFactor() {
|
||||||
rl.showPluginPopup(TwoFactorAuthTestPopupView, [this.twoFactorTested]);
|
TwoFactorAuthTestPopupView.showModal([this.twoFactorTested]);
|
||||||
}
|
}
|
||||||
|
|
||||||
clearTwoFactor() {
|
clearTwoFactor() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue