From: Florian Zeitz Date: Sat, 28 Mar 2009 23:32:22 +0000 (+0100) Subject: Some vCard work X-Git-Url: https://git.babelmonkeys.de/?a=commitdiff_plain;h=304a32ff55fe711e84fd2ca5ad0860adcf5e4a1b;p=socialXMPP.git Some vCard work --- diff --git a/index.html b/index.html index f68b777..e06ee7d 100644 --- a/index.html +++ b/index.html @@ -22,17 +22,6 @@
-
Avatar:
-
Full Name:
-
Last Name:
-
First Name:
-
Middle Name:
-
Nickname:
-
Birthday:
-
Telephone (Work):
-
Telephone (Home):
-
Country:
-
E-Mail:
diff --git a/scripts/basic.js b/scripts/basic.js index cc4fde5..934308c 100644 --- a/scripts/basic.js +++ b/scripts/basic.js @@ -47,6 +47,18 @@ function populateVCard(e, jid) { $("#"+jid2id(jid)+" img").attr('src', 'data:'+mime+';base64,'+binval); $("#PHOTO img").attr('src', 'data:'+mime+';base64,'+binval); } + $(e).find('TEL:has(HOME)').each(function() { + $('#TELHOME').append(Strophe.xmlTextNode($(this).find('NUMBER').text())); + }); + $(e).find('TEL:has(WORK)').each(function() { + $('#TELWORK').append(Strophe.xmlTextNode($(this).find('NUMBER').text())); + }); + $(e).find('EMAIL:has(HOME)').each(function() { + $('#EMAILHOME').append(Strophe.xmlTextNode($(this).find('USERID').text())); + }); + $(e).find('EMAIL:has(WORK)').each(function() { + $('#EMAILWORK').append(Strophe.xmlTextNode($(this).find('USERID').text())); + }); $('#vCard_container').slideDown("normal"); } @@ -65,6 +77,11 @@ function _cbVCard(e) { } function _cbOwnVCard(e) { + $('#ownInfo').empty(); + $('#ownInfo').load('vCard.html #vCard', function() { + $('#ownInfo').find('div').each(function() { + $(this).attr('id', 'own' + $(this).attr('id')); + }); var easy_cases = new Array('FN', 'FAMILY', 'MIDDLE', 'GIVEN', 'NICKNAME', 'BDAY', 'CTRY', 'USERID'); for (var i=0; iMiddle Name:
Nickname:
Birthday:
-
Telephone (Work):
Telephone (Home):
+
Telephone (Work):
+
E-Mail (Home):
+
E-Mail (Work):
Country:
E-Mail: