mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Merge all example plugins
This commit is contained in:
parent
f588c91570
commit
eb61563db4
23 changed files with 230 additions and 425 deletions
37
plugins/example/js/ExampleAdminSettings.js
Normal file
37
plugins/example/js/ExampleAdminSettings.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
(rl => { if (rl) {
|
||||
|
||||
class ExampleAdminSettings
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
this.php = ko.observable('');
|
||||
this.loading = ko.observable(false);
|
||||
}
|
||||
|
||||
onBuild()
|
||||
{
|
||||
this.loading(true);
|
||||
|
||||
rl.pluginRemoteRequest((iError, oData) => {
|
||||
|
||||
this.loading(false);
|
||||
|
||||
if (iError) {
|
||||
console.error({
|
||||
iError: iError,
|
||||
oData: oData
|
||||
});
|
||||
} else {
|
||||
this.php(oData.Result.PHP || '');
|
||||
}
|
||||
|
||||
}, 'JsonAdminGetData');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
rl.addSettingsViewModelForAdmin(ExampleAdminSettings, 'ExampleAdminSettingsTab',
|
||||
'SETTINGS_EXAMPLE_ADMIN_EXAMPLE_TAB_PLUGIN/TAB_NAME', 'Example');
|
||||
|
||||
}})(window.rl);
|
||||
Loading…
Add table
Add a link
Reference in a new issue