Changeset - 60d0a06e2558
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 7 years ago 2014-12-09 00:15:17
bkuhn@ebb.org
progressbar Javascript need not change for content

The content of the amounts for the fundraiser can be kept in the HTML
rather than the progress bar Javscript code.

I suspect at some point I should keep this data in the Django database
and extract it from there as dynamic content.
2 files changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/supporter-page.js
Show inline comments
...
 
@@ -5,7 +5,12 @@
 
*/
 

	
 
$(document).ready(function() {
 
    $("#progressbar").progressbar({ value: (0.00 / 5000.00) * 100 });
 
    var goal  = $('span#fundraiser-goal').text();
 
    var soFar = $('span#fundraiser-so-far').text();
 
    var noCommaGoal = goal.replace(/,/g, "");
 
    var noCommaSoFar = soFar.replace(/,/g, "");
 

	
 
    $("#progressbar").progressbar({ value: (parseFloat(noCommaSoFar) / parseFloat(noCommaGoal)) * 100 });
 

	
 
    $('.toggle-content').hide();
 

	
www/conservancy/static/supporter/index.html
Show inline comments
...
 
@@ -18,7 +18,7 @@
 

	
 
<div id="donate-box" class="toggle-unit"><h1 class="toggle-content">Support
 
    Now!</h1></div>
 
$240 of the $5,000 match goal met.<br/>
 
$<span id="fundraiser-so-far">240</span> of the $<span id="fundraiser-goal">5,000</span> match goal met.<br/>
 
<div id="progressbar" style="height:20px;"><span style="float:right; align:center; margin-right:40%">0.05%</span></div>
 

	
 
<h3>Help Us Reach Our Match Goal:</h3>
0 comments (0 inline, 0 general)