incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r931136 - in /incubator/esme/trunk/server/src/main: scala/org/apache/esme/lib/ scala/org/apache/esme/model/ scala/org/apache/esme/snippet/ webapp/info_view/ webapp/templates-hidden/
Date Tue, 06 Apr 2010 13:02:00 GMT
Author: rhirsch
Date: Tue Apr  6 13:02:00 2010
New Revision: 931136

URL: http://svn.apache.org/viewvc?rev=931136&view=rev
Log:
[ESME-100] Finish web UI
Daily hour

Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/StreamMgr.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/UserSnip.scala
    incubator/esme/trunk/server/src/main/webapp/info_view/streams.html
    incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline.html

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=931136&r1=931135&r2=931136&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 Tue Apr
 6 13:02:00 2010
@@ -22,9 +22,12 @@ import java.text.SimpleDateFormat
 
 import net.liftweb._
 import http._
-import SHtml._
 import js._
-import JsCmds._
+import js.jquery._
+import http.jquery._
+import JqJsCmds._
+import JsCmds._ 
+import SHtml._
 import JE._
 
 import sitemap._
@@ -145,20 +148,20 @@ object StreamMgr {
          "resent" -> ajaxSelect(following,
                                 Empty,
                                 u => {resender = u.toLong
-                                      redisplay()},
+                                      redisplay() & DisplayMessage("messages", <b>{S.?("base_streams_filter_pool_active")}</b>,
 3 seconds, 3 seconds)},
                                 "id" -> resenderInput),
          "pools" -> ajaxSelect(pools,
                                Empty,
                                p => {pool = p.toLong
-                                     S.notice(S.?("base_streams_filter_pool_active"));redisplay()},
+                                      redisplay() & DisplayMessage("messages", <b>{S.?("base_streams_filter_pool_active")}</b>,
 3 seconds, 3 seconds)},
                                "id" -> poolInput),
          "filterResent" -> ajaxCheckbox(false,
                                         r_? => {filterResent = r_?
-                                                redisplay()},
+                                                 redisplay() & DisplayMessage("messages",
<b>{S.?("base_streams_filter_pool")}</b>,  3 seconds, 3 seconds)},
                                         "id" -> filterResentInput),
          "filterPools" -> ajaxCheckbox(false,
                                        p_? => {filterPools = p_?
-                                               S.notice(S.?("base_streams_filter_pool"));redisplay()},
+                                       redisplay() & DisplayMessage("messages", <b>{S.?("base_streams_filter_pool")}</b>,
 3 seconds, 3 seconds)},
                                        "id" -> filterPoolsInput)
     )
     

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala?rev=931136&r1=931135&r2=931136&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/AccessPool.scala Tue
Apr  6 13:02:00 2010
@@ -76,6 +76,7 @@ class AccessPool extends LongKeyedMapper
   }
   
   def getName() = name.is
+  def getDescription() = description.is
 
   private def sameName(name: String) = 
     AccessPool.findAll(By(AccessPool.name, name)).
@@ -84,6 +85,7 @@ class AccessPool extends LongKeyedMapper
   //define create and modify fields
   object createdDate extends MappedDateTime(this) 
   object creator extends MappedLongForeignKey(this,User)
