changeset 1633:ac5f7e5a11e5

sort HTMLClass.properties results by name (feature [SF#724738])
author Richard Jones <richard@users.sourceforge.net>
date Fri, 09 May 2003 02:23:33 +0000
parents eb4d04a9d647
children e5e00d3a3fe2
files CHANGES.txt roundup/cgi/templating.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Fri May 09 02:02:40 2003 +0000
+++ b/CHANGES.txt	Fri May 09 02:23:33 2003 +0000
@@ -68,6 +68,7 @@
   Note: requires python 2.2+
 - added Windows Service mode for roundup-server when daemonification is
   attempted on Windows.
+- sort HTMLClass.properties results by name (sf feature 724738)
 
 Fixed:
 - applied unicode patch. All data is stored in utf-8. Incoming messages
--- a/roundup/cgi/templating.py	Fri May 09 02:02:40 2003 +0000
+++ b/roundup/cgi/templating.py	Fri May 09 02:23:33 2003 +0000
@@ -338,7 +338,7 @@
 
         return klass(self._client, self.classname, itemid)
 
-    def properties(self):
+    def properties(self, sort=1):
         ''' Return HTMLProperty for all of this class' properties.
         '''
         l = []
@@ -351,6 +351,8 @@
                 if isinstance(prop, klass):
                     l.append(htmlklass(self._client, self._classname, '',
                         prop, name, value, self._anonymous))
+        if sort:
+            l.sort(lambda a,b:cmp(a._name, b._name))
         return l
 
     def list(self):

Roundup Issue Tracker: http://roundup-tracker.org/