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 {
|
.map-fixed-header {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background: white;
|
background: white;
|
||||||
|
padding-top:15px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -91,7 +92,7 @@
|
|||||||
|
|
||||||
.map-accordion {
|
.map-accordion {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-top: 180px;
|
margin-top: 135px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (String(window.location).match(/\/map$/ig)) {
|
if (String(window.location).match(/\/map$/ig)) {
|
||||||
$('.text-center').css('top', '50px');
|
$('.map-fixed-header').css('top', '50px');
|
||||||
}
|
}
|
||||||
|
|
||||||
// map
|
// 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', () => {
|
$('#showAll').on('click', () => {
|
||||||
var mapExpanded = $('#showAll').hasClass('active');
|
var mapExpanded = $('#showAll').hasClass('active');
|
||||||
if (!mapExpanded) {
|
if (!mapExpanded) {
|
||||||
|
@ -4,9 +4,12 @@ block content
|
|||||||
p Required challenges are marked with a *
|
p Required challenges are marked with a *
|
||||||
.row
|
.row
|
||||||
.col-xs-10.col-xs-offset-1.col-sm-6.col-sm-offset-3.col-md-4.col-md-offset-4
|
.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
|
hr
|
||||||
#accordion
|
#accordion.map-accordion
|
||||||
.button-spacer
|
.button-spacer
|
||||||
for superBlock, index in superBlocks
|
for superBlock, index in superBlocks
|
||||||
h2
|
h2
|
||||||
|
Reference in New Issue
Block a user