changeset 422:1fe19d424346

added size attr to select widget imported from: moin--main--1.5--patch-426
author Thomas Waldmann <tw@waldmann-edv.de>
date Sat, 04 Feb 2006 13:24:45 +0000
parents 8eefc299cf06
children c16423b7ff18
files ChangeLog MoinMoin/util/web.py
diffstat 2 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Feb 04 12:10:42 2006 +0000
+++ b/ChangeLog	Sat Feb 04 13:24:45 2006 +0000
@@ -2,6 +2,20 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-02-04 14:24:45 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-426
+
+    Summary:
+      added size attr to select widget
+    Revision:
+      moin--main--1.5--patch-426
+
+    added size attr to select widget
+    
+
+    modified files:
+     ChangeLog MoinMoin/util/web.py
+
+
 2006-02-04 13:10:42 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-425
 
     Summary:
--- a/MoinMoin/util/web.py	Sat Feb 04 12:10:42 2006 +0000
+++ b/MoinMoin/util/web.py	Sat Feb 04 13:24:45 2006 +0000
@@ -51,7 +51,7 @@
 
     return request.theme.make_icon(icon)
 
-def makeSelection(name, values, selectedval=None):
+def makeSelection(name, values, selectedval=None, size=1):
     """ Make a HTML <select> element named `name` from a value list.
         The list can either be a list of strings, or a list of
         (value, label) tuples.
@@ -59,7 +59,7 @@
         `selectedval` is the value that should be pre-selected.
     """
     from MoinMoin.widget import html
-    result = html.SELECT(name=name)
+    result = html.SELECT(name=name, size="%d" % int(size))
     for val in values:
         if not isinstance(val, type(())):
             val = (val, val)