forked from gitcoinco/web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request gitcoinco#4658 from gitcoinco/hackathon-featured
Hackathon - add featured bounties
- Loading branch information
Showing
2 changed files
with
24 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -544,33 +544,31 @@ var refreshBounties = function(event, offset, append, do_save_search) { | |
$('.loading').css('display', 'none'); | ||
}); | ||
|
||
if (!document.hackathon) { | ||
explorer.bounties_request = $.get(featuredBountiesURI, function(results, x) { | ||
results = sanitizeAPIResults(results); | ||
|
||
if (results.length === 0 && !append) { | ||
$('.featured-bounties').hide(); | ||
if (localStorage['referrer'] === 'onboard') { | ||
$('.no-results').removeClass('hidden'); | ||
$('#dashboard-content').addClass('hidden'); | ||
} else { | ||
$('.nonefound').css('display', 'none'); | ||
} | ||
explorer.bounties_request = $.get(featuredBountiesURI, function(results, x) { | ||
results = sanitizeAPIResults(results); | ||
|
||
if (results.length === 0 && !append) { | ||
$('.featured-bounties').hide(); | ||
if (localStorage['referrer'] === 'onboard') { | ||
$('.no-results').removeClass('hidden'); | ||
$('#dashboard-content').addClass('hidden'); | ||
} else { | ||
$('.nonefound').css('display', 'none'); | ||
} | ||
} | ||
|
||
var html = renderFeaturedBountiesFromResults(results, true); | ||
var html = renderFeaturedBountiesFromResults(results, true); | ||
|
||
if (html) { | ||
$('.featured-bounties').show(); | ||
$('#featured-card-container').html(html); | ||
} | ||
}).fail(function() { | ||
if (explorer.bounties_request.readyState !== 0) | ||
_alert({ message: gettext('got an error. please try again, or contact [email protected]') }, 'error'); | ||
}).always(function() { | ||
$('.loading').css('display', 'none'); | ||
}); | ||
} | ||
if (html) { | ||
$('.featured-bounties').show(); | ||
$('#featured-card-container').html(html); | ||
} | ||
}).fail(function() { | ||
if (explorer.bounties_request.readyState !== 0) | ||
_alert({ message: gettext('got an error. please try again, or contact [email protected]') }, 'error'); | ||
}).always(function() { | ||
$('.loading').css('display', 'none'); | ||
}); | ||
}; | ||
|
||
window.addEventListener('load', function() { | ||
|
@@ -790,7 +788,7 @@ $(document).ready(function() { | |
// sidebar filters | ||
$('.sidebar_search input[type=checkbox], .sidebar_search label').change(function(e) { | ||
reset_offset(); | ||
refreshBounties(null, 0, false, true); | ||
// refreshBounties(null, 0, false, true); | ||
e.preventDefault(); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters