You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@esme.apache.org by es...@apache.org on 2010/10/10 14:36:23 UTC

svn commit: r1006282 [1/2] - in /incubator/esme/branches/tagandconversationfollow: ./ src/main/resources/ src/main/resources/props/ src/main/scala/bootstrap/liftweb/ src/main/scala/org/apache/esme/actor/ src/main/scala/org/apache/esme/api/ src/main/sca...

Author: esjewett
Date: Sun Oct 10 12:36:21 2010
New Revision: 1006282

URL: http://svn.apache.org/viewvc?rev=1006282&view=rev
Log:
Merged trunk into branch in preparation for merging the branch into trunk. That makes sense...

Added:
    incubator/esme/branches/tagandconversationfollow/src/main/resources/props/compass.mysql.jdbc.cfg.xml
      - copied unchanged from r1006280, incubator/esme/trunk/server/src/main/resources/props/compass.mysql.jdbc.cfg.xml
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/images/edit.gif
      - copied unchanged from r1006280, incubator/esme/trunk/server/src/main/webapp/images/edit.gif
    incubator/esme/branches/tagandconversationfollow/src/test/scala/org/apache/esme/api/TwitterAPITest.scala
      - copied unchanged from r1006280, incubator/esme/trunk/server/src/test/scala/org/apache/esme/api/TwitterAPITest.scala
Removed:
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/public.html
Modified:
    incubator/esme/branches/tagandconversationfollow/   (props changed)
    incubator/esme/branches/tagandconversationfollow/pom.xml
    incubator/esme/branches/tagandconversationfollow/src/main/resources/ESMEUI.properties
    incubator/esme/branches/tagandconversationfollow/src/main/resources/props/compass.filesystem.cfg.xml   (props changed)
    incubator/esme/branches/tagandconversationfollow/src/main/resources/props/compass.jdbc.cfg.xml
    incubator/esme/branches/tagandconversationfollow/src/main/scala/bootstrap/liftweb/Boot.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/Distributor.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/UserActor.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/API2.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/TwitterAPI.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/XMLHelper.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/AtomFeed.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/Feed.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/RssFeed.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/StreamMgr.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/liftwebext/SHtml.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/AccessPool.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Action.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Message.scala
    incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Privilege.scala
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/index.html
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/public.html
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/search.html
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/streams.html
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/pools_view/index.html
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_action.js
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_pool.js
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_token.js
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_track.js
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages.js
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages_top.js
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_single_message.js
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/esme_streams.js
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/pretty.js
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/style/style.css
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base.html
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base_top.html
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/default.html
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/message.html
    incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/message_core.html
    incubator/esme/branches/tagandconversationfollow/src/test/scala/org/apache/esme/api/API2Test.scala

Propchange: incubator/esme/branches/tagandconversationfollow/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 10 12:36:21 2010
@@ -1,2 +1,4 @@
 /incubator/esme/branches/lift-2.0/server:928728-939625
+/incubator/esme/branches/metadata:966215-979767
 /incubator/esme/branches/ui-2010-03-05:919339-923098
+/incubator/esme/trunk/server:966215-1006280

Modified: incubator/esme/branches/tagandconversationfollow/pom.xml
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/pom.xml?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/pom.xml (original)
+++ incubator/esme/branches/tagandconversationfollow/pom.xml Sun Oct 10 12:36:21 2010
@@ -22,7 +22,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.esme</groupId>
     <artifactId>esme-server</artifactId>
-    <version>apache-esme-1.0-RC1-incubating</version>
+    <version>apache-esme-1.1-incubating</version>
     <packaging>war</packaging>
     <name>Apache Enterprise Social Messaging Experiment (ESME)</name>
      <url>http://incubator.apache.org/esme</url>
@@ -75,7 +75,7 @@
     </developer>
     </developers>
     <properties>
-        <lift.version>2.0-SNAPSHOT</lift.version>
+        <lift.version>2.0</lift.version>
         <scala.version>2.7.7</scala.version>
         <compass.version>2.1.1</compass.version>
         <lucene.version>2.4.0</lucene.version>
@@ -177,6 +177,7 @@
             <groupId>net.liftweb</groupId>
             <artifactId>lift-testkit</artifactId>
             <version>${lift.version}</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>net.liftweb</groupId>
@@ -225,7 +226,7 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.mortbay.jetty</groupId>
+          <groupId>org.mortbay.jetty</groupId>
             <artifactId>jetty</artifactId>
             <version>[6.1.6,)</version>
             <scope>test</scope>
@@ -242,11 +243,21 @@
             <artifactId>lucene-snowball</artifactId>
             <version>${lucene.version}</version>
         </dependency>
-        <!--dependency>
-            <groupId>com.twitter</groupId>
-            <artifactId>stats</artifactId>
-            <version>${scala.stats.version}</version>
-        </dependency-->
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.5.11</version>
+        </dependency>
+        <dependency>
+            <groupId>net.lag</groupId>
+            <artifactId>configgy</artifactId>
+            <version>1.5.3</version>
+        </dependency>
         <dependency>
             <groupId>com.twitter</groupId>
             <artifactId>ostrich</artifactId>

