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.
  • [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.