From 76a955b1b86cfe35cabf64561c63de9b034c5a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Wed, 13 May 2020 00:40:06 +0200 Subject: [PATCH 1/5] Unify AK list and submission overview Use tabbed-view for ak list, too Reduce code duplication between submission overview and ak list Cleanup filtering in view Display message when (filtered) AK list is empty Remove submission button from dashboard when event is inactive Closes #70 --- .../templates/AKDashboard/dashboard_row.html | 2 +- .../templates/AKSubmission/ak_list.html | 91 +++++++------- .../templates/AKSubmission/ak_overview.html | 30 +++++ .../{ak_list_table.html => ak_table.html} | 4 + .../AKSubmission/submission_overview.html | 25 +--- AKSubmission/urls.py | 2 +- AKSubmission/views.py | 115 +++++++++++------- 7 files changed, 149 insertions(+), 120 deletions(-) create mode 100644 AKSubmission/templates/AKSubmission/ak_overview.html rename AKSubmission/templates/AKSubmission/{ak_list_table.html => ak_table.html} (94%) diff --git a/AKDashboard/templates/AKDashboard/dashboard_row.html b/AKDashboard/templates/AKDashboard/dashboard_row.html index 36b32af5..4b3e40c5 100644 --- a/AKDashboard/templates/AKDashboard/dashboard_row.html +++ b/AKDashboard/templates/AKDashboard/dashboard_row.html @@ -40,7 +40,7 @@ </a> {% endif %} {% endif %} - {% if 'AKSubmission'|check_app_installed %} + {% if 'AKSubmission'|check_app_installed and event.active %} <a class="dashboard-box btn btn-primary" href="{% url 'submit:submission_overview' event_slug=event.slug %}"> <div class="col-sm-12 col-md-3 col-lg-2 dashboard-button"> diff --git a/AKSubmission/templates/AKSubmission/ak_list.html b/AKSubmission/templates/AKSubmission/ak_list.html index 3e4098bc..ac774bd7 100644 --- a/AKSubmission/templates/AKSubmission/ak_list.html +++ b/AKSubmission/templates/AKSubmission/ak_list.html @@ -1,49 +1,46 @@ -{% extends 'AKSubmission/submission_base.html' %} - {% load i18n %} -{% load fontawesome_5 %} - -{% load tags_AKSubmission %} - -{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AKs" %}{% endblock %} - -{% block imports %} - <style> - /* Prevent wrapping of buttons in AK table */ - .table td:nth-child(5) { - white-space: nowrap; - } - </style> -{% endblock %} - -{% block breadcrumbs %} - {% include "AKSubmission/submission_breadcrumbs.html" %} - <li class="breadcrumb-item"><a - href="{% url 'submit:submission_overview' event_slug=event.slug %}">{% trans "AK Submission" %}</a></li> - <li class="breadcrumb-item active">{% trans "AK List" %}</li> -{% endblock %} - -{% block content %} - <h1>{{ event.name }}: {% trans "AK List" %}</h1> - - {% if categories.count > 0 %} - <b>{% trans 'Categories' %}:</b> - {% category_list categories event.slug %} - {% endif %} - - <br><br> - - {% if tracks.count > 0 %} - <b>{% trans 'Tracks' %}:</b> - {% track_list tracks event.slug %} - {% endif %} - - <br><br> - - {% if filter_condition_string != "" %} - <h2 class="text-secondary">{{ filter_condition_string }}</h2> - {% endif %} - - {% include "AKSubmission/ak_list_table.html" %} -{% endblock %} +<div class="float-right"> + <ul class="nav nav-pills"> + <li class="nav-item"> + <a class="nav-link" href="{% url 'submit:ak_list' event_slug=event.slug %}">{% trans "All AKs" %}</a> + </li> + {% if event.aktrack_set.count > 0 %} + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" + aria-expanded="false">{% trans "Tracks" %}</a> + <div class="dropdown-menu" style=""> + {% for track in event.aktrack_set.all %} + <a class="dropdown-item" + href="{% url 'submit:ak_list_by_track' event_slug=event.slug track_pk=track.pk %}"> + {{ track }}</a> + {% endfor %} + </div> + </li> + {% endif %} + </ul> +</div> + +<h2>{{ table_title }}</h2> + +<noscript> + {% include "AKSubmission/ak_table.html" %} +</noscript> + +<ul class="nav nav-tabs" style="margin-bottom:15px"> + {% for category, _ in categories_with_aks %} + <li class="nav-item"> + <a class="nav-link {% if category.name == active_category %}active{% endif %}" data-toggle="tab" + href="#category_{{ category.pk }}">{{ category.name }}</a> + </li> + {% endfor %} +</ul> + +<div id="akListTabbed" class="tab-content"> + {% for category, AKs in categories_with_aks %} + <div class="tab-pane fade {% if category.name == active_category %}show active{% endif %}" id="category_{{ category.pk }}"> + <p><b>{{ category.name }}:</b> {{ category.description }}</p> + {% include "AKSubmission/ak_table.html" %} + </div> + {% endfor %} +</div> diff --git a/AKSubmission/templates/AKSubmission/ak_overview.html b/AKSubmission/templates/AKSubmission/ak_overview.html new file mode 100644 index 00000000..45342420 --- /dev/null +++ b/AKSubmission/templates/AKSubmission/ak_overview.html @@ -0,0 +1,30 @@ +{% extends 'AKSubmission/submission_base.html' %} + +{% load i18n %} +{% load fontawesome_5 %} + +{% load tags_AKSubmission %} + +{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AKs" %}{% endblock %} + +{% block imports %} + <style> + /* Prevent wrapping of buttons in AK table */ + .table td:nth-child(5) { + white-space: nowrap; + } + </style> +{% endblock %} + +{% block breadcrumbs %} + {% include "AKSubmission/submission_breadcrumbs.html" %} + <li class="breadcrumb-item"><a + href="{% url 'submit:submission_overview' event_slug=event.slug %}">{% trans "AK Submission" %}</a></li> + <li class="breadcrumb-item active">{% trans "AK List" %}</li> +{% endblock %} + +{% block content %} + <h1>{% trans "AKs" %}: {{ event.name }}</h1> + + {% include "AKSubmission/ak_list.html" %} +{% endblock %} diff --git a/AKSubmission/templates/AKSubmission/ak_list_table.html b/AKSubmission/templates/AKSubmission/ak_table.html similarity index 94% rename from AKSubmission/templates/AKSubmission/ak_list_table.html rename to AKSubmission/templates/AKSubmission/ak_table.html index 0f227396..485c982e 100644 --- a/AKSubmission/templates/AKSubmission/ak_list_table.html +++ b/AKSubmission/templates/AKSubmission/ak_table.html @@ -58,6 +58,10 @@ <tr> <td colspan="5" class="small">{{ ak.description }}</td> </tr> + {% empty %} + <tr> + <td colspan="5" class="small">{% trans "There are no AKs in this category yet" %}</td> + </tr> {% endfor %} </tbody> </table> diff --git a/AKSubmission/templates/AKSubmission/submission_overview.html b/AKSubmission/templates/AKSubmission/submission_overview.html index 5c4ab1d0..dd09c528 100644 --- a/AKSubmission/templates/AKSubmission/submission_overview.html +++ b/AKSubmission/templates/AKSubmission/submission_overview.html @@ -63,28 +63,5 @@ </div> {% endif %} - <h2>{% trans "Current AKs" %}</h2> - - <noscript> - {% include "AKSubmission/ak_list_table.html" %} - </noscript> - - <ul class="nav nav-tabs" style="margin-bottom:15px"> - {% for category, _ in categories_with_aks %} - <li class="nav-item"> - <a class="nav-link {% if forloop.first %}active{% endif %}" data-toggle="tab" - href="#category_{{ category.pk }}">{{ category.name }}</a> - </li> - {% endfor %} - </ul> - - <div id="akListTabbed" class="tab-content"> - {% for category, AKs in categories_with_aks %} - <div class="tab-pane fade {% if forloop.first %}show active{% endif %}" id="category_{{ category.pk }}"> - <p><b>{{ category.name }}:</b> {{ category.description }}</p> - {% include "AKSubmission/ak_list_table.html" %} - </div> - {% endfor %} - </div> - + {% include "AKSubmission/ak_list.html" %} {% endblock %} diff --git a/AKSubmission/urls.py b/AKSubmission/urls.py index 3528b45d..982db8a7 100644 --- a/AKSubmission/urls.py +++ b/AKSubmission/urls.py @@ -16,7 +16,7 @@ urlpatterns = [ path('ak/<int:pk>/add_slot/', views.AKSlotAddView.as_view(), name='akslot_add'), path('akslot/<int:pk>/edit/', views.AKSlotEditView.as_view(), name='akslot_edit'), path('akslot/<int:pk>/delete/', views.AKSlotDeleteView.as_view(), name='akslot_delete'), - path('aks/', views.AKListView.as_view(), name='ak_list'), + path('aks/', views.AKOverviewView.as_view(), name='ak_list'), path('aks/category/<int:category_pk>/', views.AKListByCategoryView.as_view(), name='ak_list_by_category'), path('aks/tag/<int:tag_pk>/', views.AKListByTagView.as_view(), name='ak_list_by_tag'), path('aks/track/<int:track_pk>/', views.AKListByTrackView.as_view(), name='ak_list_by_track'), diff --git a/AKSubmission/views.py b/AKSubmission/views.py index 78c2fcde..662d038d 100644 --- a/AKSubmission/views.py +++ b/AKSubmission/views.py @@ -13,10 +13,20 @@ from AKModel.views import FilterByEventSlugMixin from AKSubmission.forms import AKWishForm, AKOwnerForm, AKEditForm, AKSubmissionForm, AKDurationForm -class SubmissionOverviewView(FilterByEventSlugMixin, ListView): +class AKOverviewView(FilterByEventSlugMixin, ListView): model = AKCategory context_object_name = "categories" - template_name = "AKSubmission/submission_overview.html" + template_name = "AKSubmission/ak_overview.html" + wishes_as_category = False + + def filter_aks(self, context, category): + return category.ak_set.all() + + def get_active_category_name(self, context): + return context["categories_with_aks"][0][0].name + + def get_table_title(self, context): + return _("All AKs") def get_context_data(self, *, object_list=None, **kwargs): context = super().get_context_data(object_list=object_list, **kwargs) @@ -27,17 +37,35 @@ class SubmissionOverviewView(FilterByEventSlugMixin, ListView): for category in context["categories"]: aks_for_category = [] - for ak in category.ak_set.all(): - if settings.WISHES_AS_CATEGORY and ak.wish: + for ak in self.filter_aks(context, category): + if self.wishes_as_category and ak.wish: ak_wishes.append(ak) else: aks_for_category.append(ak) categories_with_aks.append((category, aks_for_category)) - if settings.WISHES_AS_CATEGORY: + if self.wishes_as_category: categories_with_aks.append( ({"name": _("Wishes"), "pk": "wish", "description": _("AKs one would like to have")}, ak_wishes)) + context["categories_with_aks"] = categories_with_aks + context["active_category"] = self.get_active_category_name(context) + context['table_title'] = self.get_table_title(context) + + return context + + +class SubmissionOverviewView(AKOverviewView): + model = AKCategory + context_object_name = "categories" + template_name = "AKSubmission/submission_overview.html" + wishes_as_category = settings.WISHES_AS_CATEGORY + + def get_table_title(self, context): + return _("Currently planned AKs") + + def get_context_data(self, *, object_list=None, **kwargs): + context = super().get_context_data(object_list=object_list, **kwargs) # Get list of existing owners for event (for AK submission start) context["existingOwners"] = AKOwner.objects.filter(event=self.event) @@ -45,6 +73,39 @@ class SubmissionOverviewView(FilterByEventSlugMixin, ListView): return context +class AKListByCategoryView(AKOverviewView): + def dispatch(self, request, *args, **kwargs): + self.category = get_object_or_404(AKCategory, pk=kwargs['category_pk']) + return super().dispatch(request, *args, **kwargs) + + def get_active_category_name(self, context): + return self.category.name + + +class AKListByTagView(AKOverviewView): + def dispatch(self, request, *args, **kwargs): + self.tag = get_object_or_404(AKTag, pk=kwargs['tag_pk']) + return super().dispatch(request, *args, **kwargs) + + def filter_aks(self, context, category): + return self.tag.ak_set.filter(event=self.event, category=category) + + def get_table_title(self, context): + return f"{_('AKs with Tag')} = {self.tag.name}" + + +class AKListByTrackView(AKOverviewView): + def dispatch(self, request, *args, **kwargs): + self.track = get_object_or_404(AKTrack, pk=kwargs['track_pk']) + return super().dispatch(request, *args, **kwargs) + + def filter_aks(self, context, category): + return category.ak_set.filter(track=self.track) + + def get_table_title(self, context): + return f"{_('AKs with Track')} = {self.track.name}" + + class AKDetailView(EventSlugMixin, DetailView): model = AK context_object_name = "ak" @@ -60,56 +121,16 @@ class AKHistoryView(EventSlugMixin, DetailView): class AKListView(FilterByEventSlugMixin, ListView): model = AK context_object_name = "AKs" - template_name = "AKSubmission/ak_list.html" - filter_condition_string = "" + template_name = "AKSubmission/ak_overview.html" + table_title = "" def get_context_data(self, *, object_list=None, **kwargs): context = super().get_context_data(object_list=object_list, **kwargs) context['categories'] = AKCategory.objects.filter(event=self.event) context['tracks'] = AKTrack.objects.filter(event=self.event) - context['filter_condition_string'] = self.filter_condition_string return context -class AKListByCategoryView(AKListView): - category = None - - def get_queryset(self): - # Find category based on event slug - try: - self.category = AKCategory.objects.get(pk=self.kwargs['category_pk']) - self.filter_condition_string = f"{_('Category')} = {self.category.name}" - except AKCategory.DoesNotExist: - raise Http404 - return super().get_queryset().filter(category=self.category) - - -class AKListByTagView(AKListView): - tag = None - - def get_queryset(self): - # Find tag based on event slug - try: - self.tag = AKTag.objects.get(pk=self.kwargs['tag_pk']) - self.filter_condition_string = f"{_('Tag')} = {self.tag.name}" - except AKTag.DoesNotExist: - raise Http404 - return super().get_queryset().filter(tags=self.tag) - - -class AKListByTrackView(AKListView): - track = None - - def get_queryset(self): - # Find track based on event slug - try: - self.track = AKTrack.objects.get(pk=self.kwargs['track_pk']) - self.filter_condition_string = f"{_('Track')} = {self.track.name}" - except AKTrack.DoesNotExist: - raise Http404 - return super().get_queryset().filter(track=self.track) - - class EventInactiveRedirectMixin: def get_error_message(self): return _("Event inactive. Cannot create or update.") -- GitLab From 470a0e6121689b8ef28e0e98088dee5de096add2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Wed, 13 May 2020 00:43:27 +0200 Subject: [PATCH 2/5] Display linebreaks in AK descriptions Closes #75 --- AKSubmission/templates/AKSubmission/ak_detail.html | 2 +- AKSubmission/templates/AKSubmission/ak_table.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AKSubmission/templates/AKSubmission/ak_detail.html b/AKSubmission/templates/AKSubmission/ak_detail.html index 5d2dceb4..b7b9342d 100644 --- a/AKSubmission/templates/AKSubmission/ak_detail.html +++ b/AKSubmission/templates/AKSubmission/ak_detail.html @@ -117,7 +117,7 @@ {% endif %} </table> - <p style="margin-top: 30px;margin-bottom: 30px;">{{ ak.description }}</p> + <p style="margin-top: 30px;margin-bottom: 30px;">{{ ak.description|linebreaks }}</p> {% if 'AKPlan'|check_app_installed %} diff --git a/AKSubmission/templates/AKSubmission/ak_table.html b/AKSubmission/templates/AKSubmission/ak_table.html index 485c982e..732b96cb 100644 --- a/AKSubmission/templates/AKSubmission/ak_table.html +++ b/AKSubmission/templates/AKSubmission/ak_table.html @@ -56,7 +56,7 @@ </td> </tr> <tr> - <td colspan="5" class="small">{{ ak.description }}</td> + <td colspan="5" class="small">{{ ak.description|linebreaks }}</td> </tr> {% empty %} <tr> -- GitLab From 830055e847c4decc351bb988e992738bfed4aeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Wed, 13 May 2020 00:56:31 +0200 Subject: [PATCH 3/5] Update translations --- .../locale/de_DE/LC_MESSAGES/django.po | 34 +-- AKModel/locale/de_DE/LC_MESSAGES/django.po | 228 +++++++++--------- AKPlanning/locale/de_DE/LC_MESSAGES/django.po | 6 +- .../locale/de_DE/LC_MESSAGES/django.po | 168 ++++++++----- 4 files changed, 244 insertions(+), 192 deletions(-) diff --git a/AKDashboard/locale/de_DE/LC_MESSAGES/django.po b/AKDashboard/locale/de_DE/LC_MESSAGES/django.po index 6c1179e4..0ba6ef4f 100644 --- a/AKDashboard/locale/de_DE/LC_MESSAGES/django.po +++ b/AKDashboard/locale/de_DE/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-11 20:45+0000\n" +"POT-Creation-Date: 2020-05-12 22:53+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -61,37 +61,37 @@ msgstr "Veranstaltung" msgid "Event this button belongs to" msgstr "Veranstaltung, zu der dieser Button gehört" -#: AKDashboard/templates/AKDashboard/dashboard.html:30 +#: AKDashboard/templates/AKDashboard/dashboard.html:25 +msgid "Currently, there are no Events!" +msgstr "Aktuell gibt es keine Events!" + +#: AKDashboard/templates/AKDashboard/dashboard.html:28 +msgid "Please contact an administrator if you want to use AKPlanning." +msgstr "" +"Bitte kontaktiere eine*n Administrator*in, falls du AKPlanning verwenden " +"möchtest." + +#: AKDashboard/templates/AKDashboard/dashboard_row.html:13 msgid "AK List" msgstr "AK Liste" -#: AKDashboard/templates/AKDashboard/dashboard.html:40 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:23 msgid "Current AKs" msgstr "Aktuelle AKs" -#: AKDashboard/templates/AKDashboard/dashboard.html:47 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:30 msgid "AK Wall" msgstr "AK-Wall" -#: AKDashboard/templates/AKDashboard/dashboard.html:55 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:38 msgid "Schedule" msgstr "AK-Plan" -#: AKDashboard/templates/AKDashboard/dashboard.html:65 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:48 msgid "AK Submission" msgstr "AK-Submission" -#: AKDashboard/templates/AKDashboard/dashboard.html:81 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:64 msgid "Write to organizers of this event for questions and comments" msgstr "" "Kontaktiere die Organisator*innen des Events bei Fragen oder Kommentaren" - -#: AKDashboard/templates/AKDashboard/dashboard.html:88 -msgid "Currently, there are no Events!" -msgstr "Aktuell gibt es keine Events!" - -#: AKDashboard/templates/AKDashboard/dashboard.html:91 -msgid "Please contact an administrator if you want to use AKPlanning." -msgstr "" -"Bitte kontaktiere eine*n Administrator*in, falls du AKPlanning verwenden " -"möchtest." diff --git a/AKModel/locale/de_DE/LC_MESSAGES/django.po b/AKModel/locale/de_DE/LC_MESSAGES/django.po index ef43f9e8..4e2f7cb0 100644 --- a/AKModel/locale/de_DE/LC_MESSAGES/django.po +++ b/AKModel/locale/de_DE/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-11 22:27+0000\n" +"POT-Creation-Date: 2020-05-12 22:53+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -11,31 +11,31 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: AKModel/admin.py:96 +#: AKModel/admin.py:97 msgid "Wish" msgstr "AK-Wunsch" -#: AKModel/admin.py:102 +#: AKModel/admin.py:103 msgid "Is wish" msgstr "Ist ein Wunsch" -#: AKModel/admin.py:103 +#: AKModel/admin.py:104 msgid "Is not a wish" msgstr "Ist kein Wunsch" -#: AKModel/admin.py:130 +#: AKModel/admin.py:131 msgid "Export to wiki syntax" msgstr "In Wiki-Syntax exportieren" -#: AKModel/availability.py:38 AKModel/models.py:37 AKModel/models.py:61 -#: AKModel/models.py:113 AKModel/models.py:132 AKModel/models.py:164 -#: AKModel/models.py:217 AKModel/models.py:257 AKModel/models.py:287 +#: AKModel/availability.py:38 AKModel/models.py:40 AKModel/models.py:69 +#: AKModel/models.py:121 AKModel/models.py:140 AKModel/models.py:172 +#: AKModel/models.py:225 AKModel/models.py:267 AKModel/models.py:297 msgid "Event" msgstr "Event" -#: AKModel/availability.py:39 AKModel/models.py:62 AKModel/models.py:114 -#: AKModel/models.py:133 AKModel/models.py:165 AKModel/models.py:218 -#: AKModel/models.py:258 AKModel/models.py:288 +#: AKModel/availability.py:39 AKModel/models.py:70 AKModel/models.py:122 +#: AKModel/models.py:141 AKModel/models.py:173 AKModel/models.py:226 +#: AKModel/models.py:268 AKModel/models.py:298 msgid "Associated event" msgstr "Zugehöriges Event" @@ -47,7 +47,7 @@ msgstr "Person" msgid "Person whose availability this is" msgstr "Person deren Verfügbarkeit hier abgebildet wird" -#: AKModel/availability.py:56 AKModel/models.py:261 AKModel/models.py:280 +#: AKModel/availability.py:56 AKModel/models.py:271 AKModel/models.py:290 msgid "Room" msgstr "Raum" @@ -55,7 +55,7 @@ msgstr "Raum" msgid "Room whose availability this is" msgstr "Raum dessen Verfügbarkeit hier abgebildet wird" -#: AKModel/availability.py:65 AKModel/models.py:221 AKModel/models.py:279 +#: AKModel/availability.py:65 AKModel/models.py:231 AKModel/models.py:289 msgid "AK" msgstr "AK" @@ -63,7 +63,7 @@ msgstr "AK" msgid "AK whose availability this is" msgstr "Verfügbarkeiten" -#: AKModel/availability.py:74 AKModel/models.py:117 +#: AKModel/availability.py:74 AKModel/models.py:125 msgid "AK Category" msgstr "AK Kategorie" @@ -79,87 +79,87 @@ msgstr "Verfügbarkeit" msgid "Availabilities" msgstr "Verfügbarkeiten" -#: AKModel/models.py:14 AKModel/models.py:108 AKModel/models.py:129 -#: AKModel/models.py:148 AKModel/models.py:162 AKModel/models.py:180 -#: AKModel/models.py:250 +#: AKModel/models.py:17 AKModel/models.py:116 AKModel/models.py:137 +#: AKModel/models.py:156 AKModel/models.py:170 AKModel/models.py:188 +#: AKModel/models.py:260 msgid "Name" msgstr "Name" -#: AKModel/models.py:15 +#: AKModel/models.py:18 msgid "Name or iteration of the event" msgstr "Name oder Iteration des Events" -#: AKModel/models.py:16 +#: AKModel/models.py:19 msgid "Short Form" msgstr "Kurzer Name" -#: AKModel/models.py:17 +#: AKModel/models.py:20 msgid "Short name of letters/numbers/dots/dashes/underscores used in URLs." msgstr "" "Kurzname bestehend aus Buchstaben, Nummern, Punkten und Unterstrichen zur " "Nutzung in URLs" -#: AKModel/models.py:19 +#: AKModel/models.py:22 msgid "Place" msgstr "Ort" -#: AKModel/models.py:20 +#: AKModel/models.py:23 msgid "City etc. the event takes place in" msgstr "Stadt o.ä. in der das Event stattfindet" -#: AKModel/models.py:22 +#: AKModel/models.py:25 msgid "Time Zone" msgstr "Zeitzone" -#: AKModel/models.py:22 +#: AKModel/models.py:25 msgid "Time Zone where this event takes place in" msgstr "Zeitzone in der das Event stattfindet" -#: AKModel/models.py:23 +#: AKModel/models.py:26 msgid "Start" msgstr "Start" -#: AKModel/models.py:23 +#: AKModel/models.py:26 msgid "Time the event begins" msgstr "Zeit zu der das Event beginnt" -#: AKModel/models.py:24 +#: AKModel/models.py:27 msgid "End" msgstr "Ende" -#: AKModel/models.py:24 +#: AKModel/models.py:27 msgid "Time the event ends" msgstr "Zeit zu der das Event endet" -#: AKModel/models.py:26 +#: AKModel/models.py:29 msgid "Active State" msgstr "Aktiver Status" -#: AKModel/models.py:26 +#: AKModel/models.py:29 msgid "Marks currently active events" msgstr "Markiert aktuell aktive Events" -#: AKModel/models.py:28 +#: AKModel/models.py:31 msgid "Base URL" msgstr "URL-Prefix" -#: AKModel/models.py:28 +#: AKModel/models.py:31 msgid "Prefix for wiki link construction" msgstr "Prefix für die automatische Generierung von Wiki-Links" -#: AKModel/models.py:29 +#: AKModel/models.py:32 msgid "Default Slot Length" msgstr "Standardslotlänge" -#: AKModel/models.py:30 +#: AKModel/models.py:33 msgid "Default length in hours that is assumed for AKs in this event." msgstr "Standardlänge von Slots (in Stunden) für dieses Event" -#: AKModel/models.py:32 +#: AKModel/models.py:35 msgid "Contact email address" msgstr "E-Mail Kontaktadresse" -#: AKModel/models.py:34 +#: AKModel/models.py:37 msgid "" "An email address that is displayed on every page and can be used for all " "kinds of questions" @@ -167,210 +167,208 @@ msgstr "" "Eine Mailadresse die auf jeder Seite angezeigt wird und für alle Arten von " "Fragen genutzt werden kann" -#: AKModel/models.py:38 +#: AKModel/models.py:41 msgid "Events" msgstr "Events" -#: AKModel/models.py:56 +#: AKModel/models.py:64 msgid "Nickname" msgstr "Spitzname" -#: AKModel/models.py:56 +#: AKModel/models.py:64 msgid "Name to identify an AK owner by" msgstr "Name durch den eine AK Leitung identifiziert wird" -#: AKModel/models.py:57 +#: AKModel/models.py:65 msgid "Slug" msgstr "Slug" -#: AKModel/models.py:57 +#: AKModel/models.py:65 msgid "Slug for URL generation" msgstr "Slug für URL-Generierung" -#: AKModel/models.py:58 +#: AKModel/models.py:66 msgid "Institution" msgstr "Instutution" -#: AKModel/models.py:58 +#: AKModel/models.py:66 msgid "Uni etc." msgstr "Universität o.ä." -#: AKModel/models.py:59 AKModel/models.py:189 +#: AKModel/models.py:67 AKModel/models.py:197 msgid "Web Link" msgstr "Internet Link" -#: AKModel/models.py:59 +#: AKModel/models.py:67 msgid "Link to Homepage" msgstr "Link zu Homepage oder Webseite" -#: AKModel/models.py:65 +#: AKModel/models.py:73 msgid "AK Owner" msgstr "AK Leitung" -#: AKModel/models.py:66 +#: AKModel/models.py:74 msgid "AK Owners" msgstr "AK Leitungen" -#: AKModel/models.py:108 +#: AKModel/models.py:116 msgid "Name of the AK Category" msgstr "Name des AK Kategorie" -#: AKModel/models.py:109 AKModel/models.py:130 +#: AKModel/models.py:117 AKModel/models.py:138 msgid "Color" msgstr "Farbe" -#: AKModel/models.py:109 AKModel/models.py:130 +#: AKModel/models.py:117 AKModel/models.py:138 msgid "Color for displaying" msgstr "Farbe für die Anzeige" -#: AKModel/models.py:110 AKModel/models.py:183 +#: AKModel/models.py:118 AKModel/models.py:191 msgid "Description" msgstr "Beschreibung" -#: AKModel/models.py:111 +#: AKModel/models.py:119 msgid "Short description of this AK Category" msgstr "Beschreibung der AK-Kategorie" -#: AKModel/models.py:118 +#: AKModel/models.py:126 msgid "AK Categories" msgstr "AK Kategorien" -#: AKModel/models.py:129 +#: AKModel/models.py:137 msgid "Name of the AK Track" msgstr "Name des AK Tracks" -#: AKModel/models.py:136 +#: AKModel/models.py:144 msgid "AK Track" msgstr "AK Track" -#: AKModel/models.py:137 +#: AKModel/models.py:145 msgid "AK Tracks" msgstr "AK Tracks" -#: AKModel/models.py:148 +#: AKModel/models.py:156 msgid "Name of the AK Tag" msgstr "Name das AK Tags" -#: AKModel/models.py:151 +#: AKModel/models.py:159 msgid "AK Tag" msgstr "AK Tag" -#: AKModel/models.py:152 +#: AKModel/models.py:160 msgid "AK Tags" msgstr "AK Tags" -#: AKModel/models.py:162 +#: AKModel/models.py:170 msgid "Name of the Requirement" msgstr "Name der Anforderung" -#: AKModel/models.py:168 +#: AKModel/models.py:176 msgid "AK Requirement" msgstr "AK Anforderung" -#: AKModel/models.py:169 +#: AKModel/models.py:177 msgid "AK Requirements" msgstr "AK Anforderungen" -#: AKModel/models.py:180 +#: AKModel/models.py:188 msgid "Name of the AK" msgstr "Name des AKs" -#: AKModel/models.py:181 +#: AKModel/models.py:189 msgid "Short Name" msgstr "Kurzer Name" -#: AKModel/models.py:182 +#: AKModel/models.py:190 msgid "Name displayed in the schedule" msgstr "Name zur Anzeige im AK Plan" -#: AKModel/models.py:183 +#: AKModel/models.py:191 msgid "Description of the AK" msgstr "Beschreibung des AKs" -#: AKModel/models.py:185 +#: AKModel/models.py:193 msgid "Owners" msgstr "Leitungen" -#: AKModel/models.py:186 +#: AKModel/models.py:194 msgid "Those organizing the AK" msgstr "Menschen, die den AK organisieren und halten" -#: AKModel/models.py:189 +#: AKModel/models.py:197 msgid "Link to wiki page" msgstr "Link zur Wiki Seite" -#: AKModel/models.py:191 +#: AKModel/models.py:199 msgid "Category" msgstr "Kategorie" -#: AKModel/models.py:192 +#: AKModel/models.py:200 msgid "Category of the AK" msgstr "Kategorie des AKs" -#: AKModel/models.py:193 +#: AKModel/models.py:201 msgid "Tags" msgstr "Tags" -#: AKModel/models.py:193 +#: AKModel/models.py:201 msgid "Tags provided by owners" msgstr "Tags, die durch die AK Leitung vergeben wurden" -#: AKModel/models.py:194 +#: AKModel/models.py:202 msgid "Track" msgstr "Track" -#: AKModel/models.py:195 +#: AKModel/models.py:203 msgid "Track the AK belongs to" msgstr "Track zu dem der AK gehört" -#: AKModel/models.py:197 +#: AKModel/models.py:205 msgid "Resolution Intention" msgstr "Resolutionsabsicht" -#: AKModel/models.py:198 +#: AKModel/models.py:206 msgid "Intends to submit a resolution" msgstr "Beabsichtigt eine Resolution einzureichen" -#: AKModel/models.py:199 +#: AKModel/models.py:207 msgid "Present this AK" msgstr "AK Präsentieren" -#: AKModel/models.py:200 +#: AKModel/models.py:208 msgid "Present results of this AK" msgstr "Die Ergebnisse dieses AKs vorstellen" -#: AKModel/models.py:202 +#: AKModel/models.py:210 msgid "Requirements" msgstr "Anforderungen" -#: AKModel/models.py:203 +#: AKModel/models.py:211 msgid "AK's Requirements" msgstr "Anforderungen des AKs" -#: AKModel/models.py:205 +#: AKModel/models.py:213 msgid "Conflicting AKs" msgstr "AK Konflikte" -#: AKModel/models.py:206 +#: AKModel/models.py:214 msgid "AKs that conflict and thus must not take place at the same time" msgstr "" "AKs, die Konflikte haben und deshalb nicht gleichzeitig stattfinden dürfen" -#: AKModel/models.py:207 +#: AKModel/models.py:215 msgid "Prerequisite AKs" msgstr "Vorausgesetzte AKs" -#: AKModel/models.py:208 +#: AKModel/models.py:216 msgid "AKs that should precede this AK in the schedule" msgstr "AKS die im AK Plan vor diesem AK stattfinden müssen" -#: AKModel/models.py:210 -#, fuzzy -#| msgid "Internal Notes" +#: AKModel/models.py:218 msgid "Organizational Notes" -msgstr "Interne Notizen" +msgstr "Notizen zur Organisation" -#: AKModel/models.py:211 +#: AKModel/models.py:219 msgid "" "Notes to organizers. These are public. For private notes, please send an e-" "mail." @@ -378,97 +376,95 @@ msgstr "" "Notizen an die Organisator*innen. Diese sind öffentlich, für private " "Anmerkungen bitte eine E-Mail schicken." -#: AKModel/models.py:213 +#: AKModel/models.py:221 msgid "Interest" msgstr "Interesse" -#: AKModel/models.py:213 +#: AKModel/models.py:221 msgid "Expected number of people" msgstr "Erwartete Personenzahl" -#: AKModel/models.py:214 -#, fuzzy -#| msgid "Interest" +#: AKModel/models.py:222 msgid "Interest Counter" -msgstr "Interesse" +msgstr "Interessenszähler" -#: AKModel/models.py:215 +#: AKModel/models.py:223 msgid "People who have indicated interest online" msgstr "Anzahl Personen, die online Interesse bekundet haben" -#: AKModel/models.py:222 +#: AKModel/models.py:232 msgid "AKs" msgstr "AKs" -#: AKModel/models.py:250 +#: AKModel/models.py:260 msgid "Name or number of the room" msgstr "Name oder Nummer des Raums" -#: AKModel/models.py:251 +#: AKModel/models.py:261 msgid "Building" msgstr "Gebäude" -#: AKModel/models.py:252 +#: AKModel/models.py:262 msgid "Name or number of the building" msgstr "Name oder Nummer des Gebäudes" -#: AKModel/models.py:253 +#: AKModel/models.py:263 msgid "Capacity" msgstr "Kapazität" -#: AKModel/models.py:253 +#: AKModel/models.py:263 msgid "Maximum number of people" msgstr "Maximale Personenzahl" -#: AKModel/models.py:254 +#: AKModel/models.py:264 msgid "Properties" msgstr "Eigenschaften" -#: AKModel/models.py:255 +#: AKModel/models.py:265 msgid "AK requirements fulfilled by the room" msgstr "AK Anforderungen, die dieser Raum erfüllt" -#: AKModel/models.py:262 +#: AKModel/models.py:272 msgid "Rooms" msgstr "Räume" -#: AKModel/models.py:279 +#: AKModel/models.py:289 msgid "AK being mapped" msgstr "AK, der zugeordnet wird" -#: AKModel/models.py:281 +#: AKModel/models.py:291 msgid "Room the AK will take place in" msgstr "Raum in dem der AK stattfindet" -#: AKModel/models.py:282 +#: AKModel/models.py:292 msgid "Slot Begin" msgstr "Beginn des Slots" -#: AKModel/models.py:282 +#: AKModel/models.py:292 msgid "Time and date the slot begins" msgstr "Zeit und Datum zu der der AK beginnt" -#: AKModel/models.py:284 +#: AKModel/models.py:294 msgid "Duration" msgstr "Dauer" -#: AKModel/models.py:285 +#: AKModel/models.py:295 msgid "Length in hours" msgstr "Länge in Stunden" -#: AKModel/models.py:290 +#: AKModel/models.py:300 msgid "Last update" msgstr "Letzte Aktualisierung" -#: AKModel/models.py:293 +#: AKModel/models.py:303 msgid "AK Slot" msgstr "AK Slot" -#: AKModel/models.py:294 +#: AKModel/models.py:304 msgid "AK Slots" msgstr "AK Slot" -#: AKModel/models.py:308 +#: AKModel/models.py:318 msgid "Not scheduled yet" msgstr "Noch nicht geplant" diff --git a/AKPlanning/locale/de_DE/LC_MESSAGES/django.po b/AKPlanning/locale/de_DE/LC_MESSAGES/django.po index bd433b91..bcd0701f 100644 --- a/AKPlanning/locale/de_DE/LC_MESSAGES/django.po +++ b/AKPlanning/locale/de_DE/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-11 22:27+0000\n" +"POT-Creation-Date: 2020-05-12 22:53+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,10 +17,10 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: AKPlanning/settings.py:127 +#: AKPlanning/settings.py:129 msgid "German" msgstr "Deutsch" -#: AKPlanning/settings.py:128 +#: AKPlanning/settings.py:130 msgid "English" msgstr "Englisch" diff --git a/AKSubmission/locale/de_DE/LC_MESSAGES/django.po b/AKSubmission/locale/de_DE/LC_MESSAGES/django.po index 74621dae..0a10c314 100644 --- a/AKSubmission/locale/de_DE/LC_MESSAGES/django.po +++ b/AKSubmission/locale/de_DE/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-11 22:27+0000\n" +"POT-Creation-Date: 2020-05-12 22:53+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -40,7 +40,9 @@ msgstr "" #: AKSubmission/templates/AKSubmission/ak_detail.html:10 #: AKSubmission/templates/AKSubmission/ak_edit.html:8 -#: AKSubmission/templates/AKSubmission/ak_list.html:8 +#: AKSubmission/templates/AKSubmission/ak_history.html:11 +#: AKSubmission/templates/AKSubmission/ak_overview.html:8 +#: AKSubmission/templates/AKSubmission/ak_overview.html:27 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:7 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:7 #: AKSubmission/templates/AKSubmission/akslot_delete.html:7 @@ -52,13 +54,15 @@ msgid "AKs" msgstr "AKs" #: AKSubmission/templates/AKSubmission/ak_detail.html:10 +#: AKSubmission/templates/AKSubmission/ak_history.html:11 #: AKSubmission/templates/AKSubmission/akslot_delete.html:31 msgid "AK" msgstr "AK" #: AKSubmission/templates/AKSubmission/ak_detail.html:15 #: AKSubmission/templates/AKSubmission/ak_edit.html:13 -#: AKSubmission/templates/AKSubmission/ak_list.html:22 +#: AKSubmission/templates/AKSubmission/ak_history.html:16 +#: AKSubmission/templates/AKSubmission/ak_overview.html:22 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:12 #: AKSubmission/templates/AKSubmission/akslot_add_update.html:12 #: AKSubmission/templates/AKSubmission/akslot_delete.html:12 @@ -73,64 +77,94 @@ msgstr "AK-Eintragung" msgid "Interest" msgstr "Interesse" -#: AKSubmission/templates/AKSubmission/ak_detail.html:45 -#: AKSubmission/templates/AKSubmission/ak_list_table.html:32 +#: AKSubmission/templates/AKSubmission/ak_detail.html:33 +#, fuzzy +#| msgid "Interest" +msgid "Show Interest" +msgstr "Interesse" + +#: AKSubmission/templates/AKSubmission/ak_detail.html:39 +#: AKSubmission/templates/AKSubmission/ak_table.html:48 +msgid "Open external link" +msgstr "Externen Link öffnen" + +#: AKSubmission/templates/AKSubmission/ak_detail.html:44 +#: AKSubmission/templates/AKSubmission/ak_history.html:19 +#: AKSubmission/templates/AKSubmission/ak_history.html:31 +msgid "History" +msgstr "Versionsgeschichte" + +#: AKSubmission/templates/AKSubmission/ak_detail.html:47 +#: AKSubmission/templates/AKSubmission/ak_detail.html:146 +#: AKSubmission/templates/AKSubmission/ak_edit.html:16 +#: AKSubmission/templates/AKSubmission/ak_table.html:53 +msgid "Edit" +msgstr "Bearbeiten" + +#: AKSubmission/templates/AKSubmission/ak_detail.html:52 +#: AKSubmission/templates/AKSubmission/ak_history.html:31 +#: AKSubmission/templates/AKSubmission/ak_table.html:35 msgid "AK Wish" msgstr "AK-Wunsch" -#: AKSubmission/templates/AKSubmission/ak_detail.html:49 -#: AKSubmission/templates/AKSubmission/ak_list_table.html:10 +#: AKSubmission/templates/AKSubmission/ak_detail.html:56 +#: AKSubmission/templates/AKSubmission/ak_table.html:10 msgid "Who?" msgstr "Wer?" -#: AKSubmission/templates/AKSubmission/ak_detail.html:53 -#: AKSubmission/templates/AKSubmission/ak_list_table.html:11 +#: AKSubmission/templates/AKSubmission/ak_detail.html:62 +#: AKSubmission/templates/AKSubmission/ak_history.html:36 +#: AKSubmission/templates/AKSubmission/ak_table.html:11 msgid "Category" msgstr "Kategorie" -#: AKSubmission/templates/AKSubmission/ak_detail.html:59 +#: AKSubmission/templates/AKSubmission/ak_detail.html:68 msgid "Present this AK" msgstr "Diesen AK vorstellen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:63 -#: AKSubmission/templates/AKSubmission/ak_list_table.html:12 +#: AKSubmission/templates/AKSubmission/ak_detail.html:72 +#: AKSubmission/templates/AKSubmission/ak_table.html:12 msgid "Tags" msgstr "Tags" -#: AKSubmission/templates/AKSubmission/ak_detail.html:69 +#: AKSubmission/templates/AKSubmission/ak_detail.html:78 msgid "Reso?" msgstr "Reso?" -#: AKSubmission/templates/AKSubmission/ak_detail.html:76 +#: AKSubmission/templates/AKSubmission/ak_detail.html:85 msgid "Requirements" msgstr "Anforderungen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:89 +#: AKSubmission/templates/AKSubmission/ak_detail.html:98 msgid "Conflicting AKs" msgstr "AK Konflikte" -#: AKSubmission/templates/AKSubmission/ak_detail.html:97 +#: AKSubmission/templates/AKSubmission/ak_detail.html:106 msgid "Prerequisite AKs" msgstr "AK Voraussetzungen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:105 +#: AKSubmission/templates/AKSubmission/ak_detail.html:114 msgid "Notes" msgstr "Notizen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:122 +#: AKSubmission/templates/AKSubmission/ak_detail.html:131 msgid "When?" msgstr "Wann?" -#: AKSubmission/templates/AKSubmission/ak_detail.html:123 +#: AKSubmission/templates/AKSubmission/ak_detail.html:132 #: AKSubmission/templates/AKSubmission/akslot_delete.html:35 msgid "Duration" msgstr "Dauer" -#: AKSubmission/templates/AKSubmission/ak_detail.html:124 +#: AKSubmission/templates/AKSubmission/ak_detail.html:133 msgid "Room" msgstr "Raum" -#: AKSubmission/templates/AKSubmission/ak_detail.html:150 +#: AKSubmission/templates/AKSubmission/ak_detail.html:149 +msgid "Delete" +msgstr "Löschen" + +#: AKSubmission/templates/AKSubmission/ak_detail.html:161 msgid "Add another slot" msgstr "Einen neuen AK-Slot hinzufügen" @@ -139,35 +173,53 @@ msgstr "Einen neuen AK-Slot hinzufügen" msgid "Edit AK" msgstr "AK bearbeiten" -#: AKSubmission/templates/AKSubmission/ak_edit.html:16 -msgid "Edit" -msgstr "Bearbeiten" - -#: AKSubmission/templates/AKSubmission/ak_list.html:23 -#: AKSubmission/templates/AKSubmission/ak_list.html:27 -msgid "AK List" -msgstr "AK Liste" - -#: AKSubmission/templates/AKSubmission/ak_list.html:30 -msgid "Categories" -msgstr "Kategorie" +#: AKSubmission/templates/AKSubmission/ak_history.html:27 +msgid "Back" +msgstr "Zurück" -#: AKSubmission/templates/AKSubmission/ak_list.html:37 -msgid "Tracks" -msgstr "" - -#: AKSubmission/templates/AKSubmission/ak_list_table.html:9 +#: AKSubmission/templates/AKSubmission/ak_history.html:35 +#: AKSubmission/templates/AKSubmission/ak_table.html:9 msgid "Name" msgstr "Name" -#: AKSubmission/templates/AKSubmission/ak_list_table.html:23 +#: AKSubmission/templates/AKSubmission/ak_history.html:37 +msgid "Track" +msgstr "Track" + +#: AKSubmission/templates/AKSubmission/ak_history.html:38 +msgid "Time" +msgstr "Zeit" + +#: AKSubmission/templates/AKSubmission/ak_history.html:48 +#: AKSubmission/templates/AKSubmission/ak_table.html:26 msgid "present this AK" msgstr "Diesen AK vorstellen" -#: AKSubmission/templates/AKSubmission/ak_list_table.html:27 +#: AKSubmission/templates/AKSubmission/ak_history.html:52 +#: AKSubmission/templates/AKSubmission/ak_table.html:30 msgid "Reso" msgstr "Reso" +#: AKSubmission/templates/AKSubmission/ak_list.html:6 AKSubmission/views.py:29 +msgid "All AKs" +msgstr "Alle AKs" + +#: AKSubmission/templates/AKSubmission/ak_list.html:11 +msgid "Tracks" +msgstr "Tracks" + +#: AKSubmission/templates/AKSubmission/ak_overview.html:23 +msgid "AK List" +msgstr "AK-Liste" + +#: AKSubmission/templates/AKSubmission/ak_table.html:44 +msgid "Details" +msgstr "Details" + +#: AKSubmission/templates/AKSubmission/ak_table.html:63 +msgid "There are no AKs in this category yet" +msgstr "Es gibt noch keine AKs in dieser Kategorie" + #: AKSubmission/templates/AKSubmission/akowner_create_update.html:7 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:13 #: AKSubmission/templates/AKSubmission/akowner_create_update.html:18 @@ -252,60 +304,64 @@ msgstr "" "Dieses Event is nicht aktiv. Es können keine AKs hinzugefügt oder bearbeitet " "werden" -#: AKSubmission/templates/AKSubmission/submission_overview.html:66 -msgid "Current AKs" -msgstr "Aktuelle AKs" - #: AKSubmission/templates/AKSubmission/submit_new.html:41 msgid "Submit" msgstr "Eintragen" -#: AKSubmission/views.py:39 +#: AKSubmission/views.py:49 msgid "Wishes" msgstr "Wünsche" -#: AKSubmission/views.py:39 +#: AKSubmission/views.py:49 msgid "AKs one would like to have" msgstr "" "AKs die sich gewünscht wurden, aber bei denen noch nicht klar ist, wer sie " "macht. Falls du dir das vorstellen kannst, trag dich einfach ein" -#: AKSubmission/views.py:109 +#: AKSubmission/views.py:65 + +msgid "Currently planned AKs" +msgstr "Aktuell geplante AKs" + +#: AKSubmission/views.py:136 msgid "Event inactive. Cannot create or update." msgstr "Event inaktiv. Hinzufügen/Bearbeiten nicht möglich." -#: AKSubmission/views.py:125 +#: AKSubmission/views.py:152 msgid "AK successfully created" msgstr "AK erfolgreich angelegt" -#: AKSubmission/views.py:183 +#: AKSubmission/views.py:210 msgid "AK successfully updated" msgstr "AK erfolgreich aktualisiert" -#: AKSubmission/views.py:261 +#: AKSubmission/views.py:288 msgid "Person Info successfully updated" msgstr "Personen-Info erfolgreich aktualisiert" -#: AKSubmission/views.py:281 +#: AKSubmission/views.py:308 msgid "No user selected" msgstr "Keine Person ausgewählt" -#: AKSubmission/views.py:307 +#: AKSubmission/views.py:334 msgid "AK Slot successfully added" msgstr "AK-Slot erfolgreich angelegt" -#: AKSubmission/views.py:321 +#: AKSubmission/views.py:348 msgid "You cannot edit a slot that has already been scheduled" msgstr "Bereits geplante AK-Slots können nicht mehr bearbeitet werden" -#: AKSubmission/views.py:331 +#: AKSubmission/views.py:358 msgid "AK Slot successfully updated" msgstr "AK-Slot erfolgreich aktualisiert" -#: AKSubmission/views.py:344 +#: AKSubmission/views.py:371 msgid "You cannot delete a slot that has already been scheduled" msgstr "Bereits geplante AK-Slots können nicht mehr gelöscht werden" -#: AKSubmission/views.py:354 +#: AKSubmission/views.py:381 msgid "AK Slot successfully deleted" msgstr "AK-Slot erfolgreich angelegt" + +#~ msgid "Categories" +#~ msgstr "Kategorie" -- GitLab From 9c6c92f99059a767d9a8e8d6d135dc7aa2f34e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Wed, 13 May 2020 01:04:37 +0200 Subject: [PATCH 4/5] Improve consistency of breadcrumbs in submission, plan and dashboard apps Closes #74 --- AKDashboard/templates/AKDashboard/dashboard_event.html | 2 +- AKPlan/templates/AKPlan/plan_breadcrumbs.html | 7 +++++-- AKPlan/templates/AKPlan/plan_index.html | 3 +++ AKPlan/templates/AKPlan/plan_room.html | 8 +++++--- AKPlan/templates/AKPlan/plan_track.html | 8 +++++--- .../templates/AKSubmission/submission_breadcrumbs.html | 8 +++++++- 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/AKDashboard/templates/AKDashboard/dashboard_event.html b/AKDashboard/templates/AKDashboard/dashboard_event.html index d91c688b..0cef2cfa 100644 --- a/AKDashboard/templates/AKDashboard/dashboard_event.html +++ b/AKDashboard/templates/AKDashboard/dashboard_event.html @@ -15,7 +15,7 @@ {% block breadcrumbs %} <li class="breadcrumb-item"><a href="{% url 'dashboard:dashboard' %}">AKPlanning</a></li> - <li class="breadcrumb-item active">{{ event.slug }}</li> + <li class="breadcrumb-item active">{{ event }}</li> {% endblock %} {% block content %} diff --git a/AKPlan/templates/AKPlan/plan_breadcrumbs.html b/AKPlan/templates/AKPlan/plan_breadcrumbs.html index c5ca3c1a..653e04c2 100644 --- a/AKPlan/templates/AKPlan/plan_breadcrumbs.html +++ b/AKPlan/templates/AKPlan/plan_breadcrumbs.html @@ -8,7 +8,10 @@ AKPlanning {% endif %} </li> -<li class="breadcrumb-item">{{ event.slug }}</li> <li class="breadcrumb-item"> - <a href="{% url 'plan:plan_overview' event_slug=event.slug %}">{% trans "AK Plan" %}</a> + {% if 'AKDashboard'|check_app_installed %} + <a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event }}</a> + {% else %} + {{ event }} + {% endif %} </li> diff --git a/AKPlan/templates/AKPlan/plan_index.html b/AKPlan/templates/AKPlan/plan_index.html index cd22d225..517b5067 100644 --- a/AKPlan/templates/AKPlan/plan_index.html +++ b/AKPlan/templates/AKPlan/plan_index.html @@ -70,6 +70,9 @@ {% block breadcrumbs %} {% include "AKPlan/plan_breadcrumbs.html" %} + <li class="breadcrumb-item"> + {% trans "AK Plan" %} + </li> {% endblock %} diff --git a/AKPlan/templates/AKPlan/plan_room.html b/AKPlan/templates/AKPlan/plan_room.html index 6f956563..c47ba1d0 100644 --- a/AKPlan/templates/AKPlan/plan_room.html +++ b/AKPlan/templates/AKPlan/plan_room.html @@ -5,8 +5,10 @@ {% block breadcrumbs %} {% include "AKPlan/plan_breadcrumbs.html" %} - <li class="breadcrumb-item">{% trans "Room" %}</li> - <li class="breadcrumb-item">{{ room.title }}</li> + <li class="breadcrumb-item"> + <a href="{% url 'plan:plan_overview' event_slug=event.slug %}">{% trans "AK Plan" %}</a> + </li> + <li class="breadcrumb-item">{% trans "Room" %}: {{ room.title }}</li> {% endblock %} @@ -41,7 +43,7 @@ </ul> </div> - <h1>Plan: {{ event }} -- {% trans "Room" %}: {{ room }}</h1> + <h1>Plan: {{ event }} ({% trans "Room" %}: {{ room }})</h1> {% timezone event.timezone %} <div class="row" style="margin-top:30px;clear:both;"> diff --git a/AKPlan/templates/AKPlan/plan_track.html b/AKPlan/templates/AKPlan/plan_track.html index da452573..da292778 100644 --- a/AKPlan/templates/AKPlan/plan_track.html +++ b/AKPlan/templates/AKPlan/plan_track.html @@ -5,8 +5,10 @@ {% block breadcrumbs %} {% include "AKPlan/plan_breadcrumbs.html" %} - <li class="breadcrumb-item">{% trans "Track" %}</li> - <li class="breadcrumb-item">{{ track }}</li> + <li class="breadcrumb-item"> + <a href="{% url 'plan:plan_overview' event_slug=event.slug %}">{% trans "AK Plan" %}</a> + </li> + <li class="breadcrumb-item">{% trans "Track" %}: {{ track }}</li> {% endblock %} @@ -41,7 +43,7 @@ </ul> </div> - <h1>Plan: {{ event }} -- {% trans "Track" %}: {{ track }}</h1> + <h1>Plan: {{ event }} ({% trans "Track" %}: {{ track }})</h1> {% timezone event.timezone %} <div class="row" style="margin-top:30px;clear: both;"> diff --git a/AKSubmission/templates/AKSubmission/submission_breadcrumbs.html b/AKSubmission/templates/AKSubmission/submission_breadcrumbs.html index 147d6c26..0f1365d4 100644 --- a/AKSubmission/templates/AKSubmission/submission_breadcrumbs.html +++ b/AKSubmission/templates/AKSubmission/submission_breadcrumbs.html @@ -7,4 +7,10 @@ AKPlanning {% endif %} </li> -<li class="breadcrumb-item">{{ event.slug }}</li> +<li class="breadcrumb-item"> + {% if 'AKDashboard'|check_app_installed %} + <a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event }}</a> + {% else %} + {{ event }} + {% endif %} +</li> -- GitLab From 013179a066dee630ac82b3c07a31c4dac5b0de23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Wed, 13 May 2020 01:27:41 +0200 Subject: [PATCH 5/5] Allow searching in AK owner dropdown of submission interface Closes #68 Add select2 dependency Use select2 for submission interface (if active) --- .../AKSubmission/submission_overview.html | 23 +++++++++++++++++++ .../common/vendor/select2/select2.min.css | 1 + .../common/vendor/select2/select2.min.js | 2 ++ 3 files changed, 26 insertions(+) create mode 100644 static_common/common/vendor/select2/select2.min.css create mode 100644 static_common/common/vendor/select2/select2.min.js diff --git a/AKSubmission/templates/AKSubmission/submission_overview.html b/AKSubmission/templates/AKSubmission/submission_overview.html index dd09c528..f26cf36a 100644 --- a/AKSubmission/templates/AKSubmission/submission_overview.html +++ b/AKSubmission/templates/AKSubmission/submission_overview.html @@ -2,6 +2,7 @@ {% load i18n %} {% load fontawesome_5 %} +{% load static %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Submission" %}{% endblock %} @@ -11,7 +12,21 @@ .table td:nth-child(5) { white-space: nowrap; } + + /* Make Select2 boxes match Bootstrap heights: */ + .select2-selection__rendered { + line-height: 32px !important; + } + + .select2-selection { + height: 34px !important; + } </style> + + {% if event.active %} + <link href="{% static 'common/vendor/select2/select2.min.css' %}" rel="stylesheet" /> + <script src="{% static 'common/vendor/select2/select2.min.js' %}"></script> + {% endif %} {% endblock %} {% block breadcrumbs %} @@ -65,3 +80,11 @@ {% include "AKSubmission/ak_list.html" %} {% endblock %} + +{% block bottom_script %} + {% if event.active %} + <script> + $("#selectOwnerId").select2(); + </script> + {% endif %} +{% endblock %} diff --git a/static_common/common/vendor/select2/select2.min.css b/static_common/common/vendor/select2/select2.min.css new file mode 100644 index 00000000..7c18ad59 --- /dev/null +++ b/static_common/common/vendor/select2/select2.min.css @@ -0,0 +1 @@ +.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb} diff --git a/static_common/common/vendor/select2/select2.min.js b/static_common/common/vendor/select2/select2.min.js new file mode 100644 index 00000000..b073e95d --- /dev/null +++ b/static_common/common/vendor/select2/select2.min.js @@ -0,0 +1,2 @@ +/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ +!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),--u;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;--u){if(r=n.slice(0,u).join("/"),h)for(d=h.length;0<d;--d)if(i=(i=f[h.slice(0,d).join("/")])&&i[r]){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(w(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!w(m,e)&&!w(_,e))throw new Error("No "+e);return m[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?c(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},i=Object.prototype.hasOwnProperty,a=[].slice,b=/\.js$/,f=function(e,t){var n,r,i=c(e),o=i[0],s=t[1];return e=i[1],o&&(n=D(o=l(o,s))),o?e=n&&n.normalize?n.normalize(e,(r=s,function(e){return l(e,r)})):l(e,s):(o=(i=c(e=l(e,s)))[0],e=i[1],o&&(n=D(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},o=function(e,t,n,r){var i,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(r=r||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)i=d[l]=g.module(e);else if(w(m,o)||w(v,o)||w(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(r,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(i&&i.exports!==h&&i.exports!==m[e]?m[e]=i.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,r,i){if("string"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=r,r=i),r?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=r),e.define("almond",function(){}),e.define("jquery",[],function(){var e=u||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(o){var i={};function u(e){var t=e.prototype,n=[];for(var r in t){"function"==typeof t[r]&&"constructor"!==r&&n.push(r)}return n}i.Extend=function(e,t){var n={}.hasOwnProperty;function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i.Decorate=function(r,i){var e=u(i),t=u(r);function o(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=r.prototype.constructor;0<t&&(e.call(arguments,r.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=r.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=r.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},i.Observable=e,i.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},i.bind=function(e,t){return function(){e.apply(t,arguments)}},i._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in r||(r[o]={}),i==n.length-1&&(r[o]=e[t]),r=r[o]}delete e[t]}}return e},i.hasScroll=function(e,t){var n=o(t),r=t.style.overflowX,i=t.style.overflowY;return(r!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===r||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},i.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],i=this.option(r);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},r.prototype.position=function(e,t){t.find(".select2-results").append(e)},r.prototype.sort=function(e){return this.options.get("sorter")(e)},r.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},r.prototype.setClasses=function(){var t=this;this.data.current(function(e){var r=h.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,r)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},r.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},r.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},r.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"option","aria-selected":"false"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var i in(null!=e.element&&r.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var s=h(t),a=document.createElement("strong");a.className="select2-results__group";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):i<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,r=0<e.deltaY&&t-e.deltaY<=0,i=e.deltaY<0&&n<=l.$results.height();r?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=h(this),n=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:h(this)})})},r.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},r.prototype.destroy=function(){this.$results.remove()},r.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,r=e.offset().top,i=this.$results.scrollTop()+(r-n),o=r-n;i-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.selectionContainer(),o=this.display(r,i);i.append(o);var s=r.title||r.text;s&&i.attr("title",s),l.StoreData(i[0],"data",r),t.push(i)}var a=this.$selection.find(".select2-selection__rendered");l.appendMany(a,t)}},n}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},t}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,r,a){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var r=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};if(this.trigger("clear",o),o.prevented)this.$element.val(i);else{for(var s=0;s<r.length;s++)if(o={data:r[s]},this.trigger("unselect",o),o.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=r.DELETE&&t.which!=r.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.options.get("translations").get("removeAllItems"),r=i('<span class="select2-selection__clear" title="'+n()+'">×</span>');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=a.GetData(t[0],"data");r.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){r.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)r.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&r.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var r=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,i)){t=t||{};var n=s.Event("select2:"+e,{params:t});r.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function r(e){this.dict=e||{}}return r.prototype.all=function(){return this.dict},r.prototype.get=function(e){return this.dict[e]},r.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},r._cache={},r.loadPath=function(e){if(!(e in r._cache)){var t=n(e);r._cache[e]=t}return new r(r._cache[e])},r}),e.define("select2/diacritics",[],function(){return{"â’¶":"A","A":"A","À":"A","Ã":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ä€":"A","Ä‚":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ä":"A","Çž":"A","Ả":"A","Ã…":"A","Ǻ":"A","Ç":"A","È€":"A","È‚":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ä„":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ç¢":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","â’·":"B","ï¼¢":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Æ‚":"B","Æ":"B","â’¸":"C","ï¼£":"C","Ć":"C","Ĉ":"C","ÄŠ":"C","ÄŒ":"C","Ç":"C","Ḉ":"C","Ƈ":"C","È»":"C","Ꜿ":"C","â’¹":"D","D":"D","Ḋ":"D","ÄŽ":"D","Ḍ":"D","á¸":"D","Ḓ":"D","Ḏ":"D","Ä":"D","Æ‹":"D","ÆŠ":"D","Ɖ":"D","ê¹":"D","DZ":"DZ","Ç„":"DZ","Dz":"Dz","Ç…":"Dz","â’º":"E","ï¼¥":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ä’":"E","Ḕ":"E","Ḗ":"E","Ä”":"E","Ä–":"E","Ë":"E","Ẻ":"E","Äš":"E","È„":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Æ":"E","ÆŽ":"E","â’»":"F","F":"F","Ḟ":"F","Æ‘":"F","ê»":"F","â’¼":"G","G":"G","Ç´":"G","Äœ":"G","Ḡ":"G","Äž":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Æ“":"G","êž ":"G","ê½":"G","ê¾":"G","â’½":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Èž":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","â±µ":"H","êž":"H","â’¾":"I","I":"I","ÃŒ":"I","Ã":"I","ÃŽ":"I","Ĩ":"I","Ī":"I","Ĭ":"I","Ä°":"I","Ã":"I","Ḯ":"I","Ỉ":"I","Ç":"I","Ȉ":"I","ÈŠ":"I","Ị":"I","Ä®":"I","Ḭ":"I","Æ—":"I","â’¿":"J","J":"J","Ä´":"J","Ɉ":"J","â“€":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","ê€":"K","ê‚":"K","ê„":"K","Ꞣ":"K","â“":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Å":"L","Ƚ":"L","â±¢":"L","â± ":"L","êˆ":"L","ê†":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","â“‚":"M","ï¼":"M","Ḿ":"M","á¹€":"M","Ṃ":"M","â±®":"M","Æœ":"M","Ⓝ":"N","ï¼®":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Å…":"N","Ṋ":"N","Ṉ":"N","È ":"N","Æ":"N","êž":"N","Ꞥ":"N","ÇŠ":"NJ","Ç‹":"Nj","â“„":"O","O":"O","Ã’":"O","Ó":"O","Ô":"O","á»’":"O","á»":"O","á»–":"O","á»”":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","ÅŒ":"O","á¹":"O","á¹’":"O","ÅŽ":"O","È®":"O","È°":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Å":"O","Ç‘":"O","ÈŒ":"O","ÈŽ":"O","Æ ":"O","Ờ":"O","Ớ":"O","á» ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","ÆŸ":"O","êŠ":"O","êŒ":"O","Å’":"OE","Æ¢":"OI","êŽ":"OO","È¢":"OU","â“…":"P","ï¼°":"P","á¹”":"P","á¹–":"P","Ƥ":"P","â±£":"P","ê":"P","ê’":"P","ê”":"P","Ⓠ":"Q","ï¼±":"Q","ê–":"Q","ê˜":"Q","ÉŠ":"Q","Ⓡ":"R","ï¼²":"R","Å”":"R","Ṙ":"R","Ř":"R","È":"R","È’":"R","Ṛ":"R","Ṝ":"R","Å–":"R","Ṟ":"R","ÉŒ":"R","Ɽ":"R","êš":"R","Ꞧ":"R","êž‚":"R","Ⓢ":"S","ï¼³":"S","ẞ":"S","Åš":"S","Ṥ":"S","Åœ":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","Ș":"S","Åž":"S","â±¾":"S","Ꞩ":"S","êž„":"S","Ⓣ":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Èš":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","â“Š":"U","ï¼µ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ãœ":"U","Ç›":"U","Ç—":"U","Ç•":"U","Ç™":"U","Ủ":"U","Å®":"U","Å°":"U","Ç“":"U","È”":"U","È–":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","Ṷ":"U","á¹´":"U","É„":"U","â“‹":"V","V":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","êž":"V","É…":"V","ê ":"VY","â“Œ":"W","ï¼·":"W","Ẁ":"W","Ẃ":"W","Å´":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","â±²":"W","â“":"X","X":"X","Ẋ":"X","Ẍ":"X","â“Ž":"Y","ï¼¹":"Y","Ỳ":"Y","Ã":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","á»´":"Y","Ƴ":"Y","ÉŽ":"Y","Ỿ":"Y","â“":"Z","Z":"Z","Ź":"Z","áº":"Z","Å»":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","ê¢":"Z","â“":"a","ï½":"a","ẚ":"a","à ":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","Ä":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","ÇŸ":"a","ả":"a","Ã¥":"a","Ç»":"a","ÇŽ":"a","È":"a","ȃ":"a","ạ":"a","áº":"a","ặ":"a","á¸":"a","Ä…":"a","â±¥":"a","É":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","â“‘":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","Æ€":"b","ƃ":"b","É“":"b","â“’":"c","c":"c","ć":"c","ĉ":"c","Ä‹":"c","Ä":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","â““":"d","d":"d","ḋ":"d","Ä":"d","á¸":"d","ḑ":"d","ḓ":"d","á¸":"d","Ä‘":"d","ÆŒ":"d","É–":"d","É—":"d","êº":"d","dz":"dz","dž":"dz","â“”":"e","ï½…":"e","è":"e","é":"e","ê":"e","á»":"e","ế":"e","á»…":"e","ể":"e","ẽ":"e","Ä“":"e","ḕ":"e","ḗ":"e","Ä•":"e","Ä—":"e","ë":"e","ẻ":"e","Ä›":"e","È…":"e","ȇ":"e","ẹ":"e","ệ":"e","È©":"e","á¸":"e","Ä™":"e","ḙ":"e","ḛ":"e","ɇ":"e","É›":"e","Ç":"e","â“•":"f","f":"f","ḟ":"f","Æ’":"f","ê¼":"f","â“–":"g","g":"g","ǵ":"g","Ä":"g","ḡ":"g","ÄŸ":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","êž¡":"g","áµ¹":"g","ê¿":"g","â“—":"h","h":"h","Ä¥":"h","ḣ":"h","ḧ":"h","ÈŸ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","É¥":"h","Æ•":"hv","ⓘ":"i","i":"i","ì":"i","Ã":"i","î":"i","Ä©":"i","Ä«":"i","Ä":"i","ï":"i","ḯ":"i","ỉ":"i","Ç":"i","ȉ":"i","È‹":"i","ị":"i","į":"i","á¸":"i","ɨ":"i","ı":"i","â“™":"j","j":"j","ĵ":"j","Ç°":"j","ɉ":"j","â“š":"k","k":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","Æ™":"k","ⱪ":"k","ê":"k","êƒ":"k","ê…":"k","ꞣ":"k","â“›":"l","l":"l","Å€":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","Å‚":"l","Æš":"l","É«":"l","ⱡ":"l","ê‰":"l","êž":"l","ê‡":"l","lj":"lj","â“œ":"m","ï½":"m","ḿ":"m","á¹":"m","ṃ":"m","ɱ":"m","ɯ":"m","â“":"n","n":"n","ǹ":"n","Å„":"n","ñ":"n","á¹…":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","Æž":"n","ɲ":"n","ʼn":"n","êž‘":"n","ꞥ":"n","ÇŒ":"nj","â“ž":"o","ï½":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","á»—":"o","ổ":"o","õ":"o","á¹":"o","È":"o","á¹":"o","Å":"o","ṑ":"o","ṓ":"o","Å":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","á»":"o","Å‘":"o","Ç’":"o","È":"o","È":"o","Æ¡":"o","á»":"o","á»›":"o","ỡ":"o","ở":"o","ợ":"o","á»":"o","á»™":"o","Ç«":"o","Ç":"o","ø":"o","Ç¿":"o","É”":"o","ê‹":"o","ê":"o","ɵ":"o","Å“":"oe","Æ£":"oi","È£":"ou","ê":"oo","â“Ÿ":"p","ï½":"p","ṕ":"p","á¹—":"p","Æ¥":"p","áµ½":"p","ê‘":"p","ê“":"p","ê•":"p","â“ ":"q","q":"q","É‹":"q","ê—":"q","ê™":"q","â“¡":"r","ï½’":"r","Å•":"r","á¹™":"r","Å™":"r","È‘":"r","È“":"r","á¹›":"r","á¹":"r","Å—":"r","ṟ":"r","É":"r","ɽ":"r","ê›":"r","ꞧ":"r","ꞃ":"r","â“¢":"s","s":"s","ß":"s","Å›":"s","á¹¥":"s","Å":"s","ṡ":"s","Å¡":"s","ṧ":"s","á¹£":"s","ṩ":"s","È™":"s","ÅŸ":"s","È¿":"s","êž©":"s","êž…":"s","ẛ":"s","â“£":"t","ï½”":"t","ṫ":"t","ẗ":"t","Å¥":"t","á¹":"t","È›":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å":"u","ü":"u","Çœ":"u","ǘ":"u","Ç–":"u","Çš":"u","ủ":"u","ů":"u","ű":"u","Ç”":"u","È•":"u","È—":"u","Æ°":"u","ừ":"u","ứ":"u","ữ":"u","á»":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","ʉ":"u","â“¥":"v","ï½–":"v","á¹½":"v","ṿ":"v","Ê‹":"v","êŸ":"v","ÊŒ":"v","ê¡":"vy","ⓦ":"w","ï½—":"w","áº":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","â±³":"w","ⓧ":"x","x":"x","ẋ":"x","áº":"x","ⓨ":"y","ï½™":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","áº":"y","ÿ":"y","á»·":"y","ẙ":"y","ỵ":"y","Æ´":"y","É":"y","ỿ":"y","â“©":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","È¥":"z","É€":"z","ⱬ":"z","ê£":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","ÎŒ":"Ο","ÎŽ":"Î¥","Ϋ":"Î¥","Î":"Ω","ά":"α","Î":"ε","ή":"η","ί":"ι","ÏŠ":"ι","Î":"ι","ÏŒ":"ο","Ï":"Ï…","Ï‹":"Ï…","ΰ":"Ï…","ÏŽ":"ω","Ï‚":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(r){function n(e,t){n.__super__.constructor.call(this)}return r.Extend(n,r.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=r.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+r.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],r=this;this.$element.find(":selected").each(function(){var e=l(this),t=r.item(e);n.push(t)}),e(n)},n.prototype.select=function(i){var o=this;if(i.selected=!0,l(i.element).is("option"))return i.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var r=i[n].id;-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")});else{var e=i.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(i){var o=this;if(this.$element.prop("multiple")){if(i.selected=!1,l(i.element).is("option"))return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].id;r!==i.id&&-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(r,e){var i=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(r,t);null!==n&&i.push(n)}}),e({results:i})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),r=this._normalizeItem(e);return r.element=t,a.StoreData(t,"data",r),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),r=[],i=0;i<n.length;i++){var o=l(n[i]),s=this.item(o);r.push(s)}t.children=r}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function r(e,t){this._dataToConvert=t.get("data")||[],r.__super__.constructor.call(this,e,t)}return f.Extend(r,e),r.prototype.bind=function(e,t){r.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),r.__super__.select.call(this,n)},r.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),r=n.map(function(){return t.item(g(this)).id}).get(),i=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,r)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}i.push(p)}}return i},r}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var r=o.ajax(e);return r.then(t),r.fail(n),r}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,r){var i=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=i.processResults(e,n);i.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),r(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||i.trigger("results:message",{message:"errorLoading"})});i._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var r=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(r))for(var s=0;s<r.length;s++){var a=r[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var r=t.results,i=0;i<r.length;i++){var o=r[i],s=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||s)return!n&&(t.data=r,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(r,a)}t.results=r,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,function(e){var t,n=i._normalizeItem(e);if(!i.$element.find("option").filter(function(){return d(this).val()===n.id}).length){var r=i.option(n);r.attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([r])}t=n,i.trigger("select",{data:t})});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.trigger("focus")),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,r){for(var i=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,i)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(r(u),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-s,u=l>i.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r<t.length;r++){var i=t[r];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(e){r._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var i=o.GetData(r[0],"data");null!=i.element&&i.element.selected||null==i.element&&i.selected||this.trigger("select",{data:i})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,u,d,p,h,f,g,m,v,y,s,t,_,$,b,w,A,x,D,S,E,C,O,T,q,L,I,j,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=b:null!=e.data?e.dataAdapter=$:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,w)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=E;else{var r=y.Decorate(E,C);e.dropdownAdapter=r}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,L)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var i=u(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,i)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=u(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var r=c.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&r.children.splice(i,1);return 0<r.children.length?r:e(t,r)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,r=this.defaults.language,i=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],r=0;r<t.length;r++)if(n.push(t[r]),"string"==typeof t[r]&&0<t[r].indexOf("-")){var i=t[r].split("-")[0];n.push(i)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,r=0;r<e.length;r++){var i=new s,o=e[r];if("string"==typeof o)try{i=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,i=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else i=c.isPlainObject(o)?new s(o):o;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var r=y._convertData(n);c.extend(!0,this.defaults,r)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(r,d,i,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=i.applyFromElement(this.options,t)),this.options=i.apply(this.options),t&&t.is("input")){var n=r(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function r(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var o=e[0].attributes[i].name,s="data-";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,r)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,u,r){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var i=this.render();this._placeContainer(i);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,i);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,i);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,r=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,r)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===r.ESC||t===r.TAB||t===r.UP&&e.altKey?(n.close(e),e.preventDefault()):t===r.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===r.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===r.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===r.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===r.ENTER||t===r.SPACE||t===r.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){t.addedNodes[i].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(r._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),r=this;n&&this.dataAdapter.current(function(e){r.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in r){var i=r[e],o={prevented:!1,name:e,args:t};if(n.call(this,i,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",u.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1<i.inArray(t,a)?this:n}}return null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return u.fn.select2.amd=e,t}); -- GitLab