Modified: incubator/esme/branches/tagandconversationfollow/src/main/resources/ESMEUI.properties
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/resources/ESMEUI.properties?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/resources/ESMEUI.properties (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/resources/ESMEUI.properties Sun Oct 10 12:36:21 2010
@@ -42,8 +42,11 @@ ui_login_openid=Or Login using Open ID
 ui_login_email=Email
 
 ui_default_conversation=Conversation
-ui_default_footer=Apache ESME 2009 - An Apache Incubator Project
+ui_default_footer=Apache ESME 2010 - An Apache Incubator Project
 ui_default_title=Enterprise Social Messaging Experiment
+ui_default_on_esme=Now on ESME
+ui_default_pagetitle=ESME
+
 
 ui_pool_manage=My Pools
 ui_pool_create=Create New Pool
@@ -183,6 +186,10 @@ ui_tag_date=Date
 ui_streams_manage=Streams
 ui_public_title=Public
 
+ui_pool_list_mine_title=All My Pools & Roles
+ui_pool_list_mine_pool_name=Pool
+ui_pool_list_mine_role=My Role
+
 
 
 

Propchange: incubator/esme/branches/tagandconversationfollow/src/main/resources/props/compass.filesystem.cfg.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 10 12:36:21 2010
@@ -0,0 +1,2 @@
+/incubator/esme/branches/metadata/src/main/resources/props/compass.filesystem.cfg.xml:966215-979767
+/incubator/esme/trunk/server/src/main/resources/props/compass.filesystem.cfg.xml:966215-1006280

Modified: incubator/esme/branches/tagandconversationfollow/src/main/resources/props/compass.jdbc.cfg.xml
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/resources/props/compass.jdbc.cfg.xml?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/resources/props/compass.jdbc.cfg.xml (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/resources/props/compass.jdbc.cfg.xml Sun Oct 10 12:36:21 2010
@@ -25,11 +25,13 @@
   <compass name="default">
 
     <connection>
-      <jdbc>
+      <jdbc dialect= "org.apache.lucene.store.jdbc.dialect.DerbyDialect">
+      <!-- For 'dialect' see http://www.compass-project.org/schema/compass-core-config-2.1.xsd -->
           <dataSourceProvider>
-              <driverManager  url="jdbc:example"
-                              username="user" password="password"
-                              driverClass="com.example.jdbc.Driver" />
+            <!-- Username must be present and password can be empty -->
+            <driverManager  url="jdbc:derby:esme_compass_index_db;create=true"
+                            username="esmeuser" password=""                              
+                            driverClass="org.apache.derby.jdbc.EmbeddedDriver" />
           </dataSourceProvider>
       </jdbc>
 

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/bootstrap/liftweb/Boot.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/bootstrap/liftweb/Boot.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/bootstrap/liftweb/Boot.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/bootstrap/liftweb/Boot.scala Sun Oct 10 12:36:21 2010
@@ -27,7 +27,7 @@ import net.liftweb.http.auth._
 import net.liftweb.sitemap._
 import net.liftweb.sitemap.Loc._
 import Helpers._
-import TimeHelpers.intToTimeSpanBuilder
+//import TimeHelpers.intToTimeSpanBuilder
 //import net.liftweb.mapper.{DB, ConnectionManager, Schemifier, DefaultConnectionIdentifier, ConnectionIdentifier}
 import java.sql.{Connection, DriverManager}
 import _root_.net.liftweb.mapper.{DB, ConnectionManager, Schemifier, DefaultConnectionIdentifier, StandardDBVendor}
@@ -123,6 +123,12 @@ class Boot {
     object logLevel extends LogLevelChanger with Log4jLoggingBackend
 
 
+      LiftRules
+           .noticesAutoFadeOut
+           .default
+           .set(Vendor((noticeType:NoticeType.Value) => Full((3 seconds, 3
+   seconds)))) 
+
     LiftRules.dispatch.append(ESMEOpenIDVendor.dispatchPF)
 
     //Resources for Internationalization
@@ -158,16 +164,19 @@ class Boot {
     // Register Auth methods that are used in ESME
     
     UserAuth.register(UserPwdAuthModule)
-    UserAuth.register(OpenIDAuthModule)
+    UserAuth.register(OpenIDAuthModule)  
+                      
+    def ifIsLoggedIn = If(User.loggedIn_? _, strFuncToFailMsg(() => S.?("base_error_not_logged_in")))
 
     // Build SiteMap
     val entries = Menu(Loc("Home", List("index"), "Home")) ::
-        Menu(Loc("user", List("info_view", "user"), "User Info", Hidden,
+        Menu(Loc("user", List("info_view", "user"), "User Info", ifIsLoggedIn,
           Loc.Snippet("user_info", TagDisplay.userInfo))) ::
         logLevel.menu  ::
-        Menu(Loc("tag", List("info_view", "tag"), "Tag", Hidden, Loc.Snippet("tag_display", TagDisplay.display))) ::
-        Menu(Loc("public", List("info_view", "public"), S.?("base_profile_public"))) ::
-        Menu(Loc("contacts", List("info_view", "contacts"), S.?("base_profile_contacts"))) ::
+        Menu(Loc("tag", List("info_view", "tag"), "Tag", ifIsLoggedIn,
+          Loc.Snippet("tag_display", TagDisplay.display))) ::
+        Menu(Loc("public", List("info_view", "public"), S.?("base_profile_public"), ifIsLoggedIn)) ::
+        Menu(Loc("contacts", List("info_view", "contacts"), S.?("base_profile_contacts"), ifIsLoggedIn)) ::
         Menu(Loc("sign_up", List("signup"), S.?("base_menu_signup"),
           Snippet("signup", User.signupForm),
           Unless(User.loggedIn_? _, S.?("base_menu_sign_up_error")))) ::

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/Distributor.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/Distributor.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/Distributor.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/Distributor.scala Sun Oct 10 12:36:21 2010
@@ -33,7 +33,7 @@ import common._
 import org.apache.esme._
 import model._
 
-import scala.xml.{Elem}
+import scala.xml.{Node, Elem}
 
 /**
  * The Distributor actor forwards messages to the appropriate user actor
@@ -102,8 +102,8 @@ object Distributor extends LiftActor {
   }                             
 
   case class UserCreatedMessage(user: Long, text: String, tags: List[String],
-                                when: Long,
-                                metaData: Box[Elem],
+                                when: Long,               
+                                metaData: Box[Node],
                                 source: String,
                                 replyTo: Box[Long],
                                 pool: Box[Long])

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/UserActor.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/UserActor.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/UserActor.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/actor/UserActor.scala Sun Oct 10 12:36:21 2010
@@ -31,15 +31,15 @@ import model._
 import lib._
 
 import java.util.{TimeZone, Calendar}
-import scala.xml.{Elem}
+import scala.xml.{Node, Elem}
 //import com.twitter.stats.Stats
 import com.twitter.ostrich.Stats
 
 object UserActor {
   private[actor] case class StartMeUp(user: Long)
   private[actor] case class RefreshMe(user: Long)
-  private[actor] case class CreateMessage(text: String, tags: List[String],
-                                          when: Long, metaData: Box[Elem],
+  private[actor] case class CreateMessage(text: String, tags: List[String],     
+                                          when: Long, metaData: Box[Node],
                                           source: String,
                                           replyTo: Box[Long],
                                           pool: Box[Long])

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/API2.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/API2.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/API2.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/API2.scala Sun Oct 10 12:36:21 2010
@@ -56,7 +56,7 @@ import org.apache.esme._
 import model._
 import org.apache.esme.actor._
 
-import scala.xml.{NodeSeq, Text, Elem, XML, Node}
+import scala.xml._
 
 import scala.collection.mutable.ListBuffer
 
@@ -339,7 +339,10 @@ object API2 extends ApiHelper with XmlHe
                                        Tag.split(S.param("tags")
                                                  openOr ""),
                                        millis,
-                                       xml,
+                                       xml match {
+                                         case Full(x) => xml
+                                         case _ => Box({new Atom(S.param("metadata") openOr "")})
+                                       },
                                        from,
                                        S.param("replyto").map(toLong),
                                        pool) match {

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/TwitterAPI.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/TwitterAPI.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/TwitterAPI.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/TwitterAPI.scala Sun Oct 10 12:36:21 2010
@@ -94,7 +94,11 @@ abstract class TwitterAPI {
     case Req(ApiPath ::> "statuses" ::> "retweeted_to_me", this.method, GetRequest) => () => timeline(ToMe)
 
     case Req(ApiPath ::> "friendships" ::> "create" ::> last, this.method, PostRequest) => () => createFriendship(last)
+    case Req(ApiPath ::> "friendships" ::> "create", this.method, PostRequest)
+      if S.param("user_id").isDefined => createFriendship
     case Req(ApiPath ::> "friendships" ::> "destroy" ::> last, this.method, PostRequest) => () => destroyFriendship(last)
+    case Req(ApiPath ::> "friendships" ::> "destroy", this.method, PostRequest)
+      if S.param("user_id").isDefined => destroyFriendship
     case Req(ApiPath ::> "friendships" ::> "exists", this.method, GetRequest) => existsFriendship
 
     case Req(ApiPath ::> "account" ::> "verify_credentials", this.method, GetRequest) => verifyCredentials
@@ -236,7 +240,12 @@ abstract class TwitterAPI {
                                source(req.param("source") openOr "twitterapi").
                                setTextAndTags(text, Nil, None))
     yield {
-      Distributor ! Distributor.AddMessageToMailbox(user.id.is, msg.saveMe, NoReason)
+      Distributor ! Distributor.UserCreatedMessage(user.id.is, text, Nil,
+                                                   millis,
+                                                   None,
+                                                   msg.source,
+                                                   None,
+                                                   None)
       Right(Map("status" -> msgData(msg)))
     }
   }
@@ -286,6 +295,12 @@ abstract class TwitterAPI {
     }
   }
   
+  def createFriendship(): Box[TwitterResponse] = {
+    for (user_id <- S.param("user_id");
+         response <- createFriendship(user_id))
+    yield response
+  }
+  
   def destroyFriendship(other: String): Box[TwitterResponse] = {
     for (user <- calcUser;
          other <- User.findFromWeb(other) ?~ S.?("base_twitter_api_err_user_not_found"))
@@ -296,6 +311,12 @@ abstract class TwitterAPI {
         Right(Map("hash" -> Map("error" -> S.?("base_twitter_api_err_user_not_unfollow"))))
     }
   }
+
+  def destroyFriendship(): Box[TwitterResponse] = {
+    for (user_id <- S.param("user_id");
+         response <- destroyFriendship(user_id))
+    yield response
+  }
   
   def existsFriendship(): Box[TwitterResponse] = {
     for (req <- S.request;

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/XMLHelper.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/XMLHelper.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/XMLHelper.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/api/XMLHelper.scala Sun Oct 10 12:36:21 2010
@@ -35,7 +35,7 @@ import Helpers._ 
 import org.apache.esme._
 import model._
 
-import scala.xml.{NodeSeq, Text, Elem, UnprefixedAttribute, Null, Node}  
+import scala.xml.{NodeSeq, Text, Elem, UnprefixedAttribute, Null, Node, XML}  
   
 trait XmlHelper { 
   protected def userToXml(user: User): Elem =
@@ -60,7 +60,9 @@ trait XmlHelper { 
   <date>{toInternetDate(msg.when.is)}</date>
   <source>{msg.source.sourceAttr.getOrElse(Text(""))}</source>
   <body>{msg.body}</body>
-  <metadata>{msg.metadata}</metadata>  
+  { if ( msg.metadata != null && msg.metadata.length != 0 )
+      XML.loadString(msg.metadata)
+    else <metadata/> }  
   {
     msg.author.obj.map(u =>
       <author><nickname>{u.niceName}</nickname><id>{u.id.toString}</id></author>

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/AtomFeed.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/AtomFeed.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/AtomFeed.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/AtomFeed.scala Sun Oct 10 12:36:21 2010
@@ -37,7 +37,7 @@ class AtomFeed(user: User, atomURL: Stri
   
   override def dateFormats = AtomFeed.dateFormats
   
-  override def getEntries(xml: Elem) = xml \ "entry"
+  override def getEntries(xml: NodeSeq) = xml \ "entry"
   
   override def getText(node: Node) = {
     // a title element is mandatory

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/Feed.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/Feed.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/Feed.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/Feed.scala Sun Oct 10 12:36:21 2010
@@ -43,24 +43,22 @@ abstract class Feed(val user: User, val 
 
   override def apply() = {
     
-    ( for {
-           xml <- PCDataXmlParser(responseString).toList
-           node <- xml.flatMap{ case e: Elem => List(e) case _ => Nil}
-         }
-        yield UserCreatedMessage(
-          if (user != null) {user.id} else 0,
-          getText(node) + " " + getLink(node),
-          tags,
-          getDate(node),
-          Empty,
-          source,
-          Empty,
-          None
-        )
-    ).toList
+    for {
+         xml <- PCDataXmlParser(responseString).toList
+         node <- getEntries(xml)
+    } yield UserCreatedMessage(
+      if (user != null) {user.id} else 0,
+      getText(node) + " " + getLink(node),
+      tags,
+      getDate(node),
+      Empty,
+      source,
+      Empty,
+      None
+    )
   }
   
-  protected def getEntries(xml: Elem): NodeSeq
+  protected def getEntries(xml: NodeSeq): NodeSeq
   
   protected def getText(xml: Node): String
   

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/RssFeed.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/RssFeed.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/RssFeed.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/external/RssFeed.scala Sun Oct 10 12:36:21 2010
@@ -38,7 +38,7 @@ class RssFeed(user: User, rssURL: String
 
   override def dateFormats = RssFeed.dateFormats
   
-  override def getEntries(xml: Elem) = xml \\ "item"
+  override def getEntries(xml: NodeSeq) = xml \\ "item"
   
   override def getText(node: Node) = {
     // if there's no title, get description

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala Sun Oct 10 12:36:21 2010
@@ -56,11 +56,12 @@ object AccessPoolMgr {
   val ifIsLoggedIn = If(loggedIn_? _, strFuncToFailMsg(() => S.?("base_error_not_logged_in")))
 
   val menuItems =
-  Menu(Loc("accessPools", List("pools_view", "index"), S.?("base_pool_menu"), ifIsLoggedIn,
+  Menu(Loc("accessPools", new Link("pools_view" :: Nil, true)/*List("pools_view", "index")*/, S.?("base_pool_menu"), ifIsLoggedIn,
            Loc.Snippet("addPool", addPool),
            Loc.Snippet("editPool", editPool),
            Loc.Snippet("poolUsers", displayPoolUsers),
   		   Loc.Snippet("poolDetail", displayPoolDetail)//regist snippet for pool detail display
+          ,Loc.Snippet("myPools", myPoolsWithRoles)          
   		)) ::
   Nil
 
@@ -68,8 +69,9 @@ object AccessPoolMgr {
   
   //update pool detail response 
   object updatePoolDetail extends RequestVar[() => JsCmd](() => Noop)
-  
-  
+
+  object poolsWithRoles extends RequestVar[() => JsCmd](() => Noop)
+
   object poolId extends RequestVar[Long](0)
 
 
@@ -78,12 +80,15 @@ object AccessPoolMgr {
   *
   */
   def addPool(in: NodeSeq): NodeSeq = {
+
+    // redisplay my pools and roles
+    val redisplayPoolsAndRoles = poolsWithRoles.is
   
     val theInput = "new_pool"
     val newPoolDescription = "new_pool_description";
     val user = User.currentUser
     var newPoolName = "";
-    
+
       
     //def addNewPool(name: String) = {
     def addNewPool(poolDescription: String) = {
@@ -118,6 +123,7 @@ object AccessPoolMgr {
                 SetValById(theInput, "")  &
                 ReplaceOptions("edit_pool", selectPools, Full(p.id.is.toString))  &
                 FireOnchangeById("edit_pool") &
+                redisplayPoolsAndRoles() &
                 //DisplayMessage("messages", <b>{S.?("base_pool_msg_new_pool",name)}</b>,  3 seconds, 2 seconds)
                 DisplayMessage("messages", <b>{S.?("base_pool_msg_new_pool",x)}</b>,  3 seconds, 2 seconds)
               } else
@@ -154,10 +160,13 @@ object AccessPoolMgr {
     // redisplay pool detail
     val redisplayPoolDetail = updatePoolDetail.is
 
+    val redisplayPoolsAndRoles = poolsWithRoles.is
+
     // redisplay pool users and pool detail
     def redisplay(): JsCmd = {
-      redisplayPoolDetail() & redisplayPool()
+      redisplayPoolDetail() & redisplayPool() & redisplayPoolsAndRoles()
     }
+
     var pool = ""
     var username = ""
     val editPoolName = "edit_pool"
@@ -214,7 +223,8 @@ object AccessPoolMgr {
         case _ => DisplayMessage("messages", <b>{S.?("base_error_general")}</b>,  3 seconds, 2 seconds)//S.error(S.?("base_error_general"))
       } ) & 
       //we needn't redisplay pool detail when add a new user
-      redisplayPool() & SetValById(editUsername, "") 
+      redisplayPool() & SetValById(editUsername, "") &
+      redisplayPoolsAndRoles()
     }
 
     /*
@@ -254,6 +264,39 @@ object AccessPoolMgr {
     )
   }
 
+  def myPoolsWithRoles(in: NodeSeq): NodeSeq = {
+
+    // get the span name to update
+    val spanName = S.attr("the_id") openOr "pool_membership_and_roles"
+
+    def doRender(): NodeSeq = {
+
+      val user = User.currentUser
+
+      val userPools =
+        (user match {
+          case Full(u)=> Privilege.findViewablePools(u.id).map(
+            p => (p, AccessPool.find(p).get.getName))
+          case _ => Nil
+        })
+
+      val userPerms = userPools.map((x: (Long, String)) => Privilege.getPermissionString(user.open_!.id, x._1));
+      val poolsAndRoles = userPools.map(_._2).zip(userPerms)
+
+      bind("myPool", in,
+          "pool" ->
+             (in1 =>
+                poolsAndRoles.flatMap((x: (String, String)) =>
+                                            bind("pool", in1,
+                                              "poolName" -> x._1,
+                                              "role" -> x._2
+               ))))
+    }
+
+    def updateSpan(): JsCmd = SetHtml(spanName, doRender())
+    poolsWithRoles.set(updateSpan)
+    doRender
+  }
 
   def displayPoolDetail(in: NodeSeq): NodeSeq = {
     import org.apache.esme.model.AccessPool

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/StreamMgr.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/StreamMgr.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/StreamMgr.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/lib/StreamMgr.scala Sun Oct 10 12:36:21 2010
@@ -64,75 +64,80 @@ object StreamMgr {
   object resenderId extends RequestVar[Long](AnyResender)
   object filterResent_? extends RequestVar[Boolean](false)
   object poolId extends RequestVar[Long](PublicPool)
-  object filterPools_? extends RequestVar[Boolean](false)
-
-  def displayStream(in: NodeSeq): NodeSeq = {
-    // get the span name to update
-    val spanName = S.attr("the_id") openOr "StreamSpan"
+  object filterPools_? extends RequestVar[Boolean](false)  
+  object spanName extends RequestVar[String]("StreamSpan")     
+  object displayStreamNodes extends RequestVar[NodeSeq](Text(""))  
+  
+  def updateSpan(): JsCmd = SetHtml(spanName, doRender(displayStreamNodes))    
+  
+  // bind the dynamic content to the incoming nodeseq
+  def doRender(in: NodeSeq): NodeSeq = {   
     // get the current user
     val user = User.currentUser
-
-    // bind the dynamic content to the incoming nodeseq
-    def doRender(): NodeSeq = {
-      val resentQuery = 
-      if (filterResent_?.is == false) Nil
-      else {
-        val queryParam = resenderId.is match {
-          case AnyResender => NotBy(Mailbox.resentBy, Empty)
-          case id => By(Mailbox.resentBy, id)
-        }
-        List(In(Message.id,Mailbox.message,By(Mailbox.user, user), queryParam))
+  
+    val resentQuery = 
+    if (filterResent_?.is == false) Nil
+    else {
+      val queryParam = resenderId.is match {
+        case AnyResender => NotBy(Mailbox.resentBy, Empty)
+        case id => By(Mailbox.resentBy, id)
       }
-      
-      val poolsQuery = 
-      if (filterPools_?.is == false) Nil
-      else List(poolId.is match {
-        case PublicPool => By(Message.pool, Empty)
-        case id => By(Message.pool, id)
-      })
-      
-      val query = poolsQuery :::
-                  resentQuery :::
-                  List[QueryParam[Message]](OrderBy(Message.id, Descending), MaxRows(10)) 
+      List(In(Message.id,Mailbox.message,By(Mailbox.user, user), queryParam))
+    }
+    
+    val poolsQuery = 
+    if (filterPools_?.is == false) Nil
+    else List(poolId.is match {
+      case PublicPool => By(Message.pool, Empty)
+      case id => By(Message.pool, id)
+    })
+    
+    val query = poolsQuery :::
+                resentQuery :::
+                List[QueryParam[Message]](OrderBy(Message.id, Descending), MaxRows(10)) 
+       
+    def profileImage(u: User): NodeSeq = {
+        var imageUrl = u.imageUrl.toString
+        if (imageUrl.length > 0) 
+          <img width="30px" src={imageUrl}/>
+        else
+           <img width="30px" src="/images/avatar.jpg"/>
+     }
          
-      def profileImage(u: User): NodeSeq = {
-          var imageUrl = u.imageUrl.toString
-          if (imageUrl.length > 0) 
-            <img width="30px" src={imageUrl}/>
-          else
-             <img width="30px" src="/images/avatar.jpg"/>
-       }
-           
-      //XXX copy from lib.UserMgr
-      def nicknameWithProfileLink(u: User): NodeSeq = {
-    		  <a href={"/user/" + urlEncode(u.nickname.is)}>{u.niceName}</a>
-      	}
-      	
-      val dateFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm")
-          
+    //XXX copy from lib.UserMgr
+    def nicknameWithProfileLink(u: User): NodeSeq = {
+  		  <a href={"/user/" + urlEncode(u.nickname.is)}>{u.niceName}</a>
+    	}
+    	
+    val dateFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm")
         
-      Message.findAll(query: _*) match {
-        case Nil => NodeSeq.Empty
-        case xs => bind("disp", in,
-                        "item" -> 
-                        (lst => xs.flatMap(i => bind("item", lst,
-                                                     "author" -> i.author.obj.map(nicknameWithProfileLink).openOr(Text("")),
-                                                     "imageUrl" -> i.author.obj.map(profileImage).openOr(Text("")),
-                                                     "text" -> i.getBody,
-                                                     "date" -> dateFormatter.format(i.getWhen)
-                ))))
-      }
+      
+    Message.findAll(query: _*) match {
+      case Nil => NodeSeq.Empty
+      case xs => bind("disp", in,
+                      "item" -> 
+                      (lst => xs.flatMap(i => bind("item", lst,
+                                                   "author" -> i.author.obj.map(nicknameWithProfileLink).openOr(Text("")),
+                                                   "imageUrl" -> i.author.obj.map(profileImage).openOr(Text("")),
+                                                   "text" -> i.getBody,
+                                                   "date" -> dateFormatter.format(i.getWhen)
+              ))))
     }
-    def updateSpan(): JsCmd = SetHtml(spanName, doRender())
+  }  
+  
 
-    updateStream.set(updateSpan)
-    doRender()
+  def displayStream(in: NodeSeq): NodeSeq = {    
+      
+    updateStream.set(updateSpan)    
+    displayStreamNodes.set(in)                               
+  
+    doRender(in)
   }
 
-  def streamFilters(in: NodeSeq): NodeSeq = {
+  def streamFilters(in: NodeSeq): NodeSeq = {   
+  
     import org.apache.esme.model.AccessPool
-    import net.liftweb.common.Empty
-    val redisplayStream = updateStream.is
+    import net.liftweb.common.Empty              
     val resenderInput = "resender_input"
     val poolInput = "pool_input"
     val filterResentInput = "filter_resent_input"
@@ -162,7 +167,7 @@ object StreamMgr {
       poolId.set(pool)
       filterResent_?.set(filterResent)
       filterPools_?.set(filterPools)
-      redisplayStream()
+      updateStream()
     }
 
     /*
@@ -212,5 +217,4 @@ object StreamMgr {
                                        "id" -> filterPoolsInput)
     )
   }
-
 }

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/liftwebext/SHtml.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/liftwebext/SHtml.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/liftwebext/SHtml.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/liftwebext/SHtml.scala Sun Oct 10 12:36:21 2010
@@ -1,4 +1,23 @@
-package org.apache.esme.liftwebext
+/**
+ * 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.liftwebext
 
 import _root_.net.liftweb._
 import http._
@@ -13,13 +32,6 @@ import JE._
 import JsCmds._
 import _root_.scala.xml._
 
-/**
- * Created by IntelliJ IDEA.
- * User: imtiaz
- * Date: Jun 27, 2010
- * Time: 11:40:19 AM
- * To change this template use File | Settings | File Templates.
- */
 
 object SHtml {
   import net.liftweb.http.js.JsCmds.JsCrVar

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/AccessPool.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/AccessPool.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/AccessPool.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/AccessPool.scala Sun Oct 10 12:36:21 2010
@@ -43,6 +43,13 @@ object AccessPool extends AccessPool wit
     ap.creator(User.currentUser)
     ap
   }
+
+  def getPoolName(poolId: long) = {
+    AccessPool.find(poolId) match {
+      case Full(p) => p.getName
+      case _ => "ERROR"
+    }
+  }
 }
 
 class AccessPool extends LongKeyedMapper[AccessPool] {

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Action.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Action.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Action.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Action.scala Sun Oct 10 12:36:21 2010
@@ -265,6 +265,7 @@ class Action extends LongKeyedMapper[Act
     def testFunc = (testExpr(is): @unchecked) match {
       case Success(v, _) => Action.toFunc(v)
     }
+   
   }
   
   object uniqueId extends MappedUniqueId(this, 32) {
@@ -280,7 +281,14 @@ class Action extends LongKeyedMapper[Act
 
   def setTest(in: String): Box[Action] = try {
     testExpr(in) match {
-      case Success(v, _) => Full(this.theTest(v.toStr))
+      case Success(testAction: TestAction, _) =>
+         testAction.error match {
+            case Some(msg) =>
+              net.liftweb.common.Failure(msg  + " - " + testAction.toStr, Empty, Empty)
+            case None =>
+              Full(this.theTest(testAction.toStr))
+         }
+      //case Success(v, _) => Full(this.theTest(v.toStr))
       case Failure(m, _) => net.liftweb.common.Failure(m, Empty, Empty)
       case Error(m, _) => net.liftweb.common.Failure(m, Empty, Empty)
     }
@@ -318,7 +326,7 @@ class Action extends LongKeyedMapper[Act
     test={theTest.is}
     action={theAction.is}
     enabled={enabled.toString}></action>
-
+  
 }
 
 class PerformMatcher(val func: Action.TestFunc, val performId: Long,
@@ -351,6 +359,7 @@ object TestAction {
 }
 
 sealed trait TestAction {
+  var error: Option[String] = None
   def toStr: String
   def toDisplayStr: String = toStr
 }
@@ -362,13 +371,16 @@ case object SentToMeAction extends TestA
 }
 case class NotAction(action: TestAction) extends TestAction {
   def toStr = "not( "+action.toStr+" )"
+  override def toDisplayStr = "not( "+action.toDisplayStr+" )"
 }
 case class OrAction(left: TestAction, right: TestAction) extends TestAction {
   def toStr = left.toStr + " | " + right.toStr
+  override def toDisplayStr = left.toDisplayStr + " | " + right.toDisplayStr
 }
 
 case class AndAction(left: TestAction, right: TestAction) extends TestAction {
   def toStr = left.toStr + " &  " + right.toStr
+  override def toDisplayStr = left.toDisplayStr + " &  " + right.toDisplayStr
 }
 
 case class AtUserAction(userId: Long) extends TestAction {
@@ -386,6 +398,7 @@ case object PoolAction extends TestActio
 
 case class PoolAction(poolId: Long) extends TestAction {
   def toStr = "pool:" + poolId
+  override def toDisplayStr = "pool:" + AccessPool.getPoolName(poolId)
 }
 
 case object ResentAction extends TestAction {
@@ -439,6 +452,7 @@ case class HashAction(hashId: Long, str:
 
 case class ParenAction(action: TestAction) extends TestAction {
   def toStr = "( "+action.toStr+" )"
+  override def toDisplayStr = "( "+action.toDisplayStr+" )"
 }
 
 case class PercentAction(percent: Int) extends TestAction {
@@ -484,6 +498,15 @@ case class DateTestAction(dateType: Date
       case xs => xs.mkString("(", ", ", ")")
     }
   )
+
+  error =
+    dateType match {
+      case DayDateType   => if (what.exists((x) => x < 1 || x > 7)) Some("Invalid day value") else None
+      case DateDateType  => if (what.exists((x) => x < 1 || x > 31)) Some("Invalid date value") else None
+      case MonthDateType => if (what.exists((x) => x < 1 || x > 11)) Some("Invalid month value") else None
+      case HourDateType  => if (what.exists((x) => x < 0 || x > 23)) Some("Invalid hour value") else None
+      case MinuteDateType  => if (what.exists((x) => x < 0 || x > 59)) Some("Invalid minute value") else None
+    }
 }
 
 sealed trait OprType {

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Message.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Message.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Message.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Message.scala Sun Oct 10 12:36:21 2010
@@ -202,7 +202,8 @@ object Message extends Message with Long
         Privilege.findViewablePools(user.id.is)
       }                                      
     val newQueryParams: Seq[QueryParam[Message]] = viewablePools match {
-      case Full(pools: List[Long]) if !pools.isEmpty => List(
+      case Full(Nil) => List(By(pool, Empty))
+      case Full(pools: List[Long]) => List(
         BySql(" POOL in ( ?" + ( ", ?" * (pools.size - 1)) + " ) OR POOL IS NULL ",
               IHaveValidatedThisSQL("vdichev", "22 June 2009"),
               pools.toSeq:_*)
@@ -311,7 +312,8 @@ class Message extends LongKeyedMapper[Me
  
   lazy val body: String = originalXml \ "body" text
   
-  lazy val metadata: String = originalXml \ "metadata" text
+  //lazy val metadata: String = originalXml \ "metadata" text
+  lazy val metadata: String = (originalXml \ "metadata").toString
 
   lazy val metaData: String = {
     val org = originalXml
@@ -392,9 +394,16 @@ class Message extends LongKeyedMapper[Me
 
         case e: Elem if e.label == "url" =>
           e.attribute("url").flatMap(url =>
-            e.attribute("uniqueId").map(id =>
-              <xml:group> <a href={"/u/"+id} target="_blank">{url}</a> </xml:group>)).
-          getOrElse(Text("") )
+            e.attribute("uniqueId").map { id =>
+              val href =
+                if (pool.defined_?)
+                  // disable shortener to avoid popularity statistics
+                  url.toString
+                else
+                  "/u/" + id
+              <xml:group> <a class="tiplelement" href={href} target="_blank" title={url}>{url.toString.substring(0,20)}...</a> </xml:group>
+            }
+          ).getOrElse(Text("") )
 
         case e: Elem if e.label == "em" =>
           e.attribute("text").map(text =>
@@ -498,8 +507,9 @@ class Message extends LongKeyedMapper[Me
    * Note that the text representation of the XML must be readable
    * for clients that don't support markup formatting
    * and is recommended to result in the same XML when parsed
-   */
-  def setTextAndTags(in: String, tags: List[Tag], metaData: Box[Elem]): Box[Message] = {
+   */                                                                                        
+   
+  def setTextAndTags(in: String, tags: List[Tag], metaData: Box[Node]): Box[Message] = {
     MsgParser.parseMessage(in).map{
       lst =>
       val xml = <message><body>{

Modified: incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Privilege.scala
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Privilege.scala?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Privilege.scala (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/scala/org/apache/esme/model/Privilege.scala Sun Oct 10 12:36:21 2010
@@ -71,6 +71,11 @@ object Privilege extends Privilege with 
     By(Privilege.user, userId),
     By(Privilege.permission, Permission.Admin)
   )(p => Full(p.pool.is)) :_*)
+
+  def getPermissionString(userId: Long, poolId: Long) : String = Privilege.find(
+    By(user, userId),
+    By(pool, poolId)
+  ).map(_.permission.is).open_!.toString 
 }
 
 /**
@@ -98,6 +103,7 @@ class Privilege extends LongKeyedMapper[
     By(user, userId),
     By(pool, poolId)
   ).map(_.permission.is >= permission).getOrElse(false)
+
 }
 
 /**

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/index.html?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/index.html (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/index.html Sun Oct 10 12:36:21 2010
@@ -56,20 +56,19 @@
 
 			<lift:comet type="SinglePublicTimeline"/>
 			<!--updates-box -->
-			<div class="gray-box">
-			<h1>Now on ESME</h1>
-			<div class = "mesg-box">
-			   <div id="timeline_messages">
-				<div id="message">
-							
-				 <div class="avatar"> <img id="avatar" src="/images/avatar.jpg" alt="Anonymous" width="50px"/></div>
-				   <div class="update"> <div id="body">-</div>
-				   <div class="info"><a id="author">-</a><div class="time"></div></div>
-				 </div>	
-				 <div class="time"> <div id="supp_data"> -</div> </div>	
-				</div>
-				</div>
-			</div>
+			<h1><lift:loc>ui_default_on_esme</lift:loc></h1>
+			<div id="timeline_messages" class="gray-box">
+			    <div class="updates-box" id="message" style ="">
+			            <div class="avatar">
+			                <img id="avatar" width="40px" />
+			            </div>
+			            <!--end avatar-->
+			            <div class="info2">
+			                <a href="" id="author" />
+			                <div id="msgbody" />
+			                <div class="supp_data_class" id="supp_data" />
+			            </div>
+			        </div>
 			</div><!--gray-box-->
 		</lift:surround>
 	</logged:out>

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/public.html
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/public.html?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/public.html (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/public.html Sun Oct 10 12:36:21 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/branches/tagandconversationfollow/src/main/webapp/info_view/search.html
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/search.html?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/search.html (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/search.html Sun Oct 10 12:36:21 2010
@@ -17,20 +17,22 @@
  under the License.                                           *
 -->
 <lift:surround with="base" at="left">
-<script src="../scripts/display_messages.js" type="text/javascript"/>
-	<div id="left">
-	<div id="back-header">
-	<h1><lift:loc>ui_messages_search_for</lift:loc> <i><lift:searchTerm/></i> </h1>
-<div class="container-aux">
-		<!--updates-box -->
-    <lift:displaySearch/>
-    <lift:embed what="templates-hidden/message_core"/>
-	</div>
-	<!--updates-box-->
-	
-	</div><!-- End demo -->
-</div><!-- End demo -->
-
-
+       <div id="back-header">
+            <div id="left">
+                  <h1>
+                        <lift:loc>ui_messages_search_for</lift:loc>
+                        <i>
+                              <lift:searchTerm/>
+                        </i>
+                  </h1>
+                  <div class="container-public">
+                        <!--updates-box -->
+                        <lift:displaySearch/>
+                        <lift:embed what="templates-hidden/message_core"/>
+                  </div>
+                  <!--updates-box-->
+                  </div>
+            <!-- End demo -->
+            </div>
 </lift:surround>
 

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/streams.html
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/streams.html?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/streams.html (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/info_view/streams.html Sun Oct 10 12:36:21 2010
@@ -16,64 +16,64 @@
  specific language governing permissions and limitations      *
  under the License.                                           *
 -->
-<lift:surround with="base" at="left">     
+<lift:surround with="base" at="left">
+  <link rel="stylesheet" type="text/css" href="../style/style.css"/>
   <lift:TableSorterSnip/>
   <div id="back-header">
-    <h1><b><lift:loc>ui_streams_manage</lift:loc></b></h1>  
-  </div>
-   
-  <!---CONTENT BOX-->
-  <div class="container-streams"> 
-    <div class="StreamUI">
-	    <lift:streamFilters>
-			  <table class="tablesorter" >
-			    <thead>
-				    <tr>
-					    <th class="tipelement" title="These are users that you follow">
-						    <lift:loc>ui_streams_filter_resender</lift:loc> <main:resent/>
-					    </th>
-					    <th align="center" class="tipelement" title="Filter by messages that have been resent by those you follow. ">
-						    <lift:loc>ui_streams_resent_active</lift:loc> <main:filterResent/>
-					    </th>
-					    <th class="tipelement" title="These are pools in which you are a member">
-						    <lift:loc>ui_streams_filter_pool</lift:loc> <main:pools/> 
-					    </th>
-					    <th align="center">
-						    <lift:loc>ui_streams_pool_active</lift:loc> <main:filterPools/>
-					    </th>
-				    </tr>
-				  </thead>
-			  </table>
-		  </lift:streamFilters>
-    </div>
-    
-    <div class ="stream_body">
-      <table id="esme-table" class="tablesorter">            
-        <thead>
+    <h1><b><lift:loc>ui_streams_manage</lift:loc></b></h1>
+     
+	  <!---CONTENT BOX-->
+	  <div class="container-streams">  
+	    <div class="StreamUI">
+			  <lift:streamFilters>
+					<table class="tablesorter" >
+					  <thead>
+						  <tr>
+							  <th class="tipelement" title="These are users that you follow">
+								  <lift:loc>ui_streams_filter_resender</lift:loc> <main:resent/>
+							  </th>
+							  <th align="center" class="tipelement" title="Filter by messages that have been resent by those you follow. ">
+								  <lift:loc>ui_streams_resent_active</lift:loc> <main:filterResent/>
+							  </th>
+							  <th class="tipelement" title="These are pools in which you are a member">
+								  <lift:loc>ui_streams_filter_pool</lift:loc> <main:pools/> 
+							  </th>
+							  <th align="center">
+								  <lift:loc>ui_streams_pool_active</lift:loc> <main:filterPools/>
+							  </th>
+						  </tr>
+						</thead>
+					</table>
+				</lift:streamFilters>
+		  </div>
+	    <div class ="stream_body">  
+        <table id="esme-table" class="tablesorter">        
+          <thead>
             <tr>
-                <th></th>
-                <th><lift:loc>ui_user_list_nickname</lift:loc></th>
-                <th><lift:loc>ui_user_list_last_message</lift:loc></th>
-                <th><lift:loc>ui_user_list_last_message_date</lift:loc></th>
+              <th></th>
+              <th><lift:loc>ui_user_list_nickname</lift:loc></th>
+              <th><lift:loc>ui_user_list_last_message</lift:loc></th>
+              <th><lift:loc>ui_user_list_last_message_date</lift:loc></th>
             </tr>
-        </thead>
-        <tbody id="StreamSpan">         
-          <lift:displayStream>                  
-            <disp:item>
-              <tr class="user_row">
-                <td><item:imageUrl/></td>
-                <td>
-                  <div class="user_name">
-                    <item:author/>
-	                </div>
-                </td>
-                <td class="user_message"><item:text/></td>
-                <td><item:date/></td>
-              </tr>
-            </disp:item>
-          </lift:displayStream>
-        </tbody>
-      </table>
-    </div> 
-  </div>    
+          </thead>              
+          <tbody id="StreamSpan">         
+            <lift:displayStream>                  
+              <disp:item>
+                <tr class="user_row">
+                  <td><item:imageUrl/></td>
+                  <td>
+                    <div class="user_name">
+                      <item:author/>
+                    </div>
+                  </td>
+                  <td class="user_message"><item:text/></td>
+                  <td><item:date/></td>
+                </tr>
+              </disp:item>
+            </lift:displayStream>
+          </tbody>
+        </table>
+      </div>
+	  </div>
+	</div>           
 </lift:surround>
\ No newline at end of file

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/pools_view/index.html
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/pools_view/index.html?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/pools_view/index.html (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/pools_view/index.html Sun Oct 10 12:36:21 2010
@@ -92,8 +92,7 @@
                                      </fieldset>
 				</lift:poolDetail>
 			</div>
-			<div id="PoolSpan">
-			     
+			<div id="PoolSpan">  
 				<lift:ignore>
 					<!--  The poolUsers snippet *MUST* appear on the page before the editPool snippet                        -->
 				</lift:ignore>
@@ -125,7 +124,7 @@
 						</table>
 					<div class="post-form-row">
 						<div class="submit-btn tipelement" title="Add a user to an existing pool." >
-							<input type="image" onclick="javascript:$('#dialog-form-user').dialog('open')" id="create-user" src="../images/add1.gif"/>
+							<input type="image" onclick="javascript:$('#dialog-form-user').dialog('open')" id="create-user" src="../images/edit.gif"/>
 						</div>
 					</div>
 				</lift:poolUsers>
@@ -137,7 +136,39 @@
 						<edit:pool class="tipelement" title="Select a pool to edit"/>
 					</lift:editPool>
 				</lift:form>
-			</div>
+			</div>      
+			<div id="pool_membership_and_roles" title="My Pool Roles" >
+        <lift:myPools the_id="pool_membership_and_roles">
+          <br/>
+          <br/>
+          <br/>
+          <b><lift:loc>ui_pool_list_mine_title</lift:loc></b>
+          <table id="esme-table" class="tablesorter">
+            <thead>
+              <tr>
+                <th>
+                  <lift:loc>ui_pool_list_mine_pool_name</lift:loc>
+                </th>
+                <th>
+                  <lift:loc>ui_pool_list_mine_role</lift:loc>
+                </th>
+              </tr>
+            </thead>
+            <tbody>
+              <myPool:pool>
+                <tr>
+                  <td>
+                    <pool:poolName/>
+                      </td>
+                      <td>
+                    <pool:role/>
+                  </td>
+                </tr>
+              </myPool:pool>
+            </tbody>
+          </table>
+        </lift:myPools>
+      </div>
 			<div id="dialog-form" title="Create new  pool" style="display: none">
 				<p class="validateTips">
 					<!--lift:loc>ui_form_all_fields_required</lift:loc-->
@@ -158,7 +189,7 @@
 					</lift:addPool>
 				</form>
 			</div>
-			<div id="dialog-form-user" title="Add a user to a pool" style="display: none">
+			<div id="dialog-form-user" title="Add a user/Change a user's role" style="display: none">
 				<p class="validateTips">
 					<lift:loc>ui_form_all_fields_required</lift:loc>
 				</p>
@@ -168,11 +199,13 @@
 							<label for="poolName">
 								<lift:loc>ui_pool_add</lift:loc>
 							</label>
-							<edit:username class="text ui-widget-content ui-corner-all tipelement" title="This is the user that will be added to a pool." />
+							<!--edit:username class="text ui-widget-content ui-corner-all tipelement" title="This is the user that will be added to a pool." /-->
+                            <edit:username class="text ui-widget-content ui-corner-all tipelement" title="This will be the new user or the user whose role is being changed" />
 							<label for="permission">
 								<lift:loc>ui_pool_list_user_role</lift:loc>
 							</label>
-							<edit:permission class="text ui-widget-content ui-corner-all tipelement" title="This is the type of permission that the new user will have." />
+							<!--edit:permission class="text ui-widget-content ui-corner-all tipelement" title="This is the type of permission that the new user will have." /-->
+                            <edit:permission class="text ui-widget-content ui-corner-all tipelement" title="This is the type of permission that the user will have." />
 						</fieldset>
 					</lift:editPool>
 				</form>

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_action.js
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_action.js?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_action.js (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_action.js Sun Oct 10 12:36:21 2010
@@ -1,3 +1,22 @@
+/*
+ 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.                                           *
+*/
+
 // <![CDATA[
 /*
  * function to display action modal dialog

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_pool.js
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_pool.js?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_pool.js (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_pool.js Sun Oct 10 12:36:21 2010
@@ -1,3 +1,22 @@
+/*
+ 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.                                           *
+*/
+
 // <![CDATA[
 /*
  * function to display new_pool modal dialog

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_token.js
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_token.js?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_token.js (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_token.js Sun Oct 10 12:36:21 2010
@@ -1,3 +1,21 @@
+/*
+ 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.                                           *
+*/
 // <![CDATA[
 /*
  * function to display token modal dialog

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_track.js
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_track.js?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_track.js (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/dialog_track.js Sun Oct 10 12:36:21 2010
@@ -1,3 +1,22 @@
+/*
+ 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.                                           *
+*/
+
 // <![CDATA[
 /*
  * displayMessages called by lift:comet, type="Timeline" and type="PublicTimeline"

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages.js
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages.js?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages.js (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages.js Sun Oct 10 12:36:21 2010
@@ -125,9 +125,15 @@ function displayMessages(msgArray, eleme
       if (cometResent) {
         resendButton.css("display", "none");
       } else {
-        resendButton.attr('id', 'resend_' + id).
+        resendButton
+            .attr('id', 'resend_' + id)
+            .click(function() { resend_msg(id);
+                                clearResend("resend_" + id );
+                                return false;})
+          /*
           attr('onclick', 'javascript:resend_msg(' + id + ');' +
                                      'clearResend("resend_' + id + '")');
+          */
       }
       
       
@@ -136,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/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages_top.js
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages_top.js?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages_top.js (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_messages_top.js Sun Oct 10 12:36:21 2010
@@ -62,6 +62,11 @@ function searchMe()
 {
    if(document.forms["validateForm"].term.value.trim.length > 0)
    	document.forms["validateForm"].submit();
+}    
+
+var resendFunction = function(id){
+  resend_msg(id);
+  clearResend("resend_" + id );
 }
 
 function displayMessages(msgArray, elementId)
@@ -107,7 +112,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 +135,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,25 +154,26 @@ 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');
+      var resendButton = newMsg.find('#resend');    
+      
       if (cometResent) {
         resendButton.css("display", "none");
       } else {
-        resendButton.attr('id', 'resend_' + id).
-          attr('onclick', 'javascript:resend_msg(' + id + ');' +
-                                     'clearResend("resend_' + id + '")');
+        resendButton
+            .attr('id', 'resend_' + id)     
+            .attr('href', "javascript:resendFunction(" + id + ");")       
       }
 
-
       var tempStr = strip(msgBody).replaceAll ("'", "ZZZ$%$");
       
       var myReplyMsg = tempStr.replaceAll ("ZZZ$%$", "\\'");   
@@ -191,6 +201,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/branches/tagandconversationfollow/src/main/webapp/scripts/display_single_message.js
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_single_message.js?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_single_message.js (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/display_single_message.js Sun Oct 10 12:36:21 2010
@@ -114,19 +114,26 @@ function displayMessages(msgArray, eleme
       .attr('alt',msgAuthor.firstname + ' ' + msgAuthor.lastname);
 
 
-      newMsg.find('#body').html(msgBody);
-      newMsg.find('#supp_data').text(msgPool + " " + msgDateStr  + " " +  msgReason  + " " +   msgSource);
-      //newMsg.find('#source').text(msgSource);
-      //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');
       if (cometResent) {
         resendButton.css("display", "none");
       } else {
-        resendButton.attr('id', 'resend_' + id).
+        resendButton
+            .attr('id', 'resend_' + id)
+            .click(function() { resend_msg(id);
+                                clearResend("resend_" + id );
+                                return false;})
+          /*
           attr('onclick', 'javascript:resend_msg(' + id + ');' +
                                      'clearResend("resend_' + id + '")');
+          */
       }
       newMsg.find('#reply').attr('href',
         "javascript:setReplyTo(" + id + ", '"+ msgBody + "', " + msgPoolId + ")");

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/esme_streams.js
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/esme_streams.js?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/esme_streams.js (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/esme_streams.js Sun Oct 10 12:36:21 2010
@@ -7,13 +7,7 @@
  "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     
-   
-   $("#prob_test").bind('DOMSubtreeModified', function() 
-    { 
-       alert ('hi'); 
-    } 
-);             *
+   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  *

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/pretty.js
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/pretty.js?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/pretty.js (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/scripts/pretty.js Sun Oct 10 12:36:21 2010
@@ -10,9 +10,14 @@ function prettyDate(myDate){
 	var date = myDate,
 		diff = (((new Date()).getTime() - date.getTime()) / 1000),
 		day_diff = Math.floor(diff / 86400);
+		
+	
 			
-	if ( isNaN(day_diff) || day_diff < 0 || day_diff >= 31 )
+	if ( isNaN(day_diff) || day_diff < 0 )
 		return;
+		
+	if ( day_diff >= 31 )
+		return "more than 1 month ago";
 			
 	return day_diff == 0 && (
 			diff < 60 && "just now" ||

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/style/style.css
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/style/style.css?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/style/style.css (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/style/style.css Sun Oct 10 12:36:21 2010
@@ -420,13 +420,14 @@ ul.main-links  {
 .gray-box {
 	float:left;
 	background:#f9f9f9;
-	padding:20px;
+
 }
 
 .updates-box {
 	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,10 @@ top: 60px
 top: 100px
 }
 
+/* Contacts
+******************************************************************************/
+
+.b-contacts {
+  list-style-type:none;
+}
+

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base.html
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base.html?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base.html (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base.html Sun Oct 10 12:36:21 2010
@@ -47,7 +47,7 @@
             <div id="container">
                 <div id="header">
                     <div id="logo">
-                        <h1><a href="/">ESME</a></h1>
+                        <h1><a href="/"><lift:loc>ui_default_pagetitle</lift:loc></a></h1>
                     </div>
                     <div id="top-menu">
                         <ul>
@@ -112,11 +112,11 @@
                                     <input type="image" onclick="javascript:form.submit();" src="../images/btn-search.gif" style="padding:0;"/>
                                 </div>
                             </div>
-                        </form><!--search form--><h3><a href=""  class ="tipelement" title="These are tags that appear often in your timeline."><lift:loc>ui_messages_message_label_tag_cloud</lift:loc></a></h3>
+                        </form><!--search form--><h3 class ="tipelement" title="These are tags that appear often in your timeline."><lift:loc>ui_messages_message_label_tag_cloud</lift:loc></h3>
                        <div class="right-content">
                              <lift:comet type="TagCloud"/>
                         </div>
-                        <h3><a href="" class ="tipelement" title="These are popular messages that users have resent often"><lift:loc>ui_messages_message_label_popular</lift:loc></a></h3>
+                        <h3 class ="tipelement" title="These are popular messages that users have resent often"><lift:loc>ui_messages_message_label_popular</lift:loc></h3>
                         <div class="right-content">
                                         <lift:UserSnip.popular>
                                         <ul>
@@ -128,7 +128,7 @@
                                         </ul>
                                     </lift:UserSnip.popular> 
                                      </div>
-                        <h3><a href="" class ="tipelement" title="These are popular links that users have clicked often."><lift:loc>ui_messages_message_label_popular_links</lift:loc></a></h3>
+                        <h3 class ="tipelement" title="These are popular links that users have clicked often."><lift:loc>ui_messages_message_label_popular_links</lift:loc></h3>
                         <div class="right-content">
                                   <lift:UserSnip.links>
                                         <ul>
@@ -150,7 +150,7 @@
                 <div class="ftr-links">			
 				<a href="http://cwiki.apache.org/confluence/display/ESME/Index"><lift:loc>custom_text_link1</lift:loc></a> |
 				<a href="http://cwiki.apache.org/confluence/display/ESME/Index#Index-GettingStarted"><lift:loc>custom_text_link2</lift:loc></a> |
-				<a href="http://blog.esme.us/"><lift:loc>custom_text_link3</lift:loc></a> |
+				<a href="http://blog.esme.us/"><lift:loc>custom_text_link3</lift:loc></a> 
 				<br />
                 <lift:loc>ui_default_footer</lift:loc>
           <br />

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base_top.html
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base_top.html?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base_top.html (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/base_top.html Sun Oct 10 12:36:21 2010
@@ -1,3 +1,4 @@
+
 <!--
  Licensed to the Apache Software Foundation (ASF) under one   *
  or more contributor license agreements.  See the NOTICE file *
@@ -47,7 +48,7 @@
             <div id="container">
                 <div id="header">
                     <div id="logo">
-                        <h1><a href="/">ESME</a></h1>
+                        <h1><a href="/"><lift:loc>ui_default_pagetitle</lift:loc></a></h1>
                     </div>
                     <div id="top-menu">
                         <ul>
@@ -112,11 +113,11 @@
                                     <input type="image" onclick="javascript:searchMe();" src="images/btn-search.gif" style="padding:0;"/>
                                 </div>
                             </div>
-                        </form><!--search form--><h3><a href=""  class ="tipelement" title="These are tags that appear often in your timeline."><lift:loc>ui_messages_message_label_tag_cloud</lift:loc></a></h3>
+                        </form><!--search form--><h3 class ="tipelement" title="These are tags that appear often in your timeline."><lift:loc>ui_messages_message_label_tag_cloud</lift:loc></h3>
                        <div class="right-content">
                              <lift:comet type="TagCloud"/>
                         </div>
-                        <h3><a href="" class ="tipelement" title="These are popular messages that users have resent often"><lift:loc>ui_messages_message_label_popular</lift:loc></a></h3>
+                        <h3  class ="tipelement" title="These are popular messages that users have resent often"><lift:loc>ui_messages_message_label_popular</lift:loc></h3>
                         <div class="right-content">
                                         <lift:UserSnip.popular>
                                         <ul>
@@ -128,7 +129,7 @@
                                         </ul>
                                     </lift:UserSnip.popular> 
                                      </div>
-                        <h3><a href="" class ="tipelement" title="These are popular links that users have clicked often."><lift:loc>ui_messages_message_label_popular_links</lift:loc></a></h3>
+                        <h3 class ="tipelement" title="These are popular links that users have clicked often."><lift:loc>ui_messages_message_label_popular_links</lift:loc></h3>
                         <div class="right-content">
                                   <lift:UserSnip.links>
                                         <ul>
@@ -150,7 +151,7 @@
                 <div class="ftr-links">			
 				<a href="http://cwiki.apache.org/confluence/display/ESME/Index"><lift:loc>custom_text_link1</lift:loc></a> |
 				<a href="http://cwiki.apache.org/confluence/display/ESME/Index#Index-GettingStarted"><lift:loc>custom_text_link2</lift:loc></a> |
-				<a href="http://blog.esme.us/"><lift:loc>custom_text_link3</lift:loc></a> |
+				<a href="http://blog.esme.us/"><lift:loc>custom_text_link3</lift:loc></a> 
 				<br />
                 <lift:loc>ui_default_footer</lift:loc>
           <br />

Modified: incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/default.html
URL: http://svn.apache.org/viewvc/incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/default.html?rev=1006282&r1=1006281&r2=1006282&view=diff
==============================================================================
--- incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/default.html (original)
+++ incubator/esme/branches/tagandconversationfollow/src/main/webapp/templates-hidden/default.html Sun Oct 10 12:36:21 2010
@@ -54,7 +54,7 @@
                 <div class="ftr-links">			
 				<a href="http://cwiki.apache.org/confluence/display/ESME/Index"><lift:loc>custom_text_link1</lift:loc></a> |
 				<a href="http://cwiki.apache.org/confluence/display/ESME/Index#Index-GettingStarted"><lift:loc>custom_text_link2</lift:loc></a> |
-				<a href="http://blog.esme.us/"><lift:loc>custom_text_link3</lift:loc></a> |
+				<a href="http://blog.esme.us/"><lift:loc>custom_text_link3</lift:loc></a> 
 				<br />
                 <lift:loc>ui_default_footer</lift:loc>
           <br />