changeset 3791:7f43f5c38310

WikiConfigHelp macro: hide default already at 30 characters, use span to show on mouse hover
author Johannes Berg <johannes AT sipsolutions DOT net>
date Tue, 24 Jun 2008 14:12:55 +0200
parents 4340777f31f9
children 4f1d2cd9879b
files MoinMoin/macro/WikiConfigHelp.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/WikiConfigHelp.py	Tue Jun 24 13:39:58 2008 +0200
+++ b/MoinMoin/macro/WikiConfigHelp.py	Tue Jun 24 14:12:55 2008 +0200
@@ -51,13 +51,15 @@
                 default_txt = default.text
             else:
                 default_txt = '%r' % (default, )
-                if len(default_txt) > 50:
-                    default_txt = '...'
+                if len(default_txt) <= 30:
+                    default_txt = f.text(default_txt)
+                else:
+                    default_txt = f.span(1, title=default_txt) + f.text('...') + f.span(0)
                 description = _(description or '', wiki=True)
             ret.extend([
                 f.table_row(1),
                 f.table_cell(1), f.text(name), f.table_cell(0),
-                f.table_cell(1), f.code(1, css="backtick"), f.text(default_txt), f.code(0), f.table_cell(0),
+                f.table_cell(1), f.code(1, css="backtick"), default_txt, f.code(0), f.table_cell(0),
                 f.table_cell(1), description, f.table_cell(0),
                 f.table_row(0),
             ])