mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 00:17:03 +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);
|
this.scripts.remove(script);
|
||||||
delegateRunOnDestroy(script);
|
delegateRunOnDestroy(script);
|
||||||
} else {
|
} else {
|
||||||
this.saveError(true);
|
this.serverError(true);
|
||||||
this.saveErrorText((data && data.ErrorCode)
|
this.serverErrorDesc((data && data.ErrorCode)
|
||||||
? (data.ErrorMessageAdditional || getNotification(data.ErrorCode))
|
? (data.ErrorMessageAdditional || getNotification(data.ErrorCode))
|
||||||
: getNotification(Notification.CantActivateFiltersScript)
|
: getNotification(Notification.CantActivateFiltersScript)
|
||||||
);
|
);
|
||||||
|
|
@ -101,8 +101,8 @@ class FiltersUserSettings {
|
||||||
if (StorageResultType.Success === result && data && data.Result) {
|
if (StorageResultType.Success === result && data && data.Result) {
|
||||||
this.scripts().forEach(script => script.active(script.name() === name));
|
this.scripts().forEach(script => script.active(script.name() === name));
|
||||||
} else {
|
} else {
|
||||||
this.saveError(true);
|
this.serverError(true);
|
||||||
this.saveErrorText((data && data.ErrorCode)
|
this.serverErrorDesc((data && data.ErrorCode)
|
||||||
? (data.ErrorMessageAdditional || getNotification(data.ErrorCode))
|
? (data.ErrorMessageAdditional || getNotification(data.ErrorCode))
|
||||||
: getNotification(Notification.CantActivateFiltersScript)
|
: getNotification(Notification.CantActivateFiltersScript)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,9 @@ class SieveScriptPopupView extends AbstractViewNext {
|
||||||
|
|
||||||
// @command()
|
// @command()
|
||||||
saveScriptCommand() {
|
saveScriptCommand() {
|
||||||
let script = this.script();
|
let self = this,
|
||||||
if (!this.saving/* && script.hasChanges()*/) {
|
script = self.script();
|
||||||
|
if (!self.saving/* && script.hasChanges()*/) {
|
||||||
if (!script.verify()) {
|
if (!script.verify()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -47,21 +48,21 @@ class SieveScriptPopupView extends AbstractViewNext {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.saving = true;
|
self.saving = true;
|
||||||
this.saveError(false);
|
self.saveError(false);
|
||||||
// script.body(script.filtersToRaw());
|
// script.body(script.filtersToRaw());
|
||||||
|
|
||||||
Remote.filtersScriptSave(
|
Remote.filtersScriptSave(
|
||||||
(result, data) => {
|
(result, data) => {
|
||||||
this.saving = false;
|
self.saving = false;
|
||||||
|
|
||||||
if (StorageResultType.Success === result && data && data.Result) {
|
if (StorageResultType.Success === result && data && data.Result) {
|
||||||
script.exists(true);
|
script.exists(true);
|
||||||
script.hasChanges(false);
|
script.hasChanges(false);
|
||||||
SieveStore.scripts.push(script);
|
SieveStore.scripts.push(script);
|
||||||
} else {
|
} else {
|
||||||
this.saveError(true);
|
self.saveError(true);
|
||||||
this.saveErrorText((data && data.ErrorCode)
|
self.saveErrorText((data && data.ErrorCode)
|
||||||
? (data.ErrorMessageAdditional || getNotification(data.ErrorCode))
|
? (data.ErrorMessageAdditional || getNotification(data.ErrorCode))
|
||||||
: getNotification(Notification.CantSaveFilters)
|
: getNotification(Notification.CantSaveFilters)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class Filters extends \RainLoop\Providers\AbstractProvider
|
||||||
}
|
}
|
||||||
catch (\Throwable $oException)
|
catch (\Throwable $oException)
|
||||||
{
|
{
|
||||||
static::handleException($oException. \RainLoop\Notifications::CantSaveFilters);
|
static::handleException($oException, \RainLoop\Notifications::CantSaveFilters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -65,7 +65,7 @@ class Filters extends \RainLoop\Providers\AbstractProvider
|
||||||
}
|
}
|
||||||
catch (\Throwable $oException)
|
catch (\Throwable $oException)
|
||||||
{
|
{
|
||||||
static::handleException($oException. \RainLoop\Notifications::CantActivateFiltersScript);
|
static::handleException($oException, \RainLoop\Notifications::CantActivateFiltersScript);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@ class Filters extends \RainLoop\Providers\AbstractProvider
|
||||||
}
|
}
|
||||||
catch (\Throwable $oException)
|
catch (\Throwable $oException)
|
||||||
{
|
{
|
||||||
static::handleException($oException. \RainLoop\Notifications::CantDeleteFiltersScript);
|
static::handleException($oException, \RainLoop\Notifications::CantDeleteFiltersScript);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue