mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-08 07:48:02 +08:00
44 lines
710 B
JavaScript
44 lines
710 B
JavaScript
|
|
(function () {
|
|
|
|
if (!window.rl)
|
|
{
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* @constructor
|
|
*/
|
|
function CustomAdminSettings()
|
|
{
|
|
this.php = ko.observable('');
|
|
|
|
this.loading = ko.observable(false);
|
|
}
|
|
|
|
CustomAdminSettings.prototype.onBuild = function () // special function
|
|
{
|
|
var self = this;
|
|
|
|
this.loading(true);
|
|
|
|
rl.pluginRemoteRequest((iError, oData) => {
|
|
|
|
self.loading(false);
|
|
|
|
if (!iError) {
|
|
self.php(oData.Result.PHP || '');
|
|
}
|
|
|
|
if (rl.Enums.StorageResultType.Abort === iError) {
|
|
// show abort
|
|
}
|
|
|
|
}, 'JsonAdminGetData');
|
|
|
|
};
|
|
|
|
rl.addSettingsViewModelForAdmin(CustomAdminSettings, 'PluginCustomAdminSettingsTab',
|
|
'SETTINGS_CUSTOM_ADMIN_CUSTOM_TAB_PLUGIN/TAB_NAME', 'custom');
|
|
|
|
}());
|