incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r822748 - in /incubator/esme/trunk/server/src/main/webapp: images/avatar.jpg scripts/display_messages.js templates-hidden/message.html
Date Wed, 07 Oct 2009 14:12:50 GMT
Author: rhirsch
Date: Wed Oct  7 14:12:50 2009
New Revision: 822748

URL: http://svn.apache.org/viewvc?rev=822748&view=rev
Log:
[ESME-96] ESME image for users with no avatars should use internal image

Added:
    incubator/esme/trunk/server/src/main/webapp/images/avatar.jpg   (with props)
Modified:
    incubator/esme/trunk/server/src/main/webapp/scripts/display_messages.js
    incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html

Added: incubator/esme/trunk/server/src/main/webapp/images/avatar.jpg
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/images/avatar.jpg?rev=822748&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/images/avatar.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/esme/trunk/server/src/main/webapp/scripts/display_messages.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/display_messages.js?rev=822748&r1=822747&r2=822748&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/display_messages.js (original)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/display_messages.js Wed Oct  7 14:12:50
2009
@@ -63,7 +63,11 @@
       var newMsg = msgTemplate.clone(true).attr('id',msgId);
 
       newMsg.find('#author').text(msgAuthor.nickname);
-
+     
+      // Dealing with users with no avatars
+      if (!msgAuthor.imageurl)
+      	msgAuthor.imageurl="/images/avatar.jpg"
+      	
       var avatar = newMsg.find('#avatar')
       .attr('src', msgAuthor.imageurl)
       .attr('alt',msgAuthor.firstname + ' ' + msgAuthor.lastname);

Modified: incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html?rev=822748&r1=822747&r2=822748&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html Wed Oct  7 14:12:50
2009
@@ -52,7 +52,7 @@
                           <lift:comet type="Timeline"/>
                           <tbody id="timeline_messages">
                             <tr id="message">
-                              <td><img id="avatar" src="http://static.twitter.com/images/default_profile_bigger.png"
alt="Anonymous" width="50px"/><div id="author">anon</div></td>
+                              <td><img id="avatar" src="/images/avatar.jpg" alt="Anonymous"
width="50px"/><div id="author">anon</div></td>
                               <td class="message">
                                 <div class="outer">
                                   <div class="inner clear">
@@ -96,7 +96,7 @@
                           <lift:comet type="PublicTimeline"/>
                           <tbody id="public_timeline_messages">
                             <tr id="message">
-                            <td><img id="avatar" src="http://static.twitter.com/images/default_profile_bigger.png"
alt="Anonymous" width="50px"/><div id="author">anon</div></td>
+                            <td><img id="avatar" src="/images/avatar.jpg" alt="Anonymous"
width="50px"/><div id="author">anon</div></td>
                               <td id="author">dhague</td>
                               <td class="message">
                                 <div class="outer">



Mime
View raw message