From a8bd5a21296d98a843871711954adb11f6a10dfb Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Sun, 8 Mar 2015 22:08:14 -0700 Subject: [PATCH] Leave text w/ percentage when no progressbar The progressbar is generated by Javascript. As such, the text here won't have a progressbar formatted around it when the browser doesn't support Javascript. However, since the Javascript does update the text, we can format the Django template to put in place text that we wish will appear when no Javascript is turned on, and then allow the Javascript to make it right when it's available. Graceful degradation: I may be its last proponent. --- www/conservancy/static/npoacct/index.html | 2 +- www/conservancy/templates/base_compliance.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/conservancy/static/npoacct/index.html b/www/conservancy/static/npoacct/index.html index c2e8821a..55a6bf55 100644 --- a/www/conservancy/static/npoacct/index.html +++ b/www/conservancy/static/npoacct/index.html @@ -106,7 +106,7 @@ el.attachEvent('on'+ev, function() {handler.apply(el);});

Support NPO Accounting Project Now!

${{ fundgoal.fundraiser_so_far_amount|floatformat:0|intcomma }} raised toward
our ${{ fundgoal.fundraiser_goal_amount|floatformat:0|intcomma }} goal.
-
{{ fundgoal.percentage_there|floatformat:1 }}%
+
(i.e., {{ fundgoal.percentage_there|floatformat:1 }}%)

(Progress bar updated daily.)

Help us reach our goal:

diff --git a/www/conservancy/templates/base_compliance.html b/www/conservancy/templates/base_compliance.html index ec92a219..eda3cd7e 100644 --- a/www/conservancy/templates/base_compliance.html +++ b/www/conservancy/templates/base_compliance.html @@ -22,7 +22,7 @@ ${{ fundgoal.fundraiser_so_far_amount|floatformat:0|intcomma }} of ${{ fundgoal.fundraiser_goal_amount|floatformat:0|intcomma }} match met.
-
{{ fundgoal.percentage_there|floatformat:1 }}%
+
(i.e., {{ fundgoal.percentage_there|floatformat:1 }}%)

Donate now via PayPal: