(js) Prevent the creation of empty card categories
parent
888adc9396
commit
f34937d92c
2
NEWS
2
NEWS
|
@ -23,6 +23,8 @@ Bug fixes
|
|||
- [web] only one postal address of same type is saved (#4091)
|
||||
- [web] improve handling of email notifications of a calendar properties
|
||||
- [web] fixed XSRF cookie path when changing password (#4139)
|
||||
- [web] spaces can now be inserted in address book names
|
||||
- [web] prevent the creation of empty contact categories
|
||||
- [eas] hebrew folders encoding problem using EAS (#4240)
|
||||
- [eas] avoid sync requests for shared folders every second (#4275)
|
||||
|
||||
|
|
|
@ -497,6 +497,7 @@
|
|||
<md-input-container class="md-block md-flex">
|
||||
<input type="text"
|
||||
label:aria-label="Contact Category"
|
||||
required="required"
|
||||
ng-model="app.preferences.defaults.SOGoContactsCategories[$index]"
|
||||
sg-focus-on="contactCategory_{{$index}}"/>
|
||||
</md-input-container>
|
||||
|
|
|
@ -108,6 +108,8 @@
|
|||
|
||||
if (angular.isUndefined(data.SOGoContactsCategories))
|
||||
data.SOGoContactsCategories = [];
|
||||
else
|
||||
data.SOGoContactsCategories = _.compact(data.SOGoContactsCategories);
|
||||
|
||||
angular.extend(_this.defaults, data);
|
||||
|
||||
|
|
|
@ -76,8 +76,12 @@
|
|||
};
|
||||
|
||||
this.addContactCategory = function(form) {
|
||||
var i = _.indexOf(this.preferences.defaults.SOGoContactsCategories, "");
|
||||
if (i < 0) {
|
||||
this.preferences.defaults.SOGoContactsCategories.push("");
|
||||
focus('contactCategory_' + (this.preferences.defaults.SOGoContactsCategories.length - 1));
|
||||
i = this.preferences.defaults.SOGoContactsCategories.length - 1;
|
||||
}
|
||||
focus('contactCategory_' + i);
|
||||
form.$setDirty();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue