From: Michael J. Rubinsky Date: Fri, 10 Dec 2010 17:41:54 +0000 (-0500) Subject: build the same structure from js that we do in the ajax response. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=26212579c8afd0472e593f04ff75927f46d09abd;p=horde.git build the same structure from js that we do in the ajax response. Finally fixes the annoying layout bug when tweeting/retweeting --- 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});