+  object description extends MappedPoliteString(this, 64)
   object lastModifyDate extends MappedDateTime(this) 
   object modifier extends MappedLongForeignKey(this,User)
   

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/UserSnip.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/UserSnip.scala?rev=931136&r1=931135&r2=931136&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/UserSnip.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/UserSnip.scala Tue
Apr  6 13:02:00 2010
@@ -152,6 +152,10 @@ class UserSnip extends DispatchSnippet {
    // Image of user as part of an img tag
   def image: MetaData = ("src" -> (User.currentUser.map(_.image_url)openOr "/images/avatar.jpg"))
   
+  // Href used to display details about a user
+  def userDetailshref: MetaData = ("href" -> ("/user/" + (User.currentUser.map(_.nickname.is)openOr
"default")))
+
+  
   def userImage(in: NodeSeq) = {
     if (User.currentUser.map(_.needsChange_?) openOr false)
     S.redirectTo("/user_mgt/edit")

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=931136&r1=931135&r2=931136&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 Tue Apr  6 13:02:00
2010
@@ -39,42 +39,10 @@
 	<script src="/scripts/display_messages.js" type="text/javascript"/>
 	<script src="/scripts/pretty.js" type="text/javascript"/>
 	<div class="demo">
-		<lift:Msgs>
-			<lift:error_msg>Error:</lift:error_msg>
-			<lift:notice_msg>Note:</lift:notice_msg>
-			<lift:error_class>error_major</lift:error_class>
-			<lift:notice_msg>
-				<lift:loc>ui_base_note</lift:loc>
-			</lift:notice_msg>
-			<lift:notice_class>note_major</lift:notice_class>
-		</lift:Msgs>
-		<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
-			<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
-				<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active">
-					<a href="#tabs-1">
-						<lift:loc>ui_stream_selected_stream</lift:loc>
-					</a>
-				</li>
-				<li class="ui-state-default ui-corner-top">
-					<a href="#tabs-2">
-						<lift:loc>ui_streams_filter</lift:loc>
-					</a>
-				</li>
-			</ul>
-			<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tabs-1">
-				<span id="StreamSpan">
-					<lift:ignore>
-						<!--                        The displayStreams snippet *MUST* appear on the page
before                        the main snippet                        -->
-						</lift:ignore>
-					<div class="b-list">
-						<lift:displayStream the_id="StreamSpan"/>
-						<lift:embed what="templates-hidden/timeline"/>
-					</div>
-				</span>
-			</div>
-			<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tabs-2">
-				<lift:streamFilters>
-					<table>
+		<div id="messages"></div>
+		
+		<lift:streamFilters>
+					<table class="tablesorter">
 						<thead>
 							<tr>
 								<th>
@@ -83,44 +51,36 @@
 								<th>
 									<lift:loc>ui_streams_active</lift:loc>
 								</th>
-								<th>
-									<lift:loc>ui_streams_conditions</lift:loc>
-								</th>
 							</tr>
 						</thead>
 						<tr>
 							<td>
-								<lift:loc>ui_streams_filter_by_resent</lift:loc>
-							</td>
-							<td>
-								<main:filterResent/>
-							</td>
-							<td>
-								<lift:loc>ui_streams_filter_resender</lift:loc>
+								 <lift:loc>ui_streams_filter_resender</lift:loc> <main:resent/>
 							</td>
 							<td>
-								<main:resent/>
+								 <main:filterResent/>
 							</td>
-							<br/>
 						</tr>
 						<tr>
 							<td>
-								<lift:loc>ui_streams_filter_by_pool</lift:loc>
+								<lift:loc>ui_streams_filter_pool</lift:loc> <main:pools/> 
 							</td>
 							<td>
 								<main:filterPools/>
 							</td>
-							<td>
-								<lift:loc>ui_streams_filter_pool</lift:loc>
-							</td>
-							<td>
-								<main:pools/>
-							</td>
 						</tr>
 					</table>
 				</lift:streamFilters>
-			</div>
-		</div>
+				
+ 			<span id="StreamSpan">
+					<lift:ignore>
+						<!--                        The displayStreams snippet *MUST* appear on the page
before                        the main snippet                        -->
+						</lift:ignore>
+					<div class="b-list">
+						<lift:displayStream the_id="StreamSpan"/>
+						<lift:embed what="templates-hidden/timeline"/>
+					</div>
+				</span>
 	</div>
 	<!-- End demo -->
 </lift:surround>

Modified: incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline.html?rev=931136&r1=931135&r2=931136&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/timeline.html Tue Apr  6
13:02:00 2010
@@ -17,49 +17,34 @@
  under the License.                                           *
 -->
  
- <table id="esme-table" class="tablesorter">
-    <thead>
-        <tr>
-            <th>
-                <lift:loc>ui_messages_message_label_author</lift:loc>
-            </th>
-            <th>
-                <lift:loc>ui_messages_message_label_message</lift:loc>
-            </th>
-            <th>
-                <lift:loc>ui_messages_message_label_tags</lift:loc>
-            </th>
-        </tr>
-    </thead>
-    <tbody id="timeline_messages">
-        <tr id="message">
-            <td>
-                <img id="avatar" src="/images/avatar.jpg" alt="Anonymous" width="50px"/>
-                <div id="author">
-                    -
-                </div>
-            </td>
-            <td class="message">
-                <div class="outer">
-                    <div class="inner clear">
-                        <p class="text" id="body">
-                            -
-                        </p>
-                    </div>
-                    <div class="metainfo">
-                        <div id="supp_data"> -</div>
-                    </div>
-                </div>
-            </td>
-            <td id="tags" class="tag">
-                <p id="tag">
-                    <a href="tag/tag1">-</a>
-                </p>
-                <p id="tag">
-                    <a href="tag/tag2">-</a>
-                </p>
-            </td>
-        </tr>
-    </tbody>
-</table>
+ <div id="timeline_messages">
+	<div class="updates-box" 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 href="" id="author">-</a>
+				<div class="time">
+					<div id="supp_data"> -</div>
+				</div>
+			</div>
+		</div>
+		<div class="time">  </div>
+		<div class="actions">
+			<a href="#"  id="resend">
+				<lift:loc>ui_messages_message_label_resend</lift:loc>
+			</a>
+			| <a href="#" id="reply">
+				<lift:loc>ui_messages_message_label_reply</lift:loc>
+			</a>
+			<a id="conversation">
+				|  <lift:loc>ui_messages_message_label_conversation</lift:loc>
+			</a>
+		</div>
+		<div class="separator">                    </div>
+	</div>
+</div>	
+				
 



Mime
View raw message