From ef3014aca3e04bc56a17dff7e2e0028376de59bc Mon Sep 17 00:00:00 2001 From: glover Date: Wed, 19 Sep 2012 19:23:22 -0500 Subject: [PATCH 1/6] add simple modal --- app.py | 2 +- templates/index.html | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index e782fe9..9b9ad02 100644 --- a/app.py +++ b/app.py @@ -52,4 +52,4 @@ def index(): if __name__ == '__main__': app.debug=True - app.run(port=5001, host='0.0.0.0') + app.run(port=5001) diff --git a/templates/index.html b/templates/index.html index aa31218..376e264 100644 --- a/templates/index.html +++ b/templates/index.html @@ -21,7 +21,7 @@ @@ -71,7 +72,15 @@

Birth rates by community area

{% for row in table %}
-

{{ row.0.title() }}

+

+ {{ row.0.title() }} + enlarge +

+ From 5cb66978761d4a247508d28f2a0e0c2cbbce8acd Mon Sep 17 00:00:00 2001 From: glover Date: Wed, 19 Sep 2012 20:33:21 -0500 Subject: [PATCH 2/6] added working modal --- static/css/style.css | 6 ++++++ templates/index.html | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 173468e..e812ab0 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -41,3 +41,9 @@ table.table tbody td { position: relative; right: -15px; } +.modal .tablechart { + right: -28px; +} +.community-area .modal .jqplot-xaxis, .community-area .modal .jqplot-yaxis { + color: #000; +} diff --git a/templates/index.html b/templates/index.html index 376e264..bdcfb39 100644 --- a/templates/index.html +++ b/templates/index.html @@ -24,7 +24,7 @@ var options = { height: 50, plotOptions: { - seriesColors: [ '#999999' ], + seriesColors: [ '#9999ff' ], gridPadding : {top:0, bottom: 0, right:0, left:0}, legend: { show: false @@ -59,6 +59,13 @@ } }; $('.community-data').tablechart(options); + options.height=150; + options.width=500; + $(".modal").one("shown",function() { + var community_area = $(this).parent(); + var table = community_area.find("table").clone(); + table.appendTo($(this)).tablechart(options); + }); }); @@ -77,8 +84,12 @@

enlarge

From c318c8460977c6609ba6aa21d90aeda8d62e673b Mon Sep 17 00:00:00 2001 From: glover Date: Thu, 20 Sep 2012 15:33:31 -0500 Subject: [PATCH 3/6] Enlarged

tag. --- static/css/style.css | 2 +- templates/index.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index e812ab0..f9bd6d5 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -5,7 +5,7 @@ h1 { letter-spacing: -1px; } p, li, blockquote { - font-size: 18px; + font-size: 27px; font-weight: 200; line-height: 27px; color: inherit; diff --git a/templates/index.html b/templates/index.html index bdcfb39..347af05 100644 --- a/templates/index.html +++ b/templates/index.html @@ -43,12 +43,12 @@ yaxis: { min: {{ chart_min }}, max: {{ chart_max }}, - numberTicks: 3 + numberTicks: 5 }, xaxis: { min: 1999, max: 2009, - numberTicks: 10 + numberTicks: 8 } }, highlighter: { @@ -59,7 +59,7 @@ } }; $('.community-data').tablechart(options); - options.height=150; + options.height=200; options.width=500; $(".modal").one("shown",function() { var community_area = $(this).parent(); From 118f9c0ce728b64b06d71e6f0a373cc92a2f7c41 Mon Sep 17 00:00:00 2001 From: glover Date: Thu, 20 Sep 2012 17:10:16 -0500 Subject: [PATCH 4/6] Removed shadow in modal backdrop --- templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 347af05..588a37f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -83,7 +83,7 @@

{{ row.0.title() }} enlarge

-