You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mm...@apache.org on 2014/05/05 18:09:58 UTC
[11/50] [abbrv] git commit: explanation about organizations added
explanation about organizations added
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/f7bc6883
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/f7bc6883
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/f7bc6883
Branch: refs/heads/cdvtest
Commit: f7bc6883653fc0628d10b50e4139c00bc20c31e4
Parents: e43a1a9
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Fri Dec 20 14:12:07 2013 +0100
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Fri Dec 20 14:12:07 2013 +0100
----------------------------------------------------------------------
src/firefoxos/ContactsProxy.js | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/f7bc6883/src/firefoxos/ContactsProxy.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/ContactsProxy.js b/src/firefoxos/ContactsProxy.js
index 6d06a13..c24ad78 100644
--- a/src/firefoxos/ContactsProxy.js
+++ b/src/firefoxos/ContactsProxy.js
@@ -133,6 +133,9 @@ mozContact.prototype.updateFromCordova = function(contact) {
this.tel = exportContactField(contact.phoneNumbers);
}
if (contact.organizations) {
+ // XXX: organizations are saved in 2 arrays - org and jobTitle
+ // depending on the usecase it might generate issues
+ // where wrong title will be added to an organization
this.org = exportContactFieldArray(contact.organizations, 'name');
this.jobTitle = exportContactFieldArray(contact.organizations, 'title');
}
@@ -254,6 +257,7 @@ Contact.prototype.updateFromMozilla = function(moz) {
}
// organizations
if (moz.org || moz.jobTitle) {
+ // XXX: organizations array is created from org and jobTitle
this.organizations = createOrganizations(moz.org, moz.jobTitle);
}
}