mirror of https://github.com/nextcloud/contacts
Fixed contact update after propertyGroup refactor
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
parent
71b5f850bf
commit
618003ca84
|
@ -75,10 +75,6 @@ angular.module('contactsApp')
|
|||
});
|
||||
};
|
||||
|
||||
ctrl.updateContact = function() {
|
||||
ContactService.queueUpdate(ctrl.contact);
|
||||
};
|
||||
|
||||
ctrl.deleteContact = function() {
|
||||
ContactService.delete(ctrl.contact);
|
||||
};
|
||||
|
|
|
@ -118,6 +118,10 @@ angular.module('contactsApp')
|
|||
ContactService.queueUpdate(ctrl.contact);
|
||||
};
|
||||
|
||||
ctrl.updateContact = function() {
|
||||
ContactService.queueUpdate(ctrl.contact);
|
||||
};
|
||||
|
||||
ctrl.getTemplate = function() {
|
||||
var templateUrl = OC.linkTo('contacts', 'templates/detailItems/' + ctrl.meta.template + '.html');
|
||||
return $templateRequest(templateUrl);
|
||||
|
|
|
@ -5,32 +5,32 @@
|
|||
<div>
|
||||
|
||||
<label for="details-pobox-{{ctrl.index}}">{{ctrl.t.poBox}}</label>
|
||||
<input type="text" id="details-pobox-{{ctrl.index}}" name="address" ng-model="ctrl.data.value[0]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.model.updateContact()" value=""
|
||||
<input type="text" id="details-pobox-{{ctrl.index}}" name="address" ng-model="ctrl.data.value[0]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.updateContact()" value=""
|
||||
ng-disabled="ctrl.model.addressBook.readOnly" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="details-address-{{ctrl.index}}">{{ctrl.t.address}}</label>
|
||||
<input type="text" id="details-address-{{ctrl.index}}" name="address" ng-model="ctrl.data.value[2]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.model.updateContact()" value=""
|
||||
<input type="text" id="details-address-{{ctrl.index}}" name="address" ng-model="ctrl.data.value[2]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.updateContact()" value=""
|
||||
ng-disabled="ctrl.model.addressBook.readOnly"
|
||||
focus-expression="$parent.ctrl.focus === ctrl.name" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="details-postal-code-{{ctrl.index}}">{{ctrl.t.postalCode}}</label>
|
||||
<input type="text" id="details-postal-code-{{ctrl.index}}" name="postal-code" ng-model="ctrl.data.value[5]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.model.updateContact()" value=""
|
||||
<input type="text" id="details-postal-code-{{ctrl.index}}" name="postal-code" ng-model="ctrl.data.value[5]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.updateContact()" value=""
|
||||
ng-disabled="ctrl.model.addressBook.readOnly" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="details-city-{{ctrl.index}}">{{ctrl.t.city}}</label>
|
||||
<input type="text" id="details-city-{{ctrl.index}}" name="city" ng-model="ctrl.data.value[3]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.model.updateContact()" value=""
|
||||
<input type="text" id="details-city-{{ctrl.index}}" name="city" ng-model="ctrl.data.value[3]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.updateContact()" value=""
|
||||
ng-disabled="ctrl.model.addressBook.readOnly" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="details-state-{{ctrl.index}}">{{ctrl.t.state}}</label>
|
||||
<input type="text" id="details-state-{{ctrl.index}}" name="state" ng-model="ctrl.data.value[4]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.model.updateContact()" value=""
|
||||
<input type="text" id="details-state-{{ctrl.index}}" name="state" ng-model="ctrl.data.value[4]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.updateContact()" value=""
|
||||
ng-disabled="ctrl.model.addressBook.readOnly" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="details-country-{{ctrl.index}}">{{ctrl.t.country}}</label>
|
||||
<input type="text" id="details-country-{{ctrl.index}}" name="state" ng-model="ctrl.data.value[6]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.model.updateContact()" value=""
|
||||
<input type="text" id="details-country-{{ctrl.index}}" name="state" ng-model="ctrl.data.value[6]" ng-model-options="{ debounce: 500 }" ng-change="ctrl.updateContact()" value=""
|
||||
ng-disabled="ctrl.model.addressBook.readOnly" />
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</a>
|
||||
<input type="email" id="details-{{ctrl.name}}-{{ctrl.index}}" name="email"
|
||||
ng-model="ctrl.data.value" email-model ng-model-options="{ debounce: 500 }"
|
||||
ng-change="ctrl.model.updateContact()" value=""
|
||||
ng-change="ctrl.updateContact()" value=""
|
||||
placeholder="{{ctrl.meta.readableName}}"
|
||||
focus-expression="$parent.ctrl.focus === ctrl.name"
|
||||
ng-disabled="ctrl.model.addressBook.readOnly"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<label ng-if="ctrl.availableOptions.length === 0" for="details-{{ctrl.name}}-{{ctrl.index}}">{{ctrl.meta.readableName}}</label>
|
||||
<ui-select id="details-{{ctrl.name}}-{{ctrl.index}}" multiple tagging tagging-label="{{ctrl.t.newGroup}}" ng-model="ctrl.data.value"
|
||||
on-remove="ctrl.model.updateContact()" on-select="ctrl.model.updateContact()"
|
||||
on-remove="ctrl.updateContact()" on-select="ctrl.updateContact()"
|
||||
theme="select2" focus-expression="$parent.$parent.ctrl.focus === ctrl.name"
|
||||
ng-disabled="ctrl.model.addressBook.readOnly">
|
||||
<ui-select-match placeholder="{{ctrl.meta.readableName}}">{{$item}}</ui-select-match>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<label ng-if="ctrl.availableOptions.length > 0" for="details-{{ctrl.name}}">{{ctrl.meta.readableName}}</label>
|
||||
<select id="details-{{ctrl.name}}" name="{{ctrl.name}}" ng-if="ctrl.availableOptions.length > 0"
|
||||
ng-model="ctrl.data.value" ng-model-options="{ debounce: 500 }" ng-change="ctrl.model.updateContact()"
|
||||
ng-model="ctrl.data.value" ng-model-options="{ debounce: 500 }" ng-change="ctrl.updateContact()"
|
||||
ng-disabled="ctrl.model.addressBook.readOnly">
|
||||
<option ng-repeat="option in ctrl.availableOptions" value="{{option.id}}">{{option.name}}</option>
|
||||
</select>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</a>
|
||||
<input type="tel" id="details-{{ctrl.name}}-{{ctrl.index}}" name="phone"
|
||||
ng-model="ctrl.data.value" tel-model ng-model-options="{ debounce: 500 }"
|
||||
ng-change="ctrl.model.updateContact()" value=""
|
||||
ng-change="ctrl.updateContact()" value=""
|
||||
placeholder="{{ctrl.meta.readableName}}"
|
||||
focus-expression="$parent.ctrl.focus === ctrl.name"
|
||||
ng-disabled="ctrl.model.addressBook.readOnly"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<label ng-if="ctrl.availableOptions.length === 0" for="details-{{ctrl.name}}-{{ctrl.index}}">{{ctrl.meta.readableName}}</label>
|
||||
<input type="text" id="details-{{ctrl.name}}-{{ctrl.index}}" name="{{ctrl.name}}"
|
||||
ng-model="ctrl.data.value" ng-model-options="{ debounce: 500 }"
|
||||
ng-change="ctrl.model.updateContact()" value=""
|
||||
ng-change="ctrl.updateContact()" value=""
|
||||
placeholder="{{ctrl.meta.readableName}}"
|
||||
focus-expression="$parent.ctrl.focus === ctrl.name"
|
||||
ng-disabled="ctrl.model.addressBook.readOnly"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<label for="details-{{ctrl.name}}-{{ctrl.index}}">{{ctrl.meta.readableName}}</label>
|
||||
<textarea id="details-{{ctrl.name}}-{{ctrl.index}}" name="{{ctrl.name}}"
|
||||
ng-model="ctrl.data.value" rows="3" cols="40"
|
||||
ng-model-options="{ debounce: 500 }" ng-change="ctrl.model.updateContact()"
|
||||
ng-model-options="{ debounce: 500 }" ng-change="ctrl.updateContact()"
|
||||
placeholder="{{ctrl.meta.readableName}}"
|
||||
focus-expression="$parent.ctrl.focus === ctrl.name"
|
||||
ng-disabled="ctrl.model.addressBook.readOnly">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</a>
|
||||
<input type="url" id="details-{{ctrl.name}}-{{ctrl.index}}" name="{{ctrl.name}}"
|
||||
ng-model="ctrl.data.value" ng-model-options="{ debounce: 500, allowInvalid: true }"
|
||||
ng-change="ctrl.model.updateContact()" value=""
|
||||
ng-change="ctrl.updateContact()" value=""
|
||||
placeholder="https://…"
|
||||
focus-expression="$parent.ctrl.focus === ctrl.name"
|
||||
ng-disabled="ctrl.model.addressBook.readOnly"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<label ng-if="ctrl.availableOptions.length === 0" for="details-{{ctrl.name}}-{{ctrl.index}}">{{ctrl.meta.readableName}}</label>
|
||||
<input type="text" id="details-{{ctrl.name}}-{{ctrl.index}}" name="{{ctrl.name}}"
|
||||
ng-model="ctrl.data.value" ng-model-options="{ debounce: 500 }"
|
||||
ng-change="ctrl.model.updateContact()" value=""
|
||||
ng-change="ctrl.updateContact()" value=""
|
||||
placeholder="Username"
|
||||
focus-expression="$parent.ctrl.focus === ctrl.name"
|
||||
ng-disabled="ctrl.model.addressBook.readOnly"
|
||||
|
|
Loading…
Reference in New Issue