From 26212579c8afd0472e593f04ff75927f46d09abd Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Fri, 10 Dec 2010 12:41:54 -0500 Subject: [PATCH] build the same structure from js that we do in the ajax response. Finally fixes the annoying layout bug when tweeting/retweeting --- horde/js/twitterclient.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/horde/js/twitterclient.js b/horde/js/twitterclient.js index 8e14ebbc4..ff7e9b70c 100644 --- a/horde/js/twitterclient.js +++ b/horde/js/twitterclient.js @@ -284,17 +284,22 @@ var Horde_Twitter = Class.create({ }, /** - * Build adnd display the node for a new tweet. + * Build and display the node for a new tweet. */ buildNewTweet: function(response) { var tweet = new Element('div', {'class':'hordeSmStreamstory'}); - var tPic = new Element('div', {'class':'hordeSmAvatar'}).update( + var tPic = new Element('div', {'class':'solidbox hordeSmAvatar'}).update( new Element('a', {'href': 'http://twitter.com/' + response.user.screen_name}).update( new Element('img', {'src':response.user.profile_image_url}) ) ); + tPic.appendChild( + new Element('div', { 'style': {'overflow': 'hidden' }}).update( + new Element('a', {'href': 'http://twitter.com/' + response.user.screen_name}).update(response.user.screen_name) + ) + ); var tBody = new Element('div', {'class':'hordeSmStreambody'}).update(response.text); - tBody.appendChild(new Element('div', {'class':'hordeSmStreaminfo'}).update(this.opts.strings.justnow)); + tBody.appendChild(new Element('div', {'class':'hordeSmStreaminfo'}).update(this.opts.strings.justnow + '

')); tweet.appendChild(tPic); tweet.appendChild(tBody); $(this.opts.content).insert({top:tweet}); -- 2.11.0