incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r825813 - in /incubator/esme/trunk/server/src/main: scala/bootstrap/liftweb/Boot.scala scala/org/apache/esme/snippet/TableSorterSnip.scala webapp/info_view/users.html webapp/scripts/esme_table_sorter.js
Date Fri, 16 Oct 2009 08:54:25 GMT
Author: rhirsch
Date: Fri Oct 16 08:54:24 2009
New Revision: 825813

URL: http://svn.apache.org/viewvc?rev=825813&view=rev
Log:
[ESME-90] Sorting tables via Lift's TableSorter widget

Added:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TableSorterSnip.scala
    incubator/esme/trunk/server/src/main/webapp/scripts/esme_table_sorter.js
Modified:
    incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala
    incubator/esme/trunk/server/src/main/webapp/info_view/users.html

Modified: incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala?rev=825813&r1=825812&r2=825813&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/bootstrap/liftweb/Boot.scala Fri Oct 16 08:54:24
2009
@@ -46,6 +46,8 @@
 import scala.actors.Actor
 import Actor._
 
+import net.liftweb.widgets.tablesorter._  
+
 /**
  * A class that's instantiated early and run.  It allows the application
  * to modify lift's environment
@@ -86,6 +88,10 @@
     
     //Resources for Internationalization
     LiftRules.resourceNames = "ESMEBase" :: "ESMEUI" :: Nil
+    
+    //Jquery functions
+    
+    TableSorter.init
 
     LiftRules.siteMapFailRedirectLocation = List("static", "about")
 

Added: incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TableSorterSnip.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TableSorterSnip.scala?rev=825813&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TableSorterSnip.scala
(added)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/TableSorterSnip.scala
Fri Oct 16 08:54:24 2009
@@ -0,0 +1,39 @@
+/**
+ * Copyright 2008-2009 WorldWide Conferencing, LLC
+ * 
+ * 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.snippet
+
+import org.apache.esme._
+
+import net.liftweb._
+import http._
+import js._
+import JsCmds._
+import JE._
+import util._
+import Helpers._
+import scala.xml.{NodeSeq, Unparsed}
+
+import net.liftweb.widgets.tablesorter._  
+
+class TableSorterSnip {
+def render(xhtml: NodeSeq): NodeSeq = TableSorter("esme-table")
+}
\ No newline at end of file

Modified: incubator/esme/trunk/server/src/main/webapp/info_view/users.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/info_view/users.html?rev=825813&r1=825812&r2=825813&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/info_view/users.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/info_view/users.html Fri Oct 16 08:54:24 2009
@@ -1,9 +1,17 @@
 <lift:surround with="default" at="content">
 
+		<script type="text/javascript" src="../scripts/esme_table_sorter.js"></script>
+
+	<lift:TableSorterSnip/>
+
     <fieldset style="width: 80em">
       <legend><lift:loc>ui_user_list_title</lift:loc></legend>
-      <table>
+      <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_name</lift:loc></th><th
colspan="2"><lift:loc>ui_user_list_last_message</lift:loc></th></tr>
+       </thead>
+        <tbody>
           <lift:displayUsers>
               <disp:item>
                   <tr>
@@ -15,6 +23,7 @@
                   </tr>
               </disp:item>
           </lift:displayUsers>
+            </tbody>
       </table>
     </fieldset>
 

Added: incubator/esme/trunk/server/src/main/webapp/scripts/esme_table_sorter.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/esme_table_sorter.js?rev=825813&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/esme_table_sorter.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/esme_table_sorter.js Fri Oct 16 08:54:24
2009
@@ -0,0 +1,6 @@
+$(document).ready(function() 
+    { 
+        $("#esme-table").tablesorter(); 
+    } 
+); 
+   



Mime
View raw message