</form>
</div>
<div id="ownInfo">
- <div id="ownPHOTO"><span class="vCardName">Avatar: </span><img src="imgs/none.png" /></div>
- <div id="ownFN"><span class="vCardName">Full Name: </span></div>
- <div id="ownFAMILY"><span class="vCardName">Last Name: </span></div>
- <div id="ownGIVEN"><span class="vCardName">First Name: </span></div>
- <div id="ownMIDDLE"><span class="vCardName">Middle Name: </span></div>
- <div id="ownNICKNAME"><span class="vCardName">Nickname: </span></div>
- <div id="ownBDAY"><span class="vCardName">Birthday: </span></div>
- <div id="ownTELWORK"><span class="vCardName">Telephone (Work): </span></div>
- <div id="ownTELHOME"><span class="vCardName">Telephone (Home): </span></div>
- <div id="ownCTRY"><span class="vCardName">Country: </span></div>
- <div id="ownUSERID"><span class="vCardName">E-Mail: </span></div>
</div>
<div id='friends'>
</div>
$("#"+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");
}
}
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<easy_cases.length; i++) {
var text = e.getElementsByTagName(easy_cases[i])[0];
$("#ownPHOTO img").attr('src', 'data:'+mime+';base64,'+binval);
}
+ $(e).find('TEL:has(HOME)').each(function() {
+ $('#ownTELHOME').append(Strophe.xmlTextNode($(this).find('NUMBER').text()));
+ });
+ $(e).find('TEL:has(WORK)').each(function() {
+ $('#ownTELWORK').append(Strophe.xmlTextNode($(this).find('NUMBER').text()));
+ });
+ $(e).find('EMAIL:has(HOME)').each(function() {
+ $('#ownEMAILHOME').append(Strophe.xmlTextNode($(this).find('USERID').text()));
+ });
+ $(e).find('EMAIL:has(WORK)').each(function() {
+ $('#ownEMAILWORK').append(Strophe.xmlTextNode($(this).find('USERID').text()));
+ });
$('#ownInfo').show();
+ });
return false;
}
var button = $('#connect').get(0);
$('#log').empty();
- $('#ownInfo').empty();
+ $('#ownInfo').hide();
$('#vCard_container').empty();
$('#friends').empty();
$('label').show();
<div id="MIDDLE"><span class="vCardName">Middle Name: </span></div>
<div id="NICKNAME"><span class="vCardName">Nickname: </span></div>
<div id="BDAY"><span class="vCardName">Birthday: </span></div>
- <div id="TELWORK"><span class="vCardName">Telephone (Work): </span></div>
<div id="TELHOME"><span class="vCardName">Telephone (Home): </span></div>
+ <div id="TELWORK"><span class="vCardName">Telephone (Work): </span></div>
+ <div id="EMAILHOME"><span class="vCardName">E-Mail (Home): </span></div>
+ <div id="EMAILWORK"><span class="vCardName">E-Mail (Work): </span></div>
<div id="CTRY"><span class="vCardName">Country: </span></div>
<div id="USERID"><span class="vCardName">E-Mail: </span></div>
</div>