Set the loading class on the property being changed, not on its container.

This commit is contained in:
Thomas Tanghus 2012-07-08 16:10:12 +02:00
parent 25b95a9ec7
commit d730d3edd4
1 changed files with 3 additions and 3 deletions

View File

@ -628,7 +628,7 @@ Contacts={
return false; return false;
} }
container = $(obj).parents('.propertycontainer').first(); // get the parent holding the metadata. container = $(obj).parents('.propertycontainer').first(); // get the parent holding the metadata.
Contacts.UI.loading(container, true); Contacts.UI.loading(obj, true);
var checksum = container.data('checksum'); var checksum = container.data('checksum');
var name = container.data('element'); var name = container.data('element');
var fields = container.find('input.contacts_property,select.contacts_property').serializeArray(); var fields = container.find('input.contacts_property,select.contacts_property').serializeArray();
@ -651,7 +651,7 @@ Contacts={
var q = container.find('input.contacts_property,select.contacts_property,textarea.contacts_property').serialize(); var q = container.find('input.contacts_property,select.contacts_property,textarea.contacts_property').serialize();
if(q == '' || q == undefined) { if(q == '' || q == undefined) {
OC.dialogs.alert(t('contacts', 'Couldn\'t serialize elements.'), t('contacts', 'Error')); OC.dialogs.alert(t('contacts', 'Couldn\'t serialize elements.'), t('contacts', 'Error'));
Contacts.UI.loading(container, false); Contacts.UI.loading(obj, false);
return false; return false;
} }
q = q + '&id=' + this.id + '&name=' + name; q = q + '&id=' + this.id + '&name=' + name;
@ -663,7 +663,7 @@ Contacts={
if(jsondata.status == 'success'){ if(jsondata.status == 'success'){
container.data('checksum', jsondata.data.checksum); container.data('checksum', jsondata.data.checksum);
Contacts.UI.Card.savePropertyInternal(name, fields, checksum, jsondata.data.checksum); Contacts.UI.Card.savePropertyInternal(name, fields, checksum, jsondata.data.checksum);
Contacts.UI.loading(container, false); Contacts.UI.loading(obj, false);
$(obj).removeAttr('disabled'); $(obj).removeAttr('disabled');
return true; return true;
} }