Changeset - a7a15cec8b57
[Not reviewed]
0 1 0
Bradley Kuhn (bkuhn) - 9 years ago 2015-03-12 01:36:01
bkuhn@ebb.org
Better handle no value situations.

The issue where these values were empty was not properly handled.
1 file changed with 7 insertions and 6 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/supporter-page.js
Show inline comments
...
 
@@ -10,4 +10,4 @@ $(document).ready(function() {
 
    var donationCount = $('span#fundraiser-donation-count').text();
 
    var noCommaGoal = goal.replace(/,/g, "");
 
    var noCommaSoFar = soFar.replace(/,/g, "");
 
    var noCommaGoal = parseFloat(goal.replace(/,/g, ""));
 
    var noCommaSoFar = parseFloat(soFar.replace(/,/g, ""));
 
    var noCommaDonationCount = parseInt(donationCount.replace(/,/g, ""));
...
 
@@ -18,3 +18,2 @@ $(document).ready(function() {
 

	
 
    $('span#fundraiser-percentage').text("");
 
    $('span#fundraiser-percentage').css({ 'color'        : 'green',
...
 
@@ -25,4 +24,2 @@ $(document).ready(function() {
 
                                          'text-align'   : 'inherit'});
 
    $("#progressbar").progressbar({ value:  curValue });
 

	
 
    function riseDonationProgressBar() {
...
 
@@ -52,3 +49,7 @@ $(document).ready(function() {
 
    }
 
    riseDonationProgressBar();
 
    if (noCommaSoFar > 0.00 and noCommaGoal > 0.00) {
 
        $('span#fundraiser-percentage').text("");
 
        $("#progressbar").progressbar({ value:  curValue });
 
        riseDonationProgressBar();
 
    }
 

	
0 comments (0 inline, 0 general)