Skip to content

Commit

Permalink
fix remaining map legend behaviour and start version 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpeixe committed Sep 16, 2016
1 parent d9892ca commit bc70004
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#JEO
v1.0.7
v1.0.8

JEO WordPress Theme acts as a geojournalism platform which allows news organizations, bloggers and NGOs to publish news stories as layers of information on digital maps. With JEO, creating the interaction between data layers and contextual information is much more intuitive and interactive. The theme is ready for multilingual content and facilitates the publishing tasks.

Expand Down
2 changes: 1 addition & 1 deletion inc/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function scripts() {
/*
* Local
*/
wp_enqueue_script('jeo', get_template_directory_uri() . '/inc/js/jeo.js', array('mapbox-js', 'underscore', 'jquery'), '0.4.3');
wp_enqueue_script('jeo', get_template_directory_uri() . '/inc/js/jeo.js', array('mapbox-js', 'underscore', 'jquery'), '0.4.5');

wp_enqueue_script('jeo.groups', get_template_directory_uri() . '/inc/js/groups.js', array('jeo'), '0.2.7');

Expand Down
13 changes: 3 additions & 10 deletions inc/js/jeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,8 @@ var jeo = {};
/*
* Legends
*/
if(conf.legend) {
map.legendControl.addLegend(conf.legend);
}
if(conf.legend_full)
jeo.enableDetails(map, conf.legend, conf.legend_full);
jeo.enableDetails(map, conf.legend_full);

/*
* Fullscreen
Expand Down Expand Up @@ -236,7 +233,6 @@ var jeo = {};
jeo.loadLayers = function(map, parsedLayers) {

for(var key in map.legendControl._legends) {
console.log(key);
if(key.indexOf('map-details-link') == -1)
map.legendControl.removeLegend(key);
}
Expand Down Expand Up @@ -331,12 +327,9 @@ var jeo = {};
/*
* Legend page (map details)
*/
jeo.enableDetails = function(map, legend, full) {
if(typeof legend === 'undefined')
legend = '';
jeo.enableDetails = function(map, full) {

map.legendControl.removeLegend(legend);
map.conf.legend_full_content = legend + '<span class="map-details-link">' + jeo_localization.more_label + '</span>';
map.conf.legend_full_content = '<span class="map-details-link">' + jeo_localization.more_label + '</span>';
map.legendControl.addLegend(map.conf.legend_full_content);

var isContentMap = map.$.parents('.content-map').length;
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://github.com/cardume/jeo
Author: Cardume
Author URI: http://www.cardume.art.br/
Description: Interactive maps and journalism
Version: 1.0.7
Version: 1.0.8
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Tags: black, white, green, light, four-columns, two-columns, responsive-layout, translation-ready, theme-options
Expand Down

0 comments on commit bc70004

Please sign in to comment.