Ignore:
Timestamp:
Jul 25, 2011 11:39:56 AM (6 years ago)
Author:
mbutscher
Message:

branches/mbutscher/work:

  • Table option to set CSS class (Ross' rep.: part of 073653527c0ea0109c762007b27093f28cab2061)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mbutscher/work/extensions/HtmlExporter.py

    r279 r287  
    13721372        self.astNodeStack.append(astNode)
    13731373
    1374         self.outAppend(u'<table border="2">\n')
    1375        
     1374        # Retrieve table appendix values
     1375        cssClass = u""
     1376        tableModeAppendix = astNode.findFlatByName("tableModeAppendix")
     1377        if tableModeAppendix:
     1378            # Written this way to keep compatible if user's own parser wasn't
     1379            # updated properly
     1380            style = getattr(tableModeAppendix, "cssClass", u"")
     1381            if style:
     1382                cssClass = u' class="{0}"'.format(style)
     1383
     1384        self.outAppend(u'<table border="2"{0}>\n'.format(cssClass))
     1385
    13761386        for row in astNode.iterFlatByName("tableRow"):
    13771387            self.outAppend(u"<tr>")
     
    13811391                self.outAppend(u"</td>")
    13821392            self.outAppend(u"</tr>\n")
    1383        
     1393
    13841394        if self.asIntHtmlPreview:
    13851395            self.outAppend(u'</table>\n<br />\n') # , eatPostBreak=not self.asIntHtmlPreview)
Note: See TracChangeset for help on using the changeset viewer.