mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Changed: StorageResultType to error result code
This commit is contained in:
parent
be3ef15f8e
commit
4a8d516123
33 changed files with 257 additions and 302 deletions
|
|
@ -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('');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
||||
}());
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
||||
}());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue