Enable Save btn after deleting attribute from card

Fixes #4095
pull/16/merge
Francis Lachapelle 2017-03-23 12:47:16 -04:00
parent 2f92484064
commit b7bc59d599
3 changed files with 15 additions and 8 deletions

4
NEWS
View File

@ -8,7 +8,7 @@ Enhancements
- [web] constrain event/task reminder to a positive number
- [web] display year in day and week views
- [web] split string on comma and semicolon when pasting multiple addresses (#4097)
- [web] restrict Draft/Sent/Trash/Junk mailboxes to the top level (#6963)
- [web] restrict Draft/Sent/Trash/Junk mailboxes to the top level
Bug fixes
- [core] handle broken CalDAV clients sending bogus SENT-BY (#3992)
@ -27,6 +27,8 @@ Bug fixes
- [web] fixed SCAYT automatic language selection in HTML editor
- [web] fixed task sorting on multiple categories
- [web] fixed sanitisation of flags in Sieve filters (#4087)
- [web] fixed missing CC or BCC when specified before sending message (#3944)
- [web] enabled Save button after deleting attributes from a card (#4095)
- [eas] fixed opacity in EAS freebusy (#4033)
3.2.7 (2017-02-14)

View File

@ -97,7 +97,7 @@
<!-- other orgs -->
<div class="attr" ng-repeat="org in editor.card.orgs">
<div layout="row" layout-align="start center">
<md-button class="md-icon-button" type="button" ng-click="editor.card.$delete('orgs', $index)">
<md-button class="md-icon-button" type="button" ng-click="editor.removeAttribute(contactForm, 'orgs', $index)">
<md-icon>remove_circle</md-icon>
</md-button>
<md-input-container class="md-flex">
@ -136,7 +136,7 @@
<div class="section">
<div class="attr" ng-repeat="email in editor.card.emails">
<div layout="row" layout-align="start center">
<md-button class="md-icon-button" type="button" ng-click="editor.card.$delete('emails', $index)">
<md-button class="md-icon-button" type="button" ng-click="editor.removeAttribute(contactForm, 'emails', $index)">
<md-icon>remove_circle</md-icon>
</md-button>
<md-input-container flex="20">
@ -166,7 +166,7 @@
<!-- screenname -->
<div class="section">
<div layout="row" layout-align="start center" ng-show="editor.card.c_screenname != null">
<md-button class="md-icon-button" type="button" ng-click="editor.card.$delete('c_screenname', -1)">
<md-button class="md-icon-button" type="button" ng-click="editor.removeAttribute(contactForm, 'c_screenname', -1)">
<md-icon>remove_circle</md-icon>
</md-button>
<md-input-container class="md-flex">
@ -189,7 +189,7 @@
<!-- birthday -->
<div class="section">
<div layout="row" layout-align="start end" ng-show="editor.card.birthday">
<md-button class="md-icon-button" type="button" ng-click="editor.card.$delete('birthday', -1)">
<md-button class="md-icon-button" type="button" ng-click="editor.removeAttribute(contactForm, 'birthday', -1)">
<md-icon>remove_circle</md-icon>
</md-button>
<div class="pseudo-input-container">
@ -214,7 +214,7 @@
<div class="section">
<div class="attr" ng-repeat="phone in editor.card.phones">
<div layout="row" layout-align="start center">
<md-button class="md-icon-button" type="button" ng-click="editor.card.$delete('phones', $index)">
<md-button class="md-icon-button" type="button" ng-click="editor.removeAttribute(contactForm, 'phones', $index)">
<md-icon>remove_circle</md-icon>
</md-button>
<md-input-container flex="20">
@ -245,7 +245,7 @@
<div class="section">
<div class="attr" ng-repeat="url in editor.card.urls">
<div layout="row" layout-align="start center">
<md-button class="md-icon-button" type="button" ng-click="editor.card.$delete('urls', $index)">
<md-button class="md-icon-button" type="button" ng-click="editor.removeAttribute(contactForm, 'urls', $index)">
<md-icon>remove_circle</md-icon>
</md-button>
<md-input-container flex="20">
@ -275,7 +275,7 @@
<div class="section">
<div class="attr" ng-repeat="address in editor.card.addresses">
<div layout="row" layout-align="start center">
<md-button class="md-icon-button" type="button" ng-click="editor.card.$delete('addresses', $index)">
<md-button class="md-icon-button" type="button" ng-click="editor.removeAttribute(contactForm, 'addresses', $index)">
<md-icon>remove_circle</md-icon>
</md-button>
<div class="md-flex" layout="column">

View File

@ -21,6 +21,7 @@
vm.categories = {};
vm.userFilterResults = [];
vm.transformCategory = transformCategory;
vm.removeAttribute = removeAttribute;
vm.addOrg = addOrg;
vm.addBirthday = addBirthday;
vm.addScreenName = addScreenName;
@ -71,6 +72,10 @@
else
return input;
}
function removeAttribute(form, attribute, index) {
vm.card.$delete(attribute, index);
form.$setDirty();
}
function addOrg() {
var i = vm.card.$addOrg({ value: '' });
focus('org_' + i);