affichage chantiers pour la métropole de Montpellier (#73652) #135
|
@ -1,5 +1,6 @@
|
|||
$cell-map-height: calc(100vh - 265px);
|
||||
$cell-map-mobile-height: calc(100vh - 108px);
|
||||
$cell-map-height: calc(100vh - 265px) !default;
|
||||
$cell-map-mobile-height: calc(100vh - 108px) !default;
|
||||
$roadwork-width: 400px !default;
|
||||
|
||||
.page-template-roadworks-map {
|
||||
#main-content {
|
||||
|
@ -42,8 +43,8 @@ $cell-map-mobile-height: calc(100vh - 108px);
|
|||
height: calc(#{$cell-map-height} + 2px);
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
width: 25vw;
|
||||
transform: translateX(25vw);
|
||||
width: $roadwork-width;
|
||||
transform: translateX($roadwork-width);
|
||||
transition: transform linear 250ms;
|
||||
padding: 1em;
|
||||
h3 {
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"cache_duration": 3600,
|
||||
"force_async": false,
|
||||
"name": "Chantiers gênants",
|
||||
"template-name": "combo/json/montpellier-chantiers-genants.html",
|
||||
"url": "{{url}}",
|
||||
"form": [
|
||||
{"label": "Adresse du GEOJSON des chantiers gênants", "varname": "url", "required": true}
|
||||
|
@ -32,6 +33,7 @@
|
|||
"cache_duration": 3600,
|
||||
"force_async": false,
|
||||
"name": "Chantiers majeurs",
|
||||
"template-name": "combo/json/montpellier-chantiers-majeurs.html",
|
||||
"url": "{{url}}",
|
||||
"form": [
|
||||
{"label": "Adresse de récupération des fiches des chantiers majeurs", "varname": "url", "required": true}
|
||||
|
|
|
@ -978,3 +978,22 @@ p#help {
|
|||
text-align: right;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.page-template-roadworks-map {
|
||||
.leaflet-marker-icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
.chantier .chantier--libelle {
|
||||
color: #666;
|
||||
}
|
||||
.chantier {
|
||||
padding: 0;
|
||||
> h3 {
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 110%;
|
||||
}
|
||||
> div {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,3 +42,5 @@ $wcs-steps-spacing: 0.7rem;
|
|||
$wcs-step-background: #fbfbfb;
|
||||
|
||||
$or-separator: false;
|
||||
|
||||
$cell-map-mobile-height: calc(100vh - 198px);
|
||||
|
|
|
@ -3,5 +3,37 @@
|
|||
"variables": {
|
||||
"favicon": "montpellier/favicon.png",
|
||||
"theme_color": "#EA5B0C"
|
||||
},
|
||||
"settings": {
|
||||
"combo": {
|
||||
"COMBO_PUBLIC_TEMPLATES.update": {
|
||||
"roadworks-map": {
|
||||
"name": "Une colonne (spéciale carte travaux)",
|
||||
"template": "combo/page_template.html"
|
||||
}
|
||||
},
|
||||
"JSON_CELL_TYPES.update": {
|
||||
"chantiers-genants": {
|
||||
"cache_duration": 3600,
|
||||
"force_async": false,
|
||||
"name": "Chantiers gênants",
|
||||
"template-name": "combo/json/montpellier-chantiers-genants.html",
|
||||
"url": "{{url}}",
|
||||
"form": [
|
||||
{"label": "Adresse du GEOJSON des chantiers gênants", "varname": "url", "required": true}
|
||||
]
|
||||
},
|
||||
"chantiers-majeurs": {
|
||||
"cache_duration": 3600,
|
||||
"force_async": false,
|
||||
"name": "Chantiers majeurs",
|
||||
"template-name": "combo/json/montpellier-chantiers-majeurs.html",
|
||||
"url": "{{url}}",
|
||||
"form": [
|
||||
{"label": "Adresse de récupération des fiches des chantiers majeurs", "varname": "url", "required": true}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,4 +59,26 @@ $(function() {
|
|||
$(this).parent().toggleClass('on');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.page-template-roadworks-map div.cell.map').on('combo:map-feature-prepare', function(ev, info) {
|
||||
info.layer.on('click', function(ev) {
|
||||
var marker = info.layer;
|
||||
var chantier_id = marker.feature.properties.IDCHANTIER || marker.feature.properties.id;
|
||||
var $cell = $('[data-chantier-id=' + chantier_id + ']');
|
||||
if ($cell.hasClass('shown')) {
|
||||
$('.chantier').removeClass('shown');
|
||||
} else {
|
||||
$('.chantier[data-chantier-id!=' + chantier_id + ']').removeClass('shown');
|
||||
$('.chantier').show();
|
||||
$cell.addClass('shown');
|
||||
}
|
||||
});
|
||||
});
|
||||
if ($('.page-template-roadworks-map').length) {
|
||||
$(document).on('combo:cell-loaded combo:roadworks-loaded', function(ev, elem) {
|
||||
$('.chantier').off('click').on('click', function() { $(this).toggleClass('shown'); });
|
||||
});
|
||||
$(document).trigger('combo:roadworks-loaded');
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -16,5 +16,6 @@
|
|||
@import '../includes/back-top';
|
||||
@import '../includes/library';
|
||||
@import '../includes/authentic';
|
||||
@import '../montpellier-ville/chantiers';
|
||||
|
||||
@import 'custom';
|
||||
|
|
Loading…
Reference in New Issue