mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Improved handling of sieve script changes
This commit is contained in:
parent
14ba459d46
commit
ea56397c3b
3 changed files with 6 additions and 3 deletions
|
|
@ -50,7 +50,10 @@ class SieveScriptPopupView extends AbstractViewNext {
|
||||||
|
|
||||||
self.saving = true;
|
self.saving = true;
|
||||||
self.saveError(false);
|
self.saveError(false);
|
||||||
// script.body(script.filtersToRaw());
|
|
||||||
|
if (self.allowToggle()) {
|
||||||
|
script.body(script.filtersToRaw());
|
||||||
|
}
|
||||||
|
|
||||||
Remote.filtersScriptSave(
|
Remote.filtersScriptSave(
|
||||||
(result, data) => {
|
(result, data) => {
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ class SieveStorage implements FiltersInterface
|
||||||
|
|
||||||
public function Save(\RainLoop\Model\Account $oAccount, string $sScriptName, array $aFilters, string $sRaw = '') : bool
|
public function Save(\RainLoop\Model\Account $oAccount, string $sScriptName, array $aFilters, string $sRaw = '') : bool
|
||||||
{
|
{
|
||||||
if (self::SIEVE_FILE_NAME === $sScriptName) {
|
if ($aFilters && !$sRaw) {
|
||||||
Sieve::$bUtf8FolderName = !!$this->oConfig->Get('labs', 'sieve_utf8_folder_name', true);
|
Sieve::$bUtf8FolderName = !!$this->oConfig->Get('labs', 'sieve_utf8_folder_name', true);
|
||||||
$sRaw = Sieve::collectionToFileString($aFilters);
|
$sRaw = Sieve::collectionToFileString($aFilters);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
<b class="i18n" data-i18n="POPUPS_SIEVE_SCRIPT/CAPABILITY_LABEL"></b>:
|
<b class="i18n" data-i18n="POPUPS_SIEVE_SCRIPT/CAPABILITY_LABEL"></b>:
|
||||||
<span data-bind="text: $root.sieveCapabilities"></span>
|
<span data-bind="text: $root.sieveCapabilities"></span>
|
||||||
</pre>
|
</pre>
|
||||||
<textarea class="span8" data-bind="value: body, valueUpdate: 'afterkeydown'"></textarea>
|
<textarea class="span8" data-bind="value: body, valueUpdate: 'input'"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div data-bind="visible: !$root.rawActive()">
|
<div data-bind="visible: !$root.rawActive()">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue