You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@esme.apache.org by rh...@apache.org on 2010/03/22 09:33:03 UTC
svn commit: r925997 - in /incubator/esme/trunk/server/src/main: resources/
scala/org/apache/esme/lib/ webapp/auth_view/ webapp/templates-hidden/
Author: rhirsch
Date: Mon Mar 22 08:33:02 2010
New Revision: 925997
URL: http://svn.apache.org/viewvc?rev=925997&view=rev
Log:
[ESME-100] Finish web UI
Daily hour
Modified:
incubator/esme/trunk/server/src/main/resources/ESMEBase.properties
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AuthMgr.scala
incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/TrackMgr.scala
incubator/esme/trunk/server/src/main/webapp/auth_view/index.html
incubator/esme/trunk/server/src/main/webapp/templates-hidden/base.html
incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html
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=925997&r1=925996&r2=925997&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/resources/ESMEBase.properties (original)
+++ incubator/esme/trunk/server/src/main/resources/ESMEBase.properties Mon Mar 22 08:33:02 2010
@@ -74,13 +74,13 @@ base_user_edit_openid_save=The OpenID ID
base_user_edit_openid_duplicate=This OpenID URL is registered with another user
base_token_menu=Tokens
-base_token_error_name_short=Token description too short!
+base_token_error_name_short=Token description too short! Token descriptions must have a length of at least 3 characters!
base_token_msg_new_token=A new token '%s' has been created.
base_token_msg_removed=Action '%s' removed
base_track_menu=Tracks
base_track_error_name_short=The track is too short. Tracks must have a length of at least 3 characters!
-base_track_error_name_long=The track is too long. Tracks must have a length less than l30 characters!
+base_track_error_name_long=The track is too long. Tracks must have a length less than 30 characters!
base_track_msg_success=Now tracking '%s'
base_track_msg_removed=Track '%s' removed
base_track_msg_active=Active state of the track '%s' changed: %b
@@ -95,7 +95,7 @@ base_actions_menu=Actions
base_action_msg_new_action=A new action '%s' has been created.
base_action_error_min_len=The name must be at least 2 characters long!
base_action_msg_removed=Action '%s' removed
-base_action_msg_active=Active state of the action changed
+base_action_msg_active=Active state of the action '%s' changed
base_twitter_api_err_user_not_found=User was not found
base_twitter_api_err_user_not_included=Message was not included
Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala?rev=925997&r1=925996&r2=925997&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AccessPoolMgr.scala Mon Mar 22 08:33:02 2010
@@ -74,11 +74,17 @@ object AccessPoolMgr {
object poolId extends RequestVar[Long](0)
+
+ /*
+ * Function for adding pools
+ *
+ */
def addPool(in: NodeSeq): NodeSeq = {
+
val theInput = "new_pool"
val user = User.currentUser
- val redisplayPool = updatePool.is
-
+
+
def addNewPool(name: String) = {
name.trim match {
case x if x.length < 3 => DisplayMessage("messages", <b>{S.?("base_pool_error_name_short")}</b>, 3 seconds, 3 seconds)
@@ -90,8 +96,8 @@ object AccessPoolMgr {
Privilege.create.pool(p.saveMe).user(user).permission(Permission.Admin).save
if(privilegeSaved && user.isDefined) {
Distributor ! Distributor.AllowUserInPool(user.get.id.is, p.id.is)
- logger.info("ACCESS: " + S.?("base_pool_msg_new_pool") + " " + name)
- SetValById(theInput, "")
+ logger.info("ACCESS: " + S.?("base_pool_msg_new_pool",name))
+ SetValById(theInput, "") &
DisplayMessage("messages", <b>{S.?("base_pool_msg_new_pool",name)}</b>, 3 seconds, 2 seconds)
} else
DisplayMessage("messages", <b>{S.?("base_pool_msg_no_permission")}</b>, 3 seconds, 2 seconds)
@@ -108,7 +114,12 @@ object AccessPoolMgr {
}
+ /*
+ * Function for editing pools
+ *
+ */
def editPool(in: NodeSeq): NodeSeq = {
+
val redisplayPool = updatePool.is
// redisplay pool detail
@@ -134,6 +145,11 @@ object AccessPoolMgr {
val permissions = Permission.map(perm => (perm.id.toString, perm.toString)).collect
+
+ /*
+ * Function for adding a user to a pool
+ *
+ */
def addPoolUser(permission: String): JsCmd = {
val r: Box[Boolean] =
for (admin <- adminUser;
Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala?rev=925997&r1=925996&r2=925997&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/ActionMgr.scala Mon Mar 22 08:33:02 2010
@@ -90,13 +90,13 @@ object ActionMgr {
(lst => xs.flatMap(i => bind("item", lst,
"name" -> i.name.is,
"enabled" -> ajaxCheckbox(!i.disabled,
- e => {i.disabled(!e).save; DisplayMessage("messages", <b>Action activity changed</b>, 3 seconds, 3 seconds); Noop} ),
+ e => {i.disabled(!e).save; DisplayMessage("messages", <b>{S.?("base_action_msg_active",i.name)}</b>, 3 seconds, 3 seconds) & Noop} ),
"test" -> i.testText,
"action" -> i.actionText,
"createdDate" -> getDateHtml(i.createdDate),
"remove" ->
((bt: NodeSeq) =>
- ajaxButton(bt, () => {i.removed(true).save ; DisplayMessage("messages", <b>Action removed</b>, 3 seconds, 3 seconds); updateSpan()}))
+ ajaxButton(bt, () => {i.removed(true).save ; updateSpan() & DisplayMessage("messages", <b>{S.?("base_action_msg_removed",i.name)}</b>, 3 seconds, 3 seconds); }))
))))
Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AuthMgr.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AuthMgr.scala?rev=925997&r1=925996&r2=925997&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AuthMgr.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/AuthMgr.scala Mon Mar 22 08:33:02 2010
@@ -21,9 +21,12 @@ package org.apache.esme.lib
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._
@@ -84,7 +87,7 @@ object AuthMgr {
"createdDate" -> getDateHtml(i.createdDate),
"revoke" ->
((bt: NodeSeq) =>
- ajaxButton(bt, () => {i.delete_! ; S.notice(S.?("base_token_msg_removed", i.description.is));updateSpan()}))
+ ajaxButton(bt, () => {i.delete_! ; updateSpan() & DisplayMessage("messages", <b>{S.?("base_track_msg_removed", i.description.is)}</b>, 3 seconds, 3 seconds)}))
))))
}
@@ -101,12 +104,13 @@ object AuthMgr {
def addAuthToken(desc: String): JsCmd = {
desc.trim match {
- case x if x.length < 3 => S.error(S.?("base_token_error_name_short"))
+ case x if x.length < 3 => DisplayMessage("messages", <b>{S.?("base_token_error_name_short")}</b>, 3 seconds, 3 seconds)
case x => AuthToken.create.description(x).user(user).saveMe
- S.notice(S.?("base_token_msg_new_token", x))
+ redisplayTokens() & SetValById(theInput, "") &
+ DisplayMessage("messages", <b>{S.?("base_token_msg_new_token", x)}</b>, 3 seconds, 3 seconds)
}
- redisplayTokens() & SetValById(theInput, "")
+
}
bind("main", in,
Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/TrackMgr.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/TrackMgr.scala?rev=925997&r1=925996&r2=925997&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/TrackMgr.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/lib/TrackMgr.scala Mon Mar 22 08:33:02 2010
@@ -62,6 +62,10 @@ object TrackMgr {
// get the span name to update
val spanName = S.attr("the_id") openOr "TrackSpan"
// get the current user
+ // ajaxButton(bt, () => {i.removed(true).save ; updateSpan()}))
+ // ajaxButton(bt, () => {ModalDialog(<lift:embed what="/info_view/tag"/>)}))
+
+ // ajaxButton(bt, () => {ModalDialog(<lift:embed what="/tag"/>)}))
val user = User.currentUser
// bind the dynamic content to the incoming nodeseq
@@ -77,7 +81,7 @@ object TrackMgr {
e => {i.disabled(!e).save; Noop} ),
"remove" ->
((bt: NodeSeq) =>
- ajaxButton(bt, () => { i.removed(true).save ; updateSpan(); }))
+ ajaxButton(bt, () => {i.removed(true).save ; updateSpan() & DisplayMessage("messages", <b>{S.?("base_track_msg_removed", lst)}</b>, 3 seconds, 3 seconds)}))
))))
}
@@ -97,9 +101,10 @@ object TrackMgr {
case x if x.length < 3 => DisplayMessage("messages", <b>{S.?("base_track_error_name_short")}</b>, 3 seconds, 3 seconds)
case x if x.length > 30 => DisplayMessage("messages", <b>{S.?("base_track_error_name_long")}</b>, 3 seconds, 3 seconds)
case x => Tracking.create.regex(x).user(user).saveMe
- redisplayTracking()
- SetValById(theInput, "")
- DisplayMessage("messages", <b>{S.?("base_track_msg_success", x)}</b>, 3 seconds, 3 seconds)
+ redisplayTracking() &
+ SetValById(theInput, "") &
+ DisplayMessage("messages", <b>{S.?("base_track_msg_success", x)}</b>, 3 seconds, 3 seconds)
+
}
Modified: incubator/esme/trunk/server/src/main/webapp/auth_view/index.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/auth_view/index.html?rev=925997&r1=925996&r2=925997&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/auth_view/index.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/auth_view/index.html Mon Mar 22 08:33:02 2010
@@ -35,7 +35,8 @@
<script type="text/javascript" src="../scripts/jquery-ui-1.7.2.custom.min.js"> </script>
<script type="text/javascript" src="../scripts/esme.js"> </script>
<script type="text/javascript" src="../scripts/esme_table_sorter.js"> </script>
- <div class="demo">
+ <div id="messages"></div>
+ <div class="b-list">
<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">
@@ -68,7 +69,7 @@
<lift:loc>ui_token_list_create</lift:loc>
</th>
<th>
- <lift:loc>ui_token_revoke</lift:loc>
+
</th>
</tr>
</thead>
@@ -85,8 +86,8 @@
<item:createdDate/>
</td>
<td>
- <item:revoke>
- <img src="/images/delete.png"/>
+ <item:revoke style="background-color:#fff;">
+ <img valign="center" style="background-color:#fff;" src="/images/delete.gif"/>
</item:revoke>
</td>
</tr>
@@ -108,13 +109,4 @@
</div>
</div>
<!-- End demo -->
- <lift:Msgs>
- <lift:error_msg>Error:</lift:error_msg>
- <lift:notice_msg>FYI:</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>
</lift:surround>
\ No newline at end of file
Modified: incubator/esme/trunk/server/src/main/webapp/templates-hidden/base.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/base.html?rev=925997&r1=925996&r2=925997&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/base.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/base.html Mon Mar 22 08:33:02 2010
@@ -110,7 +110,7 @@
<table>
<thead>
<tr>
- <th>
+ <th class="popular_th">
<lift:loc>ui_messages_message_header_popular_resent</lift:loc>
</th>
<th>
@@ -124,9 +124,10 @@
<td>
<item:freq/>
</td>
- <td>
- <item:author/>:<item:text/><!--<item:date/>-->
+ <td text-align="center">
+ <item:author/>: <item:text/><!--<item:date/>--> <item:authlink/>
</td>
+
</tr>
</disp:item>
</tbody>
@@ -139,7 +140,7 @@
<table>
<thead>
<tr>
- <th>
+ <th font-weight="bold">
<lift:loc>ui_messages_message_header_popular_links_clicked</lift:loc>
</th>
<th>
@@ -150,7 +151,7 @@
<tbody>
<disp:item>
<tr>
- <td>
+ <td text-align="center">
<item:freq/>
</td>
<td>
Modified: incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html?rev=925997&r1=925996&r2=925997&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html Mon Mar 22 08:33:02 2010
@@ -27,6 +27,7 @@
</h3>
<div id="form-update">
<div id="messages"></div>
+
<div class="post-form-row">
<label><lift:loc>ui_messages_share</lift:loc></label>
<select id="vPool" class="inputBox2">
@@ -36,9 +37,13 @@
<lift:UserSnip.accessPools/>
</select>
</div>
- <div class="row clear" style="display: none">
- <input id="tagdude" style="width: 90%"/>
- </div>
+ <div class="row clear" style="display: none" id="reply-to-div">
+ <b><lift:loc>ui_messages_message_label_message_reply</lift:loc></b>
+ <span id="reply-to-span">-</span>
+ <a href="javascript: clearReplyTo()">
+ <lift:loc>ui_messages_message_label_message_remove_reply</lift:loc>
+ </a>
+ </div>
<div class="post-form-row">
<textarea class="inputBox2" id="vMsg" rows="5" cols="80%"></textarea>
<div class="row clear" style="display: none">
@@ -54,13 +59,15 @@
function setReplyTo(id, text){
currentConvNumber = id;
- //document.getElementById('reply-to-div').style.display = "block";
+ document.getElementById('reply-to-div').style.display = "block";
+ //document.getElementById('container-update').height = "172px";
jQuery('#reply-to-span').html(text);
}
function clearReplyTo(){
currentConvNumber = 0;
- // document.getElementById('reply-to-div').style.display = "none";
+ document.getElementById('reply-to-div').style.display = "none";
+ document.getElementById('container-update').height = "152px";
}
function clearResend(id){
@@ -80,7 +87,6 @@
<!--updates-box -->
<!--updates-box -->
<lift:comet type="Timeline"/>
- <div class="separator"> </div>
<table>
<tbody id="personal_timeline_messages">
<tr id="message">
@@ -114,7 +120,7 @@
</table>
</div>
<div class="actions">
- <a href="javascript:resend_msg();">
+ <a href="#" id="resend">
<lift:loc>ui_messages_message_label_resend</lift:loc>
</a>
| <a href="#" id="reply">
@@ -127,6 +133,7 @@
</div>
</div>
</div>
+ <div class="separator"> </div>
</tr>
</tbody>
</table>