diff --git a/UI/Templates/PreferencesUI/UIxAccountEditor.wox b/UI/Templates/PreferencesUI/UIxAccountEditor.wox index 3143a8ed6..8ec18bac8 100644 --- a/UI/Templates/PreferencesUI/UIxAccountEditor.wox +++ b/UI/Templates/PreferencesUI/UIxAccountEditor.wox @@ -14,6 +14,7 @@ @@ -33,18 +34,37 @@ - + ng-model="$AccountDialogController.account.port" + placeholder="" + sg-placeholder="$AccountDialogController.defaultPort"/> - - - +
+
+ +
+
+ +
+
+ +
+
diff --git a/UI/Templates/PreferencesUI/UIxPreferences.wox b/UI/Templates/PreferencesUI/UIxPreferences.wox index 3e2bbdf5a..b61b17dc1 100644 --- a/UI/Templates/PreferencesUI/UIxPreferences.wox +++ b/UI/Templates/PreferencesUI/UIxPreferences.wox @@ -739,7 +739,8 @@ + ng-model="value[0]" + sg-focus-on="mailLabel_{{$index}}"/> 0) return false; diff --git a/UI/WebServerResources/js/Preferences/PreferencesController.js b/UI/WebServerResources/js/Preferences/PreferencesController.js index 71b716fbe..8230c2f6e 100644 --- a/UI/WebServerResources/js/Preferences/PreferencesController.js +++ b/UI/WebServerResources/js/Preferences/PreferencesController.js @@ -115,19 +115,22 @@ vm.preferences.defaults.AuxiliaryMailAccounts.push({}); account = _.last(vm.preferences.defaults.AuxiliaryMailAccounts); - account.name = l("New account"); - account.identities = [ - { - fullName: "", - email: "" - } - ]; - account.receipts = { - receiptAction: "ignore", - receiptNonRecipientAction: "ignore", - receiptOutsideDomainAction: "ignore", - receiptAnyAction: "ignore" - }; + angular.extend(account, + { + name: "", + identities: [ + { + fullName: "", + email: "" + } + ], + receipts: { + receiptAction: "ignore", + receiptNonRecipientAction: "ignore", + receiptOutsideDomainAction: "ignore", + receiptAnyAction: "ignore" + } + }); $mdDialog.show({ controller: 'AccountDialogController', @@ -142,6 +145,8 @@ } }).then(function() { form.$setDirty(); + }).catch(function() { + vm.preferences.defaults.AuxiliaryMailAccounts.pop(); }); } @@ -173,6 +178,7 @@ // See $omit() in the Preferences services for real key generation var key = '_$$' + guid(); vm.preferences.defaults.SOGoMailLabelsColors[key] = ["New label", "#aaa"]; + focus('mailLabel_' + (_.size(vm.preferences.defaults.SOGoMailLabelsColors) - 1)); form.$setDirty(); }