Skip to content

Commit

Permalink
Merge pull request #237 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Sep 13, 2022
2 parents 29f8a9c + cd983a1 commit ffdf4dd
Show file tree
Hide file tree
Showing 47 changed files with 1,029 additions and 664 deletions.
7 changes: 7 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

15.1 - (2022-09-12)
---------------------------
* Fix: Fix TypeError: Cannot read properties of undefined (reading 'msie')
[avoinea]
* Feature: Multiselect widget - add support for ajax vocabulary
[avoinea]

15.0 - (2022-07-25)
---------------------------
* Upgrade step: Within "Plone > Site Setup > Add-ons" click on
Expand Down
14 changes: 6 additions & 8 deletions eea/facetednavigation/browser/javascript/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Faceted.Form = {
// Handle form submit event
this.area = jQuery('#faceted-results');
this.mode = this.form.data('mode') || 'view';
this.area_html = this.area.html();

// Faceted version
this.version = '';
Expand All @@ -152,14 +153,10 @@ Faceted.Form = {
}

// Handle errors
var area = this.area;
$(document).ajaxError(function(event, request, settings){
jQuery(area).html('' +
'<h3>This site encountered an error trying to fulfill your request</h3>' +
'<p>' +
'If the error persists please contact the site maintainer. ' +
'Thank you for your patience.' +
'</p>');
var self = this;
$(document).ajaxError(function(event, request, settings, thrownError){
jQuery(self.area).html(self.area_html);
console.error("AJAX ERROR", event, request, settings, thrownError);
jQuery(Faceted.Events).trigger(Faceted.Events.AJAX_ERROR);
});

Expand Down Expand Up @@ -237,6 +234,7 @@ Faceted.Form = {
context.area.fadeOut('fast', function(){
if(Faceted.Options.SHOW_SPINNER){
var loading = '<div class="faceted_loading"></div>';
context.area_html = context.area.html();
context.area.html(loading);
context.area.fadeIn(Faceted.Options.FADE_SPEED);
}
Expand Down
2 changes: 1 addition & 1 deletion eea/facetednavigation/browser/static/faceted-edit.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eea/facetednavigation/browser/static/faceted-jquery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eea/facetednavigation/browser/static/faceted-view.min.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions eea/facetednavigation/browser/template/macros.pt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
">
<div id="faceted-results" class="faceted-results"
metal:define-slot="content">
<noscript tal:condition="view_mode">
<tal:results replace="structure python:faceted_html" />
</noscript>
<tal:results replace="structure python:faceted_html" tal:condition="view_mode" />
</div>
</metal:results>
46 changes: 27 additions & 19 deletions eea/facetednavigation/locales/bg/LC_MESSAGES/eea.po
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ msgstr "Преди 5 дни"
msgid "6 months ago"
msgstr "Преди 6 месеца"

#: ../../facetednavigation/widgets/multiselect/interfaces.py:57
msgid "AJAX URL"
msgstr ""

#: ../../facetednavigation/widgets/interfaces.py:55
msgid "Accessor"
msgstr ""
Expand Down Expand Up @@ -80,7 +84,7 @@ msgstr "След заявка филтри"
msgid "All"
msgstr "Всички"

#: ../../facetednavigation/widgets/multiselect/interfaces.py:45
#: ../../facetednavigation/widgets/multiselect/interfaces.py:44
msgid "Allow multiple selections"
msgstr ""

Expand Down Expand Up @@ -129,7 +133,7 @@ msgid "Can select several elements"
msgstr ""

#: ../../facetednavigation/widgets/checkbox/interfaces.py:51
#: ../../facetednavigation/widgets/multiselect/interfaces.py:58
#: ../../facetednavigation/widgets/multiselect/interfaces.py:68
#: ../../facetednavigation/widgets/radio/interfaces.py:24
msgid "Catalog"
msgstr "Референтен каталожен номер"
Expand Down Expand Up @@ -174,7 +178,7 @@ msgstr ""
msgid "Close on select"
msgstr ""

#: ../../facetednavigation/widgets/multiselect/interfaces.py:67
#: ../../facetednavigation/widgets/multiselect/interfaces.py:77
msgid "Close selection popup after each select"
msgstr ""

Expand Down Expand Up @@ -263,7 +267,7 @@ msgid "Default e-tag"
msgstr ""

#: ../../facetednavigation/widgets/checkbox/interfaces.py:19
#: ../../facetednavigation/widgets/multiselect/interfaces.py:19
#: ../../facetednavigation/widgets/multiselect/interfaces.py:18
msgid "Default items (one per line)"
msgstr "Стандартните елементи (по един на ред)"

Expand All @@ -272,7 +276,7 @@ msgid "Default letter to be selected"
msgstr "По подразбиране писмо, да се избере"

#: ../../facetednavigation/widgets/checkbox/interfaces.py:26
#: ../../facetednavigation/widgets/multiselect/interfaces.py:26
#: ../../facetednavigation/widgets/multiselect/interfaces.py:25
msgid "Default operator"
msgstr "Operator"

Expand Down Expand Up @@ -501,7 +505,7 @@ msgid "Future"
msgstr "бъдеще"

#: ../../facetednavigation/widgets/checkbox/interfaces.py:52
#: ../../facetednavigation/widgets/multiselect/interfaces.py:59
#: ../../facetednavigation/widgets/multiselect/interfaces.py:69
#: ../../facetednavigation/widgets/radio/interfaces.py:25
msgid "Get unique values from catalog as an alternative for vocabulary"
msgstr "Получите уникален стойности от каталог, като алтернатива за речник"
Expand Down Expand Up @@ -584,7 +588,7 @@ msgid "Invalid or empty vocabulary provided for this widget. Leave empty for def
msgstr "Невалидни или празни речник е предвидено за тази джаджа. Оставете празно за критерии по подразбиране за сортиране."

#: ../../facetednavigation/widgets/checkbox/widget.pt:31
#: ../../facetednavigation/widgets/multiselect/widget.pt:36
#: ../../facetednavigation/widgets/multiselect/widget.pt:38
#: ../../facetednavigation/widgets/radio/widget.pt:29
msgid "Invalid or empty vocabulary provided for this widget. This widget will be ignored in view mode."
msgstr ""
Expand Down Expand Up @@ -623,7 +627,7 @@ msgid "Less filters"
msgstr "По-малко филтри"

#: ../../facetednavigation/widgets/checkbox/interfaces.py:37
#: ../../facetednavigation/widgets/multiselect/interfaces.py:37
#: ../../facetednavigation/widgets/multiselect/interfaces.py:36
msgid "Let the end-user choose to search with AND or OR between elements"
msgstr ""

Expand Down Expand Up @@ -686,7 +690,7 @@ msgstr "Преместване нагоре"
msgid "Multi Select"
msgstr ""

#: ../../facetednavigation/widgets/multiselect/interfaces.py:44
#: ../../facetednavigation/widgets/multiselect/interfaces.py:43
msgid "Multiselect"
msgstr ""

Expand Down Expand Up @@ -753,7 +757,7 @@ msgid "Numerical range"
msgstr ""

#: ../../facetednavigation/widgets/checkbox/interfaces.py:36
#: ../../facetednavigation/widgets/multiselect/interfaces.py:36
#: ../../facetednavigation/widgets/multiselect/interfaces.py:35
msgid "Operator visible"
msgstr ""

Expand Down Expand Up @@ -830,6 +834,10 @@ msgstr "Позиция"
msgid "Position of the widget."
msgstr "Позиция на джаджа."

#: ../../facetednavigation/widgets/multiselect/interfaces.py:58
msgid "Provide an URL to be used to get and filter items asynchronously e.g.: /search. Your endpoint should filter items by 'q' param and return a JSON like e.g.: {'items': [...]}"
msgstr ""

#: ../../facetednavigation/widgets/interfaces.py:41
msgid "Python name of a factory which can create the implementation object. This must identify an object in a module using the full dotted name."
msgstr "Python името на една фабрика, която може да създаде изпълнението на обекта. Това трябва да идентифицира един обект в модул за използване на пълния пунктирана име."
Expand Down Expand Up @@ -888,7 +896,7 @@ msgid "Reverse"
msgstr "Заден ход:"

#: ../../facetednavigation/widgets/checkbox/interfaces.py:66
#: ../../facetednavigation/widgets/multiselect/interfaces.py:72
#: ../../facetednavigation/widgets/multiselect/interfaces.py:82
#: ../../facetednavigation/widgets/radio/interfaces.py:45
msgid "Reverse options"
msgstr "Обратните опции"
Expand Down Expand Up @@ -924,7 +932,7 @@ msgid "Search in all elements only"
msgstr ""

#: ../../facetednavigation/widgets/checkbox/interfaces.py:27
#: ../../facetednavigation/widgets/multiselect/interfaces.py:27
#: ../../facetednavigation/widgets/multiselect/interfaces.py:26
msgid "Search with AND/OR between elements"
msgstr "Търси с и / или между елементите"

Expand Down Expand Up @@ -962,7 +970,7 @@ msgid "Sort by countable"
msgstr ""

#: ../../facetednavigation/widgets/checkbox/interfaces.py:67
#: ../../facetednavigation/widgets/multiselect/interfaces.py:73
#: ../../facetednavigation/widgets/multiselect/interfaces.py:83
#: ../../facetednavigation/widgets/radio/interfaces.py:46
msgid "Sort options reversed"
msgstr "Опции за сортиране обратна"
Expand Down Expand Up @@ -1125,7 +1133,7 @@ msgid "Visible to"
msgstr "Вижда се от"

#: ../../facetednavigation/widgets/checkbox/interfaces.py:44
#: ../../facetednavigation/widgets/multiselect/interfaces.py:51
#: ../../facetednavigation/widgets/multiselect/interfaces.py:50
#: ../../facetednavigation/widgets/radio/interfaces.py:17
msgid "Vocabulary"
msgstr "Речник"
Expand All @@ -1135,7 +1143,7 @@ msgid "Vocabulary to use to filter sorting criteria. Leave empty for default sor
msgstr "Речник, за да се използва за филтриране на сортиране критерии. Оставете празно за критерии по подразбиране за сортиране."

#: ../../facetednavigation/widgets/checkbox/interfaces.py:45
#: ../../facetednavigation/widgets/multiselect/interfaces.py:52
#: ../../facetednavigation/widgets/multiselect/interfaces.py:51
#: ../../facetednavigation/widgets/radio/interfaces.py:18
msgid "Vocabulary to use to render widget items"
msgstr "Речник, за да използвате, за да направи джаджа елементи"
Expand Down Expand Up @@ -1165,7 +1173,7 @@ msgid "Yesterday"
msgstr "вчера"

#: ../../facetednavigation/widgets/checkbox/widget.pt:36
#: ../../facetednavigation/widgets/multiselect/widget.pt:62
#: ../../facetednavigation/widgets/multiselect/widget.pt:65
msgid "all"
msgstr ""

Expand All @@ -1175,7 +1183,7 @@ msgid "all items"
msgstr "всички елементи"

#: ../../facetednavigation/widgets/checkbox/widget.pt:36
#: ../../facetednavigation/widgets/multiselect/widget.pt:62
#: ../../facetednavigation/widgets/multiselect/widget.pt:65
msgid "any"
msgstr ""

Expand All @@ -1185,12 +1193,12 @@ msgid "in current results"
msgstr "в текущите резултати"

#: ../../facetednavigation/widgets/checkbox/widget.pt:35
#: ../../facetednavigation/widgets/multiselect/widget.pt:61
#: ../../facetednavigation/widgets/multiselect/widget.pt:64
msgid "match"
msgstr ""

#: ../../facetednavigation/widgets/checkbox/widget.pt:34
#: ../../facetednavigation/widgets/multiselect/widget.pt:60
#: ../../facetednavigation/widgets/multiselect/widget.pt:63
msgid "match any/all filters bellow"
msgstr ""

Expand Down
Loading

0 comments on commit ffdf4dd

Please sign in to comment.