mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
Add "custom-admin-settings-tab" plugin
This commit is contained in:
parent
613ab074d9
commit
3bcf23f8fa
11 changed files with 115 additions and 3 deletions
36
plugins/custom-admin-settings-tab/js/CustomAdminSettings.js
Normal file
36
plugins/custom-admin-settings-tab/js/CustomAdminSettings.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
(function () {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function CustomAdminSettings()
|
||||
{
|
||||
this.php = ko.observable('');
|
||||
|
||||
this.loading = ko.observable(false);
|
||||
}
|
||||
|
||||
CustomAdminSettings.prototype.onBuild = function () // special function
|
||||
{
|
||||
var self = this;
|
||||
|
||||
this.loading(true);
|
||||
|
||||
window.rl.pluginRemoteRequest(function (sResult, oData) {
|
||||
|
||||
self.loading(false);
|
||||
|
||||
if (window.rl.Enums.StorageResultType.Success === sResult && oData && oData.Result)
|
||||
{
|
||||
self.php(oData.Result.PHP || '');
|
||||
}
|
||||
|
||||
}, 'AjaxAdminGetData');
|
||||
|
||||
};
|
||||
|
||||
window.rl.addSettingsViewModelForAdmin(CustomAdminSettings, 'PluginCustomAdminSettingnTab',
|
||||
'SETTINGS_CUSTOM_ADMIN_CUSTOM_TAB_PLUGIN/TAB_NAME', 'custom');
|
||||
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue