Changeset - efe90bd2d04e
[Not reviewed]
0 3 0
Bradley Kuhn (bkuhn) - 7 years ago 2015-03-09 15:46:16
bkuhn@ebb.org
Better animation effects when donate link clicked.

The banner always faded in/out, but now other texts can be designated
with the class 'donate-box-highlight' and those will fade out and fade
back in with bold and slightly larger font.
3 files changed with 17 insertions and 9 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/npoacct/index.html
Show inline comments
...
 
@@ -106,13 +106,13 @@ el.attachEvent('on'+ev, function() {handler.apply(el);});
 
<h3>Support NPO Accounting Project Now!</h3>
 
$<span id="fundraiser-so-far">{{ fundgoal.fundraiser_so_far_amount|floatformat:0|intcomma }}</span> raised toward<br/>
 
our $<span id="fundraiser-goal">{{ fundgoal.fundraiser_goal_amount|floatformat:0|intcomma  }}</span> goal.<br/>
 
<div id="progressbar"><span id="fundraiser-percentage">(i.e., {{ fundgoal.percentage_there|floatformat:1 }}%)</span></div>
 
<p style="font-size: 75%">(Progress bar updated daily.)</p>
 
<a id="donate" style="text-decoration:none"></a>
 
<h3>Help us reach our goal:</h3>
 
<h3 class="donate-box-highlight">Help us reach our goal:</h3>
 

	
 
<!-- PayPal start -->
 
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
 
<input type="hidden" name="cmd" value="_s-xclick">
 
<input type="hidden" name="hosted_button_id" value="3VRTJALJ5PQRW">
 
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" style="border:0" name="submit" alt="Donate Now!">
...
 
@@ -201,13 +201,13 @@ evbind(document.getElementById('bank-account-form'), 'submit',
 
});
 

	
 
</script>
 
- Balanced end -->
 

	
 
<p>
 
Other donation methods:
 
  <span class="donate-box-highlight">Other donation methods:</span>
 
<div class="toggle-unit">
 
    <h4 class="toggle-control" data-text="Wire Transfer" 
 
    data-expanded-text="Wire Transfer:">Wire Transfer</h4>
 
    <div class="toggle-content">
 
        Please
 
            contact <a href="mailto:accounting@sfconservancy.org">Conservancy
www/conservancy/static/supporter-page.js
Show inline comments
...
 
@@ -56,16 +56,24 @@ $(document).ready(function() {
 
        }
 
    });
 
    $('a.donate-now')
 
      .addClass('clickable')
 
      .bind('click', function() {
 
        var $control = $('#donate-box');
 
        var $otherTextControl = $('.donate-sidebar');
 

	
 
        $control.toggleClass('expanded');
 
        $control.find('.toggle-content').slideUp("slow");
 
        $control.find('.toggle-content').slideDown("slow");
 
        setTimeout(function() { $control.find('.toggle-content').slideUp(100);
 
                                $control.toggleClass('expanded');
 
                                $control.find('.toggle-content').slideDown(800).fadeOut(10);
 
                                $otherTextControl.find('.donate-box-highlight').fadeOut(100);
 
                              }, 300);
 
          setTimeout(function() { $control.find('.toggle-content').fadeIn(2000);
 
                                  $otherTextControl.find('.donate-box-highlight')
 
                                  .css({'font-weight': 'bold', 'font-size' : '110%' });
 
                                  $otherTextControl.find('.donate-box-highlight').fadeIn(10000);
 
                                }, 500);
 
    });
 
    $(".t-shirt-size-selector").hide();
 
    $('input[name=on0]:radio').change(function() {
 
        var input=$(this);
 
        var tShirtSelector = input.parent().children('.t-shirt-size-selector')
 
        var noShippingSelector = input.parent().children('input#no_shipping');
www/conservancy/templates/base_compliance.html
Show inline comments
...
 
@@ -16,33 +16,33 @@
 
<tr><td style="text-align:center;padding:10px;padding-bottom:10px;">
 
<div id="donate-box" class="toggle-unit"><h1 class="toggle-content">Support
 
    Now!</h1></div>
 

	
 
<h3>Support GPL Compliance Now!</h3>
 

	
 
<p>Support our GPL compliance work now &amp; <strong>donations count double!</strong></p>
 
<p>Support our GPL compliance work now &amp; <span class="donate-box-highlight">donations count double!</span></p>
 

	
 
{% cache 3600 compliancedonation fundgoal.fundraiser_so_far_amount %}
 
$<span id="fundraiser-so-far">{{ fundgoal.fundraiser_so_far_amount|floatformat:0|intcomma }}</span>
 
of $<span id="fundraiser-goal">{{ fundgoal.fundraiser_goal_amount|floatformat:0|intcomma  }}</span> match met.<br/>
 
<div id="progressbar"><span id="fundraiser-percentage">(i.e., {{ fundgoal.percentage_there|floatformat:1 }}%)</span></div>
 
{% endcache %}
 

	
 
<p>Donate now via PayPal:
 
<p><span class="donate-box-highlight">Donate now via PayPal:</span>
 
</p>
 
<!-- PayPal start -->
 
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
 
<input type="hidden" name="cmd" value="_s-xclick">
 
<input type="hidden" name="hosted_button_id" value="4ZKJN4F9BMFAS">
 
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" style="border:0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 
<img alt="" style="border:0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
 
</form>
 
<!-- PayPal end -->
 

	
 
<p>Or, <a href="/supporter/#annual"><strong>become a Conservancy
 
      Supporter</strong></a> (&mdash; a better option if you're donating more
 
<p>Or, <a href="/supporter/#annual"><span class="donate-box-highlight">become a Conservancy
 
      Supporter</span></a> (&mdash; a better option if you're donating more
 
      than $120, since you'll get a t-shirt!).</p>
 
</td></tr></table>
 
</div>
 
<div class="content-with-donate-sidebar">
 
    <div id="container">
 
         <div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
0 comments (0 inline, 0 general)