From f9cf90ac99e7ff1aa46ebda7e23ddcf11a3bf969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Verg=C3=A9s?= Date: Thu, 8 Apr 2021 10:09:02 +0200 Subject: [PATCH] fix category and operation over hashtags (#77) * fix category and operation over hashtags * bump version * update gemfiles --- CHANGELOG.md | 8 ++++---- Gemfile.lock | 6 +++--- .../decidim/decidim_awesome/awesome_map/map.js.es6 | 13 ++++++++++++- gemfiles/decidim_0.22.gemfile.lock | 6 +++--- gemfiles/decidim_0.23.2.gemfile.lock | 6 +++--- gemfiles/decidim_0.23.gemfile.lock | 6 +++--- lib/decidim/decidim_awesome/version.rb | 2 +- 7 files changed, 29 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29420c5ae..1585ede19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,14 @@ v0.6.7 ------ Compatibility: - - Decidim 0.23.3 - - Decidim 0.23.2 - - Decidim v0.23.1 + - Decidim v0.23.x - Decidim v0.23 - Decidim v0.22 Features: - Feature: Truncate description in map popups to configurable character limit + - Add CSS validation and syntax highlighting in CSS boxes editors + - Fix: filter awesome map by hash takes into account the status of categories v0.6.6 ------ @@ -25,7 +25,7 @@ Compatibility: - Decidim v0.22 Features: - - Fix: Prevents overrides for menus not specified in awesomes config + - Fix: Prevents overrides for menus not specified in awesome config - Fix: Respect original @if condition for menu presenter for native menus v0.6.5 diff --git a/Gemfile.lock b/Gemfile.lock index 4c4e05170..c198e6104 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - decidim-decidim_awesome (0.6.6) + decidim-decidim_awesome (0.6.7) decidim-admin (>= 0.22.0, < 0.24) decidim-core (>= 0.22.0, < 0.24) redcarpet (~> 3.4) @@ -493,7 +493,7 @@ GEM mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2021.0225) - mimemagic (0.3.9) + mimemagic (0.3.10) nokogiri (~> 1) rake mini_magick (4.11.0) @@ -513,7 +513,7 @@ GEM netrc (0.11.0) nio4r (2.5.7) nobspw (0.6.2) - nokogiri (1.11.2) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) oauth (0.5.5) diff --git a/app/assets/javascripts/decidim/decidim_awesome/awesome_map/map.js.es6 b/app/assets/javascripts/decidim/decidim_awesome/awesome_map/map.js.es6 index 1d9d81983..fda9a800c 100644 --- a/app/assets/javascripts/decidim/decidim_awesome/awesome_map/map.js.es6 +++ b/app/assets/javascripts/decidim/decidim_awesome/awesome_map/map.js.es6 @@ -108,7 +108,7 @@ // if it's a children, put the parent to indeterminate indeterminateInput(cat.parent); } else { - // show group of markers + // hide group of markers map.removeLayer(layer.group); // if it's a children, put the parent to indeterminate cat.children().forEach((c) => { @@ -118,6 +118,8 @@ } }); } + // sync tags + updateHashtagLayers(); } }); @@ -146,6 +148,15 @@ map.addLayer(layer.group); } }); + // hide non-selected categories + $(".awesome_map-categories-selector:not(:checked)").each((_idx, el) => { + const layer = layers[$(el).closest("label").data("layer")]; + console.log(el, layer, map) + if(layer) { + map.addLayer(layer.group); + map.removeLayer(layer.group); + } + }); }; // hashtag events diff --git a/gemfiles/decidim_0.22.gemfile.lock b/gemfiles/decidim_0.22.gemfile.lock index 8ed7f78fa..e4ae34951 100644 --- a/gemfiles/decidim_0.22.gemfile.lock +++ b/gemfiles/decidim_0.22.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - decidim-decidim_awesome (0.6.6) + decidim-decidim_awesome (0.6.7) decidim-admin (>= 0.22.0, < 0.24) decidim-core (>= 0.22.0, < 0.24) redcarpet (~> 3.4) @@ -490,7 +490,7 @@ GEM mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2021.0225) - mimemagic (0.3.9) + mimemagic (0.3.10) nokogiri (~> 1) rake mini_magick (4.11.0) @@ -510,7 +510,7 @@ GEM netrc (0.11.0) nio4r (2.5.7) nobspw (0.6.2) - nokogiri (1.11.2) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) oauth (0.5.5) diff --git a/gemfiles/decidim_0.23.2.gemfile.lock b/gemfiles/decidim_0.23.2.gemfile.lock index 9006cd010..027e12b1c 100644 --- a/gemfiles/decidim_0.23.2.gemfile.lock +++ b/gemfiles/decidim_0.23.2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - decidim-decidim_awesome (0.6.6) + decidim-decidim_awesome (0.6.7) decidim-admin (>= 0.22.0, < 0.24) decidim-core (>= 0.22.0, < 0.24) redcarpet (~> 3.4) @@ -493,7 +493,7 @@ GEM mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2021.0225) - mimemagic (0.3.9) + mimemagic (0.3.10) nokogiri (~> 1) rake mini_magick (4.11.0) @@ -513,7 +513,7 @@ GEM netrc (0.11.0) nio4r (2.5.7) nobspw (0.6.2) - nokogiri (1.11.2) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) oauth (0.5.5) diff --git a/gemfiles/decidim_0.23.gemfile.lock b/gemfiles/decidim_0.23.gemfile.lock index e74bae6ac..4885be9ad 100644 --- a/gemfiles/decidim_0.23.gemfile.lock +++ b/gemfiles/decidim_0.23.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - decidim-decidim_awesome (0.6.6) + decidim-decidim_awesome (0.6.7) decidim-admin (>= 0.22.0, < 0.24) decidim-core (>= 0.22.0, < 0.24) redcarpet (~> 3.4) @@ -498,7 +498,7 @@ GEM mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2021.0225) - mimemagic (0.3.9) + mimemagic (0.3.10) nokogiri (~> 1) rake mini_magick (4.11.0) @@ -518,7 +518,7 @@ GEM netrc (0.11.0) nio4r (2.5.7) nobspw (0.6.2) - nokogiri (1.11.2) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) oauth (0.5.5) diff --git a/lib/decidim/decidim_awesome/version.rb b/lib/decidim/decidim_awesome/version.rb index 0dac9a1c7..8ebf4e595 100644 --- a/lib/decidim/decidim_awesome/version.rb +++ b/lib/decidim/decidim_awesome/version.rb @@ -3,7 +3,7 @@ module Decidim # This holds the decidim-decidim_awesome version. module DecidimAwesome - VERSION = "0.6.6" + VERSION = "0.6.7" COMPAT_DECIDIM_VERSION = [">= 0.22.0", "< 0.24"].freeze end end