Merge pull request #6358 from bugron/feature/map_filter-buttons
Add the filter button and fix superblock's position
This commit is contained in:
@ -83,6 +83,7 @@
|
||||
.map-fixed-header {
|
||||
position: fixed;
|
||||
background: white;
|
||||
padding-top:15px;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
left: 0;
|
||||
@ -91,7 +92,7 @@
|
||||
|
||||
.map-accordion {
|
||||
position: absolute;
|
||||
margin-top: 180px;
|
||||
margin-top: 135px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ $(document).ready(function() {
|
||||
}
|
||||
|
||||
if (String(window.location).match(/\/map$/ig)) {
|
||||
$('.text-center').css('top', '50px');
|
||||
$('.map-fixed-header').css('top', '50px');
|
||||
}
|
||||
|
||||
// map
|
||||
@ -319,6 +319,27 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$('#manipAll').on('click', () => {
|
||||
var showAll = $('#manipAll').hasClass('active');
|
||||
if (showAll) {
|
||||
$.each($('.sr-only'), function(i, item) {
|
||||
if ($(item).text() === ' Complete') {
|
||||
$(item).parents('p').css('display', 'none');
|
||||
$(item).parents('p').addClass('manip-hidden');
|
||||
}
|
||||
});
|
||||
$('#manipAll').text('Show all challenges');
|
||||
return $('#manipAll').removeClass('active');
|
||||
} else {
|
||||
$.each($('.manip-hidden'), function(i, item) {
|
||||
$(item).css('display', 'block');
|
||||
$(item).removeClass('manip-hidden');
|
||||
});
|
||||
$('#manipAll').text('Show incomplete challenges');
|
||||
return $('#manipAll').addClass('active');
|
||||
}
|
||||
});
|
||||
|
||||
$('#showAll').on('click', () => {
|
||||
var mapExpanded = $('#showAll').hasClass('active');
|
||||
if (!mapExpanded) {
|
||||
|
@ -4,9 +4,12 @@ block content
|
||||
p Required challenges are marked with a *
|
||||
.row
|
||||
.col-xs-10.col-xs-offset-1.col-sm-6.col-sm-offset-3.col-md-4.col-md-offset-4
|
||||
.btn.btn-primary.btn-block.active#showAll Collapse all challenges
|
||||
.row
|
||||
.col-xs-12.col-sm-8.col-sm-offset-2.col-md-6.col-md-offset-3
|
||||
.btn.btn-sm.btn-block.btn-primary.active#manipAll Show incomplete challenges
|
||||
.btn.btn-sm.btn-block.btn-primary.active#showAll Collapse all
|
||||
hr
|
||||
#accordion
|
||||
#accordion.map-accordion
|
||||
.button-spacer
|
||||
for superBlock, index in superBlocks
|
||||
h2
|
||||
|
Reference in New Issue
Block a user