Map legend markers now have the proper color

This commit is contained in:
echarp 2016-05-23 01:51:45 +02:00
parent 7f3ca0e920
commit 1d5eac21f2
10 changed files with 93215 additions and 5 deletions

View File

@ -23,6 +23,10 @@
// Left align the map controls place in the top right corner
form.leaflet-control-layers-list label
text-align: left
.awesome-marker
height: auto
display: inline-block
position: relative
html.iframe #map
width: 100%

View File

@ -6,13 +6,19 @@
%em= params[:tag]
»
%ul#map.list
%ul.list#map
%li
= link_to maps_path format: :json do
%em.fa.fa-calendar
.awesome-marker.awesome-marker-icon-blue
%i.icon-white.fa.fa-calendar
= Event.model_name.human
- markerColors = ['blue', 'red', 'darkred', 'orange', 'green', 'darkgreen',
'purple', 'darkpuple', 'cadetblue']
- idx = 1
- Kind.all.each do |kind|
%li
= link_to map_path kind.name, format: :json do
%em.fa{ class: "fa-#{kind.icon}" }
.awesome-marker{ class: "awesome-marker-icon-#{markerColors[idx % markerColors.length]}" }
%i.icon-white.fa{ class: "fa-#{kind.icon}" }
= Kind.human_attribute_name("name_#{kind.name}")
- idx += 1

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,21 @@
(function() {
$(document).ready(function() {
return tinyMCE.init({
schema: 'html5',
menubar: false,
language: 'fr_FR',
selector: 'textarea.description',
content_css: '/assets/application-c34c3ba2010790dceea8b71dba0bf37f4895c79e2154218b2d7759d721fa1e59.css',
entity_encoding: 'raw',
add_unload_trigger: true,
browser_spellcheck: true,
toolbar: [' bold italic strikethrough | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | link image media insertdatetime charmap table | undo redo | searchreplace | code visualblocks preview fullscreen'],
plugins: 'lists, advlist, autolink, link, image, charmap, paste, print, preview, table, fullscreen, searchreplace, media, insertdatetime, visualblocks, visualchars, wordcount, contextmenu, code'
});
});
$(document).on('page:receive', function() {
return tinymce.remove();
});
}).call(this);