Attachment 'simplemente.diff'

Download

   1 --- alt_simplemente.txt	2008-01-27 16:46:26.000000000 +0100
   2 +++ neu_simplemente.txt	2008-06-16 20:21:46.000000000 +0200
   3 @@ -823,7 +823,7 @@
   4  
   5  
   6          from MoinMoin import config
   7 -        for scheme in self.linkSchemas:
   8 +        for scheme in config.url_schemas:
   9              if pagename.startswith(scheme):
  10                  title = wikiutil.escape(title)
  11                  link = self.request.formatter.url(1, pagename, name=title) + \
  12 @@ -930,27 +930,33 @@
  13      def msg(self, d):
  14          """ Assemble the msg display
  15  
  16 -        Changed: Added hidden h1 heading for better navigation with screenreaders
  17 -        
  18 +        Display a message with a widget or simple strings with a clear message link.
  19 +
  20          @param d: parameter dictionary
  21          @rtype: unicode
  22          @return: msg display html
  23          """
  24          _ = self.request.getText
  25 -        msg = d['msg']
  26 -        if not msg:
  27 -            return u''
  28 +        msgs = d['msg']
  29  
  30 -        if isinstance(msg, (str, unicode)):
  31 -            # Render simple strings with a close link
  32 -            close = d['page'].link_to(self.request, text=_('Clear message'))
  33 -            html = u'<p>%s</p>\n<div class="buttons">%s</div>\n' % (msg, close)
  34 +        result = u""
  35 +        close = d['page'].link_to(self.request, text=_('Clear message'), css_class="clear-link")
  36 +        for msg, msg_class in msgs:
  37 +            try:
  38 +                result += u'<p>%s</p>' % msg.render()
  39 +                close = ''
  40 +            except AttributeError:
  41 +                if msg and msg_class:
  42 +                    result += u'<p><div class="%s">%s</div></p>' % (msg_class, msg)
  43 +                elif msg:
  44 +                    result += u'<p>%s</p>\n' % msg
  45 +        if result:
  46 +            html = result + close
  47 +            return u'<div id="message">\n%s\n</div>\n' % html
  48          else:
  49 -            # msg is a widget
  50 -            html = msg.render()
  51 -
  52 -        return u'<div id="message">\n<h1 class="screenreader_info">%s</h1>\n%s\n</div>\n' % (_('Message'), html)
  53 -
  54 +            return u''
  55 +        return u'<div id="message">\n<h1 class="screenreader_info">%s</h1>\n</div>\n' % html
  56 +    
  57      def navibar(self, d):
  58          """ Assemble the navibar
  59  

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.
  • [get | view] (2007-08-18 19:40:01, 110.7 KB) [[attachment:SimpleMente-10.jpg]]
  • [get | view] (2007-03-14 19:11:43, 92.3 KB) [[attachment:SimpleMente-grande.png]]
  • [get | view] (2007-03-17 21:38:03, 104.3 KB) [[attachment:SimpleMente-ie.png]]
  • [get | view] (2007-03-21 21:15:17, 56.2 KB) [[attachment:Simplemente0-5.zip]]
  • [get | view] (2007-08-17 16:18:43, 29.2 KB) [[attachment:breadcrumbs1.jpg]]
  • [get | view] (2007-08-17 16:19:27, 35.7 KB) [[attachment:breadcrumbs2.jpg]]
  • [get | view] (2007-08-17 16:20:45, 37.9 KB) [[attachment:breadcrumbs3.jpg]]
  • [get | view] (2007-03-22 23:32:23, 1.8 KB) [[attachment:de.SimpleMente.po]]
  • [get | view] (2007-03-22 23:32:44, 47.9 KB) [[attachment:de.py]]
  • [get | view] (2007-03-22 23:29:51, 1.8 KB) [[attachment:es.SimpleMente.po]]
  • [get | view] (2007-03-22 23:31:55, 48.5 KB) [[attachment:es.py]]
  • [get | view] (2007-03-18 12:12:33, 103.1 KB) [[attachment:firefox.png]]
  • [get | view] (2007-03-17 21:40:13, 8.5 KB) [[attachment:footer.png]]
  • [get | view] (2007-03-21 21:01:04, 4.0 KB) [[attachment:navibar.png]]
  • [get | view] (2007-03-17 21:39:10, 98.5 KB) [[attachment:opera.png]]
  • [get | view] (2007-03-19 18:51:14, 100.4 KB) [[attachment:opera_metanav.png]]
  • [get | view] (2009-02-16 23:14:41, 2177.7 KB) [[attachment:package.zip]]
  • [get | view] (2007-08-16 14:53:50, 92.3 KB) [[attachment:pagestructure.jpg]]
  • [get | view] (2007-08-16 14:54:38, 56.5 KB) [[attachment:pagestructure_modern.jpg]]
  • [get | view] (2007-03-17 21:39:45, 0.1 KB) [[attachment:shortcuts.js]]
  • [get | view] (2007-03-22 19:42:43, 6.2 KB) [[attachment:show_keys.png]]
  • [get | view] (2008-12-17 12:10:33, 120.8 KB) [[attachment:simplemente v1-2.zip]]
  • [get | view] (2009-11-08 23:54:31, 124.8 KB) [[attachment:simplemente-1.3.zip]]
  • [get | view] (2007-03-12 15:51:55, 106.7 KB) [[attachment:simplemente-chico.png]]
  • [get | view] (2007-07-12 14:09:22, 15.6 KB) [[attachment:simplemente-footer-div.png]]
  • [get | view] (2008-10-06 21:14:18, 3.1 KB) [[attachment:simplemente-v1.8rc1.py.diff]]
  • [get | view] (2008-06-16 18:56:13, 2.2 KB) [[attachment:simplemente.diff]]
  • [get | view] (2007-03-14 19:04:36, 308.1 KB) [[attachment:simplemente.tar.gz]]
  • [get | view] (2007-03-21 21:42:39, 56.1 KB) [[attachment:simplemente0-5.zip]]
  • [get | view] (2007-03-22 23:33:26, 64.5 KB) [[attachment:simplemente0-6.zip]]
  • [get | view] (2007-03-23 19:05:31, 64.6 KB) [[attachment:simplemente0-7.zip]]
  • [get | view] (2007-03-25 15:58:47, 65.1 KB) [[attachment:simplemente0-8-Moin1-3-4.zip]]
  • [get | view] (2007-03-28 20:35:03, 65.0 KB) [[attachment:simplemente0-8.zip]]
  • [get | view] (2007-04-05 17:48:19, 68.9 KB) [[attachment:simplemente0-9.zip]]
  • [get | view] (2007-08-17 16:18:17, 69.5 KB) [[attachment:simplemente1-0.zip]]
  • [get | view] (2008-01-27 16:00:48, 69.7 KB) [[attachment:simplemente1-1.zip]]
  • [get | view] (2008-10-29 20:37:38, 167.5 KB) [[attachment:simplemente_bug.png]]
  • [get | view] (2007-08-18 19:02:38, 12.6 KB) [[attachment:simplemente_editbar.png]]
  • [get | view] (2008-10-29 20:38:09, 165.6 KB) [[attachment:simplemente_workaround.png]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.