From 787d54ca199165ac0238ee737d906f39aa75a3ba Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Wed, 22 Jul 2009 17:17:41 +0200 Subject: [PATCH] Small layout fixes * Add maximal width for roster entries * Nice looking padding * Use random id * Update strophejs version used --- css/standard.css | 5 ++++- scripts/basic.js | 6 ++++-- scripts/strophejs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/css/standard.css b/css/standard.css index 47fa53a..b6c3b8e 100644 --- a/css/standard.css +++ b/css/standard.css @@ -20,7 +20,9 @@ } #friends { + display: none; max-width: 50%; + padding: 1em; background: grey; float: left; } @@ -31,8 +33,9 @@ .friend { float: left; - margin: 2em; + margin: 0.5em; text-align: center; + max-width: 10em; } .friend img, #vCard_container img { diff --git a/scripts/basic.js b/scripts/basic.js index 128ba20..2f816f3 100644 --- a/scripts/basic.js +++ b/scripts/basic.js @@ -175,11 +175,13 @@ function _cbRoster(e) { var initialPresence = $pres().c('show').t('online').up().c('status').t('Hy, I am an socialXMPP instance').up().c('priority').t('1').up().c('c', {xmlns: NS_CAPS, hash: 'sha-1', node: 'http://jabber.babelmonkeys.de', ver: genCaps()}).up(); connection.send(initialPresence.tree()); + $('#friends').show(); + return false; } function getRoster() { - var id = 'getRoster'; + var id = connection.getUniqueId('roster'); var rosteriq = $iq({'id':id, 'type':'get'} @@ -331,7 +333,7 @@ function showConnect() { $('#log').empty(); $('#ownInfo').hide(); $('#vCard_container').empty(); - $('#friends').empty(); + $('#friends').hide(); $('.chat').remove(); $('label').show(); jid.show(); diff --git a/scripts/strophejs b/scripts/strophejs index b3177bf..869a007 160000 --- a/scripts/strophejs +++ b/scripts/strophejs @@ -1 +1 @@ -Subproject commit b3177bf164e2a8d26f18535d117a18f935340379 +Subproject commit 869a007c919936756c3f00cd298450e6a6b27a7a -- 2.39.5