Changeset - 52bcf1152af8
[Not reviewed]
0 1 0
Brett Smith (brett) - 6 years ago 2016-11-29 18:29:12
brett@sfconservancy.org
js: Set default noCommaSiteMiddleGoal.
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/js/supporter-page.js
Show inline comments
...
 
@@ -14,24 +14,27 @@ var $window = $(window);
 
$window.load(function() {
 
    var $selectorLink = supportTypeSelector(window.location.hash);
 
    if ($selectorLink.length > 0) {
 
        $window.scrollTop($selectorLink.offset().top);
 
    }
 
});
 

	
 
$(document).ready(function() {
 
    var siteFinalGoal = $('span#site-fundraiser-final-goal').text();
 
    var noCommaSiteFinalGoal = parseInt(siteFinalGoal.replace(/,/g, ""));
 
    var siteMiddleGoal = $('span#site-fundraiser-middle-goal').text();
 
    var noCommaSiteMiddleGoal = parseInt(siteMiddleGoal.replace(/,/g, ""));
 
    if (!noCommaSiteMiddleGoal) {
 
        noCommaSiteMiddleGoal = 0;
 
    }
 
    var siteSoFar = $('span#site-fundraiser-so-far').text();
 
    var noCommaSiteSoFar = parseInt(siteSoFar.replace(/,/g, ""));
 
    var siteMatchCount = $('span#site-fundraiser-match-count').text();
 
    var noCommaSiteMatchCount = parseInt(siteMatchCount.replace(/,/g, ""));
 
    if (! noCommaSiteMatchCount) {
 
        noCommaSiteMatchCount = "0";
 
    }
 
    var noCommaMatchFinalGoal = noCommaSiteFinalGoal - noCommaSiteMatchCount;
 
    var goal  = $('span#fundraiser-goal').text();
 
    var soFar = $('span#fundraiser-so-far').text();
 
    var donationCount = $('span#fundraiser-donation-count').text();
 
    var noCommaGoal = parseFloat(goal.replace(/,/g, ""));
0 comments (0 inline, 0 general)