Attachment 'simplemente-v1.8rc1.py.diff'
Download 1 --- simplemente.py 2008-01-27 16:46:26.000000000 +0100
2 +++ simplemente-v1.8.py 2008-10-06 14:57:59.000000000 +0200
3 @@ -552,27 +552,6 @@
4
5
6 # tribute to the most sucking browser: MS IE6
7 -
8 - # Try..except for backwards compatibility of Moin versions only
9 - try:
10 - if self.cfg.hacks.get('ie7', False) and self.request.action != 'edit':
11 - # using FCKeditor and IE7 at the same time makes nices crashes in IE
12 - html.append("""
13 -<!-- compliance patch for microsoft browsers -->
14 -<!--[if lt IE 7]>
15 - <script src="%s/common/ie7/ie7-standard-p.js" type="text/javascript"></script>
16 -<![endif]-->
17 -""" % prefix)
18 - except:
19 - if self.cfg.hacks.get('ie7', False) and self.request.form.get('action', [''])[0] != 'edit':
20 - html.append("""
21 -<!-- compliance patch for microsoft browsers -->
22 -<!--[if lt IE 7]>
23 - <script src="%s/common/ie7/ie7-standard-p.js" type="text/javascript"></script>
24 -<![endif]-->
25 -""" % prefix)
26 -
27 -
28 csshref = '%s/%s/css/msie.css' % (prefix, self.name)
29 html.append("""
30 <!-- css only for MSIE browsers -->
31 @@ -823,7 +802,7 @@
32
33
34 from MoinMoin import config
35 - for scheme in self.linkSchemas:
36 + for scheme in config.url_schemas:
37 if pagename.startswith(scheme):
38 title = wikiutil.escape(title)
39 link = self.request.formatter.url(1, pagename, name=title) + \
40 @@ -930,26 +909,32 @@
41 def msg(self, d):
42 """ Assemble the msg display
43
44 - Changed: Added hidden h1 heading for better navigation with screenreaders
45 -
46 + Display a message with a widget or simple strings with a clear message link.
47 +
48 @param d: parameter dictionary
49 @rtype: unicode
50 @return: msg display html
51 """
52 _ = self.request.getText
53 - msg = d['msg']
54 - if not msg:
55 - return u''
56 + msgs = d['msg']
57
58 - if isinstance(msg, (str, unicode)):
59 - # Render simple strings with a close link
60 - close = d['page'].link_to(self.request, text=_('Clear message'))
61 - html = u'<p>%s</p>\n<div class="buttons">%s</div>\n' % (msg, close)
62 + result = u""
63 + close = d['page'].link_to(self.request, text=_('Clear message'), css_class="clear-link")
64 + for msg, msg_class in msgs:
65 + try:
66 + result += u'<p>%s</p>' % msg.render()
67 + close = ''
68 + except AttributeError:
69 + if msg and msg_class:
70 + result += u'<p><div class="%s">%s</div></p>' % (msg_class, msg)
71 + elif msg:
72 + result += u'<p>%s</p>\n' % msg
73 + if result:
74 + html = result + close
75 + return u'<div id="message">\n%s\n</div>\n' % html
76 else:
77 - # msg is a widget
78 - html = msg.render()
79 -
80 - return u'<div id="message">\n<h1 class="screenreader_info">%s</h1>\n%s\n</div>\n' % (_('Message'), html)
81 + return u''
82 + return u'<div id="message">\n<h1 class="screenreader_info">%s</h1>\n</div>\n' % html
83
84 def navibar(self, d):
85 """ Assemble the navibar
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.