Sort of targets in multiple-targets selection.
[egate.git] / www / mtargets.egw
index 306fe16..1f81bfa 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: mtargets.egw,v 1.14 1996/01/29 17:31:47 adam Exp $
+# $Id: mtargets.egw,v 1.15 1996/02/19 15:44:59 adam Exp $
     set setNo 1
     source ztargets.conf
     if {[info commands saveState] == ""} {
     html {<form action="http:} $env(SCRIPT_NAME)
     html / $sessionId {/mquery.egw/} $setNo {" method=get><br>} \n
     html "<dl>\n"
-    foreach t [array names targets] {
+
+
+
+    proc targetsCmp {l r} {
+        global targets
+        return [string compare [string tolower [lindex $targets($l) 0]] \
+                               [string tolower [lindex $targets($r) 0]]]
+    }
+    set tt [array names targets]
+    set tn [lsort -command targetsCmp $tt]
+    foreach t $tn {
         html {<dt>} [ lindex $targets($t) 0]
         html {<dd>}
         set databases [lindex $targets($t) 1]