mirror of
https://github.com/pretix/pretix.git
synced 2026-01-28 01:12:29 +00:00
Compare commits
7 Commits
tooltip-a1
...
a11y-commo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
370d0438e4 | ||
|
|
0eee35be86 | ||
|
|
0bc09a3583 | ||
|
|
d2ebbcc4d9 | ||
|
|
d3368fe9b6 | ||
|
|
0aa1ea73f1 | ||
|
|
cf17b63a83 |
@@ -80,4 +80,4 @@ def serve_metrics(request):
|
||||
|
||||
content = "\n".join(output) + "\n"
|
||||
|
||||
return HttpResponse(content, content_type="text/plain;version=1.0.0;escaping=allow-utf-8")
|
||||
return HttpResponse(content)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% load compress %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load icon %}
|
||||
{% load safelink %}
|
||||
{% load statici18n %}
|
||||
{% load thumb %}
|
||||
@@ -47,6 +48,38 @@
|
||||
<nav id="skip-to-main" role="navigation" aria-label="{% trans "Skip link" context "skip-to-main-nav" %}" class="sr-only on-focus-visible">
|
||||
<p><a href="#content">{% trans "Skip to main content" %}</a></p>
|
||||
</nav>
|
||||
{% comment %}
|
||||
<dialog> needs to be available onload and role-attribute cannot be changed dynamically.
|
||||
Therefore we need two dialogs, one normal (e.g. for status info like "loading") and one
|
||||
alertdialog with a confirm-button.
|
||||
Note: dialog[aria-describedby] is not read out on VoiceOver, so we add both label and
|
||||
description to aria-labelledby.
|
||||
{% endcomment %}
|
||||
<dialog id="dialog-info" aria-labelledby="dialog-info-label dialog-info-description">
|
||||
<div class="modal-card">
|
||||
<div class="modal-card-icon">
|
||||
{% icon "cog big-rotating-icon" %}
|
||||
</div>
|
||||
<div class="modal-card-content">
|
||||
<h2 id="dialog-info-label">Hier die Überschrift</h2>
|
||||
<p id="dialog-info-description">Hier kommt der Text. Danach der Status-Absatz.</p>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
<dialog id="dialog-alert" role="alertdialog" aria-labelledby="dialog-alert-label dialog-alert-description">
|
||||
<div class="modal-card">
|
||||
<div class="modal-card-icon">
|
||||
{% icon "cog big-rotating-icon" %}
|
||||
</div>
|
||||
<div class="modal-card-content">
|
||||
<h2 id="dialog-alert-label">Hier die Überschrift</h2>
|
||||
<p id="dialog-alert-description"></p>
|
||||
</div>
|
||||
</div>
|
||||
<form method="dialog" class="text-right">
|
||||
<button class="btn btn-primary">OK</button>
|
||||
</form>
|
||||
</dialog>
|
||||
<header>
|
||||
{% if ie_deprecation_warning %}
|
||||
<div class="old-browser-warning">
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
{{ line.price|money:event.currency }}
|
||||
{% endif %}
|
||||
{% if line.discount and line.line_price_gross != line.price %}
|
||||
<span class="text-success discounted" data-toggle="tooltip" data-placement="bottom" title="{% trans "The price of this product was reduced because of an automatic discount." %}">
|
||||
<span class="text-success discounted" data-toggle="tooltip" title="{% trans "The price of this product was reduced because of an automatic discount." %}">
|
||||
<br>
|
||||
<span class="fa fa-star fa-fw" aria-hidden="true"></span>
|
||||
{% if line.price < line.line_price_gross %}
|
||||
@@ -334,7 +334,7 @@
|
||||
{{ line.price|money:event.currency }}
|
||||
{% endif %}
|
||||
{% if line.discount and line.line_price_gross != line.price %}
|
||||
<span class="text-success discounted" data-toggle="tooltip" data-placement="bottom" title="{% trans "The price of this product was reduced because of an automatic discount." %}">
|
||||
<span class="text-success discounted" data-toggle="tooltip" title="{% trans "The price of this product was reduced because of an automatic discount." %}">
|
||||
<br>
|
||||
<span class="fa fa-star fa-fw" aria-hidden="true"></span>
|
||||
{% if line.price < line.line_price_gross %}
|
||||
|
||||
@@ -1,55 +1,44 @@
|
||||
{% load i18n %}
|
||||
{% load eventurl %}
|
||||
{% load icon %}
|
||||
{% load urlreplace %}
|
||||
<nav aria-label="{% trans "calendar navigation" %}">
|
||||
<ul class="row calendar-nav">
|
||||
<li class="text-left flip">
|
||||
<li class="col-sm-4 col-xs-2 text-left flip">
|
||||
{% if subevent_list.has_before %}
|
||||
<a href="?{% url_replace request "date" subevent_list.before|date:"Y-m" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{% blocktrans with month=subevent_list.before|date:"F Y" %}Show previous month, {{ month }}{% endblocktrans %}">
|
||||
{% icon "arrow-left" %}
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
<span class="hidden-xs">{{ subevent_list.before|date:"F Y" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="text-center">
|
||||
<li class="col-sm-4 col-xs-8 text-center">
|
||||
<form class="form-inline" method="get" id="monthselform" action="{% eventurl event "presale:event.index" cart_namespace=cart_namespace %}">
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<fieldset>
|
||||
<legend class="sr-only">{% trans "Select a month to display" %}</legend>
|
||||
<div>
|
||||
<label for="calendar-input-date">{% trans "Month" %}</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<select name="date" class="form-control" id="calendar-input-date">
|
||||
{% for y in subevent_list.years %}
|
||||
<optgroup label="{{ y }}">
|
||||
{% for m in subevent_list.months %}
|
||||
<option value="{{ y }}-{{ m|date:"m" }}" {% if m.month == subevent_list.date.month and y == subevent_list.date.year %}selected{% endif %}>{{ m|date:"F" }} {{ y }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default" aria-label="{% trans "Show month" %}">
|
||||
{% icon "chevron-right" %}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<select name="date" class="form-control" aria-label="{% trans "Select month to show" %}">
|
||||
{% for y in subevent_list.years %}
|
||||
<optgroup label="{{ y }}">
|
||||
{% for m in subevent_list.months %}
|
||||
<option value="{{ y }}-{{ m|date:"m" }}" {% if m.month == subevent_list.date.month and y == subevent_list.date.year %}selected{% endif %}>{{ m|date:"F" }} {{ y }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit" class="js-hidden btn btn-default">
|
||||
{% trans "Go" %}
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
<li class="text-right flip">
|
||||
<li class="col-sm-4 col-xs-2 text-right flip">
|
||||
{% if subevent_list.has_after %}
|
||||
<a href="?{% url_replace request "date" subevent_list.after|date:"Y-m" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{% blocktrans with month=subevent_list.after|date:"F Y" %}Show next month, {{ month }}{% endblocktrans %}">
|
||||
<span class="hidden-xs">{{ subevent_list.after|date:"F Y" }}</span>
|
||||
{% icon "arrow-right" %}
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
@@ -1,78 +1,63 @@
|
||||
{% load i18n %}
|
||||
{% load eventurl %}
|
||||
{% load icon %}
|
||||
{% load urlreplace %}
|
||||
<nav aria-label="{% trans "calendar navigation" %}">
|
||||
<ul class="row calendar-nav">
|
||||
<li class="text-left flip">
|
||||
<li class="col-sm-4 col-xs-2 text-left flip">
|
||||
{% if subevent_list.has_before %}
|
||||
<a href="?{% url_replace request "date" subevent_list.before|date:"o-\WW" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{% blocktrans with week=subevent_list.before|date:subevent_list.week_format %}Show previous week, {{ week }}{% endblocktrans %}">
|
||||
{% icon "arrow-left" %}
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
<span class="hidden-xs">{{ subevent_list.before|date:subevent_list.week_format }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="text-center">
|
||||
<li class="col-sm-4 col-xs-8 text-center">
|
||||
<form class="form-inline" method="get" id="monthselform" action="{% eventurl event "presale:event.index" cart_namespace=cart_namespace %}">
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<select name="date" class="form-control" aria-label="{% trans "Select week to show" %}">
|
||||
{% for weeks_per_year in subevent_list.weeks %}
|
||||
<optgroup label="{{ weeks_per_year.0.0.year }}">
|
||||
{% for w in weeks_per_year %}
|
||||
<option value="{{ w.0.isocalendar.0 }}-W{{ w.0.isocalendar.1 }}"
|
||||
{% if w.0.isocalendar.0 == subevent_list.date.isocalendar.0 and w.0.isocalendar.1 == subevent_list.date.isocalendar.1 %}selected{% endif %}>
|
||||
{{ w.0|date:subevent_list.week_format }}
|
||||
({{ w.0|date:subevent_list.short_month_day_format }} – {{ w.1|date:subevent_list.short_month_day_format }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
<fieldset>
|
||||
<legend class="sr-only">{% trans "Select a week to display" %}</legend>
|
||||
<div>
|
||||
<label for="calendar-input-date">{% trans "Week" %}</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<select name="date" class="form-control" aria-label="{% trans "Select week to show" %}">
|
||||
{% for weeks_per_year in subevent_list.weeks %}
|
||||
<optgroup label="{{ weeks_per_year.0.0.year }}">
|
||||
{% for w in weeks_per_year %}
|
||||
<option value="{{ w.0.isocalendar.0 }}-W{{ w.0.isocalendar.1 }}"
|
||||
{% if w.0.isocalendar.0 == subevent_list.date.isocalendar.0 and w.0.isocalendar.1 == subevent_list.date.isocalendar.1 %}selected{% endif %}>
|
||||
{{ w.0|date:subevent_list.week_format }}
|
||||
({{ w.0|date:subevent_list.short_month_day_format }} – {{ w.1|date:subevent_list.short_month_day_format }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default" aria-label="{% trans "Show week" %}">
|
||||
{% icon "chevron-right" %}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</select>
|
||||
<button type="submit" class="js-hidden btn btn-default">
|
||||
{% trans "Go" %}
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
<li class="text-right flip">
|
||||
<li class="col-sm-4 col-xs-2 text-right flip">
|
||||
{% if subevent_list.has_after %}
|
||||
<a href="?{% url_replace request "date" subevent_list.after|date:"o-\WW" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{% blocktrans with week=subevent_list.after|date:subevent_list.week_format %}Show next week, {{ week }}{% endblocktrans %}">
|
||||
<span class="hidden-xs">{{ subevent_list.after|date:subevent_list.week_format }}</span>
|
||||
{% icon "arrow-right" %}
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% include "pretixpresale/fragment_week_calendar.html" with show_avail=event.settings.event_list_availability days=subevent_list.days show_names=subevent_list.show_names %}
|
||||
<div class="row visible-xs">
|
||||
<div class="col-xs-6 text-left flip">
|
||||
<a href="?{% url_replace request "date" subevent_list.before|date:"o-\WW" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{% blocktrans with week=subevent_list.before|date:subevent_list.week_format %}Show previous week, {{ week }}{% endblocktrans %}">
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
<span class="hidden-xs">{{ subevent_list.before|date:subevent_list.week_format }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right flip">
|
||||
<a href="?{% url_replace request "date" subevent_list.after|date:"o-\WW" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{% blocktrans with week=subevent_list.after|date:subevent_list.week_format %}Show next week, {{ week }}{% endblocktrans %}">
|
||||
<span class="hidden-xs">{{ subevent_list.after|date:subevent_list.week_format }}</span>
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="visible-xs text-center" aria-hidden="true">
|
||||
<a href="?{% url_replace request "date" subevent_list.before|date:"o-\WW" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{% blocktrans with week=subevent_list.before|date:subevent_list.week_format %}Show previous week, {{ week }}{% endblocktrans %}">
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
{{ subevent_list.before|date:subevent_list.week_format }}
|
||||
</a>
|
||||
<a href="?{% url_replace request "date" subevent_list.after|date:"o-\WW" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{% blocktrans with week=subevent_list.after|date:subevent_list.week_format %}Show next week, {{ week }}{% endblocktrans %}">
|
||||
{{ subevent_list.after|date:subevent_list.week_format }}
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
{% for d in weeks|iter_weekdays %}
|
||||
<th><span aria-hidden="true" class="text-muted">{{ d|date_fast:"D" }}</span><span class="sr-only">{{ d|date_fast:"l" }}</span></th>
|
||||
<th><span aria-hidden="true">{{ d|date_fast:"D" }}</span><span class="sr-only">{{ d|date_fast:"l" }}</span></th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
{% for f in filter_form.fields %}
|
||||
{% bootstrap_field filter_form|getitem:f %}
|
||||
{% endfor %}
|
||||
<div class="visible-xs"> </div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<span class="fa fa-filter" aria-hidden="true"></span>
|
||||
{% trans "Filter" %}
|
||||
|
||||
@@ -1,91 +1,61 @@
|
||||
{% extends "pretixpresale/organizers/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load icon %}
|
||||
{% load rich_text %}
|
||||
{% load eventurl %}
|
||||
{% load urlreplace %}
|
||||
{% block title %}{% trans "Event overview" %}{% endblock %}
|
||||
{% block content %}
|
||||
{% if organizer_homepage_text %}
|
||||
<div class="blank-after">
|
||||
<div>
|
||||
{{ organizer_homepage_text | rich_text }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="blank-after text-left flip">
|
||||
{% include "pretixpresale/fragment_calendar_nav.html" with date=date request=request style="calendar" %}
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title">
|
||||
<strong>
|
||||
{% blocktrans trimmed with month=date|date:"F Y" %}
|
||||
Events in {{ month }}
|
||||
{% endblocktrans %}
|
||||
</strong>
|
||||
</h2>
|
||||
</div>
|
||||
{% if filter_form.fields %}
|
||||
<div class="panel-subhead">
|
||||
{% include "pretixpresale/fragment_event_list_filter.html" with request=request %}
|
||||
<h3>{{ date|date:"F Y" }}</h3>
|
||||
<form class="form-inline" method="get" id="monthselform" action="{% eventurl request.organizer "presale:organizer.index" %}">
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-sm-6 col-xs-12 text-left flip">
|
||||
{% include "pretixpresale/fragment_calendar_nav.html" with date=date request=request style="calendar" %}
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-4 col-xs-8 text-center" role="group" aria-label="{% trans "Select month to show" %}">
|
||||
<select name="date" class="form-control" aria-label="{% trans "Month" %}">
|
||||
{% for y in years %}
|
||||
<optgroup label="{{ y }}">
|
||||
{% for m in months %}
|
||||
<option value="{{ y }}-{{ m|date:"m" }}" {% if m.month == date.month and y == date.year %}selected{% endif %}>{{ m|date:"F" }} {{ y }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit" class="js-hidden btn btn-default">
|
||||
{% trans "Go" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-5 col-sm-2 col-xs-4 text-right flip">
|
||||
{% if has_before %}
|
||||
<a href="?{% url_replace request "date" before|date:"Y-m" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ before|date:"F Y" }}">
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
<span class="hidden-sm hidden-xs">{{ before|date:"F Y" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if has_after %}
|
||||
<a href="?{% url_replace request "date" after|date:"Y-m" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ after|date:"F Y" }}">
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
<span class="hidden-sm hidden-xs">{{ after|date:"F Y" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel-body">
|
||||
<nav aria-label="{% trans "calendar navigation" %}">
|
||||
<ul class="row calendar-nav">
|
||||
<li class="text-left flip">
|
||||
{% if has_before %}
|
||||
<a href="?{% url_replace request "date" before|date:"Y-m" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ before|date:"F Y" }}">
|
||||
{% icon "arrow-left" %}
|
||||
<span class="hidden-xs">{{ before|date:"F Y" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="text-center">
|
||||
<form class="form-inline" method="get" id="monthselform" action="{% eventurl request.organizer "presale:organizer.index" %}">
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<fieldset>
|
||||
<legend class="sr-only">{% trans "Select a month to display" %}</legend>
|
||||
<div>
|
||||
<label for="calendar-input-date">{% trans "Month" %}</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<select name="date" class="form-control" id="calendar-input-date">
|
||||
{% for y in years %}
|
||||
<optgroup label="{{ y }}">
|
||||
{% for m in months %}
|
||||
<option value="{{ y }}-{{ m|date:"m" }}" {% if m.month == date.month and y == date.year %}selected{% endif %}>{{ m|date:"F" }} {{ y }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default" aria-label="{% trans "Show month" %}">
|
||||
{% icon "chevron-right" %}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</li>
|
||||
<li class="text-right flip">
|
||||
{% if has_after %}
|
||||
<a href="?{% url_replace request "date" after|date:"Y-m" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ after|date:"F Y" }}">
|
||||
<span class="hidden-xs">{{ after|date:"F Y" }}</span>
|
||||
{% icon "arrow-right" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% include "pretixpresale/fragment_calendar.html" with show_avail=request.organizer.settings.event_list_availability %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% include "pretixpresale/fragment_event_list_filter.html" with request=request %}
|
||||
{% include "pretixpresale/fragment_calendar.html" with show_avail=request.organizer.settings.event_list_availability %}
|
||||
|
||||
{% if multiple_timezones %}
|
||||
<div class="alert alert-info">
|
||||
{% blocktrans trimmed %}
|
||||
|
||||
@@ -1,102 +1,68 @@
|
||||
{% extends "pretixpresale/organizers/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load icon %}
|
||||
{% load rich_text %}
|
||||
{% load eventurl %}
|
||||
{% load urlreplace %}
|
||||
{% block title %}{% trans "Event overview" %}{% endblock %}
|
||||
{% block content %}
|
||||
{% if organizer_homepage_text %}
|
||||
<div class="blank-after">
|
||||
<div>
|
||||
{{ organizer_homepage_text | rich_text }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="blank-after text-left flip">
|
||||
{% include "pretixpresale/fragment_calendar_nav.html" with date=date request=request style="day" %}
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title">
|
||||
<strong>
|
||||
{% blocktrans trimmed with day=date|date:"DATE_FORMAT" %}
|
||||
Events on {{ day }}
|
||||
{% endblocktrans %}
|
||||
</strong>
|
||||
</h2>
|
||||
</div>
|
||||
{% if filter_form.fields %}
|
||||
<div class="panel-subhead">
|
||||
{% include "pretixpresale/fragment_event_list_filter.html" with request=request %}
|
||||
<h3>{{ date|date:"DATE_FORMAT" }}</h3>
|
||||
<form class="form-inline" method="get" id="monthselform"
|
||||
action="{% eventurl request.organizer "presale:organizer.index" %}">
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-sm-6 col-xs-12 text-left flip">
|
||||
{% include "pretixpresale/fragment_calendar_nav.html" with date=date request=request style="day" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel-body">
|
||||
<nav aria-label="{% trans "calendar navigation" %}">
|
||||
<ul class="row calendar-nav">
|
||||
<li class="text-left flip">
|
||||
{% if has_before %}
|
||||
<a href="?{% url_replace request "date" before.date.isoformat %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ before|date:"SHORT_DATE_FORMAT" }}">
|
||||
{% icon "arrow-left" %}
|
||||
<span class="hidden-xs">{{ before|date:"SHORT_DATE_FORMAT" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="text-center">
|
||||
<form class="form-inline" method="get" id="monthselform" action="{% eventurl request.organizer "presale:organizer.index" %}">
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<fieldset>
|
||||
<legend class="sr-only">{% trans "Select a date to display" %}</legend>
|
||||
<div>
|
||||
<label for="calendar-input-date">{% trans "Date" %}</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input class="datepickerfield form-control" id="calendar-input-date" value="{{ date|date:"SHORT_DATE_FORMAT" }}" name="date">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default" aria-label="{% trans "Show date" %}">
|
||||
{% icon "chevron-right" %}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</li>
|
||||
<li class="text-right flip">
|
||||
{% if has_after %}
|
||||
<a href="?{% url_replace request "date" after.date.isoformat %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ after|date:"SHORT_DATE_FORMAT" }}">
|
||||
<span class="hidden-xs">{{ after|date:"SHORT_DATE_FORMAT" }}</span>
|
||||
{% icon "arrow-right" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% include "pretixpresale/fragment_day_calendar.html" with show_avail=request.organizer.settings.event_list_availability %}
|
||||
<div class="row visible-xs">
|
||||
<div class="col-md-2 col-sm-4 col-xs-8 text-center">
|
||||
<input class="datepickerfield form-control" value="{{ date|date:"SHORT_DATE_FORMAT" }}" name="date">
|
||||
<button type="submit" class="js-hidden btn btn-default">
|
||||
{% trans "Go" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-5 col-sm-2 col-xs-4 text-right flip">
|
||||
{% if has_before %}
|
||||
<div class="col-xs-6 text-left flip">
|
||||
<a href="?{% url_replace request "date" before.date.isoformat %}"
|
||||
class="btn btn-default">
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ before|date:"SHORT_DATE_FORMAT" }}">
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
<span class="hidden-xs">{{ before|date:"SHORT_DATE_FORMAT" }}</span>
|
||||
<span class="hidden-sm hidden-xs">{{ before|date:"SHORT_DATE_FORMAT" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if has_after %}
|
||||
<div class="col-xs-6 text-right flip{% if not has_before %} col-xs-offset-6{% endif %}">
|
||||
<a href="?{% url_replace request "date" after.date.isoformat %}"
|
||||
class="btn btn-default">
|
||||
<span class="hidden-xs">{{ after|date:"SHORT_DATE_FORMAT" }}</span>
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ after|date:"SHORT_DATE_FORMAT" }}">
|
||||
<span class="hidden-sm hidden-xs">{{ after|date:"SHORT_DATE_FORMAT" }}</span>
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% include "pretixpresale/fragment_event_list_filter.html" with request=request %}
|
||||
{% include "pretixpresale/fragment_day_calendar.html" with show_avail=request.organizer.settings.event_list_availability %}
|
||||
<div class="col-sm-4 visible-xs text-center">
|
||||
{% if has_before %}
|
||||
<a href="?{% url_replace request "date" before.date.isoformat %}"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
{{ before|date:"SHORT_DATE_FORMAT" }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if has_after %}
|
||||
<a href="?{% url_replace request "date" after.date.isoformat %}"
|
||||
class="btn btn-default">
|
||||
{{ after|date:"SHORT_DATE_FORMAT" }}
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if multiple_timezones %}
|
||||
|
||||
@@ -1,117 +1,82 @@
|
||||
{% extends "pretixpresale/organizers/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load icon %}
|
||||
{% load rich_text %}
|
||||
{% load eventurl %}
|
||||
{% load urlreplace %}
|
||||
{% block title %}{% trans "Event overview" %}{% endblock %}
|
||||
{% block content %}
|
||||
{% if organizer_homepage_text %}
|
||||
<div class="blank-after">
|
||||
<div>
|
||||
{{ organizer_homepage_text | rich_text }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="blank-after text-left flip">
|
||||
{% include "pretixpresale/fragment_calendar_nav.html" with date=date request=request style="week" %}
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title">
|
||||
<strong>
|
||||
{% blocktrans trimmed with week=date|date:week_format week_day_from=date|date:short_month_day_format week_day_to=date|date:short_month_day_format %}
|
||||
Events in {{ week }} ({{ week_day_from }} – {{ week_day_to }})
|
||||
{% endblocktrans %}
|
||||
</strong>
|
||||
</h2>
|
||||
</div>
|
||||
{% if filter_form.fields %}
|
||||
<div class="panel-subhead">
|
||||
{% include "pretixpresale/fragment_event_list_filter.html" with request=request %}
|
||||
<h3>{{ date|date:"F Y" }}</h3>
|
||||
<form class="form-inline" method="get" id="monthselform"
|
||||
action="{% eventurl request.organizer "presale:organizer.index" %}">
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-sm-6 col-xs-12 text-left flip">
|
||||
{% include "pretixpresale/fragment_calendar_nav.html" with date=date request=request style="week" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel-body">
|
||||
<nav aria-label="{% trans "calendar navigation" %}">
|
||||
<ul class="row calendar-nav">
|
||||
<li class="text-left flip">
|
||||
{% if has_before %}
|
||||
<a href="?{% url_replace request "date" before|date:"o-\WW" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ before|date:week_format }}">
|
||||
{% icon "arrow-left" %}
|
||||
<span class="hidden-xs">{{ before|date:week_format }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="text-center">
|
||||
<form class="form-inline" method="get" id="monthselform" action="{% eventurl request.organizer "presale:organizer.index" %}">
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<fieldset>
|
||||
<legend class="sr-only">{% trans "Select a week to display" %}</legend>
|
||||
<div>
|
||||
<label for="calendar-input-date">{% trans "Week" %}</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<select name="date" class="form-control" id="calendar-input-date">
|
||||
{% for weeks_per_year in weeks %}
|
||||
<optgroup label="{{ weeks_per_year.0.0.year }}">
|
||||
{% for w in weeks_per_year %}
|
||||
<option value="{{ w.0.isocalendar.0 }}-W{{ w.0.isocalendar.1 }}"
|
||||
{% if w.0.isocalendar.0 == date.isocalendar.0 and w.0.isocalendar.1 == date.isocalendar.1 %}selected{% endif %}>
|
||||
{{ w.0|date:week_format }}
|
||||
({{ w.0|date:short_month_day_format }} – {{ w.1|date:short_month_day_format }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default" aria-label="{% trans "Show week" %}">
|
||||
{% icon "chevron-right" %}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</li>
|
||||
<li class="text-right flip">
|
||||
{% if has_after %}
|
||||
<a href="?{% url_replace request "date" after|date:"o-\WW" %}"
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ after|date:week_format }}">
|
||||
<span class="hidden-xs">{{ after|date:week_format }}</span>
|
||||
{% icon "arrow-right" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% include "pretixpresale/fragment_week_calendar.html" with show_avail=request.organizer.settings.event_list_availability %}
|
||||
<div class="row visible-sm visible-xs">
|
||||
<div class="col-md-4 col-sm-4 col-xs-8 text-center">
|
||||
<select name="date" class="form-control" aria-label="{% trans "Select week to show" %}">
|
||||
{% for weeks_per_year in weeks %}
|
||||
<optgroup label="{{ weeks_per_year.0.0.year }}">
|
||||
{% for w in weeks_per_year %}
|
||||
<option value="{{ w.0.isocalendar.0 }}-W{{ w.0.isocalendar.1 }}"
|
||||
{% if w.0.isocalendar.0 == date.isocalendar.0 and w.0.isocalendar.1 == date.isocalendar.1 %}selected{% endif %}>
|
||||
{{ w.0|date:week_format }}
|
||||
({{ w.0|date:short_month_day_format }} – {{ w.1|date:short_month_day_format }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit" class="js-hidden btn btn-default">
|
||||
{% trans "Go" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-2 col-xs-4 text-right flip">
|
||||
{% if has_before %}
|
||||
<div class="col-xs-6 text-left flip">
|
||||
<a href="?{% url_replace request "date" before|date:"o-\WW" %}"
|
||||
class="btn btn-default">
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ before|date:week_format }}">
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
{{ before|date:week_format }}
|
||||
<span class="hidden-sm hidden-xs">{{ before|date:week_format }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if has_after %}
|
||||
<div class="col-xs-6 text-right flip">
|
||||
<a href="?{% url_replace request "date" after|date:"o-\WW" %}"
|
||||
class="btn btn-default">
|
||||
{{ after|date:week_format }}
|
||||
class="btn btn-default" data-save-scrollpos aria-label="{{ after|date:week_format }}">
|
||||
<span class="hidden-sm hidden-xs">{{ after|date:week_format }}</span>
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% include "pretixpresale/fragment_event_list_filter.html" with request=request %}
|
||||
{% include "pretixpresale/fragment_week_calendar.html" with show_avail=request.organizer.settings.event_list_availability %}
|
||||
<div class="col-sm-12 visible-sm visible-xs text-center">
|
||||
{% if has_before %}
|
||||
<a href="?{% url_replace request "date" before|date:"o-\WW" %}"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
{{ before|date:week_format }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if has_after %}
|
||||
<a href="?{% url_replace request "date" after|date:"o-\WW" %}"
|
||||
class="btn btn-default">
|
||||
{{ after|date:week_format }}
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
{% if multiple_timezones %}
|
||||
<div class="alert alert-info">
|
||||
{% blocktrans trimmed %}
|
||||
|
||||
@@ -19,13 +19,17 @@
|
||||
<meta property="og:url" content="{% abseventurl organizer "presale:organizer.index" %}"/>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if organizer_homepage_text %}
|
||||
<div class="blank-after">
|
||||
<div>
|
||||
{% if organizer_homepage_text %}
|
||||
{{ organizer_homepage_text | rich_text }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="monthselform">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include "pretixpresale/fragment_calendar_nav.html" with date=date request=request style="list" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="blank-after text-left flip">
|
||||
{% include "pretixpresale/fragment_calendar_nav.html" with date=date request=request style="list" %}
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
|
||||
53
src/pretix/static/bootstrap/js/bootstrap.js
vendored
53
src/pretix/static/bootstrap/js/bootstrap.js
vendored
@@ -1452,7 +1452,7 @@ if (typeof jQuery === 'undefined') {
|
||||
template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 1,
|
||||
delay: 0,
|
||||
html: false,
|
||||
container: false,
|
||||
viewport: {
|
||||
@@ -1464,14 +1464,6 @@ if (typeof jQuery === 'undefined') {
|
||||
whiteList : DefaultWhitelist
|
||||
}
|
||||
|
||||
Tooltip.activeTooltip = null;
|
||||
|
||||
function hideOnEscapeListener(e) {
|
||||
if (Tooltip.activeTooltip && e.key === 'Escape') {
|
||||
Tooltip.activeTooltip.hide();
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip.prototype.init = function (type, element, options) {
|
||||
this.enabled = true
|
||||
this.type = type
|
||||
@@ -1484,8 +1476,6 @@ if (typeof jQuery === 'undefined') {
|
||||
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
|
||||
}
|
||||
|
||||
document.body.addEventListener('keyup', hideOnEscapeListener);
|
||||
|
||||
var triggers = this.options.trigger.split(' ')
|
||||
|
||||
for (var i = triggers.length; i--;) {
|
||||
@@ -1493,7 +1483,7 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
if (trigger == 'click') {
|
||||
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
||||
} else if (trigger == 'hover' || trigger == 'focus') {
|
||||
} else if (trigger != 'manual') {
|
||||
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
|
||||
var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
|
||||
|
||||
@@ -1557,8 +1547,7 @@ if (typeof jQuery === 'undefined') {
|
||||
}
|
||||
|
||||
if (obj instanceof $.Event) {
|
||||
console.log("enter",obj.currentTarget.role, obj.type, obj.currentTarget)
|
||||
self.inState[(obj.currentTarget.role == 'tooltip' ? 'tip' : '') + (obj.type == 'focusin' ? 'focus' : 'hover')] = true
|
||||
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
|
||||
}
|
||||
|
||||
if (self.tip().hasClass('in') || self.hoverState == 'in') {
|
||||
@@ -1578,7 +1567,6 @@ if (typeof jQuery === 'undefined') {
|
||||
}
|
||||
|
||||
Tooltip.prototype.isInStateTrue = function () {
|
||||
console.log("state:",this.inState)
|
||||
for (var key in this.inState) {
|
||||
if (this.inState[key]) return true
|
||||
}
|
||||
@@ -1596,8 +1584,7 @@ if (typeof jQuery === 'undefined') {
|
||||
}
|
||||
|
||||
if (obj instanceof $.Event) {
|
||||
console.log("leave",obj.currentTarget.role, obj.type, obj.currentTarget)
|
||||
self.inState[(obj.currentTarget.role == 'tooltip' ? 'tip' : '') + (obj.type == 'focusout' ? 'focus' : 'hover')] = false
|
||||
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
|
||||
}
|
||||
|
||||
if (self.isInStateTrue()) return
|
||||
@@ -1623,12 +1610,6 @@ if (typeof jQuery === 'undefined') {
|
||||
if (e.isDefaultPrevented() || !inDom) return
|
||||
var that = this
|
||||
|
||||
if (Tooltip.activeTooltip) {
|
||||
Tooltip.activeTooltip.hide();
|
||||
}
|
||||
|
||||
Tooltip.activeTooltip = this;
|
||||
|
||||
var $tip = this.tip()
|
||||
|
||||
var tipId = this.getUID(this.type)
|
||||
@@ -1787,8 +1768,6 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
if (e.isDefaultPrevented()) return
|
||||
|
||||
Tooltip.activeTooltip = null;
|
||||
|
||||
$tip.removeClass('in')
|
||||
|
||||
$.support.transition && $tip.hasClass('fade') ?
|
||||
@@ -1833,12 +1812,12 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
return $.extend({}, elRect, scroll, outerDims, elOffset)
|
||||
}
|
||||
const OVERLAP = 3;
|
||||
|
||||
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||
return placement == 'bottom' ? { top: pos.top + pos.height - OVERLAP, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'top' ? { top: pos.top - actualHeight + OVERLAP, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2 , left: pos.left - actualWidth + OVERLAP } :
|
||||
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width - OVERLAP }
|
||||
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
|
||||
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
|
||||
|
||||
}
|
||||
|
||||
@@ -1893,20 +1872,6 @@ if (typeof jQuery === 'undefined') {
|
||||
if (this.$tip.length != 1) {
|
||||
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
|
||||
}
|
||||
|
||||
var triggers = this.options.trigger.split(' ')
|
||||
|
||||
for (var i = triggers.length; i--;) {
|
||||
var trigger = triggers[i]
|
||||
|
||||
if (trigger == 'tiphover' || trigger == 'tipfocus') {
|
||||
var eventIn = trigger == 'tiphover' ? 'mouseenter' : 'focusin'
|
||||
var eventOut = trigger == 'tiphover' ? 'mouseleave' : 'focusout'
|
||||
|
||||
this.$tip.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
||||
this.$tip.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.$tip
|
||||
}
|
||||
|
||||
@@ -117,7 +117,6 @@ function async_task_callback(data, jqXHR, status) {
|
||||
$("body").data('ajaxing', false);
|
||||
if (data.redirect) {
|
||||
if (async_task_is_download && data.success) {
|
||||
waitingDialog.hide();
|
||||
if (location.href.indexOf("async_id") !== -1) {
|
||||
history.replaceState({}, "pretix", async_task_old_url);
|
||||
}
|
||||
@@ -131,22 +130,21 @@ function async_task_callback(data, jqXHR, status) {
|
||||
|
||||
if (async_task_is_long) {
|
||||
if (data.started) {
|
||||
$("#loadingmodal p.status").text(gettext(
|
||||
'Your request is currently being processed. Depending on the size of your event, this might take up to ' +
|
||||
'a few minutes.'
|
||||
));
|
||||
window.pretix.dialog.open({
|
||||
label: gettext("Your request is currently being processed."),
|
||||
message: gettext("Depending on the size of the event, this might take up to a few minutes."),
|
||||
});
|
||||
} else {
|
||||
$("#loadingmodal p.status").text(gettext(
|
||||
'Your request has been queued on the server and will soon be ' +
|
||||
'processed.'
|
||||
));
|
||||
window.pretix.dialog.open({
|
||||
label: gettext("Your request has been queued on the server."),
|
||||
message: gettext("It will soon be processed."),
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$("#loadingmodal p.status").text(gettext(
|
||||
'Your request arrived on the server but we still wait for it to be ' +
|
||||
'processed. If this takes longer than two minutes, please contact us or go ' +
|
||||
'back in your browser and try again.'
|
||||
));
|
||||
window.pretix.dialog.open({
|
||||
label: gettext("Your request arrived on the server but we still wait for it to be processed."),
|
||||
message: gettext("If this takes longer than two minutes, please contact us or go back in your browser and try again."),
|
||||
});
|
||||
}
|
||||
if (location.href.indexOf("async_id") === -1) {
|
||||
history.pushState({}, "Waiting", async_task_check_url.replace(/ajax=1/, ''));
|
||||
@@ -157,14 +155,18 @@ function async_task_error(jqXHR, textStatus, errorThrown) {
|
||||
"use strict";
|
||||
$("body").data('ajaxing', false);
|
||||
if (textStatus === "timeout") {
|
||||
alert(gettext("The request took too long. Please try again."));
|
||||
waitingDialog.hide();
|
||||
window.pretix.dialog.open({
|
||||
label: gettext("The request took too long …"),
|
||||
message: gettext("Please try again."),
|
||||
confirm: true,
|
||||
});
|
||||
} else if (jqXHR.responseText.indexOf('<html') > 0) {
|
||||
var respdom = $(jqXHR.responseText);
|
||||
var c = respdom.filter('.container');
|
||||
if (respdom.filter('form') && (respdom.filter('.has-error') || respdom.filter('.alert-danger'))) {
|
||||
// This is a failed form validation, let's just use it
|
||||
waitingDialog.hide();
|
||||
window.pretix.dialog.close();
|
||||
// TODO: we need to give feedback regarding the error; either focus an element with error or better output another dialog?
|
||||
|
||||
if (respdom.filter('#page-wrapper') && $('#page-wrapper').length) {
|
||||
$("#page-wrapper").html(respdom.find("#page-wrapper").html());
|
||||
@@ -186,20 +188,32 @@ function async_task_error(jqXHR, textStatus, errorThrown) {
|
||||
}
|
||||
|
||||
} else if (c.length > 0) {
|
||||
waitingDialog.hide();
|
||||
ajaxErrDialog.show(c.first().html());
|
||||
window.pretix.dialog.open({
|
||||
label: gettext('An error occurred.'),
|
||||
message: c.first().text(),
|
||||
confirm: true,
|
||||
});
|
||||
//ajaxErrDialog.show(c.first().html());
|
||||
} else {
|
||||
waitingDialog.hide();
|
||||
alert(gettext('An error of type {code} occurred.').replace(/\{code\}/, jqXHR.status));
|
||||
window.pretix.dialog.open({
|
||||
label: gettext('An error of type {code} occurred.').replace(/\{code\}/, jqXHR.status),
|
||||
message: gettext("Please try again."),
|
||||
confirm: true,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (jqXHR.status >= 400 && jqXHR.status < 500) {
|
||||
waitingDialog.hide();
|
||||
alert(gettext('An error of type {code} occurred.').replace(/\{code\}/, jqXHR.status));
|
||||
window.pretix.dialog.open({
|
||||
label: gettext('An error of type {code} occurred.').replace(/\{code\}/, jqXHR.status),
|
||||
message: gettext("Please try again."),
|
||||
confirm: true,
|
||||
});
|
||||
} else {
|
||||
waitingDialog.hide();
|
||||
alert(gettext('We currently cannot reach the server. Please try again. ' +
|
||||
'Error code: {code}').replace(/\{code\}/, jqXHR.status));
|
||||
window.pretix.dialog.open({
|
||||
label: gettext('We currently cannot reach the server.'),
|
||||
message: gettext("Please try again. Error code: {code}").replace(/\{code\}/, jqXHR.status),
|
||||
confirm: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,21 +238,16 @@ $(function () {
|
||||
async_task_is_long = $(this).is("[data-asynctask-long]");
|
||||
async_task_old_url = location.href;
|
||||
$("body").data('ajaxing', true);
|
||||
if ($(this).is("[data-asynctask-headline]")) {
|
||||
waitingDialog.show($(this).attr("data-asynctask-headline"));
|
||||
} else {
|
||||
waitingDialog.show(gettext('We are processing your request …'));
|
||||
}
|
||||
if ($(this).is("[data-asynctask-text]")) {
|
||||
$("#loadingmodal p.text").text($(this).attr("data-asynctask-text")).show();
|
||||
} else {
|
||||
$("#loadingmodal p.text").hide();
|
||||
}
|
||||
$("#loadingmodal p.status").text(gettext(
|
||||
'We are currently sending your request to the server. If this takes longer ' +
|
||||
'than one minute, please check your internet connection and then reload ' +
|
||||
'this page and try again.'
|
||||
));
|
||||
|
||||
window.pretix.dialog.open({
|
||||
label: this.getAttribute("data-asynctask-headline") || gettext("We are processing your request …"),
|
||||
message: (this.getAttribute("data-asynctask-text") || "") + gettext(
|
||||
'We are currently sending your request to the server. If this takes longer ' +
|
||||
'than one minute, please check your internet connection and then reload ' +
|
||||
'this page and try again.'
|
||||
),
|
||||
icon: 'cog',
|
||||
});
|
||||
|
||||
var action = this.action;
|
||||
var formData = new FormData(this);
|
||||
|
||||
@@ -795,10 +795,9 @@ function setup_basics(el) {
|
||||
});
|
||||
});
|
||||
|
||||
el.find('[data-toggle="tooltip"]').tooltip({ delay: 1, trigger: 'focus hover tipfocus tiphover' })
|
||||
.filter(':not([tabindex])').attr('tabindex', '0');
|
||||
el.find('[data-toggle="tooltip"]').tooltip();
|
||||
el.find('[data-toggle="tooltip_html"]').tooltip({
|
||||
'html': true, delay: 1, trigger: 'focus hover tipfocus tiphover',
|
||||
'html': true,
|
||||
'whiteList': {
|
||||
// Global attributes allowed on any supplied element below.
|
||||
'*': ['class', 'dir', 'id', 'lang', 'role'],
|
||||
@@ -813,7 +812,7 @@ function setup_basics(el) {
|
||||
strong: [],
|
||||
u: [],
|
||||
}
|
||||
}).filter(':not([tabindex])').attr('tabindex', '0');
|
||||
});
|
||||
|
||||
el.find('a.pagination-selection').click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -307,8 +307,7 @@ function setup_basics(el) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
el.find('[data-toggle="tooltip"]').tooltip({ delay: 1, trigger: 'focus hover tipfocus tiphover' })
|
||||
.filter(':not([tabindex])').attr('tabindex', '0');
|
||||
el.find('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
// AddOns
|
||||
el.find('.addon-variation-description').hide();
|
||||
@@ -381,12 +380,66 @@ function get_label_text_for_id(id) {
|
||||
}).text().trim();
|
||||
}
|
||||
|
||||
|
||||
window.pretix = window.pretix || {};
|
||||
window.pretix.dialog = {
|
||||
close: function() {
|
||||
$("#dialog-alert[open], #dialog-info[open]").each(function() {
|
||||
this.close();
|
||||
});
|
||||
},
|
||||
open: function(opt) {
|
||||
window.pretix.dialog.close();
|
||||
|
||||
const id = "dialog-" + (opt.confirm ? "alert" : "info");
|
||||
const dialog = document.getElementById(id);
|
||||
$("#" + id + "-label").text(opt.label);
|
||||
$("#" + id + "-description").text(opt.message);
|
||||
$(".modal-card-icon .fa", dialog).attr('class', 'fa fa-' + (opt.icon || "exclamation-triangle"));
|
||||
if (opt.confirm) {
|
||||
$("button", dialog).attr("value", opt.confirm.toString()).text(opt.confirm === true ? gettext("OK") : opt.confirm);
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
dialog.addEventListener('close', function() {
|
||||
resolve(dialog.returnValue);
|
||||
}, { once: true });
|
||||
|
||||
dialog.showModal();
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
$("body").removeClass("nojs");
|
||||
moment.locale($("body").attr("data-datetimelocale"));
|
||||
|
||||
$("form:has(#btn-add-to-cart)").on("submit", function(e) {
|
||||
if (
|
||||
(this.classList.contains("has-seating") && this.querySelector("pretix-seating-checkout-button button")) ||
|
||||
this.querySelector("input[type=checkbox]:checked") ||
|
||||
[...this.querySelectorAll(".input-item-count[type=text]")].some(input => input.value && input.value !== "0") // TODO: seating hat noch einen seating-dummy-item-count, das ist Mist!
|
||||
) {
|
||||
// okay, let the submit-event bubble to async-task
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
window.pretix.dialog.open({
|
||||
label: gettext("You have not selected any ticket."),
|
||||
message: gettext("Please tick a checkbox or enter a quantity for one of the ticket types to add to the cart."),
|
||||
icon: 'exclamation',
|
||||
confirm: true,
|
||||
}).then((result) => {
|
||||
//console.log("returnValue is", result);
|
||||
// TODO: should we focus the first input/checkbox/variants-button?
|
||||
});
|
||||
});
|
||||
|
||||
var scrollpos = sessionStorage ? sessionStorage.getItem('scrollpos') : 0;
|
||||
if (scrollpos) {
|
||||
window.scrollTo(0, scrollpos);
|
||||
@@ -477,37 +530,17 @@ $(function () {
|
||||
$("[data-save-scrollpos]").on("click submit", function () {
|
||||
sessionStorage.setItem('scrollpos', window.scrollY);
|
||||
});
|
||||
$("#monthselform").on("submit", function () {
|
||||
sessionStorage.setItem('scrollpos', window.scrollY);
|
||||
});
|
||||
}
|
||||
var update_cart_form = function () {
|
||||
var is_enabled = $(".product-row input[type=checkbox]:checked, .variations input[type=checkbox]:checked, .product-row input[type=radio]:checked, .variations input[type=radio]:checked").length;
|
||||
if (!is_enabled) {
|
||||
$(".input-item-count").each(function () {
|
||||
if ($(this).val() && $(this).val() !== "0") {
|
||||
is_enabled = true;
|
||||
}
|
||||
});
|
||||
$(".input-seat-selection option").each(function() {
|
||||
if ($(this).val() && $(this).val() !== "" && $(this).prop('selected')) {
|
||||
is_enabled = true;
|
||||
}
|
||||
});
|
||||
$("#monthselform select").change(function () {
|
||||
if (sessionStorage) sessionStorage.setItem('scrollpos', window.scrollY);
|
||||
this.form.submit();
|
||||
});
|
||||
$("#monthselform input").on("dp.change", function () {
|
||||
if ($(this).data("DateTimePicker")) { // prevent submit after dp init
|
||||
if (sessionStorage) sessionStorage.setItem('scrollpos', window.scrollY);
|
||||
this.form.submit();
|
||||
}
|
||||
if (!is_enabled && (!$(".has-seating").length || $("#seating-dummy-item-count").length)) {
|
||||
$("#btn-add-to-cart").prop("disabled", !is_enabled).popover({
|
||||
'content': function () { return gettext("Please enter a quantity for one of the ticket types.") },
|
||||
'placement': 'top',
|
||||
'trigger': 'hover focus'
|
||||
});
|
||||
} else {
|
||||
$("#btn-add-to-cart").prop("disabled", false).popover("destroy")
|
||||
}
|
||||
};
|
||||
update_cart_form();
|
||||
$(".product-row input[type=checkbox], .variations input[type=checkbox], .product-row input[type=radio], .variations input[type=radio], .input-item-count, .input-seat-selection")
|
||||
.on("change mouseup keyup", update_cart_form);
|
||||
});
|
||||
|
||||
$(".table-calendar td.has-events").click(function () {
|
||||
var $grid = $(this).closest("[role='grid']");
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
width: 14.29%;
|
||||
}
|
||||
h3 {
|
||||
font-size: 0.875rem;
|
||||
color: $text-muted;
|
||||
border-bottom: 2px solid $table-border-color;
|
||||
font-size: 16px;
|
||||
}
|
||||
p {
|
||||
margin-bottom: 3px;
|
||||
@@ -13,7 +11,6 @@
|
||||
.events {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
a.event {
|
||||
--status-bg-color: var(--pretix-brand-primary-tint-90);
|
||||
@@ -100,13 +97,9 @@
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 8px;
|
||||
margin-bottom: 8px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
background-color: #fff;
|
||||
}
|
||||
h3 .fa::before {
|
||||
content: $fa-var-caret-right;
|
||||
@@ -119,10 +112,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.table-calendar .day:nth-child(even) {
|
||||
background-color: $table-bg-accent;
|
||||
}
|
||||
|
||||
.event-list-filter-form {
|
||||
.event-list-filter-form-row {
|
||||
display: flex;
|
||||
@@ -255,7 +244,7 @@
|
||||
}
|
||||
|
||||
.day-calendar a.event {
|
||||
margin: 0;
|
||||
margin: 1px;
|
||||
}
|
||||
.day-calendar a.event .event-time {
|
||||
display: inline;
|
||||
@@ -384,20 +373,9 @@ if concurrency is higher than 9, JavaScript (currently in pretixpresale/js/ui/ma
|
||||
grid-template-rows: repeat(var(--concurrency, 1), auto);
|
||||
}
|
||||
|
||||
|
||||
.day-timeline {
|
||||
--total-concurrency: var(--concurrency);
|
||||
}
|
||||
.day-timeline > li {
|
||||
grid-column: calc(1 + var(--offset-hour, 0)*60/var(--raster-size, 5) + var(--offset-minute, 0)/var(--raster-size, 5)) / span calc(var(--duration-hour, 0)*60/var(--raster-size, 5) + var(--duration-minute, 0)/var(--raster-size, 5));
|
||||
grid-row: var(--concurrency, 1) / span 1;
|
||||
padding: 3px 8px 0;
|
||||
/* add 11px of padding-bottom to the events with --concurrency being the same as --total-concurrency, otherwise 0px */
|
||||
padding-bottom: #{'round(down, calc(11px * var(--concurrency)/var(--total-concurrency)), 11px)'};
|
||||
}
|
||||
|
||||
.day-timeline > li[data-concurrency="1"] {
|
||||
padding-top: 8px;
|
||||
}
|
||||
.day-timeline > li:focus-within {
|
||||
z-index: 2; /* move to front so focus-outline overlays other elements */
|
||||
@@ -407,14 +385,12 @@ if concurrency is higher than 9, JavaScript (currently in pretixpresale/js/ui/ma
|
||||
grid-row: 1 / span var(--concurrency, 1) !important;
|
||||
}
|
||||
.ticks li {
|
||||
padding: 11px 8px 8px;
|
||||
padding: 8px 3px 5px;
|
||||
line-height: 1;
|
||||
border-top-left-radius: $border-radius-base;
|
||||
border-top-right-radius: $border-radius-base;
|
||||
border-bottom: 2px solid $table-border-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
.tick {
|
||||
.ticks li:nth-of-type(odd), .tick {
|
||||
background-color: $table-bg-accent;
|
||||
}
|
||||
.day-timeline:nth-last-of-type(1) li {
|
||||
@@ -446,16 +422,7 @@ if concurrency is higher than 9, JavaScript (currently in pretixpresale/js/ui/ma
|
||||
|
||||
.weekday {
|
||||
flex: 1;
|
||||
padding: 0 8px 8px;
|
||||
}
|
||||
.weekday:nth-child(even) {
|
||||
background-color: $table-bg-accent;
|
||||
}
|
||||
.weekday h3 {
|
||||
margin-left: -8px;
|
||||
margin-right: -8px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
.weekday:first-child {
|
||||
margin-left: 0;
|
||||
|
||||
@@ -240,26 +240,14 @@ div.front-page {
|
||||
}
|
||||
}
|
||||
|
||||
.calendar-nav, .calendar-nav > li {
|
||||
.calendar-nav, .calendar-nav li {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0
|
||||
}
|
||||
.calendar-nav > li {
|
||||
padding: 0 0 10px;
|
||||
.calendar-nav li {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.calendar-nav {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
}
|
||||
.calendar-nav > li {
|
||||
width: 60%;
|
||||
}
|
||||
.calendar-nav > li:first-child,
|
||||
.calendar-nav > li:last-child {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
|
||||
.subevent-toggle {
|
||||
display: none;
|
||||
|
||||
@@ -23,10 +23,6 @@ a.btn, button.btn {
|
||||
}
|
||||
}
|
||||
|
||||
.input-group:has(.input-group-btn:last-child) *:not(last-child) {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.panel-title .radio {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ $font-size-h4: ($font-size-base * 1.25) !default;
|
||||
$font-size-h5: $font-size-base !default;
|
||||
$font-size-h6: ($font-size-base * .85) !default;
|
||||
|
||||
$line-height-base: 1.43 !default;
|
||||
$line-height-base: 1.428571429 !default;
|
||||
$line-height-computed: ($font-size-base * $line-height-base) !default;
|
||||
$line-height-large: 1.3333333 !default; // extra decimals for Win 8.1 Chrome
|
||||
$line-height-small: 1.5 !default;
|
||||
@@ -374,6 +374,47 @@ body.loading .container {
|
||||
-webkit-transition: opacity .5s ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
#dialog-info, #dialog-alert {
|
||||
border: none;
|
||||
background: white;
|
||||
border-radius: $border-radius-large;
|
||||
box-shadow: 0 7px 14px 0 rgba(78, 50, 92, 0.1),0 3px 6px 0 rgba(0,0,0,.07);
|
||||
padding: 20px;
|
||||
|
||||
|
||||
max-width: 32em;
|
||||
max-height: calc(100vh - 100px);
|
||||
overflow-y: auto;
|
||||
|
||||
|
||||
&::backdrop {
|
||||
background: rgba(255, 255, 255, .7);
|
||||
}
|
||||
|
||||
.modal-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.modal-card-icon {
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
color: $brand-primary;
|
||||
font-size: 120px;
|
||||
}
|
||||
.modal-card-content {
|
||||
text-align: left;
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
font-size: 1.25em;
|
||||
font-weight: bold;
|
||||
color: $brand-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.typo-alert span[data-typosuggest] {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
margin: 10px 0;
|
||||
background-color: white;
|
||||
border: 2px solid $brand-info;
|
||||
color: $state-info-text;
|
||||
color: $brand-info;
|
||||
border-radius: $alert-border-radius;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
margin: 10px 0;
|
||||
background-color: white;
|
||||
border: 2px solid $brand-danger;
|
||||
color: $state-danger-text;
|
||||
color: $brand-danger;
|
||||
border-radius: $alert-border-radius;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user