Changed: StorageResultType to error result code

This commit is contained in:
djmaze 2021-03-16 09:46:23 +01:00
parent be3ef15f8e
commit 4a8d516123
33 changed files with 257 additions and 302 deletions

View file

@ -106,9 +106,9 @@
this.newPassword2('');
}
onChangePasswordResponse(result, data) {
onChangePasswordResponse(iError, data) {
this.reset(false);
if (rl.Enums.StorageResultType.Success === result && data && data.Result) {
if (!iError && data && data.Result) {
this.currentPassword('');
this.newPassword('');
this.newPassword2('');

View file

@ -22,20 +22,23 @@
this.loading(true);
window.rl.pluginRemoteRequest(function (sResult, oData) {
rl.pluginRemoteRequest(function (iError, oData) {
self.loading(false);
if (window.rl.Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
if (!iError && oData && oData.Result) {
self.php(oData.Result.PHP || '');
}
if (rl.Enums.StorageResultType.Abort === iError) {
// show abort
}
}, 'JsonAdminGetData');
};
window.rl.addSettingsViewModelForAdmin(CustomAdminSettings, 'PluginCustomAdminSettingsTab',
rl.addSettingsViewModelForAdmin(CustomAdminSettings, 'PluginCustomAdminSettingsTab',
'SETTINGS_CUSTOM_ADMIN_CUSTOM_TAB_PLUGIN/TAB_NAME', 'custom');
}());

View file

@ -33,14 +33,17 @@
this.saving(true);
window.rl.pluginRemoteRequest(function (sResult, oData) {
rl.pluginRemoteRequest(function (iError, oData) {
self.saving(false);
if (window.rl.Enums.StorageResultType.Success === sResult && oData && oData.Result)
if (!iError && oData && oData.Result)
{
// true
}
else if (rl.Enums.StorageResultType.Abort === iError) {
// show abort
}
else
{
// false
@ -58,11 +61,11 @@
this.loading(true);
window.rl.pluginRemoteRequest(function (sResult, oData) {
rl.pluginRemoteRequest(function (iError, oData) {
self.loading(false);
if (window.rl.Enums.StorageResultType.Success === sResult && oData && oData.Result)
if (!iError && oData && oData.Result)
{
self.userSkype(oData.Result.UserSkype || '');
self.userFacebook(oData.Result.UserFacebook || '');
@ -72,7 +75,7 @@
};
window.rl.addSettingsViewModel(CustomUserSettings, 'PluginCustomSettingsTab',
rl.addSettingsViewModel(CustomUserSettings, 'PluginCustomSettingsTab',
'SETTINGS_CUSTOM_PLUGIN/TAB_NAME', 'custom');
}());