Skip to content

Commit

Permalink
fix category and operation over hashtags (#77)
Browse files Browse the repository at this point in the history
* fix category and operation over hashtags

* bump version

* update gemfiles
  • Loading branch information
microstudi committed Apr 8, 2021
1 parent 8c67f98 commit f9cf90a
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 18 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -118,6 +118,8 @@
}
});
}
// sync tags
updateHashtagLayers();
}
});

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions gemfiles/decidim_0.22.gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions gemfiles/decidim_0.23.2.gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions gemfiles/decidim_0.23.gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/decidim/decidim_awesome/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f9cf90a

Please sign in to comment.