esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esjew...@apache.org
Subject svn commit: r1023718 - in /incubator/esme/trunk/server/src/main: scala/org/apache/esme/actor/ scala/org/apache/esme/comet/ scala/org/apache/esme/lib/ webapp/info_view/ webapp/style/ webapp/templates-hidden/
Date Mon, 18 Oct 2010 10:01:11 GMT
Author: esjewett
Date: Mon Oct 18 10:01:11 2010
New Revision: 1023718

URL: http://svn.apache.org/viewvc?rev=1023718&view=rev
Log:
[ESME-287] [ESME-289] Update conversation timeline to use same formatting as the main timeline
(mostly just some CSS and HTML tweaking in this case) and to have new messages pushed via
comet whenever new messages are available. Also some serious refactoring of templates to improve
DRY-ness, and refactoring of the comet Timeline classes to accomodate this change as well
as the upcoming change for tag timelines.

Added:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/ConversationTimeline.scala
    incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_update_box.html
    incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_conversation.html
    incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_personal.html
Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/ConvDistributor.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/PersonalTimeline.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/Timeline.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala
    incubator/esme/trunk/server/src/main/webapp/info_view/conversation.html
    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/scala/org/apache/esme/actor/ConvDistributor.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/ConvDistributor.scala?rev=1023718&r1=1023717&r2=1023718&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/ConvDistributor.scala
(original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/ConvDistributor.scala
Mon Oct 18 10:01:11 2010
@@ -23,24 +23,39 @@ import net.liftweb._  
 import actor._        
 
 import org.apache.esme._
-import model.{Message, User, ConvFollowReason}
+import model.{Message, User, ConvFollowReason, NoReason, MailboxReason}   
 
-object ConvDistributor extends LiftActor {   
+import scala.collection.mutable.HashMap
 
-  println("ConvDistributor started")
-                             
+object ConvDistributor extends LiftActor {   
+                                       
   protected def messageHandler = {
     case Distributor.NewMessage(msg) => {                                            
               
       Message.findMessages(List(msg.conversation)).values.toList.map( m => {  
         m.followers.refresh.map( u => {                             
           Distributor ! Distributor.AddMessageToMailbox(u.id, msg, ConvFollowReason(m.id));

-        })
+        })   
+        listeners.getOrElse(m, List()).map(
+          _ ! MessageReceived(msg, NoReason)
+        )
       })
     }
+    
+    case Listen(conv, who) =>
+      listeners.update(conv, who :: listeners.getOrElse(conv, List()))
+      
+    case Unlisten(conv, who) =>
+      listeners.update(conv, listeners.getOrElse(conv, List()).filter( _ ne who))
   } 
   
   def touch {
   
-  }                   
+  }    
+  
+  private var listeners: HashMap[Message,List[LiftActor]] = new HashMap
+  
+  case class Listen(conv:Message,who:LiftActor)
+  case class Unlisten(conv:Message,who:LiftActor)      
+  case class MessageReceived(msg: Message, reason: MailboxReason)          
 
 }
