Changeset - 9d0627610fa6
[Not reviewed]
0 1 0
Bradley Kuhn (bkuhn) - 9 years ago 2015-03-12 01:57:06
bkuhn@ebb.org
Make rise level consistent for both items.

With this change, both numbers should go up at the same rate.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/supporter-page.js
Show inline comments
...
 
@@ -12,13 +12,14 @@ $(document).ready(function() {
 
    var noCommaSoFar = parseFloat(soFar.replace(/,/g, ""));
 
    var noCommaDonationCount = parseInt(donationCount.replace(/,/g, ""));
 
    var percentage = (parseFloat(noCommaSoFar) / parseFloat(noCommaGoal)) * 100;
 
    var curValue = 0.00;
 
    var incrementSoFar = 0.00;
 
    var curDonationCount = 0;
 
    var incrementDonationCount = Math.round( 0.01 * donationCount );
 
    var riseLevelPercent = 0.5;
 
    var incrementDonationCount = Math.round( (riseLevelPercent / 100) * donationCount );
 

	
 
    $('span#fundraiser-percentage').css({ 'color'        : 'green',
 
                                          'font-weight'  : 'bold',
 
                                          'float'        : 'right',
 
                                          'margin-right' : '40%',
 
                                          'margin-top'   : '2.5%',
...
 
@@ -29,13 +30,13 @@ $(document).ready(function() {
 
            $("#progressbar").progressbar({ value :  percentage });
 
            $('span#fundraiser-percentage').text(percentage.toFixed(1) + "%");
 
        } else {
 
            var newVal = (curValue / 100.00) * noCommaGoal;
 
            $("#progressbar").progressbar({ value:  curValue });
 
            $('span#fundraiser-so-far').text(newVal.toLocaleString());
 
            curValue += 0.5;
 
            curValue += riseLevelPercent;
 
            setTimeout(riseDonationProgressBar, 50);
 
        }
 
    }
 
    function riseDonationCount() {
 
        if (curDonationCount >= noCommaDonationCount) {
 
            $('span#fundraiser-donation-count').text(donationCount);
0 comments (0 inline, 0 general)