Infra 1683 - Price all donations in USD
Change-Id: I45d3a53bd7b4024534cb356a9a05e0448ccfc2ef
Signed-off-by: Christopher Guindon <chris.guindon@eclipse.org>
diff --git a/assets/public/javascript/scripts.min.js b/assets/public/javascript/scripts.min.js
index fb7a6bb..7fa5b75 100644
--- a/assets/public/javascript/scripts.min.js
+++ b/assets/public/javascript/scripts.min.js
@@ -1 +1 @@
-!function(a,b,c){var d=function(){"bitpay"===$("input:radio[name=type]:checked").val()?($("#choose-amount-container-bitpay").show(),$("#choose-amount-container-paypal").hide(),$("#total-amount-sign").html('<i class="fa fa-btc"></i>'),e($("#choose-amount-container-bitpay .btn-square.active"))):($("#choose-amount-container-bitpay").hide(),$("#choose-amount-container-paypal").show(),$("#total-amount-sign").html("$"),e($("#choose-amount-container-paypal .btn-square.active")))},e=function(a){$(".total-amount").val($(a).val()),$("#other-amount").val("")};a(c).ready(function(a){d(),a(".btn-square").click(function(){a(this).parent().children(".btn-square").removeClass("active"),a(this).addClass("active"),e(this)}),a("#other-amount").click(function(){a("#other-amount").bind("keyup change",function(b){a(".total-amount").html(a(this).val()),a("input[name=amount]").val(a(this).val()),a(".btn-square").removeClass("active")})}),a("input:radio[name=type]").change(d),a(".num-only").keydown(function(b){-1!==a.inArray(b.keyCode,[46,8,9,27,13,110,190])||65==b.keyCode&&(b.ctrlKey===!0||b.metaKey===!0)||b.keyCode>=35&&b.keyCode<=40||(b.shiftKey||b.keyCode<48||b.keyCode>57)&&(b.keyCode<96||b.keyCode>105)&&b.preventDefault()})})}(jQuery,window,document);
\ No newline at end of file
+!function(a,b,c){var d=function(a){$(".total-amount").val($(a).val()),$("#other-amount").val("")};a(c).ready(function(a){a(".btn-square").click(function(){a(this).parent().children(".btn-square").removeClass("active"),a(this).addClass("active"),d(this)}),a("#other-amount").click(function(){a("#other-amount").bind("keyup change",function(b){a(".total-amount").html(a(this).val()),a("input[name=amount]").val(a(this).val()),a(".btn-square").removeClass("active")})}),a(".num-only").keydown(function(b){-1!==a.inArray(b.keyCode,[46,8,9,27,13,110,190])||65==b.keyCode&&(b.ctrlKey===!0||b.metaKey===!0)||b.keyCode>=35&&b.keyCode<=40||(b.shiftKey||b.keyCode<48||b.keyCode>57)&&(b.keyCode<96||b.keyCode>105)&&b.preventDefault()})})}(jQuery,window,document);
\ No newline at end of file
diff --git a/assets/src/javascript/scripts.js b/assets/src/javascript/scripts.js
index 92d6994..72672b9 100644
--- a/assets/src/javascript/scripts.js
+++ b/assets/src/javascript/scripts.js
@@ -11,33 +11,19 @@
* Christopher Guindon (Eclipse Foundation)- initial API and implementation
*/
(function( jQuery, window, document ) {
- var payment_type = function () {
- if ($('input:radio[name=type]:checked').val() === 'bitpay'){
- $('#choose-amount-container-bitpay').show();
- $('#choose-amount-container-paypal').hide();
- $("#total-amount-sign").html('<i class="fa fa-btc"></i>');
- update_amount($('#choose-amount-container-bitpay .btn-square.active'));
- }
- else {
- $('#choose-amount-container-bitpay').hide();
- $('#choose-amount-container-paypal').show();
- $("#total-amount-sign").html('$');
- update_amount($('#choose-amount-container-paypal .btn-square.active'));
- }
- }
+
var update_amount = function (e) {
$('.total-amount').val($(e).val());
$('#other-amount').val('');
}
jQuery(document).ready(function($) {
- payment_type();
$('.btn-square').click(function() {
$(this).parent().children('.btn-square').removeClass('active');
$(this).addClass('active');
update_amount(this);
});
-
+
$('#other-amount').click(function() {
$('#other-amount').bind("keyup change", function(e) {
$('.total-amount').html($(this).val());
@@ -45,9 +31,7 @@
$('.btn-square').removeClass('active');
});
});
-
- $('input:radio[name=type]').change(payment_type);
-
+
$(".num-only").keydown(function(e) {
// Allow: backspace, delete, tab, escape, enter and .
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
diff --git a/content/en_index.php b/content/en_index.php
index cb8de3c..b593e28 100644
--- a/content/en_index.php
+++ b/content/en_index.php
@@ -67,13 +67,6 @@
<button type="button" class="btn btn-primary btn-square" value="100">$100</button>
<button type="button" class="btn btn-primary btn-square" value="250">$250</button>
</div>
- <div id="choose-amount-container-bitpay" style="display:none;">
- <button type="button" class="btn btn-primary btn-square" value="0.05"><i class="fa fa-btc"></i>0.05</button>
- <button type="button" class="btn btn-primary btn-square" value="0.10"><i class="fa fa-btc"></i>0.10</button>
- <button type="button" class="btn btn-primary btn-square active" value="0.15"><i class="fa fa-btc"></i>0.15</button>
- <button type="button" class="btn btn-primary btn-square" value="0.25"><i class="fa fa-btc"></i>0.25</button>
- <button type="button" class="btn btn-primary btn-square" value="1"><i class="fa fa-btc"></i>1</button>
- </div>
<input id="other-amount" type="text" class="num-only margin-top-20" placeholder="Or enter amount..." /></li>
</div>
</div>
diff --git a/credit.php b/credit.php
index 935dd88..4999655 100644
--- a/credit.php
+++ b/credit.php
@@ -40,12 +40,12 @@
$variables['main_container_classes'] = 'container-credit';
$bestFriendsContributions = new FriendsContributionsList($testmode);
-$bestFriendsContributions->selectFriendsContributionsList(0, 6, 'WHERE ((FC.amount >= 100 and FC.currency = "USD") OR (FC.amount >= 0.25 and FC.currency = "BTC")) and F.is_anonymous = 0');
+$bestFriendsContributions->selectFriendsContributionsList(0, 6, 'WHERE FC.amount >= 100 and F.is_anonymous = 0');
$bestFriends = $bestFriendsContributions->getList();
$donationlist_html = $DonationList->displayFriends($bestFriends, 'credit');
$friendsContributions = new FriendsContributionsList($testmode);
-$friendsContributions->selectFriendsContributionsList(0, 40, 'WHERE ((FC.amount >= 35 and FC.amount <= 99.99 and FC.currency = "USD") OR (FC.amount >= 0.15 and FC.amount <= 0.2499 and FC.currency = "BTC")) and F.is_anonymous = 0');
+$friendsContributions->selectFriendsContributionsList(0, 40, 'WHERE FC.amount >= 35 and FC.amount <= 99.99 and F.is_anonymous = 0');
$friends = $friendsContributions->getList();
$donationlist_35_html = $DonationList->displayFriends($friends, 'four-columns');
diff --git a/donorlist.php b/donorlist.php
index 4a451c8..5863b41 100644
--- a/donorlist.php
+++ b/donorlist.php
@@ -56,12 +56,12 @@
$totalFriends = $DonationList->getFriendsCount(FALSE, TRUE, 35);
$friendsContributions = new FriendsContributionsList($debug_mode);
- $friendsContributions->selectFriendsContributionsList($fstart, $pageValue, 'WHERE ((FC.amount >= 35 and FC.amount <= 99.99 and FC.currency = "USD") OR (FC.amount >= 0.15 and FC.amount <= 0.24 and FC.currency = "BTC")) and F.is_anonymous = 0');
+ $friendsContributions->selectFriendsContributionsList($fstart, $pageValue, 'WHERE FC.amount >= 35 and FC.amount <= 99.99 and F.is_anonymous = 0');
$friends = $friendsContributions->getList();
$totalBestFriends = $DonationList->getFriendsCount(FALSE, TRUE, 100);
$bestFriendsContributions = new FriendsContributionsList($debug_mode);
- $bestFriendsContributions->selectFriendsContributionsList($bfstart, $pageValue, 'WHERE ((FC.amount >= 100 AND FC.currency = "USD") OR (FC.amount >= 0.25 AND FC.currency = "BTC")) and F.is_anonymous = 0');
+ $bestFriendsContributions->selectFriendsContributionsList($bfstart, $pageValue, 'WHERE FC.amount >= 100 and F.is_anonymous = 0');
$bestFriends = $bestFriendsContributions->getList();