You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@esme.apache.org by rh...@apache.org on 2010/09/06 08:59:39 UTC

svn commit: r992955 - in /incubator/esme/trunk/server/src/main/webapp: info_view/public.html scripts/display_messages.js scripts/display_messages_top.js style/style.css templates-hidden/message.html templates-hidden/message_core.html

Author: rhirsch
Date: Mon Sep  6 06:59:39 2010
New Revision: 992955

URL: http://svn.apache.org/viewvc?rev=992955&view=rev
Log:
[ESME-207] Main (IE7) - Message display (tools area!) is broken

Modified:
    incubator/esme/trunk/server/src/main/webapp/info_view/public.html
    incubator/esme/trunk/server/src/main/webapp/scripts/display_messages.js
    incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js
    incubator/esme/trunk/server/src/main/webapp/style/style.css
    incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html
    incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_core.html

Modified: incubator/esme/trunk/server/src/main/webapp/info_view/public.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/info_view/public.html?rev=992955&r1=992954&r2=992955&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/info_view/public.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/info_view/public.html Mon Sep  6 06:59:39 2010
@@ -18,16 +18,14 @@
 -->
 
 <lift:surround with="base" at="left">
-	<div id="left">
 	<div id="back-header">
+	<div id="left">
 	<h1><lift:loc>ui_public_title</lift:loc></h1>
-<div class="container-aux">
+        <div class="container-public">
 		<!--updates-box -->
 		<lift:comet type="PublicTimeline"/>
 		<lift:embed what="templates-hidden/message_core"/>
 	</div>
-	<!--updates-box-->
-	
-	</div><!-- End demo -->
+	</div>
 </div><!-- End demo -->
 </lift:surround>
\ No newline at end of file

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=992955&r1=992954&r2=992955&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 Mon Sep  6 06:59:39 2010
@@ -142,7 +142,7 @@ function displayMessages(msgArray, eleme
       var conversation = newMsg.find('#conversation');
       if (msgConversation != 0) {
         conversation.attr('href', 
-          '/conversation/' + msgConversation);
+          '../conversation/' + msgConversation);
       } else {
         conversation.css("display", "none");
       }

Modified: incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js?rev=992955&r1=992954&r2=992955&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js (original)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js Mon Sep  6 06:59:39 2010
@@ -107,7 +107,7 @@ function displayMessages(msgArray, eleme
 
       
       var msgPool = '';
-      if (cometMsg.pool) msgPool = 'in pool ' + cometMsg.pool.name; 
+      if (cometMsg.pool) msgPool = 'in pool \'' + cometMsg.pool.name + "\'"; 
       var msgPoolId = 0;
       if (cometMsg.pool) msgPoolId = cometMsg.pool.id; 
       var msgSource = cometMsg.source;
@@ -130,13 +130,17 @@ function displayMessages(msgArray, eleme
       // Put the marshalled data into a copy of the template
       var newMsg = msgTemplate.clone(true).attr('id',msgId);
 
+      
       newMsg.find('#author').text(msgAuthor.nickname);
       newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
      
      
-      // Dealing with users with no avatars
+           // Dealing with users with no avatars
       if (!msgAuthor.imageUrl) {
+      	if (top.location.pathName == "/") 
       	 msgAuthor.imageUrl= "images/avatar.jpg"
+      	else
+      	msgAuthor.imageUrl= "../images/avatar.jpg" 
      }
      
      	
@@ -145,13 +149,14 @@ function displayMessages(msgArray, eleme
       	
       var avatar = newMsg.find('#avatar')
       .attr('src', msgAuthor.imageUrl)
-      .attr('alt',msgAuthor.firstname + ' ' + msgAuthor.lastname);
+      .attr('alt',msgAuthor.firstName + ' ' + msgAuthor.lastName);
       
-      newMsg.find('#body').html(msgBody);
-      newMsg.find('#supp_data').text(msgPool + " " + msgDateStr  + " " +  msgReason  + " " +   msgSource);
-      newMsg.find('#msgPool').text(msgPool);
-      //newMsg.find('#reason').text(msgReason);
-      //newMsg.find('#when').text(msgDateStr);
+      newMsg.find('#msgbody').html(msgBody);
+      if (msgReason)
+         newMsg.find('#supp_data').text(msgPool + " " + msgDateStr  + " " +  msgReason );
+      else {
+      	 newMsg.find('#supp_data').text(msgPool + " " + msgDateStr  + " via "  +   msgSource);
+      }
       var id = cometMsg.id;
 
       var resendButton = newMsg.find('#resend');
@@ -163,11 +168,6 @@ function displayMessages(msgArray, eleme
             .click(function() { resend_msg(id);
                                 clearResend("resend_" + id );
                                 return false;})        
-        /*
-        resendButton.attr('id', 'resend_' + id).
-          attr('onclick', 'javascript:resend_msg(' + id + ');' +
-                                     'clearResend("resend_' + id + '")');
-        */
       }
 
 
@@ -198,6 +198,7 @@ function displayMessages(msgArray, eleme
 
       // Insert the updated copy of the message into the page
       newMsg.prependTo(msgInsertPt).show();
+      jQuery('#msgsep').clone().show();
     }
   }
 }

Modified: incubator/esme/trunk/server/src/main/webapp/style/style.css
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/style/style.css?rev=992955&r1=992954&r2=992955&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/style/style.css (original)
+++ incubator/esme/trunk/server/src/main/webapp/style/style.css Mon Sep  6 06:59:39 2010
@@ -427,6 +427,7 @@ ul.main-links  {
 	float:left;
 	padding:10px 20px;
 	word-wrap:break-word;
+	border:1px;
 }
 .avatar {
 	float:left;
@@ -434,7 +435,7 @@ ul.main-links  {
 }
 .update {
 	float:left;
-	width:420px;
+	width:470px;
 	padding:0 10px; 
 	word-wrap:break-word;
 }
@@ -443,6 +444,13 @@ ul.main-links  {
 	width:500px;
 	padding:0 10px;
 }
+
+
+.update2 {
+	float:left;
+	width:500px;
+	padding:0 10px;
+}
 .tag, .tag a {
 	margin:10px 0 2px;
 	font-weight:normal;
@@ -464,7 +472,7 @@ ul.main-links  {
 	margin:10px;
 	width:90%;
 }
-.time {
+.supp_data_class {
 	color:#07376d;
 	font-size:80%;
 }
@@ -560,6 +568,13 @@ ul#toc li.current a {
 	margin-bottom:20px; 
 }
 
+.container-public {
+	float:left; 
+	width: 623px; 
+	margin-bottom:20px;
+	background: url(../images/bg-tabs.png) no-repeat; 
+}
+
 .container-aux {
 	float:left; 
 	width: 563px; 
@@ -665,3 +680,4 @@ top: 60px
 top: 100px
 }
 
+

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=992955&r1=992954&r2=992955&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 Mon Sep  6 06:59:39 2010
@@ -24,8 +24,7 @@
         <script src="scripts/display_messages_top.js" type="text/javascript"/> 
         <script src="scripts/pretty.js" type="text/javascript"/> 
 </head>
-
-	<div id="left">
+        <div id="left">
 		<div id="back-header">
 			<!---UPDATE BOX -->
 			<div class="container-update">
@@ -104,36 +103,39 @@
 		<!--updates-box -->
 		<lift:comet type="Timeline"/>
 		<div id="personal_timeline_messages">
+		
 			<div class="updates-box" id="message">
 				<div class="avatar">
-					<img id="avatar" width="50px"/>
-				</div>
-				<div class="update">
-					<div id="body"></div>
-					<div class="info">
-						<a href="" id="author"></a>
-						<div class="time">
-							<div id="supp_data"></div>
-						</div>
-					</div>
-				</div>
-				<div class="time">  </div>
-				<div id="msgPool" style="display: none">  </div>
-				<div class="actions">
-					<a href="#"  id="resend">
-						<lift:loc>ui_messages_message_label_resend</lift:loc>
-					</a>
-					<span id="resend">| </span>
-					 <a href="#" id="reply">
-						<lift:loc>ui_messages_message_label_reply</lift:loc>
-					</a>
-					<span id="conversation">| </span>
-					<a id="conversation">
-					<lift:loc>ui_messages_message_label_conversation</lift:loc>
-					</a>
-				</div>
-				<div class="separator">                    </div>
-			</div>
-		</div>
+					<img id="avatar" width="40px"/>
+				</div> <!--end avatar-->
+				<div class="update2">
+					
+					<div class="info2">
+						<a href="" id="author"/>
+						<div id="msgbody"/>
+						<div class="supp_data_class" id="supp_data"/>
+					</div> <!--end info2-->
+					
+
+					<div class="actions">
+						<a href="#"  id="resend">
+							<lift:loc>ui_messages_message_label_resend</lift:loc>
+						</a>
+						<span id="resend">| </span>
+						 <a href="#" id="reply">
+							<lift:loc>ui_messages_message_label_reply</lift:loc>
+						</a>
+						<span id="conversation">| </span>
+						<a id="conversation">
+						<lift:loc>ui_messages_message_label_conversation</lift:loc>
+						</a>
+					</div> <!--end actions-->
+					 <div id="msgsep" class="separator"></div>  <!-- separator works here but is too short--> 
+				</div> <!--end update2-->
+			            	
+			</div> <!--end updates-box-->
+			<!-- <div id="msgsep" class="separator"/> seprator should be here but doesn't work--> 
+			
+	</div>		
 	</div>
 </lift:surround>
\ No newline at end of file

Modified: incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_core.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_core.html?rev=992955&r1=992954&r2=992955&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_core.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_core.html Mon Sep  6 06:59:39 2010
@@ -19,25 +19,29 @@
 
 <div id="timeline_messages">
 <head>
-        <script src="../scripts/display_messages.js" type="text/javascript"/> 
+        <script src="../scripts/display_messages_top.js" type="text/javascript"/> 
         <script src="../scripts/pretty.js" type="text/javascript"/> 
 </head>
-	<div class="updates-box" id="message">
-		<div class="avatar">
-			<img id="avatar" width="50px"/>
-		</div>
-		<div class="update">
-			<div id="body"></div>
-			<div class="info">
-				<a href="" id="author"></a>
-				<div class="time">
-					<div id="supp_data"></div>
-				</div>
-			</div>
-		</div>
-		<div class="time">  </div>
-		<div class="separator">                    </div>
-	</div>
+<div class="updates-box" id="message">
+				<div class="avatar">
+					<img id="avatar" width="40px"/>
+				</div> <!--end avatar-->
+				<div class="update2">
+					
+					<div class="info2">
+						<a href="" id="author"/>
+						<div id="msgbody"/>
+						<div class="supp_data_class" id="supp_data"/>
+					</div> <!--end info2-->
+
+					<div class="actions">
+						
+					</div> <!--end actions-->
+					 <div id="msgsep" class="separator"></div>  <!-- separator works here but is too short--> 
+				</div> <!--end update2-->
+			            	
+			</div> <!--end updates-box-->
+			<!-- <div id="msgsep" class="separator"/> seprator should be here but doesn't work--> 
 </div>