Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Jan 8, 2019
2 parents 44b0141 + cf4e127 commit 1ff5a27
Show file tree
Hide file tree
Showing 28 changed files with 52 additions and 59 deletions.
4 changes: 2 additions & 2 deletions app/assets/onepager/js/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ $(document).ready(function() {
}
set_metadata();
// jquery bindings
$('#advanced_toggle').click(function() {
$('#advanced_toggle').on('click', function() {
advancedToggle();
});
$('#amount').on('keyup blur change', updateEstimate);
$('#token').on('change', updateEstimate);
$('#send').click(function(e) {
$('#send').on('click', function(e) {
e.preventDefault();
if ($(this).hasClass('disabled'))
return;
Expand Down
8 changes: 4 additions & 4 deletions app/assets/v2/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $(document).ready(function() {
$('.header').css('overflow', 'visible');
}

$('.nav-link.dropdown-toggle').click(function(e) {
$('.nav-link.dropdown-toggle').on('click', function(e) {
e.preventDefault();
var parent = $(this).parents('.nav-item');

Expand All @@ -48,7 +48,7 @@ $(document).ready(function() {
});

// get started modal
$("a[href='/get']").click(function(e) {
$("a[href='/get']").on('click', function(e) {
e.preventDefault();
var url = $(this).attr('href');

Expand All @@ -60,7 +60,7 @@ $(document).ready(function() {
});

// bust the cache every time the user interacts with github
$("[href^='/_github']").click(function(e) {
$("[href^='/_github']").on('click', function(e) {
var timestamp = Date.now() / 1000 | 0;

Cookies.set('last_github_auth_mutation', timestamp);
Expand All @@ -86,7 +86,7 @@ $(document).ready(function() {
$(this).attr('src', $(this).attr('old-src'));
});
if (!$.fn.collapse) {
$('.navbar-toggler').click(function() {
$('.navbar-toggler').on('click', function() {
var toggle = $(this).attr('aria-expanded');

console.log(toggle);
Expand Down
8 changes: 6 additions & 2 deletions app/assets/v2/js/landing_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ $(document).ready(function() {
$toggleIndicator.css('left', `${$funderToggle.innerWidth() + 20}px`);
$sections.addClass('contributor-section');
}
$funderToggle.click(switchToFunder);
$contributorToggle.click(switchToContributor);
$funderToggle.on('click', function(e) {
switchToFunder(e);
});
$contributorToggle.on('click', function(e) {
switchToContributor(e);
});
switchToFunder();

const prevScroll = localStorage.getItem('scrollTop');
Expand Down
6 changes: 3 additions & 3 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ var show_extend_deadline_modal = function() {
$('.select2-selection__rendered').removeAttr('title');
});
// removes search field in all but the 'denomination' dropdown
$('.select2-container').click(function() {
$('.select2-container').on('click', function() {
$('.select2-container .select2-search__field').remove();
});

Expand Down Expand Up @@ -1366,11 +1366,11 @@ const render_activity = function(result, all_results) {
activities.filter(function(activity) {
return activity.uninterest_possible;
}).forEach(function(activity) {
$('#remove-' + activity.name).click(() => {
$('#remove-' + activity.name).on('click', function() {
uninterested(result.pk, activity.profileId);
return false;
});
$('#remove-slash-' + activity.name).click(() => {
$('#remove-slash-' + activity.name).on('click', function() {
uninterested(result.pk, activity.profileId, true);
return false;
});
Expand Down
6 changes: 4 additions & 2 deletions app/assets/v2/js/pages/bulk_payout.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ $(document).ready(function($) {
}
};

$('#acceptBounty').click(function(e) {
$('#acceptBounty').on('click', function(e) {
e.preventDefault();

if (!$('#terms').is(':checked')) {
Expand Down Expand Up @@ -180,7 +180,9 @@ $(document).ready(function($) {
add_row();
update_registry();

$('.add_another').click(add_row);
$('.add_another').on('click', function() {
add_row();
});
});
});

Expand Down
4 changes: 2 additions & 2 deletions app/assets/v2/js/pages/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ var resetFilters = function(resetKeyword) {
$('input[name=idx_status][value=open]').prop('checked', true);
$('.search-area input[type=text]').text(getURLParams('q'));

$('#onboard-alert').click(function(e) {
$('#onboard-alert').on('click', function(e) {

if (!$('.no-results').hasClass('hidden'))
$('.nonefound').css('display', 'block');
Expand Down Expand Up @@ -660,7 +660,7 @@ $(document).ready(function() {
});

// sidebar clear
$('.dashboard #clear').click(function(e) {
$('.dashboard #clear').on('click', function(e) {
e.preventDefault();
resetFilters(true);
reset_offset();
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/increase_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $(document).ready(function() {
});

// submit bounty button click
$('#increaseFunding').click(function(e) {
$('#increaseFunding').on('click', function(e) {
try {
bounty_address();
} catch (exception) {
Expand Down
19 changes: 2 additions & 17 deletions app/assets/v2/js/pages/kudos_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $(document).ready(function() {
});


$('.kudos_levitate_container, #kudos-image').click(function() {
$('.kudos_levitate_container, #kudos-image').on('click', function() {

pct_msg_should_be_shown = 0; // Disabled, *for now*. I will convince people that
// the Kudos should say something at some point :) - KO
Expand All @@ -58,7 +58,7 @@ $(document).ready(function() {
return;
}

$('#getKudos').click(function() {
$('#getKudos').on('click', function() {
if (numClones > kudosNumClonesAvailable) {
alert('Cannot make ' + numClones + ' clone(s). ' + kudosNumClonesAvailable + ' clones available!');
return;
Expand Down Expand Up @@ -158,18 +158,3 @@ $('#copyLink').on('click', () => {
document.execCommand('copy');
$('.tooltip-share .title-tooltip').html('Copied Link');
});

// $('#getKudos').click(function() {


// $(document).ready(function() {
// let address = web3.eth.coinbase;
// console.log(address);
// $.get('/api/v0.1/kudos?lister=' + address, function(results, status) {
// console.log(status)
// console.log(results)
// let numKudos = results.length;
// results.forEach(renderKudos)
// // renderKudos(results)
// })
// })
6 changes: 3 additions & 3 deletions app/assets/v2/js/pages/kudos_send.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ $(document).ready(function() {

set_metadata();
// jquery bindings
$('#advanced_toggle').click(function(e) {
$('#advanced_toggle').on('click', function(e) {
e.preventDefault();
advancedToggle();
});


$('#send_to_toggle').click(function(e) {
$('#send_to_toggle').on('click', function(e) {
e.preventDefault();
if ($(this).hasClass('github')) {
$(this).text(gettext('Send to ETH Address'));
Expand All @@ -202,7 +202,7 @@ $(document).ready(function() {

// Step 1
// Kudos send button is clicked
$('#send').click(function(e) {
$('#send').on('click', function(e) {

e.preventDefault();

Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/leaderboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $(document).ready(function() {
$(this).css('width', `${width}%`);
});

$('.clickable-row').click(function(e) {
$('.clickable-row').on('click', function(e) {
if (typeof $(this).data('href') == 'undefined') {
return;
}
Expand Down
6 changes: 3 additions & 3 deletions app/assets/v2/js/pages/new_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ $(document).ready(function() {
$('.select2-selection__rendered').removeAttr('title');
});
// removes search field in all but the 'denomination' dropdown
$('.select2-container').click(function() {
$('.select2-container').on('click', function() {
$('.select2-container .select2-search__field').remove();
});
// denomination field
Expand All @@ -182,12 +182,12 @@ $(document).ready(function() {
}, 10);
};

$('#hiringRightNow').click(function() {
$('#hiringRightNow').on('click', function() {
open_hiring_panel(true);
});


$('#advancedLink a').click(function(e) {
$('#advancedLink a').on('click', function(e) {
e.preventDefault();
var target = $('#advanced_container');

Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ onboard.watchMetamask = function() {
document.alreadyFoundMetamask = true;
$('.controls').show();
$('#metamask-video').hide();
$('#next-btn').click(function(e) {
$('#next-btn').on('click', function(e) {
var eth_address = $('#eth_address').val();

$.get('/onboard/contributor/', {eth_address: eth_address});
Expand Down
4 changes: 2 additions & 2 deletions app/assets/v2/js/pages/process_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ window.onload = function() {
$.get(uri, fulfillmentCallback);
});

$('#goBack').click(function(e) {
$('#goBack').on('click', function(e) {
var url = window.location.href;
var new_url = url.replace('process?source', 'details?url');

Expand Down Expand Up @@ -122,7 +122,7 @@ window.onload = function() {
};


$('#acceptBounty').click(function(e) {
$('#acceptBounty').on('click', function(e) {
try {
bounty_address();
} catch (exception) {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/process_faucet.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $(document).ready(function() {
$('#admin_faucet_form').submit();
};

$('#submitFaucet').click(function(e) {
$('#submitFaucet').on('click', function(e) {
e.preventDefault();
$('.js-submit').attr('disabled', 'disabled');
$('#loadingImg').show();
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/tokens_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(document).ready(function() {
$('.select2-selection__rendered').removeAttr('title');
});

$('input[type=submit]').click(function(e) {
$('input[type=submit]').on('click', function(e) {
// acutally submit form if data is present
if ($('#network').val()) {
return;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ const showMore = (length = 400) => {
}
});

$('.morelink').click((event) => {
$('.morelink').on('click', function(event) {
if ($(event.currentTarget).hasClass('less')) {
$(event.currentTarget).removeClass('less');
$(event.currentTarget).html(expand);
Expand Down
4 changes: 2 additions & 2 deletions app/assets/v2/js/toolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ $(document).ready(function() {
_alert({ message: response.responseJSON.error }, 'error');
}

$('.vote-up').click(function() {
$('.vote-up').on('click', function() {
var el = $(this);
var toolId = el.data('tool-id');

$.post('/actions/tool/' + toolId + '/voteUp', {}, function(response) {
voteCallback(response, toolId, 1);
}).fail(failVoteCallback);
});
$('.vote-down').click(function() {
$('.vote-down').on('click', function() {
var el = $(this);
var toolId = el.data('tool-id');

Expand Down
4 changes: 3 additions & 1 deletion app/dashboard/management/commands/cleanup_dupe_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
'''

from django.contrib.auth.models import User
from django.core.management.base import BaseCommand
from django.db.models import Count
from django.db.models.functions import Lower

from app.utils import sync_profile
from dashboard.models import Profile


Expand Down Expand Up @@ -135,3 +135,5 @@ def handle(self, *args, **options):
profile = profiles.first()
profile.user = user
profile.save()
else:
sync_profile(user.username, user, hide_profile=True)
2 changes: 1 addition & 1 deletion app/dashboard/templates/shared/issue_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h5 class="font-subheader">{% trans "Details" %}</h5>
</label>
</div>
</div>
<div id="reservedForDiv" style="display: none !important;">
<div id="reservedForDiv">
<label class="form__label" for="reservedFor">{% trans 'Reserved For' %}</label>
<select name="reservedFor" id="reservedFor" class="username-search custom-select"></select>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/retail/templates/emails/new_kudos.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
position: relative;
width: 330px;
max-width: 100%;
margin-top: 400px;
margin-top: -400px;
}
</style>
<div>
Expand Down
2 changes: 1 addition & 1 deletion app/retail/templates/newtoken.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h4>
<script>
$('#newtoken').validate();
$(document).ready(function() {
$('#newtoken input.btn-go').click(function(e){
$('#newtoken input.btn-go').on('click', function(e){
mixpanel.track("New Token Request", {});
setTimeout(function(){
$('#newtoken input.btn-go').attr('disabled','disabled');
Expand Down
2 changes: 1 addition & 1 deletion app/retail/templates/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ <h2 class="text-center">{% trans "Browse More Results, By Programming Language"
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script src="{% static "v2/js/pages/results.js" %}"></script>
<script>
$("#mesh_preview").click(function(e){
$("#mesh_preview").on('click', function(e){
$("#mesh_network_jobs_holder").html('<iframe src="{% url 'viz_graph' %}?keyword={{keyword}}" style="width: 100%; height: 600px; border-left: 1px #dddddd solid; border-bottom: 1px #dddddd solid; " frameBorder="0">');
e.preventDefault();
});
Expand Down
2 changes: 1 addition & 1 deletion app/retail/templates/settings/account.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h5 class="font-subheader">{% trans "Delete My Account" %}</h5>
{% block scripts %}
<script>
$(document).ready(function() {
$("#pull_from_metamask").click(function(e){
$("#pull_from_metamask").on('click', function(e){
if(web3 && typeof web3.eth.coinbase != 'undefined'){
$("input[name=preferred_payout_address]").val(web3.eth.coinbase);
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/retail/templates/settings/email.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h5>{% trans "Email Preferences" %}</h5>
<script>
$(document).ready(function(){
// select / deselect all
$('#select_all').click(function(e) {
$('#select_all').on('click', function(e) {
e.preventDefault();
if($(this).data('direction') == '+'){
$('.priv_checkbox').prop('checked', true);
Expand Down
2 changes: 1 addition & 1 deletion app/retail/templates/settings/matching.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h5>{% trans "Matching Preferences" %}</h5>
}};
flash_pull_gh();
$("input[name=github]").keyup(flash_pull_gh);
$('#pull_gh').click(function(e){
$('#pull_gh').on('click', function(e){
e.preventDefault();
keywordprefill();
});
Expand Down
2 changes: 1 addition & 1 deletion app/retail/templates/slack.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h4 class="font-smaller-1 pt-0">({{ num_slack }} online)</h4>
<script>
$('#whitepaper').validate();
$(document).ready(function() {
$('#whitepaper input.btn-go').click(function(e){
$('#whitepaper input.btn-go').on('click', function(e){
mixpanel.track("Whitepaper New Request", {});
setTimeout(function(){
$('#whitepaper input.btn-go').attr('disabled','disabled');
Expand Down
Loading

0 comments on commit 1ff5a27

Please sign in to comment.