Compare commits

..
Author SHA1 Message Date
Richard Schreiber 73c10320f0 Presale: fix auto-unchecked button-checkboxes 2024-03-08 12:00:40 +01:00
Raphael Michel a3ce3b9af3 Select2: Fix multi-select styling for events 2024-03-08 10:09:11 +01:00
Raphael Michel b6461e9303 Select2: Set closeOnSelect for event selection 2024-03-08 10:08:44 +01:00
Raphael Michel f7dfd51c2c Open invoices on new page 2024-03-07 10:57:41 +01:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 3b98d87a26 Update python-dateutil requirement from ==2.8.* to ==2.9.* (#3950)
Updates the requirements on [python-dateutil](https://github.com/dateutil/dateutil) to permit the latest version.
- [Release notes](https://github.com/dateutil/dateutil/releases)
- [Changelog](https://github.com/dateutil/dateutil/blob/master/NEWS)
- [Commits](https://github.com/dateutil/dateutil/compare/2.8.0...2.9.0)

---
updated-dependencies:
- dependency-name: python-dateutil
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-05 12:21:12 +01:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> f045062055 Bump @babel/preset-env from 7.23.9 to 7.24.0 in /src/pretix/static/npm_dir (#3952)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.9 to 7.24.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.24.0/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-05 12:17:23 +01:00
Felix Schäfer eb501dd1ea Correct config key in docs (#3955) 2024-03-05 12:17:17 +01:00
Dean Wyns 2d8793c355 Translations: Update Dutch
Currently translated at 88.7% (4938 of 5565 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/nl/

powered by weblate
2024-03-05 12:16:58 +01:00
21 changed files with 478 additions and 227 deletions
+2 -2
View File
@@ -345,7 +345,7 @@ to speed up various operations::
The location of redis, as a URL of the form ``redis://[:password]@localhost:6379/0``
or ``unix://[:password]@/path/to/socket.sock?db=0``
``session``
``sessions``
When this is set to ``True``, redis will be used as the session storage.
``sentinels``
@@ -521,4 +521,4 @@ pretix can optionally make use of a GeoIP database for some features. It needs a
.. _GeoAcumen: https://github.com/geoacumen/geoacumen-country
.. _GeoLite2: https://dev.maxmind.com/geoip/geolite2-free-geolocation-data
.. _GeoLite2: https://dev.maxmind.com/geoip/geolite2-free-geolocation-data
+1 -1
View File
@@ -84,7 +84,7 @@ dependencies = [
"pycryptodome==3.20.*",
"pypdf==3.9.*",
"python-bidi==0.4.*", # Support for Arabic in reportlab
"python-dateutil==2.8.*",
"python-dateutil==2.9.*",
"pytz",
"pytz-deprecation-shim==0.1.*",
"pyuca",
+13 -22
View File
@@ -80,15 +80,6 @@ from .organizer import Organizer, Team
logger = logging.getLogger(__name__)
def annotate_with_time_based_properties(events_or_subevents, now_dt):
print("annotate_with_time_based_properties", now_dt)
for e_s in events_or_subevents:
if e_s:
e_s.presale_is_running = e_s.presale_is_running_by_time(now_dt)
e_s.presale_has_ended = e_s.presale_has_ended_by_time(now_dt)
return events_or_subevents
class EventMixin:
def clean(self):
if self.presale_start and self.presale_end and self.presale_start > self.presale_end:
@@ -238,17 +229,17 @@ class EventMixin:
else:
return self.presale_end
def presale_has_ended_by_time(self, now_dt: datetime=None):
@property
def presale_has_ended(self):
"""
Is true, when ``presale_end`` is set and in the past.
"""
now_dt = now_dt or now()
if self.effective_presale_end:
return now_dt > self.effective_presale_end
return now() > self.effective_presale_end
elif self.date_to:
return now_dt > self.date_to
return now() > self.date_to
else:
return now_dt.astimezone(self.timezone).date() > self.date_from.astimezone(self.timezone).date()
return now().astimezone(self.timezone).date() > self.date_from.astimezone(self.timezone).date()
@property
def effective_presale_start(self):
@@ -262,15 +253,15 @@ class EventMixin:
else:
return self.presale_start
def presale_is_running_by_time(self, now_dt: datetime=None):
@property
def presale_is_running(self):
"""
Is true, when ``presale_end`` is not set or in the future and ``presale_start`` is not
set or in the past.
"""
now_dt = now_dt or now()
if self.effective_presale_start and now_dt < self.effective_presale_start:
if self.effective_presale_start and now() < self.effective_presale_start:
return False
return not self.presale_has_ended_by_time(now_dt)
return not self.presale_has_ended
@property
def event_microdata(self):
@@ -692,12 +683,12 @@ class Event(EventMixin, LoggedModel):
return qs_annotated
def presale_has_ended_by_time(self, now_dt: datetime = None):
now_dt = now_dt or now()
@property
def presale_has_ended(self):
if self.has_subevents:
return self.presale_end and now_dt > self.presale_end
return self.presale_end and now() > self.presale_end
else:
return super().presale_has_ended_by_time(now_dt)
return super().presale_has_ended
def delete_all_orders(self, really=False):
from .checkin import Checkin
File diff suppressed because it is too large Load Diff
-1
View File
@@ -545,7 +545,6 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
)
if getattr(self.request, 'customer', None) else None
),
now_dt=self.request.now_dt,
)
item_cache[ckey] = items
else:
-1
View File
@@ -59,7 +59,6 @@ class WaitingListForm(forms.ModelForm):
)
if customer else None
),
now_dt=request.now_dt,
)
for i in items:
if not i.allow_waitinglist:
-27
View File
@@ -32,11 +32,8 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under the License.
from dateutil.parser import parse
from django.template.response import TemplateResponse
from django.urls import resolve
from django.utils.timezone import now
from django_scopes import scope
from pretix.base.channels import WebshopSalesChannel
@@ -82,27 +79,3 @@ class EventMiddleware:
response = response.render()
return response
class TimeMachineMiddleware:
def __init__(self, get_response=None):
self.get_response = get_response
super().__init__()
def __call__(self, request):
if hasattr(request, 'event') and hasattr(request, '_namespace') and request._namespace == 'presale' and \
'time_machine' in request.COOKIES and \
request.user.has_event_permission(request.organizer, request.event, 'can_change_event_settings', request):
print("setting now_dt from cookie")
request.now_dt = parse(request.COOKIES['time_machine'])
request.now_dt_is_fake = True
else:
print("setting now_dt to now",
"hasevent?",hasattr(request, 'event') ,
"namespace?",hasattr(request, '_namespace') and request._namespace,
"cookies?",request.COOKIES)
request.now_dt = now()
return self.get_response(request)
@@ -33,17 +33,6 @@
</div>
</div>
{% endif %}
{% if request.now_dt_is_fake %}
<div class="offline-banner">
<div class="container">
<span class="fa fa-user-secret" aria-hidden="true"></span>
{% trans "You are currently using the time machine. The ticket shop is rendered as if it were" %} {{ request.now_dt }}
<a href="#">
{% trans "Go back to current time" %}
</a>
</div>
</div>
{% endif %}
<div class="container page-header-links {% if event.settings.theme_color_background|upper != "#FFFFFF" or event_logo_image_large %}page-header-links-outside{% endif %}">
{% if event.settings.locales|length > 1 or request.organizer.settings.customer_accounts %}
{% if event.settings.theme_color_background|upper != "#FFFFFF" or event_logo_image_large %}
@@ -239,7 +239,7 @@
<ul>
{% for i in invoices %}
<li>
<a href="{% eventurl event "presale:event.invoice.download" invoice=i.pk secret=order.secret order=order.code %}">
<a href="{% eventurl event "presale:event.invoice.download" invoice=i.pk secret=order.secret order=order.code %}" target="_blank">
{% if i.is_cancellation %}{% trans "Cancellation" context "invoice" %}{% else %}{% trans "Invoice" %}{% endif %}
{{ i.number }}</a> ({{ i.date|date:"SHORT_DATE_FORMAT" }})
</li>
-1
View File
@@ -569,7 +569,6 @@ class RedeemView(NoSearchIndexViewMixin, EventViewMixin, CartMixin, TemplateView
testmode=self.request.event.testmode
) if getattr(self.request, 'customer', None) else None
),
now_dt=self.request.now_dt,
)
# Calculate how many options the user still has. If there is only one option, we can
+1 -1
View File
@@ -55,7 +55,7 @@ class CheckoutView(View):
messages.error(request, _("Your cart is empty"))
return self.redirect(self.get_index_url(self.request))
if not request.event.presale_is_running_by_time(request.now_dt):
if not request.event.presale_is_running:
messages.error(request, _("The booking period for this event is over or has not yet started."))
return self.redirect(self.get_index_url(self.request))
+15 -21
View File
@@ -64,7 +64,7 @@ from pretix.base.channels import get_all_sales_channels
from pretix.base.models import (
ItemVariation, Quota, SeatCategoryMapping, Voucher,
)
from pretix.base.models.event import Event, SubEvent, annotate_with_time_based_properties
from pretix.base.models.event import Event, SubEvent
from pretix.base.models.items import (
ItemAddOn, ItemBundle, SubEventItem, SubEventItemVariation,
)
@@ -105,8 +105,7 @@ def item_group_by_category(items):
def get_grouped_items(event, subevent=None, voucher=None, channel='web', require_seat=0, base_qs=None, allow_addons=False,
quota_cache=None, filter_items=None, filter_categories=None, memberships=None,
ignore_hide_sold_out_for_item_ids=None, now_dt: datetime=None):
now_dt = now_dt or now()
ignore_hide_sold_out_for_item_ids=None):
base_qs_set = base_qs is not None
base_qs = base_qs if base_qs is not None else event.items
@@ -120,8 +119,8 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
requires_seat = Value(0, output_field=IntegerField())
variation_q = (
Q(Q(available_from__isnull=True) | Q(available_from__lte=now_dt) | Q(available_from_mode='info')) &
Q(Q(available_until__isnull=True) | Q(available_until__gte=now_dt) | Q(available_until_mode='info'))
Q(Q(available_from__isnull=True) | Q(available_from__lte=now()) | Q(available_from_mode='info')) &
Q(Q(available_until__isnull=True) | Q(available_until__gte=now()) | Q(available_until_mode='info'))
)
if not voucher or not voucher.show_hidden_items:
variation_q &= Q(hide_without_voucher=False)
@@ -138,8 +137,8 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
subevent_disabled=Exists(
SubEventItemVariation.objects.filter(
Q(disabled=True)
| (Exact(OuterRef('available_from_mode'), 'hide') & Q(available_from__gt=now_dt))
| (Exact(OuterRef('available_until_mode'), 'hide') & Q(available_until__lt=now_dt)),
| (Exact(OuterRef('available_from_mode'), 'hide') & Q(available_from__gt=now()))
| (Exact(OuterRef('available_until_mode'), 'hide') & Q(available_until__lt=now())),
variation_id=OuterRef('pk'),
subevent=subevent,
)
@@ -210,8 +209,8 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
subevent_disabled=Exists(
SubEventItem.objects.filter(
Q(disabled=True)
| (Exact(OuterRef('available_from_mode'), 'hide') & Q(available_from__gt=now_dt))
| (Exact(OuterRef('available_until_mode'), 'hide') & Q(available_until__lt=now_dt)),
| (Exact(OuterRef('available_from_mode'), 'hide') & Q(available_from__gt=now()))
| (Exact(OuterRef('available_until_mode'), 'hide') & Q(available_until__lt=now())),
item_id=OuterRef('pk'),
subevent=subevent,
)
@@ -307,7 +306,7 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
item._remove = True
continue
item.current_unavailability_reason = item.unavailability_reason(now_dt=now_dt, has_voucher=voucher, subevent=subevent)
item.current_unavailability_reason = item.unavailability_reason(has_voucher=voucher, subevent=subevent)
item.description = str(item.description)
for recv, resp in item_description.send(sender=event, item=item, variation=None, subevent=subevent):
@@ -423,7 +422,7 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
if not display_add_to_cart:
display_add_to_cart = not item.requires_seat and var.order_max > 0
var.current_unavailability_reason = var.unavailability_reason(now_dt=now_dt, has_voucher=voucher, subevent=subevent)
var.current_unavailability_reason = var.unavailability_reason(has_voucher=voucher, subevent=subevent)
item.original_price = (
item.tax(item.original_price, currency=event.currency, include_bundled=True,
@@ -536,7 +535,6 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
context['ev'] = self.subevent or self.request.event
context['subevent'] = self.subevent
annotate_with_time_based_properties([self.request.event, self.subevent], self.request.now_dt)
# Show voucher option if an event is selected and vouchers exist
vouchers_exist = self.request.event.cache.get('vouchers_exist')
@@ -545,10 +543,10 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
self.request.event.cache.set('vouchers_exist', vouchers_exist)
context['show_vouchers'] = context['vouchers_exist'] = vouchers_exist and (
(self.request.event.has_subevents and not self.subevent) or
context['ev'].presale_is_running_by_time(self.request.now_dt)
context['ev'].presale_is_running
)
context['allow_waitinglist'] = self.request.event.settings.waiting_list_enabled and context['ev'].presale_is_running_by_time(self.request.now_dt)
context['allow_waitinglist'] = self.request.event.settings.waiting_list_enabled and context['ev'].presale_is_running
if not self.request.event.has_subevents or self.subevent:
# Fetch all items
@@ -564,7 +562,6 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
testmode=self.request.event.testmode
) if getattr(self.request, 'customer', None) else None
),
now_dt=self.request.now_dt
)
context['waitinglist_seated'] = False
@@ -615,7 +612,7 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
context['show_cart'] = (
context['cart']['positions'] and (
self.request.event.has_subevents or self.request.event.presale_is_running_by_time(self.request.now_dt)
self.request.event.has_subevents or self.request.event.presale_is_running
)
)
if self.request.event.settings.redirect_to_checkout_directly:
@@ -682,7 +679,6 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
limit_before, after, ebd, set(), self.request.event,
self.kwargs.get('cart_namespace'),
voucher,
now_dt=self.request.now_dt,
)
# Hide names of subevents in event series where it is always the same. No need to show the name of the museum thousands of times
@@ -742,7 +738,6 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
limit_before, after, ebd, set(), self.request.event,
self.kwargs.get('cart_namespace'),
voucher,
now_dt=self.request.now_dt,
)
# Hide names of subevents in event series where it is always the same. No need to show the name of the museum thousands of times
@@ -781,7 +776,7 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
future_only=self.request.event.settings.event_calendar_future_only
)
else:
context['subevent_list'] = annotate_with_time_based_properties(self.request.event.subevents_sorted(
context['subevent_list'] = self.request.event.subevents_sorted(
filter_qs_by_attr(
self.request.event.subevents_annotated(
self.request.sales_channel.identifier,
@@ -789,8 +784,7 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
).using(settings.DATABASE_REPLICA),
self.request
)
), self.request.now_dt)
)
if self.request.event.settings.event_list_available_only and not voucher:
context['subevent_list'] = [
se for se in context['subevent_list']
+1 -2
View File
@@ -1311,8 +1311,7 @@ class OrderChangeMixin:
)
if self.order.customer else None
),
ignore_hide_sold_out_for_item_ids={k[0] for k in current_addon_products.keys()},
now_dt=self.request.now_dt,
ignore_hide_sold_out_for_item_ids={k[0] for k in current_addon_products.keys()}
)
item_cache[ckey] = items
else:
+2 -5
View File
@@ -63,7 +63,6 @@ from pretix.base.i18n import language
from pretix.base.models import (
Event, EventMetaValue, Organizer, Quota, SubEvent, SubEventMetaValue,
)
from pretix.base.models.event import annotate_with_time_based_properties
from pretix.base.services.quotas import QuotaAvailability
from pretix.helpers.compat import date_fromisocalendar
from pretix.helpers.daterange import daterange
@@ -550,16 +549,14 @@ def add_events_for_days(request, baseqs, before, after, ebd, timezones):
})
def add_subevents_for_days(qs, before, after, ebd, timezones, event=None, cart_namespace=None, voucher=None, now_dt=None):
print("add_subevents_for_days", now_dt)
now_dt = now_dt or now()
def add_subevents_for_days(qs, before, after, ebd, timezones, event=None, cart_namespace=None, voucher=None):
qs = qs.filter(active=True, is_public=True).filter(
Q(Q(date_to__gte=before) & Q(date_from__lte=after)) |
Q(Q(date_to__isnull=True) & Q(date_from__gte=before) & Q(date_from__lte=after))
).order_by(
'date_from'
)
qs = annotate_with_time_based_properties(qs, now_dt)
quotas_to_compute = []
for se in qs:
if se.presale_is_running:
+2 -3
View File
@@ -256,7 +256,6 @@ class WidgetAPIProductList(EventListMixin, View):
testmode=self.request.event.testmode
) if getattr(self.request, 'customer', None) else None
),
now_dt=self.request.now_dt,
)
grps = []
@@ -410,11 +409,11 @@ class WidgetAPIProductList(EventListMixin, View):
availability['color'] = 'none'
availability['text'] = gettext('More info')
availability['reason'] = 'unknown'
elif ev.presale_is_running_by_time(self.request.now_dt):
elif ev.presale_is_running:
availability['color'] = 'green'
availability['text'] = gettext('Book now')
availability['reason'] = 'ok'
elif ev.presale_has_ended_by_time(self.request.now_dt):
elif ev.presale_has_ended:
availability['color'] = 'red'
availability['text'] = gettext('Sale over')
availability['reason'] = 'over'
-1
View File
@@ -443,7 +443,6 @@ MIDDLEWARE = [
'pretix.base.middleware.LocaleMiddleware',
'pretix.base.middleware.SecurityMiddleware',
'pretix.presale.middleware.EventMiddleware',
'pretix.presale.middleware.TimeMachineMiddleware',
'pretix.api.middleware.ApiScopeMiddleware',
]
+29 -29
View File
@@ -9,7 +9,7 @@
"version": "0.0.0",
"dependencies": {
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/preset-env": "^7.24.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.2.3",
"rollup": "^2.79.1",
@@ -335,9 +335,9 @@
}
},
"node_modules/@babel/helper-plugin-utils": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz",
"integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==",
"version": "7.24.0",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz",
"integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==",
"engines": {
"node": ">=6.9.0"
}
@@ -1196,13 +1196,13 @@
}
},
"node_modules/@babel/plugin-transform-object-rest-spread": {
"version": "7.23.4",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz",
"integrity": "sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==",
"version": "7.24.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.0.tgz",
"integrity": "sha512-y/yKMm7buHpFFXfxVFS4Vk1ToRJDilIa6fKRioB9Vjichv58TDGXTvqV0dN7plobAmTW5eSEGXDngE+Mm+uO+w==",
"dependencies": {
"@babel/compat-data": "^7.23.3",
"@babel/helper-compilation-targets": "^7.22.15",
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/compat-data": "^7.23.5",
"@babel/helper-compilation-targets": "^7.23.6",
"@babel/helper-plugin-utils": "^7.24.0",
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
"@babel/plugin-transform-parameters": "^7.23.3"
},
@@ -1479,13 +1479,13 @@
}
},
"node_modules/@babel/preset-env": {
"version": "7.23.9",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.9.tgz",
"integrity": "sha512-3kBGTNBBk9DQiPoXYS0g0BYlwTQYUTifqgKTjxUwEUkduRT2QOa0FPGBJ+NROQhGyYO5BuTJwGvBnqKDykac6A==",
"version": "7.24.0",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.0.tgz",
"integrity": "sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA==",
"dependencies": {
"@babel/compat-data": "^7.23.5",
"@babel/helper-compilation-targets": "^7.23.6",
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/helper-plugin-utils": "^7.24.0",
"@babel/helper-validator-option": "^7.23.5",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3",
@@ -1538,7 +1538,7 @@
"@babel/plugin-transform-new-target": "^7.23.3",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4",
"@babel/plugin-transform-numeric-separator": "^7.23.4",
"@babel/plugin-transform-object-rest-spread": "^7.23.4",
"@babel/plugin-transform-object-rest-spread": "^7.24.0",
"@babel/plugin-transform-object-super": "^7.23.3",
"@babel/plugin-transform-optional-catch-binding": "^7.23.4",
"@babel/plugin-transform-optional-chaining": "^7.23.4",
@@ -4378,9 +4378,9 @@
}
},
"@babel/helper-plugin-utils": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz",
"integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg=="
"version": "7.24.0",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz",
"integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w=="
},
"@babel/helper-remap-async-to-generator": {
"version": "7.22.20",
@@ -4922,13 +4922,13 @@
}
},
"@babel/plugin-transform-object-rest-spread": {
"version": "7.23.4",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz",
"integrity": "sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==",
"version": "7.24.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.0.tgz",
"integrity": "sha512-y/yKMm7buHpFFXfxVFS4Vk1ToRJDilIa6fKRioB9Vjichv58TDGXTvqV0dN7plobAmTW5eSEGXDngE+Mm+uO+w==",
"requires": {
"@babel/compat-data": "^7.23.3",
"@babel/helper-compilation-targets": "^7.22.15",
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/compat-data": "^7.23.5",
"@babel/helper-compilation-targets": "^7.23.6",
"@babel/helper-plugin-utils": "^7.24.0",
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
"@babel/plugin-transform-parameters": "^7.23.3"
}
@@ -5091,13 +5091,13 @@
}
},
"@babel/preset-env": {
"version": "7.23.9",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.9.tgz",
"integrity": "sha512-3kBGTNBBk9DQiPoXYS0g0BYlwTQYUTifqgKTjxUwEUkduRT2QOa0FPGBJ+NROQhGyYO5BuTJwGvBnqKDykac6A==",
"version": "7.24.0",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.0.tgz",
"integrity": "sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA==",
"requires": {
"@babel/compat-data": "^7.23.5",
"@babel/helper-compilation-targets": "^7.23.6",
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/helper-plugin-utils": "^7.24.0",
"@babel/helper-validator-option": "^7.23.5",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3",
@@ -5150,7 +5150,7 @@
"@babel/plugin-transform-new-target": "^7.23.3",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4",
"@babel/plugin-transform-numeric-separator": "^7.23.4",
"@babel/plugin-transform-object-rest-spread": "^7.23.4",
"@babel/plugin-transform-object-rest-spread": "^7.24.0",
"@babel/plugin-transform-object-super": "^7.23.3",
"@babel/plugin-transform-optional-catch-binding": "^7.23.4",
"@babel/plugin-transform-optional-chaining": "^7.23.4",
+1 -1
View File
@@ -5,7 +5,7 @@
"scripts": {},
"dependencies": {
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/preset-env": "^7.24.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.2.3",
"vue": "^2.7.16",
@@ -625,6 +625,7 @@ var form_handlers = function (el) {
el.find('[data-model-select2=event]').each(function () {
var $s = $(this);
$s.select2({
closeOnSelect: !this.hasAttribute('multiple'),
theme: "bootstrap",
delay: 100,
allowClear: !$s.prop("required"),
@@ -904,8 +904,8 @@ details {
}
}
.select2-container [aria-multiselectable] .select2-results__option span strike::before,
.select2-container [aria-multiselectable] .select2-results__option span span::before {
.select2-container [aria-multiselectable] .select2-results__option > span > strike:first-child::before,
.select2-container [aria-multiselectable] .select2-results__option > span > span:first-child::before {
content: "";
font-family: FontAwesome;
display: inline-block;
@@ -913,8 +913,8 @@ details {
width: 1.28571em;
text-align: center;
}
.select2-container [aria-multiselectable] .select2-results__option[aria-selected=true] span strike::before,
.select2-container [aria-multiselectable] .select2-results__option[aria-selected=true] span span::before {
.select2-container [aria-multiselectable] .select2-results__option[aria-selected=true] > span > strike:first-child::before,
.select2-container [aria-multiselectable] .select2-results__option[aria-selected=true] > span > span:first-child::before {
content: ""
}
@@ -153,7 +153,7 @@ var form_handlers = function (el) {
var $others = $("input[name^=" + $(this).attr("data-exclusive-prefix") + "]:not([name=" + $(this).attr("name") + "])");
$(this).on('click change', function () {
if ($(this).prop('checked')) {
$others.prop('checked', false);
$others.prop('checked', false).trigger('change');
}
});
});