Skip to content

Commit

Permalink
(js) Fix mail draft autosave in preferences
Browse files Browse the repository at this point in the history
Fixes #3519
  • Loading branch information
cgx committed Feb 11, 2016
1 parent d7b0105 commit c8ea200
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -23,6 +23,7 @@ Bug fixes
- [web] really delete mailboxes being deleted from the Trash folder (#595, #1189, #641)
- [web] fixed address autocompletion of mail editor affecting cards list of active addressbook
- [web] fixed batched delete of components (#3516)
- [web] fixed mail draft autosave in preferences (#3519)

3.0.1 (2016-02-05)
------------------
Expand Down
3 changes: 2 additions & 1 deletion UI/Templates/PreferencesUI/UIxPreferences.wox
Expand Up @@ -594,7 +594,8 @@
<div layout="row" layout-align="start center">
<p><var:string label:value="Auto save every"/></p>
<md-input-container class="md-input-number" md-no-float="md-no-float">
<input type="number" min="0" label:aria-label="minutes" ng-model="preferences.defaults.SOGoMailAutoSave"/>
<input type="number" min="0" label:aria-label="minutes"
ng-model="app.preferences.defaults.SOGoMailAutoSave"/>
</md-input-container>
<var:string label:value="minutes"/>
</div>
Expand Down
3 changes: 3 additions & 0 deletions UI/WebServerResources/js/Preferences/Preferences.service.js
Expand Up @@ -23,6 +23,9 @@

data.SOGoMailLabelsColors = labels;

// Mail editor autosave is a number of minutes or 0 if disabled
data.SOGoMailAutoSave = parseInt(data.SOGoMailAutoSave) || 0;

// We convert our list of autoReplyEmailAddresses/forwardAddress into a string.
// We also convert our date objects into real date, otherwise we'll have strings
// or undefined values and the md-datepicker does NOT like this.
Expand Down

0 comments on commit c8ea200

Please sign in to comment.