mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Contacts: Don't try to delete empty new properties.
This commit is contained in:
parent
c8ee19038f
commit
dfa68f74a5
@ -87,6 +87,10 @@ OC.Contacts = OC.Contacts || {};
|
||||
};
|
||||
if(this.multi_properties.indexOf(element) !== -1) {
|
||||
params['checksum'] = this.checksumFor(obj);
|
||||
if(params['checksum'] === 'new' && this.valueFor(obj).trim() === '') {
|
||||
$container.remove();
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.setAsSaving(obj, true);
|
||||
var self = this;
|
||||
@ -464,7 +468,7 @@ OC.Contacts = OC.Contacts || {};
|
||||
var $elem = $container.find('input.value:not(:checkbox)');
|
||||
console.assert($elem.length > 0, 'Couldn\'t find value for ' + $container.data('element'));
|
||||
if($elem.length === 1) {
|
||||
return $elem.val;
|
||||
return $elem.val();
|
||||
} else if($elem.length > 1) {
|
||||
var retval = [];
|
||||
$.each($elem, function(idx, e) {
|
||||
|
Loading…
Reference in New Issue
Block a user