snappymail/plugins/custom-admin-settings-tab/js/CustomAdminSettings.js
2016-06-04 23:26:50 +03:00

36 lines
No EOL
692 B
JavaScript

(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');
}());