Changeset - a8bd5a21296d
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 6 years ago 2015-03-09 05:08:14
bkuhn@ebb.org
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.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/npoacct/index.html
Show inline comments
...
 
@@ -106,7 +106,7 @@ el.attachEvent('on'+ev, function() {handler.apply(el);});
 
<h3>Support NPO Accounting Project Now!</h3>
 
$<span id="fundraiser-so-far">{{ fundgoal.fundraiser_so_far_amount|floatformat:0|intcomma }}</span> raised toward<br/>
 
our $<span id="fundraiser-goal">{{ fundgoal.fundraiser_goal_amount|floatformat:0|intcomma  }}</span> goal.<br/>
 
<div id="progressbar"><span id="fundraiser-percentage">{{ fundgoal.percentage_there|floatformat:1 }}%</span></div>
 
<div id="progressbar"><span id="fundraiser-percentage">(i.e., {{ fundgoal.percentage_there|floatformat:1 }}%)</span></div>
 
<p style="font-size: 75%">(Progress bar updated daily.)</p>
 
<a id="donate" style="text-decoration:none"></a>
 
<h3>Help us reach our goal:</h3>
www/conservancy/templates/base_compliance.html
Show inline comments
...
 
@@ -22,7 +22,7 @@
 

	
 
$<span id="fundraiser-so-far">{{ fundgoal.fundraiser_so_far_amount|floatformat:0|intcomma }}</span>
 
of $<span id="fundraiser-goal">{{ fundgoal.fundraiser_goal_amount|floatformat:0|intcomma  }}</span> match met.<br/>
 
<div id="progressbar"><span id="fundraiser-percentage">{{ fundgoal.percentage_there|floatformat:1 }}%</span></div>
 
<div id="progressbar"><span id="fundraiser-percentage">(i.e., {{ fundgoal.percentage_there|floatformat:1 }}%)</span></div>
 

	
 
<p>Donate now via PayPal:
 
</p>
0 comments (0 inline, 0 general)