\ No newline at end of file

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala?rev=1023718&r1=1023717&r2=1023718&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/actor/Distributor.scala Mon
Oct 18 10:01:11 2010
@@ -64,8 +64,19 @@ object Distributor extends LiftActor {
         findOrCreateUser(user) ! UserActor.Listen(who)
 
       case Unlisten(user, who) =>
-        findOrCreateUser(user) ! UserActor.Unlisten(who)
-
+        findOrCreateUser(user) ! UserActor.Unlisten(who)    
+        
+      case ListenObject(listenable, who) => listenable match {
+        case u:User => findOrCreateUser(u.id) ! UserActor.Listen(who) 
+        case c:Message => ConvDistributor ! ConvDistributor.Listen(c,who)   
+        case x => println("This is all wrong " + x)
+      }              
+      
+      case UnlistenObject(listenable, who) => listenable match {
+        case u:User => findOrCreateUser(u.id) ! UserActor.Unlisten(who) 
+        case c:Message => ConvDistributor ! ConvDistributor.Unlisten(c,who)
+      }
+                         
       case LatestMessages(user, cnt) =>
         forwardMessageTo(UserActor.LatestMessages(cnt), findOrCreateUser(user))
 
@@ -109,7 +120,9 @@ object Distributor extends LiftActor {
                                 pool: Box[Long])
   case class AddMessageToMailbox(user: Long, message: Message, reason: MailboxReason)
   case class Listen(user: Long, who: LiftActor)
-  case class Unlisten(user: Long, who: LiftActor)
+  case class Unlisten(user: Long, who: LiftActor)    
+  case class ListenObject(listenable: Any, who: LiftActor)
+  case class UnlistenObject(listenable: Any, who: LiftActor)
   case class LatestMessages(user: Long, cnt: Int)
   case class NewMessage(msg: Message)
   case class UpdateTrackingFor(user: Long, which: TrackingType)

Added: incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/ConversationTimeline.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/ConversationTimeline.scala?rev=1023718&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/ConversationTimeline.scala
(added)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/ConversationTimeline.scala
Mon Oct 18 10:01:11 2010
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.esme.comet   
+
+import net.liftweb.common._    
+import net.liftweb.mapper._
+import net.liftweb.http._ 
+import net.liftweb.util.Helpers.TimeSpan
+
+import org.apache.esme._
+import actor.{Distributor,UserActor,ConvDistributor}
+import model._        
+
+class ConversationTimeline extends Timeline {  
+  
+  val jsId = "conversation_timeline_messages"
+  var convId:Long = S.param("cid").map(_.toLong).openOr(-1L)  
+  var convMess:Message = Message.findMessages(List(convId)).values.toList.first   
+                                  
+  override def localSetup() {
+    super.localSetup()       
+    
+    Distributor ! Distributor.ListenObject(convMess, this)
+    messages = Message.findAndPrime(By(Message.conversation, convId),
+                                    OrderBy(Message.id, Descending)).map( m => 
+                                    (m.id.is, NoReason, false)).take(40)
+  }  
+  
+  override def localShutdown() {
+    super.localShutdown()                          
+    Distributor ! Distributor.UnlistenObject(convMess, this)
+  } 
+  
+  override def lifespan = Full(TimeSpan(300000))
+  
+  override def lowPriority = {
+    case ConvDistributor.MessageReceived(msg, r) =>
+      messages = ((msg.id.is,r,false) :: messages).take(40)
+      reRender(false)
+  }   
+
+}
\ No newline at end of file

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/PersonalTimeline.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/PersonalTimeline.scala?rev=1023718&r1=1023717&r2=1023718&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/PersonalTimeline.scala
(original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/PersonalTimeline.scala
Mon Oct 18 10:01:11 2010
@@ -22,10 +22,12 @@ package org.apache.esme.comet   
 import net.liftweb.common._    
 
 import org.apache.esme._
-import actor.Distributor
+import actor.{Distributor,UserActor}
 import model._   
 
-class PersonalTimeline extends Timeline { 
+class PersonalTimeline extends Timeline {   
+
+  val jsId = "personal_timeline_messages"  
 
   override def localSetup() {
     super.localSetup()
@@ -36,6 +38,29 @@ class PersonalTimeline extends Timeline 
         case x =>
       }
     }
-  }     
+  }  
+  
+  override def localShutdown() {
+    super.localShutdown()
+    for (user <- User.currentUser) {
+      Distributor ! Distributor.Unlisten(user.id, this)
+    }
+  }
+  
+  override def lowPriority = {
+    case UserActor.MessageReceived(msg, r) =>
+      messages = ( (msg.id.is,r,false) :: messages).take(40)
+      reRender(false)
+      
+    case UserActor.Resend(msgId) =>
+      messages = messages.map {
+        case (`msgId`, r, _) => (msgId, r, true)
+        case x => x
+      }
+      reRender(false)
+      
+    case Distributor.UserUpdated(_) =>
+      reRender(false)
+  }   
 
 }
