Changeset - 99ff4771a1a5
[Not reviewed]
0 1 0
Bradley Kuhn (bkuhn) - 6 years ago 2016-02-24 03:21:22
bkuhn@ebb.org
Change bar to show totals in a different way.

The achieved! text is removed, to just show the total Supporters, and
the middle part is how many more we need right now.
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/js/supporter-page.js
Show inline comments
...
 
@@ -34,15 +34,17 @@ $(document).ready(function() {
 
    if (noCommaSiteSoFar >= noCommaSiteMiddleGoal) {
 
        // We've got
 
        var moreCount = noCommaSiteSoFar - noCommaSiteMiddleGoal;
 
        var leftOver = noCommaMatchFinalGoal - (moreCount + 750 + noCommaSiteMatchCount);
 

	
 
        moreCount =  moreCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
 
        $('#siteprogressbar').
 
            multiprogressbar({ parts: [
 
                { value: (noCommaSiteSoFar / noCommaSiteFinalGoal) * 100,
 
                  text: "750 achieved! " + moreCount + " beyond that have joined.",
 
                  text: noCommaSiteSoFar.toLocaleString() + " have joined.",
 
                  barClass: "progress", textClass: "soFarText" },
 
                { value:
 
                  ((noCommaMatchFinalGoal - noCommaSiteMiddleGoal) / noCommaSiteFinalGoal) * 100,
 
                  text: noCommaMatchFinalGoal.toLocaleString() + " will save license compliance work",
 
                  text: leftOver.toLocaleString() + " more needed to save license compliance work",
 
                  barClass: "final-goal", textClass: "goalText" },
 
                {  value: 100,
 
                   text: siteMatchCount + " matched!",
0 comments (0 inline, 0 general)