mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Bugfix: saveError undefined, should be serverError
Bugfix: dot should be comma
This commit is contained in:
parent
ca91a6e408
commit
d9118fbf90
3 changed files with 15 additions and 14 deletions
|
|
@ -82,8 +82,8 @@ class FiltersUserSettings {
|
|||
this.scripts.remove(script);
|
||||
delegateRunOnDestroy(script);
|
||||
} else {
|
||||
this.saveError(true);
|
||||
this.saveErrorText((data && data.ErrorCode)
|
||||
this.serverError(true);
|
||||
this.serverErrorDesc((data && data.ErrorCode)
|
||||
? (data.ErrorMessageAdditional || getNotification(data.ErrorCode))
|
||||
: getNotification(Notification.CantActivateFiltersScript)
|
||||
);
|
||||
|
|
@ -101,8 +101,8 @@ class FiltersUserSettings {
|
|||
if (StorageResultType.Success === result && data && data.Result) {
|
||||
this.scripts().forEach(script => script.active(script.name() === name));
|
||||
} else {
|
||||
this.saveError(true);
|
||||
this.saveErrorText((data && data.ErrorCode)
|
||||
this.serverError(true);
|
||||
this.serverErrorDesc((data && data.ErrorCode)
|
||||
? (data.ErrorMessageAdditional || getNotification(data.ErrorCode))
|
||||
: getNotification(Notification.CantActivateFiltersScript)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -36,8 +36,9 @@ class SieveScriptPopupView extends AbstractViewNext {
|
|||
|
||||
// @command()
|
||||
saveScriptCommand() {
|
||||
let script = this.script();
|
||||
if (!this.saving/* && script.hasChanges()*/) {
|
||||
let self = this,
|
||||
script = self.script();
|
||||
if (!self.saving/* && script.hasChanges()*/) {
|
||||
if (!script.verify()) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -47,21 +48,21 @@ class SieveScriptPopupView extends AbstractViewNext {
|
|||
return false;
|
||||
}
|
||||
|
||||
this.saving = true;
|
||||
this.saveError(false);
|
||||
self.saving = true;
|
||||
self.saveError(false);
|
||||
// script.body(script.filtersToRaw());
|
||||
|
||||
Remote.filtersScriptSave(
|
||||
(result, data) => {
|
||||
this.saving = false;
|
||||
self.saving = false;
|
||||
|
||||
if (StorageResultType.Success === result && data && data.Result) {
|
||||
script.exists(true);
|
||||
script.hasChanges(false);
|
||||
SieveStore.scripts.push(script);
|
||||
} else {
|
||||
this.saveError(true);
|
||||
this.saveErrorText((data && data.ErrorCode)
|
||||
self.saveError(true);
|
||||
self.saveErrorText((data && data.ErrorCode)
|
||||
? (data.ErrorMessageAdditional || getNotification(data.ErrorCode))
|
||||
: getNotification(Notification.CantSaveFilters)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue