esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r942677 - in /incubator/esme/trunk/server/src/main: resources/ scala/org/apache/esme/lib/ scala/org/apache/esme/model/ webapp/info_view/ webapp/style/
Date Mon, 10 May 2010 07:48:46 GMT
Author: rhirsch
Date: Mon May 10 07:48:46 2010
New Revision: 942677

URL: http://svn.apache.org/viewvc?rev=942677&view=rev
Log:
[ESME-100] Finish web UI
[ESME-190] Strange issue on Streams page
[ESME-205] Search is broken

Modified:
    incubator/esme/trunk/server/src/main/resources/ESMEBase.properties
    incubator/esme/trunk/server/src/main/resources/ESMEUI.properties
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala
    incubator/esme/trunk/server/src/main/webapp/info_view/search.html
    incubator/esme/trunk/server/src/main/webapp/info_view/streams.html
    incubator/esme/trunk/server/src/main/webapp/style/style.css

Modified: incubator/esme/trunk/server/src/main/resources/ESMEBase.properties
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/resources/ESMEBase.properties?rev=942677&r1=942676&r2=942677&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/resources/ESMEBase.properties (original)
+++ incubator/esme/trunk/server/src/main/resources/ESMEBase.properties Mon May 10 07:48:46
2010
@@ -89,7 +89,7 @@ base_track_msg_active=Active state of th
 
 base_streams_menu=Streams
 base_streams_resend_any=--any--
-base_streams_pool_default=--default--
+base_streams_pool_default=--public--
 base_streams_filter_pool=Filtering by pool has changed
 base_streams_filter_pool_active=Now filtering with a pool
 

Modified: incubator/esme/trunk/server/src/main/resources/ESMEUI.properties
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/resources/ESMEUI.properties?rev=942677&r1=942676&r2=942677&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/resources/ESMEUI.properties (original)
+++ incubator/esme/trunk/server/src/main/resources/ESMEUI.properties Mon May 10 07:48:46 2010
@@ -119,10 +119,11 @@ ui_streams_date=Date
 ui_streams_filter_by_resent=By Resent 
 ui_streams_filter_resender=Resent by: 
 ui_streams_filter_by_pool=By Pool
-ui_streams_filter_pool=In pool:
+ui_streams_filter_pool=  In pool:
 ui_stream_selected_stream=Selected Stream
 ui_streams_filter_type=Filter Type
-ui_streams_active=Active
+ui_streams_resent_active= 'Resent' filter active
+ui_streams_pool_active= 'Pool' filter active
 ui_streams_conditions=Conditions
 
 ui_login_user=User
@@ -162,6 +163,8 @@ ui_messages_message_header_popular_links
 ui_messages_message_header_popular_links_link=Link 
 ui_messages_search=Search
 
