2016-06-05 04:26:50 +08:00
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
2019-07-05 03:09:27 +08:00
|
|
|
if (!window.rl)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-06-05 04:26:50 +08:00
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
function CustomAdminSettings()
|
|
|
|
{
|
|
|
|
this.php = ko.observable('');
|
|
|
|
|
|
|
|
this.loading = ko.observable(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
CustomAdminSettings.prototype.onBuild = function () // special function
|
|
|
|
{
|
|
|
|
var self = this;
|
|
|
|
|
|
|
|
this.loading(true);
|
|
|
|
|
2021-03-18 19:33:13 +08:00
|
|
|
rl.pluginRemoteRequest((iError, oData) => {
|
2016-06-05 04:26:50 +08:00
|
|
|
|
|
|
|
self.loading(false);
|
|
|
|
|
2021-03-18 19:33:13 +08:00
|
|
|
if (!iError) {
|
2016-06-05 04:26:50 +08:00
|
|
|
self.php(oData.Result.PHP || '');
|
|
|
|
}
|
|
|
|
|
2021-03-16 16:46:23 +08:00
|
|
|
if (rl.Enums.StorageResultType.Abort === iError) {
|
|
|
|
// show abort
|
|
|
|
}
|
|
|
|
|
2020-12-30 22:50:47 +08:00
|
|
|
}, 'JsonAdminGetData');
|
2016-06-05 04:26:50 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2021-03-16 16:46:23 +08:00
|
|
|
rl.addSettingsViewModelForAdmin(CustomAdminSettings, 'PluginCustomAdminSettingsTab',
|
2016-06-05 04:26:50 +08:00
|
|
|
'SETTINGS_CUSTOM_ADMIN_CUSTOM_TAB_PLUGIN/TAB_NAME', 'custom');
|
|
|
|
|
2020-11-25 21:39:46 +08:00
|
|
|
}());
|