Changeset - 05290a635276
[Not reviewed]
0 1 0
Brett Smith (brett) - 7 years ago 2016-11-29 18:25:53
brett@sfconservancy.org
js: Fix needProgress math.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/js/supporter-page.js
Show inline comments
...
 
@@ -41,25 +41,25 @@ $(document).ready(function() {
 
    var curValue = 0.00;
 
    var incrementSoFar = 0.00;
 
    var curDonationCount = 0;
 
    var riseLevelPercent = 0.5;
 
    var incrementDonationCount = Math.round( (riseLevelPercent / 100) * noCommaDonationCount );
 
    $('#siteprogressbar').empty();
 

	
 
    if (noCommaSiteSoFar >= noCommaSiteMiddleGoal) {
 
        // We've got
 
        var leftOver = noCommaMatchFinalGoal - noCommaSiteSoFar;
 
        var supporterProgress = (noCommaSiteSoFar / noCommaSiteFinalGoal) * 100;
 
        var matchProgress = (noCommaSiteMatchCount / noCommaSiteFinalGoal) * 100;
 
        var needProgress = 100 - matchProgress;
 
        var needProgress = supporterProgress + (100 - matchProgress);
 

	
 
        $('#siteprogressbar').
 
            multiprogressbar({ parts: [
 
                { value: supporterProgress,
 
                  text: noCommaSiteSoFar.toLocaleString() + " have joined!",
 
                  barClass: "progress", textClass: "soFarText" },
 
                { value: needProgress,
 
                  text: leftOver.toLocaleString() + " more needed",
 
                  barClass: "final-goal", textClass: "goalText" },
 
                { value: 100,
 
                  text: noCommaSiteMatchCount.toLocaleString() + " matched!",
 
                  barClass: "progress", textClass: "soFarText" },
0 comments (0 inline, 0 general)