X-Git-Url: http://cgit.babelmonkeys.de/?p=socialXMPP.git;a=blobdiff_plain;f=scripts%2Fbasic.js;h=934308c22fc1fc413305f34911545322d563514f;hp=cc4fde5a693a6ea63da3ec3760b687b0ce040eaa;hb=304a32ff55fe711e84fd2ca5ad0860adcf5e4a1b;hpb=8fbc874a6968cab37cd50616b121746a3b054367 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; i