+ui_messages_search_for=Search for:
+
 ui_track_manage=My Tracks
 ui_track_manage_active=Active
 ui_track_manage_remove=Delete

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala?rev=942677&r1=942676&r2=942677&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala Mon May
10 07:48:46 2010
@@ -93,32 +93,37 @@ object StreamMgr {
       
       val query = poolsQuery :::
                   resentQuery :::
-                  List[QueryParam[Message]](OrderBy(Message.id, Descending), MaxRows(40))

-
-
-      val jsId = "timeline_messages"                  
-      val msgs = Message.findAll(query: _*)
-     /* Script(
-        After(1 second,Alert ("hi"))
-      )*/
-      Script(
-        OnLoad(JsCrVar(jsId, JsArray(
-            msgs.map(m => JsObj(("message", m.asJs)) ) :_*)) &
-        JsFunc("displayMessages", JsVar(jsId), jsId).cmd)
-      )
-      
-      /*Script(
-        Run(JsCrVar(jsId, JsArray(
-            msgs.map(m => JsObj(("message", m.asJs)) ) :_*)) &
-             JsRaw("alert('hi');"))
-        //JsFunc("displayMessages", JsVar(jsId), jsId).cmd)
+                  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"/>
+       }
+           
+      //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.getText,
+                                                     "date" -> dateFormatter.format(i.getWhen)
+                ))))
+      }
     }
     def updateSpan(): JsCmd = SetHtml(spanName, doRender())
-     //def updateSpan(): JsCmd = SetHtml(doRender())
-
 
     updateStream.set(updateSpan)
     doRender()

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala?rev=942677&r1=942676&r2=942677&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Action.scala Mon May
10 07:48:46 2010
@@ -112,7 +112,6 @@ object Action extends Action with LongKe
       (m, u, c, r) => m.pool.defined_?
       
     case ConvAction(convId) =>
-      println("here2")
       (m, u, c, r) => m.conversation.is == convId
           
     case ResentAction(userId) =>
@@ -359,10 +358,6 @@ case class AtUserAction(userId: Long) ex
   def toStr = "@"+userId
 }
 
-case object ConvAction extends TestAction {
-  def toStr = "conv"
-}
-
 case class ConvAction(convId: Long) extends TestAction {
   def toStr = "conv:" + convId
 }

Modified: incubator/esme/trunk/server/src/main/webapp/info_view/search.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/info_view/search.html?rev=942677&r1=942676&r2=942677&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/info_view/search.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/info_view/search.html Mon May 10 07:48:46
2010
@@ -17,13 +17,20 @@
  under the License.                                           *
 -->
 <lift:surround with="base" at="left">
-  <script src="/scripts/display_messages.js" type="text/javascript"/>
-  
-  Search for <lift:searchTerm/>
-  <div class="b-list">
+<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>
+	</div>
+	<!--updates-box-->
+	
+	</div><!-- End demo -->
+</div><!-- End demo -->
+
 
 </lift:surround>
 

Modified: incubator/esme/trunk/server/src/main/webapp/info_view/streams.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/info_view/streams.html?rev=942677&r1=942676&r2=942677&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/info_view/streams.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/info_view/streams.html Mon May 10 07:48:46
2010
@@ -16,65 +16,81 @@
  specific language governing permissions and limitations      *
  under the License.                                           *
 -->
-
-
-
 <lift:surround with="base" at="left">
-<head>
-        <script src="/scripts/esme_streams.js" type="text/javascript"/> 
-</head>
-	<lift:TableSorterSnip/>
-	<!-- STYLESHEETS  -->
-	<div id="back-header">
-	<h1><lift:loc>ui_streams_manage</lift:loc></h1>
-	<div class="container-aux">
-		<div id="messages"></div>
-		
-		<span id="StreamSpan">
-					<lift:ignore>
-						<!--                        The displayStreams snippet *MUST* appear on the page
before                        the main snippet                        -->
-						</lift:ignore>
-						<div id="update_msg"></div>
-						<lift:displayStream the_id="update_msg"/>
-					
-						 <lift:embed what="templates-hidden/message_core"/>
-		</span>
+    <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>
+     
+	<!---CONTENT BOX-->
+	<div class="container-streams">
+	
+	<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>
+                </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 id="StreamUI">
+		<div class="StreamUI">
 			<lift:streamFilters>
-					<table class="tablesorter">
-						<thead>
-							<tr>
-								<th>
-									<lift:loc>ui_streams_filter_type</lift:loc>
-								</th>
-								<th>
-									<lift:loc>ui_streams_active</lift:loc>
-								</th>
-							</tr>
-						</thead>
+					<table class="tablesorter" >
+					<thead>
 						<tr>
-							<td>
+							<th class="tipelement" title="These are users that you follow">
 								 <lift:loc>ui_streams_filter_resender</lift:loc> <main:resent/>
-							</td>
-							<td class="tipelement" title="Filter by messages that have been resent by those
you follow. ">
-								 <main:filterResent/>
-							</td>
-						</tr>
-						<tr>
-							<td>
+							</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/> 
-							</td>
-							<td>
-								<main:filterPools/>
-							</td>
+							</th>
+							<th align="center">
+								<lift:loc>ui_streams_pool_active</lift:loc> <main:filterPools/>
+							</th>
 						</tr>
+						 </thead>
 					</table>
 				</lift:streamFilters>
-		</div>
-
-				
+		</div>		
 
 	</div>
 	</div>

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=942677&r1=942676&r2=942677&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/style/style.css (original)
+++ incubator/esme/trunk/server/src/main/webapp/style/style.css Mon May 10 07:48:46 2010
@@ -552,6 +552,15 @@ ul#toc li.current a {
 	margin-bottom:20px; 
 }
 
+.container-streams {
+	float:left; 
+	width: 563px; 
+	height:300px; 
+	padding:20px 30px; 
+	background: url(../images/bg-tabs.png) no-repeat; 
+	margin-bottom:20px; 
+}
+
 .container-aux {
 	float:left; 
 	width: 563px; 
@@ -641,8 +650,21 @@ width:100%;
 z-index:10000;
 }
 
+/* Dealing with UI elements that are troublesome
+******************************************************************************/
+
 .pool_select {
 position:absolute;
 top: 70px
 }
 
+.StreamUI {
+position:absolute;
+top: 60px
+}
+
+.stream_body {
+position:absolute;
+top: 140px
+}
+



Mime
View raw message