\ No newline at end of file

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/Timeline.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/Timeline.scala?rev=1023718&r1=1023717&r2=1023718&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/Timeline.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/comet/Timeline.scala Mon Oct
18 10:01:11 2010
@@ -36,7 +36,8 @@ import lib._
 import java.text._
 
 trait Timeline extends CometActor {
-  protected var messages: List[(Long,MailboxReason,Boolean)] = Nil
+  protected var messages: List[(Long,MailboxReason,Boolean)] = Nil    
+  protected val jsId: String
   
   override def localSetup() {
     super.localSetup()
@@ -44,9 +45,6 @@ trait Timeline extends CometActor {
   
   override def localShutdown() {
     super.localShutdown()
-    for (user <- User.currentUser) {
-      Distributor ! Distributor.Unlisten(user.id, this)
-    }
   }
   
   def render = {
@@ -55,7 +53,6 @@ trait Timeline extends CometActor {
       for ((id, reason, resent) <- messages;
            msg <- msgMap.get(id))
       yield (msg, reason, resent)
-    val jsId = "personal_timeline_messages";
 
     OnLoad(JsCrVar(jsId, JsArray(
         toDisplay.map{case (msg, reason, resent) =>
@@ -63,20 +60,4 @@ trait Timeline extends CometActor {
                   } :_*)) &
     JsFunc("displayMessages", JsVar(jsId), jsId).cmd)
   }
-  
-  override def lowPriority = {
-    case UserActor.MessageReceived(msg, r) =>
-      messages = ( (msg.id.is,r,false) :: messages).take(40)
-      reRender(false)
-      
-    case UserActor.Resend(msgId) =>
-      messages = messages.map {
-        case (`msgId`, r, _) => (msgId, r, true)
-        case x => x
-      }
-      reRender(false)
-      
-    case Distributor.UserUpdated(_) =>
-      reRender(false)
-  }
 }

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala?rev=1023718&r1=1023717&r2=1023718&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ConversationMgr.scala Mon
Oct 18 10:01:11 2010
@@ -49,8 +49,7 @@ object ConversationMgr {
 
   val menuItems =
   Menu(Loc("conversation", List("info_view", "conversation"), S.?("base_conv_menu"), ifIsLoggedIn,
-           Loc.Snippet("conv_info", convInfo))) ::
-  Nil         
+           Loc.Snippet("conv_info", convInfo))) :: Nil         
   
   def convInfo(in: NodeSeq): NodeSeq = {  
 
@@ -81,25 +80,12 @@ object ConversationMgr {
       ret.open_!                                     
     }      
     
-    def displayConversation(in: NodeSeq): NodeSeq = {
-
-      val jsId = "timeline_messages"                  
-
-      val msgs = Message.findAndPrime(By(Message.conversation, cid),
-                                      OrderBy(Message.id, Descending))
-
-      Script(
-        OnLoad(JsCrVar(jsId, JsArray(
-            msgs.map(m => JsObj(("message", m.asJs)) ) :_*)) &
-        JsFunc(" displayMessages", JsVar(jsId), jsId).cmd)
-      )
-
-    }
-
+    def cometTimeline = <lift:comet type="ConversationTimeline" name={"conv"+cid} />

+                           
     def updateFollow: JsCmd = SetHtml("following", followOrUnfollow)
 
     bind("conv", in, 
-         "followButton" -> followOrUnfollow,
-         "displayConversation" -> displayConversation _ )       
+         "cometTimeline" -> cometTimeline,
+         "followButton" -> followOrUnfollow )       
   }                                
 }

Modified: incubator/esme/trunk/server/src/main/webapp/info_view/conversation.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/info_view/conversation.html?rev=1023718&r1=1023717&r2=1023718&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/info_view/conversation.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/info_view/conversation.html Mon Oct 18 10:01:11
2010
@@ -16,26 +16,17 @@
  specific language governing permissions and limitations      *
  under the License.                                           *
 -->
-<lift:surround with="base" at="left">
-  <lift:TableSorterSnip/>
+<lift:surround with="base" at="left">    
   <link rel="stylesheet" type="text/css" href="../style/style.css" />
-  <head>
-    <script src="../scripts/display_messages.js" type="text/javascript"/> 
-    <script src="../scripts/pretty.js" type="text/javascript"/> 
-  </head>
-                   
   <div id="back-header">  
-    <lift:conv_info>
     <h1><lift:loc>ui_default_conversation</lift:loc></h1>
-    <div class="container-aux">        
-      <span id="following"><conv:followButton/></span>
-      <div>
-        <conv:displayConversation/>
-        <lift:embed what="templates-hidden/message_core"/>
-      </div>
-    </div><!--container-settings-->    
-    </lift:conv_info>
-	</div>
+	</div>                                                 
+	<div class="container-aux">   
+	  <lift:conv_info>   
+	    <span id="following"><conv:followButton/></span>   
+	  </lift:conv_info>                                             
+    <lift:embed what="templates-hidden/timeline_conversation"/>   
+  </div>
 </lift:surround>
 
 

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=1023718&r1=1023717&r2=1023718&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/style/style.css (original)
+++ incubator/esme/trunk/server/src/main/webapp/style/style.css Mon Oct 18 10:01:11 2010
@@ -425,7 +425,7 @@ ul.main-links  {
 
 .updates-box {
 	float:left;
-	padding:10px 20px;
+	padding:10px 0px;
 	word-wrap:break-word;
 	border:1px;
 }
@@ -442,14 +442,7 @@ ul.main-links  {
 .update2 {
 	float:left;
 	width:500px;
-	padding:0 10px;
-}
-
-
-.update2 {
-	float:left;
-	width:500px;
-	padding:0 10px;
+	padding:0px;
 }
 .tag, .tag a {
 	margin:10px 0 2px;

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=1023718&r1=1023717&r2=1023718&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 Oct 18 10:01:11
2010
@@ -19,123 +19,12 @@
 
 
 
-<lift:surround with="base_top" at="left">
-<head>
-        <script src="scripts/display_messages_top.js" type="text/javascript"/> 
-        <script src="scripts/pretty.js" type="text/javascript"/> 
-</head>
-        <div id="left">
-		<div id="back-header">
-			<!---UPDATE BOX -->
-			<div class="container-update">
-				<h3 id="message_request">
-					<lift:loc>ui_messages_message_label_message_request</lift:loc>
-				</h3>
-				<div id="form-update">
-					<div id="messages"></div>
-					<div class="post-form-row">
-						<textarea class="inputBox2 tipelement" title="Enter your status message here." id="vMsg"
rows="5" cols="80%"></textarea>
-						<div class="row clear" style="display: none">
-							<input id="vTag" style="width: 90%"/>
-						</div>
-					</div>
-					<div class="row clear" style="display: none" id="reply-to-div">
-						<p>
-							<b><lift:loc>ui_messages_message_label_message_reply</lift:loc></b>
-							<span id="reply-to-span"><i></i></span>
-							<a href="javascript: clearReplyTo()">
-								<lift:loc>ui_messages_message_label_message_remove_reply</lift:loc>
-							</a>
-						</p>
-					</div>
-					<div class="post-form-row">
-						<div class="share-select">
-							<label>
-								<lift:loc>ui_messages_share</lift:loc>
-							</label>
-							<select id="vPool" class="inputBox2 tipelement" title="Select the pool in which
your message should be submitted">
-								<option value="0">
-									<lift:loc>ui_messages_message_label_message_pool_public</lift:loc>
-								</option>
-								<lift:UserSnip.accessPools/>
-							</select>
-						</div>
-						<div class="update-btn">
-							<input type="image" onclick="javascript:post_msg();" src="images/btn-update.gif"
/>
-						</div>
-					</div>
-					<script>
-                                        // <![CDATA[
-                                        var currentConvNumber = 0;
-                                        
-                                        function setReplyTo(id, text, msgPool, author){
-                                            currentConvNumber = id;
-                                            document.getElementById('reply-to-div').style.display
= "block";
-                                            jQuery('#message_request').html("Reply to: "
+ author);
-                                            var rep_msg = text
-                                            if (text.length > 50)
-                                             rep_msg = text.substr(0, 47) + "..."
-                                            jQuery('#reply-to-span').html(rep_msg);
-                                            jQuery('#vMsg').val("@" + author + " ")	
-                                            jQuery('#vMsg').focus()
-					    jQuery('#vPool').val(msgPool);
-                                        }
-                                        
-                                        function clearReplyTo(){
-                                            currentConvNumber = 0;
-                                            document.getElementById('reply-to-div').style.display
= "none";
-					    jQuery('#vPool').val(0);
-					    jQuery('#message_request').html('What are you working on?');
-                                        }
-                                        
-                                        function clearResend(id){
-                                            document.getElementById(id).style.display = "none"
-                                        }
-                                        
-                                        // ]]>						
-                                        </script>
-					<lift:UserSnip.postScript/>
-				</div>
-			</div>
-			<!--END UPDATE BOX-->
-			</div>
-		<lift:UserSnip.resendScript/>
-		<!--updates-box -->
-		<lift:comet type="PersonalTimeline"/>
-		<div id="personal_timeline_messages">
-		
-			<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">
-						<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 with="base_top" at="left">              
+	<div id="back-header">   
+	  <lift:embed what="templates-hidden/message_update_box"/>  
+	</div>  
+	
+	<div class="container-aux"> 
+	  <lift:embed what="templates-hidden/timeline_personal"/> 
+	</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=1023718&r1=1023717&r2=1023718&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 Oct
18 10:01:11 2010
@@ -17,31 +17,28 @@
  under the License.                                           *
 -->
 
-<div id="timeline_messages">
+<div>
     <head>
         <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="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 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>
 				

Added: incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_update_box.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_update_box.html?rev=1023718&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_update_box.html (added)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/message_update_box.html Mon
Oct 18 10:01:11 2010
@@ -0,0 +1,91 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one   *
+ or more contributor license agreements.  See the NOTICE file *
+ distributed with this work for additional information        *
+ regarding copyright ownership.  The ASF licenses this file   *
+ to you under the Apache License, Version 2.0 (the            *
+ "License"); you may not use this file except in compliance   *
+ with the License.  You may obtain a copy of the License at   *
+                                                              *
+   http://www.apache.org/licenses/LICENSE-2.0                 *
+                                                              *
+ Unless required by applicable law or agreed to in writing,   *
+ software distributed under the License is distributed on an  *
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ KIND, either express or implied.  See the License for the    *
+ specific language governing permissions and limitations      *
+ under the License.                                           *
+-->
+
+<!---UPDATE BOX -->
+<div class="container-update">
+	<h3 id="message_request">
+		<lift:loc>ui_messages_message_label_message_request</lift:loc>
+	</h3>
+	<div id="form-update">
+		<div id="messages"></div>
+		<div class="post-form-row">
+			<textarea class="inputBox2 tipelement" title="Enter your status message here." id="vMsg"
rows="5" cols="80%"></textarea>
+			<div class="row clear" style="display: none">
+				<input id="vTag" style="width: 90%"/>
+			</div>
+		</div>
+		<div class="row clear" style="display: none" id="reply-to-div">
+			<p>
+				<b><lift:loc>ui_messages_message_label_message_reply</lift:loc></b>
+				<span id="reply-to-span"><i></i></span>
+				<a href="javascript: clearReplyTo()">
+					<lift:loc>ui_messages_message_label_message_remove_reply</lift:loc>
+				</a>
+			</p>
+		</div>
+		<div class="post-form-row">
+			<div class="share-select">
+				<label>
+					<lift:loc>ui_messages_share</lift:loc>
+				</label>
+				<select id="vPool" class="inputBox2 tipelement" title="Select the pool in which your
message should be submitted">
+					<option value="0">
+						<lift:loc>ui_messages_message_label_message_pool_public</lift:loc>
+					</option>
+					<lift:UserSnip.accessPools/>
+				</select>
+			</div>
+			<div class="update-btn">
+				<input type="image" onclick="javascript:post_msg();" src="images/btn-update.gif" />
+			</div>
+		</div>
+		<script>
+                                  // <![CDATA[
+                                  var currentConvNumber = 0;
+                                  
+                                  function setReplyTo(id, text, msgPool, author){
+                                      currentConvNumber = id;
+                                      document.getElementById('reply-to-div').style.display
= "block";
+                                      jQuery('#message_request').html("Reply to: " + author);
+                                      var rep_msg = text
+                                      if (text.length > 50)
+                                       rep_msg = text.substr(0, 47) + "..."
+                                      jQuery('#reply-to-span').html(rep_msg);
+                                      jQuery('#vMsg').val("@" + author + " ")	
+                                      jQuery('#vMsg').focus()
+		    jQuery('#vPool').val(msgPool);
+                                  }
+                                  
+                                  function clearReplyTo(){
+                                      currentConvNumber = 0;
+                                      document.getElementById('reply-to-div').style.display
= "none";
+		    jQuery('#vPool').val(0);
+		    jQuery('#message_request').html('What are you working on?');
+                                  }
+                                  
+                                  function clearResend(id){
+                                      document.getElementById(id).style.display = "none"
+                                  }
+                                  
+                                  // ]]>						
+                                  </script>
+		<lift:UserSnip.postScript/>
+	</div>
+</div>
+<!--END UPDATE BOX-->
\ No newline at end of file

Added: incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_conversation.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_conversation.html?rev=1023718&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_conversation.html
(added)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_conversation.html
Mon Oct 18 10:01:11 2010
@@ -0,0 +1,29 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one   *
+ or more contributor license agreements.  See the NOTICE file *
+ distributed with this work for additional information        *
+ regarding copyright ownership.  The ASF licenses this file   *
+ to you under the Apache License, Version 2.0 (the            *
+ "License"); you may not use this file except in compliance   *
+ with the License.  You may obtain a copy of the License at   *
+                                                              *
+   http://www.apache.org/licenses/LICENSE-2.0                 *
+                                                              *
+ Unless required by applicable law or agreed to in writing,   *
+ software distributed under the License is distributed on an  *
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ KIND, either express or implied.  See the License for the    *
+ specific language governing permissions and limitations      *
+ under the License.                                           *
+-->
+                   
+<div id="conversation_timeline_messages">                           
+  <head>                        
+    <script src="../scripts/display_messages_top.js" type="text/javascript"/>  
+    <script src="../scripts/pretty.js" type="text/javascript"/> 
+  </head>          
+  <lift:conv_info>           
+    <conv:cometTimeline />        
+  </lift:conv_info>  
+  <lift:embed what="templates-hidden/message_core"/>
+</div>  

Added: incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_personal.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_personal.html?rev=1023718&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_personal.html (added)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline_personal.html Mon
Oct 18 10:01:11 2010
@@ -0,0 +1,58 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one   *
+ or more contributor license agreements.  See the NOTICE file *
+ distributed with this work for additional information        *
+ regarding copyright ownership.  The ASF licenses this file   *
+ to you under the Apache License, Version 2.0 (the            *
+ "License"); you may not use this file except in compliance   *
+ with the License.  You may obtain a copy of the License at   *
+                                                              *
+   http://www.apache.org/licenses/LICENSE-2.0                 *
+                                                              *
+ Unless required by applicable law or agreed to in writing,   *
+ software distributed under the License is distributed on an  *
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ KIND, either express or implied.  See the License for the    *
+ specific language governing permissions and limitations      *
+ under the License.                                           *
+-->
+   
+<div id="personal_timeline_messages">   
+  <head>                
+    <script src="../scripts/display_messages_top.js" type="text/javascript"/>  
+    <script src="../scripts/pretty.js" type="text/javascript"/>
+    <lift:UserSnip.resendScript/>  
+    <lift:comet type="PersonalTimeline"/>    
+  </head>
+
+	<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">
+				<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>          
\ No newline at end of file



Mime
View raw message