Mercurial > bitten > bitten-test
changeset 815:f11701cd8b8e 0.6.x
0.6dev: Merge [892] from trunk.
author | hodgestar |
---|---|
date | Wed, 15 Sep 2010 20:51:01 +0000 |
parents | 88454000acf8 |
children | 151e1ddf9e67 |
files | bitten/templates/bitten_config.html bitten/web_ui.py |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/templates/bitten_config.html +++ b/bitten/templates/bitten_config.html @@ -107,7 +107,7 @@ </py:when><py:when test="'view_config'"> <div id="charts"><py:for each="chart in config.charts"> <h3 id="chart_${chart.category}_title" style="text-align: center;"/> - <div id="chart_${chart.category}" style="width:220px;height:220px;"></div> + <div id="chart_${chart.category}" style="${chart.style}"></div> <script type="text/javascript"> $(document).ready(function() {
--- a/bitten/web_ui.py +++ b/bitten/web_ui.py @@ -20,6 +20,7 @@ from genshi.builder import tag from trac.attachment import AttachmentModule, Attachment from trac.core import * +from trac.config import Option from trac.mimeview.api import Context from trac.resource import Resource from trac.timeline import ITimelineEventProvider @@ -150,6 +151,11 @@ implements(IRequestHandler, IRequestFilter, INavigationContributor) + # Configuration options + + chart_style = Option('bitten', 'chart_style', 'height: 220px; width: 220px;', doc= + """Style attribute for charts. Mostly useful for setting the height and width.""") + # INavigationContributor methods def get_active_navigation_item(self, req): @@ -427,6 +433,7 @@ chart_generators.append({ 'href': req.href.build(config.name, 'chart/' + category), 'category': category, + 'style': self.config.get('bitten', 'chart_style'), }) data['config']['charts'] = chart_generators