esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r961256 - in /incubator/esme/trunk/server/src/main/scala/org/apache/esme: liftwebext/SHtml.scala snippet/UserSnip.scala
Date Wed, 07 Jul 2010 06:58:14 GMT
Author: rhirsch
Date: Wed Jul  7 06:58:14 2010
New Revision: 961256

URL: http://svn.apache.org/viewvc?rev=961256&view=rev
Log:
[ESME-238] Sort pool drop alphabetically 
Patch by Imtiaz Ahmed Hajee Esmail 

Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/liftwebext/SHtml.scala
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/snippet/UserSnip.scala

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/liftwebext/SHtml.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/liftwebext/SHtml.scala?rev=961256&r1=961255&r2=961256&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/liftwebext/SHtml.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/liftwebext/SHtml.scala Wed
Jul  7 06:58:14 2010
@@ -91,9 +91,9 @@ object SHtml {
   private def getSortedOpts(opts: Seq[(String, String)], excludeFirstOpt: Boolean): Seq[(String,
String)] =
     if ( excludeFirstOpt )
       opts match {
-        case first :: rest => first :: rest.toList.sort(_._2 < _._2)
+        case first :: rest => first :: rest.toList.sort( (first: (String, String), second:
(String, String)) => first._2.toUpperCase < second._2.toUpperCase)
         case _ => opts
       }
     else
-      opts.toList.sort(_._2 < _._2)
+      opts.toList.sort( (first: (String, String), second: (String, String)) => first._2.toUpperCase
< second._2.toUpperCase)
 }

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=961256&r1=961255&r2=961256&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 Wed
Jul  7 06:58:14 2010
@@ -179,7 +179,7 @@ class UserSnip extends DispatchSnippet {
       yield p)
         .map( p => {val pool = AccessPool.find(p); (pool.toString, pool.get.getName)}
)
         .toList
-        .sort(_._2 < _._2)
+        .sort( ( first: (String, String), second: (String, String)) => first._2.toUpperCase
< second._2.toUpperCase)
         .map(p => <option value={p._1}>{p._2}</option>)
   }
   



Mime
View raw message