diff options
author | niko <niko> | 2012-10-02 22:23:46 (GMT) |
---|---|---|
committer | niko <niko> | 2012-10-02 22:23:46 (GMT) |
commit | 32c1661206a070f04a15fc024464f91e932aac35 (patch) | |
tree | 4a98624de442447ef82aa523542b0981e9384197 /src | |
parent | 7b47175cd7c82f806b37d2fe2332cc3b6b8e105b (diff) | |
download | synckolab-32c1661206a070f04a15fc024464f91e932aac35.tar.gz |
more tests
Diffstat (limited to 'src')
-rw-r--r-- | src/chrome/content/synckolab/addressbookTools.js | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/src/chrome/content/synckolab/addressbookTools.js b/src/chrome/content/synckolab/addressbookTools.js index 6cdbaf7..db4a96c 100644 --- a/src/chrome/content/synckolab/addressbookTools.js +++ b/src/chrome/content/synckolab/addressbookTools.js @@ -761,9 +761,11 @@ synckolab.addressbookTools.xml2Card = function (xml, card) { } tok = cur.firstChild.data.split("-"); this.setCardProperty(card, "BirthYear", tok[0]); - this.setCardProperty(card, "BirthMonth", tok[1]); - // BDAY: 1987-09-27 - this.setCardProperty(card, "BirthDay", tok[2]); + if(tok.length > 2) { + this.setCardProperty(card, "BirthMonth", tok[1]); + // BDAY: 1987-09-27 + this.setCardProperty(card, "BirthDay", tok[2]); + } found = true; break; // anniversary - not in vcard rfc?? @@ -774,9 +776,11 @@ synckolab.addressbookTools.xml2Card = function (xml, card) { tok = cur.getFirstData().split("-"); this.setCardProperty(card, "AnniversaryYear", tok[0]); - this.setCardProperty(card, "AnniversaryMonth", tok[1]); - // BDAY:1987-09-27T08:30:00-06:00 - this.setCardProperty(card, "AnniversaryDay", tok[2]); + if(tok.length > 2) { + this.setCardProperty(card, "AnniversaryMonth", tok[1]); + // BDAY:1987-09-27T08:30:00-06:00 + this.setCardProperty(card, "AnniversaryDay", tok[2]); + } found = true; break; /* @deprecated @@ -909,6 +913,25 @@ synckolab.addressbookTools.xml2Card = function (xml, card) { } this.setCardProperty(card, "AllowRemoteContent", 'TRUE' === cur.firstChild.data.toUpperCase()); break; + + // fields we "know" about but just cannot work with (used for kolab 3) + case "CREATION-DATE": + case "LATITUDE": + case "LONGITUDE": + case "ASSISTANT": + case "MANAGER-NAME": + case "PROFESSION": + case "SPOUSE-NAME": + case "CHILDREN": + case "GENDER": + case "LANGUAGE": + case "OFFICE-LOCATION": + case "FREE-BUSY-URL": + if (cur.firstChild === null) { + break; + } + this.setCardProperty(card, cur.nodeName, cur.getFirstData(), true); + break; default: if (cur.firstChild === null) { break; |