Attachment 'MoinAlternateStylesheetsPep8.diff'

Download

   1 diff -r 02f68dc10be0 MoinMoin/theme/__init__.py
   2 --- a/MoinMoin/theme/__init__.py	Sun Aug 03 14:51:11 2008 +0200
   3 +++ b/MoinMoin/theme/__init__.py	Thu Nov 20 17:07:27 2008 -0600
   4 @@ -625,6 +625,7 @@
   5          @return: stylesheets links
   6          """
   7          link = '<link rel="stylesheet" type="text/css" charset="%s" media="%s" href="%s">'
   8 +        altlink = '<link rel="alternate stylesheet" type="text/css" charset="%s" media="%s" href="%s" title="%s">'
   9  
  10          # Check mode
  11          if d.get('print_mode'):
  12 @@ -647,8 +648,19 @@
  13                  usercss = None
  14  
  15          # admin configurable additional css (farm or wiki level)
  16 -        for media, csshref in self.request.cfg.stylesheets:
  17 -            html.append(link % (self.stylesheetsCharset, media, csshref))
  18 +        for stylesheet in self.request.cfg.stylesheets:
  19 +            media = csshref = title = ''
  20 +            if len(stylesheet) == 3:
  21 +                media, csshref, title = stylesheet
  22 +            elif len(stylesheet) == 2:
  23 +                media, csshref = stylesheet
  24 +            elif len(stylesheet) == 1:
  25 +                media = 'screen'
  26 +                csshref = stylesheet[0]
  27 +            if title :
  28 +                html.append(altlink % (self.stylesheetsCharset, media, csshref, title))
  29 +            else:
  30 +                html.append(link % (self.stylesheetsCharset, media, csshref))
  31  
  32          csshref = '%s/%s/css/msie.css' % (prefix, self.name)
  33          html.append("""

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] (2008-11-20 22:52:02, 1.8 KB) [[attachment:MoinAlternateStylesheets.diff]]
  • [get | view] (2008-11-20 22:46:44, 1.8 KB) [[attachment:MoinAlternateStylesheets.txt]]
  • [get | view] (2008-11-20 23:10:18, 1.4 KB) [[attachment:MoinAlternateStylesheetsPep8.diff]]
 All files | Selected Files: delete move to page copy to page

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