hadinicknam commited on
Commit
a1d42fd
·
1 Parent(s): 1016de5

Deploy: Dockerfile for HF Spaces, Django+WhiteNoise SPA setup, same-origin API, requirements updates

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Dockerfile +50 -0
  2. backend/core/__pycache__/settings.cpython-313.pyc +0 -0
  3. backend/core/__pycache__/urls.cpython-313.pyc +0 -0
  4. backend/core/settings.py +11 -3
  5. backend/core/urls.py +5 -3
  6. backend/requirements.txt +2 -0
  7. backend/staticfiles/admin/css/autocomplete.css +279 -0
  8. backend/staticfiles/admin/css/base.css +1180 -0
  9. backend/staticfiles/admin/css/changelists.css +343 -0
  10. backend/staticfiles/admin/css/dark_mode.css +130 -0
  11. backend/staticfiles/admin/css/dashboard.css +29 -0
  12. backend/staticfiles/admin/css/forms.css +498 -0
  13. backend/staticfiles/admin/css/login.css +61 -0
  14. backend/staticfiles/admin/css/nav_sidebar.css +150 -0
  15. backend/staticfiles/admin/css/responsive.css +904 -0
  16. backend/staticfiles/admin/css/responsive_rtl.css +89 -0
  17. backend/staticfiles/admin/css/rtl.css +293 -0
  18. backend/staticfiles/admin/css/unusable_password_field.css +19 -0
  19. backend/staticfiles/admin/css/vendor/select2/LICENSE-SELECT2.md +21 -0
  20. backend/staticfiles/admin/css/vendor/select2/select2.css +481 -0
  21. backend/staticfiles/admin/css/vendor/select2/select2.min.css +1 -0
  22. backend/staticfiles/admin/css/widgets.css +613 -0
  23. backend/staticfiles/admin/img/LICENSE +20 -0
  24. backend/staticfiles/admin/img/README.txt +7 -0
  25. backend/staticfiles/admin/img/calendar-icons.svg +63 -0
  26. backend/staticfiles/admin/img/gis/move_vertex_off.svg +1 -0
  27. backend/staticfiles/admin/img/gis/move_vertex_on.svg +1 -0
  28. backend/staticfiles/admin/img/icon-addlink.svg +3 -0
  29. backend/staticfiles/admin/img/icon-alert.svg +3 -0
  30. backend/staticfiles/admin/img/icon-calendar.svg +9 -0
  31. backend/staticfiles/admin/img/icon-changelink.svg +3 -0
  32. backend/staticfiles/admin/img/icon-clock.svg +9 -0
  33. backend/staticfiles/admin/img/icon-deletelink.svg +3 -0
  34. backend/staticfiles/admin/img/icon-hidelink.svg +3 -0
  35. backend/staticfiles/admin/img/icon-no.svg +3 -0
  36. backend/staticfiles/admin/img/icon-unknown-alt.svg +3 -0
  37. backend/staticfiles/admin/img/icon-unknown.svg +3 -0
  38. backend/staticfiles/admin/img/icon-viewlink.svg +3 -0
  39. backend/staticfiles/admin/img/icon-yes.svg +3 -0
  40. backend/staticfiles/admin/img/inline-delete.svg +3 -0
  41. backend/staticfiles/admin/img/search.svg +3 -0
  42. backend/staticfiles/admin/img/selector-icons.svg +34 -0
  43. backend/staticfiles/admin/img/sorting-icons.svg +19 -0
  44. backend/staticfiles/admin/img/tooltag-add.svg +3 -0
  45. backend/staticfiles/admin/img/tooltag-arrowright.svg +3 -0
  46. backend/staticfiles/admin/js/SelectBox.js +116 -0
  47. backend/staticfiles/admin/js/SelectFilter2.js +311 -0
  48. backend/staticfiles/admin/js/actions.js +204 -0
  49. backend/staticfiles/admin/js/admin/DateTimeShortcuts.js +408 -0
  50. backend/staticfiles/admin/js/admin/RelatedObjectLookups.js +252 -0
Dockerfile ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+
3
+ FROM node:20-slim AS frontend_builder
4
+ WORKDIR /app/frontend
5
+ COPY frontend/package*.json ./
6
+ RUN npm ci --no-audit --fund=false
7
+ COPY frontend/ .
8
+ RUN npm run build
9
+
10
+ FROM python:3.11-slim AS backend
11
+ ENV PYTHONDONTWRITEBYTECODE=1 \
12
+ PYTHONUNBUFFERED=1
13
+
14
+ WORKDIR /app
15
+
16
+ # System deps
17
+ RUN apt-get update && apt-get install -y --no-install-recommends \
18
+ build-essential \
19
+ curl \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
+ # Copy backend
23
+ COPY backend /app/backend
24
+
25
+ # Copy frontend build artifacts
26
+ COPY --from=frontend_builder /app/frontend/build /app/frontend/build
27
+
28
+ WORKDIR /app/backend
29
+
30
+ # Install Python deps
31
+ RUN pip install --no-cache-dir --upgrade pip \
32
+ && pip install --no-cache-dir -r requirements.txt
33
+
34
+ # Collect static
35
+ ENV DJANGO_SETTINGS_MODULE=core.settings
36
+ RUN python manage.py collectstatic --noinput
37
+
38
+ # Runtime env
39
+ ENV DJANGO_DEBUG=False \
40
+ DJANGO_ALLOWED_HOSTS=.hf.space,localhost,127.0.0.1 \
41
+ DJANGO_CSRF_TRUSTED_ORIGINS=https://*.hf.space \
42
+ DJANGO_CORS_ALLOWED_ORIGINS= \
43
+ PORT=7860
44
+
45
+ EXPOSE 7860
46
+
47
+ # Run DB migrations at container start, then start gunicorn
48
+ CMD ["sh", "-c", "python manage.py migrate --noinput && gunicorn core.wsgi:application --bind 0.0.0.0:${PORT} --workers 2 --threads 4 --timeout 120"]
49
+
50
+
backend/core/__pycache__/settings.cpython-313.pyc CHANGED
Binary files a/backend/core/__pycache__/settings.cpython-313.pyc and b/backend/core/__pycache__/settings.cpython-313.pyc differ
 
backend/core/__pycache__/urls.cpython-313.pyc CHANGED
Binary files a/backend/core/__pycache__/urls.cpython-313.pyc and b/backend/core/__pycache__/urls.cpython-313.pyc differ
 
backend/core/settings.py CHANGED
@@ -68,6 +68,7 @@ CORS_ALLOW_CREDENTIALS = True
68
 
69
  MIDDLEWARE = [
70
  'django.middleware.security.SecurityMiddleware',
 
71
  'django.contrib.sessions.middleware.SessionMiddleware',
72
  'corsheaders.middleware.CorsMiddleware',
73
  'django.middleware.common.CommonMiddleware',
@@ -82,7 +83,9 @@ ROOT_URLCONF = 'core.urls'
82
  TEMPLATES = [
83
  {
84
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
85
- 'DIRS': [],
 
 
86
  'APP_DIRS': True,
87
  'OPTIONS': {
88
  'context_processors': [
@@ -143,7 +146,11 @@ USE_TZ = True
143
  # Static files (CSS, JavaScript, Images)
144
  # https://docs.djangoproject.com/en/5.2/howto/static-files/
145
 
146
- STATIC_URL = 'static/'
 
 
 
 
147
 
148
  # Media files
149
  MEDIA_URL = '/media/'
@@ -166,4 +173,5 @@ SESSION_COOKIE_SECURE = not DEBUG
166
  CSRF_COOKIE_SECURE = not DEBUG
167
  SECURE_HSTS_SECONDS = 31536000 if not DEBUG else 0
168
  SECURE_HSTS_INCLUDE_SUBDOMAINS = not DEBUG
169
- SECURE_HSTS_PRELOAD = not DEBUG
 
 
68
 
69
  MIDDLEWARE = [
70
  'django.middleware.security.SecurityMiddleware',
71
+ 'whitenoise.middleware.WhiteNoiseMiddleware',
72
  'django.contrib.sessions.middleware.SessionMiddleware',
73
  'corsheaders.middleware.CorsMiddleware',
74
  'django.middleware.common.CommonMiddleware',
 
83
  TEMPLATES = [
84
  {
85
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
86
+ 'DIRS': [
87
+ (BASE_DIR.parent / 'frontend' / 'build'),
88
+ ],
89
  'APP_DIRS': True,
90
  'OPTIONS': {
91
  'context_processors': [
 
146
  # Static files (CSS, JavaScript, Images)
147
  # https://docs.djangoproject.com/en/5.2/howto/static-files/
148
 
149
+ STATIC_URL = '/static/'
150
+ STATIC_ROOT = BASE_DIR / 'staticfiles'
151
+ STATICFILES_DIRS = [
152
+ BASE_DIR.parent / 'frontend' / 'build' / 'static',
153
+ ]
154
 
155
  # Media files
156
  MEDIA_URL = '/media/'
 
173
  CSRF_COOKIE_SECURE = not DEBUG
174
  SECURE_HSTS_SECONDS = 31536000 if not DEBUG else 0
175
  SECURE_HSTS_INCLUDE_SUBDOMAINS = not DEBUG
176
+ SECURE_HSTS_PRELOAD = not DEBUG
177
+ STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
backend/core/urls.py CHANGED
@@ -15,14 +15,16 @@ Including another URLconf
15
  2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
16
  """
17
  from django.contrib import admin
18
- from django.urls import path, include
19
  from django.conf import settings
20
  from django.conf.urls.static import static
 
21
 
22
  urlpatterns = [
23
  path('super-secret-admin-path/', admin.site.urls),
24
  path('api/', include('api.urls')),
 
 
25
  ]
26
 
27
- if settings.DEBUG:
28
- urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
 
15
  2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
16
  """
17
  from django.contrib import admin
18
+ from django.urls import path, include, re_path
19
  from django.conf import settings
20
  from django.conf.urls.static import static
21
+ from django.views.generic import TemplateView
22
 
23
  urlpatterns = [
24
  path('super-secret-admin-path/', admin.site.urls),
25
  path('api/', include('api.urls')),
26
+ # Catch-all to serve React SPA
27
+ re_path(r'^(?!api/).*$', TemplateView.as_view(template_name='index.html')),
28
  ]
29
 
30
+ urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
 
backend/requirements.txt CHANGED
@@ -2,3 +2,5 @@ django
2
  djangorestframework
3
  django-cors-headers
4
  gradio_client
 
 
 
2
  djangorestframework
3
  django-cors-headers
4
  gradio_client
5
+ whitenoise
6
+ gunicorn
backend/staticfiles/admin/css/autocomplete.css ADDED
@@ -0,0 +1,279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ select.admin-autocomplete {
2
+ width: 20em;
3
+ }
4
+
5
+ .select2-container--admin-autocomplete.select2-container {
6
+ min-height: 30px;
7
+ }
8
+
9
+ .select2-container--admin-autocomplete .select2-selection--single,
10
+ .select2-container--admin-autocomplete .select2-selection--multiple {
11
+ min-height: 30px;
12
+ padding: 0;
13
+ }
14
+
15
+ .select2-container--admin-autocomplete.select2-container--focus .select2-selection,
16
+ .select2-container--admin-autocomplete.select2-container--open .select2-selection {
17
+ border-color: var(--body-quiet-color);
18
+ min-height: 30px;
19
+ }
20
+
21
+ .select2-container--admin-autocomplete.select2-container--focus .select2-selection.select2-selection--single,
22
+ .select2-container--admin-autocomplete.select2-container--open .select2-selection.select2-selection--single {
23
+ padding: 0;
24
+ }
25
+
26
+ .select2-container--admin-autocomplete.select2-container--focus .select2-selection.select2-selection--multiple,
27
+ .select2-container--admin-autocomplete.select2-container--open .select2-selection.select2-selection--multiple {
28
+ padding: 0;
29
+ }
30
+
31
+ .select2-container--admin-autocomplete .select2-selection--single {
32
+ background-color: var(--body-bg);
33
+ border: 1px solid var(--border-color);
34
+ border-radius: 4px;
35
+ }
36
+
37
+ .select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
38
+ color: var(--body-fg);
39
+ line-height: 30px;
40
+ }
41
+
42
+ .select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear {
43
+ cursor: pointer;
44
+ float: right;
45
+ font-weight: bold;
46
+ }
47
+
48
+ .select2-container--admin-autocomplete .select2-selection--single .select2-selection__placeholder {
49
+ color: var(--body-quiet-color);
50
+ }
51
+
52
+ .select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow {
53
+ height: 26px;
54
+ position: absolute;
55
+ top: 1px;
56
+ right: 1px;
57
+ width: 20px;
58
+ }
59
+
60
+ .select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow b {
61
+ border-color: #888 transparent transparent transparent;
62
+ border-style: solid;
63
+ border-width: 5px 4px 0 4px;
64
+ height: 0;
65
+ left: 50%;
66
+ margin-left: -4px;
67
+ margin-top: -2px;
68
+ position: absolute;
69
+ top: 50%;
70
+ width: 0;
71
+ }
72
+
73
+ .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--single .select2-selection__clear {
74
+ float: left;
75
+ }
76
+
77
+ .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--single .select2-selection__arrow {
78
+ left: 1px;
79
+ right: auto;
80
+ }
81
+
82
+ .select2-container--admin-autocomplete.select2-container--disabled .select2-selection--single {
83
+ background-color: var(--darkened-bg);
84
+ cursor: default;
85
+ }
86
+
87
+ .select2-container--admin-autocomplete.select2-container--disabled .select2-selection--single .select2-selection__clear {
88
+ display: none;
89
+ }
90
+
91
+ .select2-container--admin-autocomplete.select2-container--open .select2-selection--single .select2-selection__arrow b {
92
+ border-color: transparent transparent #888 transparent;
93
+ border-width: 0 4px 5px 4px;
94
+ }
95
+
96
+ .select2-container--admin-autocomplete .select2-selection--multiple {
97
+ background-color: var(--body-bg);
98
+ border: 1px solid var(--border-color);
99
+ border-radius: 4px;
100
+ cursor: text;
101
+ }
102
+
103
+ .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered {
104
+ box-sizing: border-box;
105
+ list-style: none;
106
+ margin: 0;
107
+ padding: 0 10px 5px 5px;
108
+ width: 100%;
109
+ display: flex;
110
+ flex-wrap: wrap;
111
+ }
112
+
113
+ .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered li {
114
+ list-style: none;
115
+ }
116
+
117
+ .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__placeholder {
118
+ color: var(--body-quiet-color);
119
+ margin-top: 5px;
120
+ float: left;
121
+ }
122
+
123
+ .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear {
124
+ cursor: pointer;
125
+ float: right;
126
+ font-weight: bold;
127
+ margin: 5px;
128
+ position: absolute;
129
+ right: 0;
130
+ }
131
+
132
+ .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice {
133
+ background-color: var(--darkened-bg);
134
+ border: 1px solid var(--border-color);
135
+ border-radius: 4px;
136
+ cursor: default;
137
+ float: left;
138
+ margin-right: 5px;
139
+ margin-top: 5px;
140
+ padding: 0 5px;
141
+ }
142
+
143
+ .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove {
144
+ color: var(--body-quiet-color);
145
+ cursor: pointer;
146
+ display: inline-block;
147
+ font-weight: bold;
148
+ margin-right: 2px;
149
+ }
150
+
151
+ .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove:hover {
152
+ color: var(--body-fg);
153
+ }
154
+
155
+ .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-search--inline {
156
+ float: right;
157
+ }
158
+
159
+ .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
160
+ margin-left: 5px;
161
+ margin-right: auto;
162
+ }
163
+
164
+ .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
165
+ margin-left: 2px;
166
+ margin-right: auto;
167
+ }
168
+
169
+ .select2-container--admin-autocomplete.select2-container--focus .select2-selection--multiple {
170
+ border: solid var(--body-quiet-color) 1px;
171
+ outline: 0;
172
+ }
173
+
174
+ .select2-container--admin-autocomplete.select2-container--disabled .select2-selection--multiple {
175
+ background-color: var(--darkened-bg);
176
+ cursor: default;
177
+ }
178
+
179
+ .select2-container--admin-autocomplete.select2-container--disabled .select2-selection__choice__remove {
180
+ display: none;
181
+ }
182
+
183
+ .select2-container--admin-autocomplete.select2-container--open.select2-container--above .select2-selection--single, .select2-container--admin-autocomplete.select2-container--open.select2-container--above .select2-selection--multiple {
184
+ border-top-left-radius: 0;
185
+ border-top-right-radius: 0;
186
+ }
187
+
188
+ .select2-container--admin-autocomplete.select2-container--open.select2-container--below .select2-selection--single, .select2-container--admin-autocomplete.select2-container--open.select2-container--below .select2-selection--multiple {
189
+ border-bottom-left-radius: 0;
190
+ border-bottom-right-radius: 0;
191
+ }
192
+
193
+ .select2-container--admin-autocomplete .select2-search--dropdown {
194
+ background: var(--darkened-bg);
195
+ }
196
+
197
+ .select2-container--admin-autocomplete .select2-search--dropdown .select2-search__field {
198
+ background: var(--body-bg);
199
+ color: var(--body-fg);
200
+ border: 1px solid var(--border-color);
201
+ border-radius: 4px;
202
+ }
203
+
204
+ .select2-container--admin-autocomplete .select2-search--inline .select2-search__field {
205
+ background: transparent;
206
+ color: var(--body-fg);
207
+ border: none;
208
+ outline: 0;
209
+ box-shadow: none;
210
+ -webkit-appearance: textfield;
211
+ }
212
+
213
+ .select2-container--admin-autocomplete .select2-results > .select2-results__options {
214
+ max-height: 200px;
215
+ overflow-y: auto;
216
+ color: var(--body-fg);
217
+ background: var(--body-bg);
218
+ }
219
+
220
+ .select2-container--admin-autocomplete .select2-results__option[role=group] {
221
+ padding: 0;
222
+ }
223
+
224
+ .select2-container--admin-autocomplete .select2-results__option[aria-disabled=true] {
225
+ color: var(--body-quiet-color);
226
+ }
227
+
228
+ .select2-container--admin-autocomplete .select2-results__option[aria-selected=true] {
229
+ background-color: var(--selected-bg);
230
+ color: var(--body-fg);
231
+ }
232
+
233
+ .select2-container--admin-autocomplete .select2-results__option .select2-results__option {
234
+ padding-left: 1em;
235
+ }
236
+
237
+ .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__group {
238
+ padding-left: 0;
239
+ }
240
+
241
+ .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option {
242
+ margin-left: -1em;
243
+ padding-left: 2em;
244
+ }
245
+
246
+ .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
247
+ margin-left: -2em;
248
+ padding-left: 3em;
249
+ }
250
+
251
+ .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
252
+ margin-left: -3em;
253
+ padding-left: 4em;
254
+ }
255
+
256
+ .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
257
+ margin-left: -4em;
258
+ padding-left: 5em;
259
+ }
260
+
261
+ .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
262
+ margin-left: -5em;
263
+ padding-left: 6em;
264
+ }
265
+
266
+ .select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected] {
267
+ background-color: var(--primary);
268
+ color: var(--primary-fg);
269
+ }
270
+
271
+ .select2-container--admin-autocomplete .select2-results__group {
272
+ cursor: default;
273
+ display: block;
274
+ padding: 6px;
275
+ }
276
+
277
+ .errors .select2-selection {
278
+ border: 1px solid var(--error-fg);
279
+ }
backend/staticfiles/admin/css/base.css ADDED
@@ -0,0 +1,1180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ DJANGO Admin styles
3
+ */
4
+
5
+ /* VARIABLE DEFINITIONS */
6
+ html[data-theme="light"],
7
+ :root {
8
+ --primary: #79aec8;
9
+ --secondary: #417690;
10
+ --accent: #f5dd5d;
11
+ --primary-fg: #fff;
12
+
13
+ --body-fg: #333;
14
+ --body-bg: #fff;
15
+ --body-quiet-color: #666;
16
+ --body-medium-color: #444;
17
+ --body-loud-color: #000;
18
+
19
+ --header-color: #ffc;
20
+ --header-branding-color: var(--accent);
21
+ --header-bg: var(--secondary);
22
+ --header-link-color: var(--primary-fg);
23
+
24
+ --breadcrumbs-fg: #c4dce8;
25
+ --breadcrumbs-link-fg: var(--body-bg);
26
+ --breadcrumbs-bg: #264b5d;
27
+
28
+ --link-fg: #417893;
29
+ --link-hover-color: #036;
30
+ --link-selected-fg: var(--secondary);
31
+
32
+ --hairline-color: #e8e8e8;
33
+ --border-color: #ccc;
34
+
35
+ --error-fg: #ba2121;
36
+
37
+ --message-success-bg: #dfd;
38
+ --message-warning-bg: #ffc;
39
+ --message-error-bg: #ffefef;
40
+
41
+ --darkened-bg: #f8f8f8; /* A bit darker than --body-bg */
42
+ --selected-bg: #e4e4e4; /* E.g. selected table cells */
43
+ --selected-row: #ffc;
44
+
45
+ --button-fg: #fff;
46
+ --button-bg: var(--secondary);
47
+ --button-hover-bg: #205067;
48
+ --default-button-bg: #205067;
49
+ --default-button-hover-bg: var(--secondary);
50
+ --close-button-bg: #747474;
51
+ --close-button-hover-bg: #333;
52
+ --delete-button-bg: #ba2121;
53
+ --delete-button-hover-bg: #a41515;
54
+
55
+ --object-tools-fg: var(--button-fg);
56
+ --object-tools-bg: var(--close-button-bg);
57
+ --object-tools-hover-bg: var(--close-button-hover-bg);
58
+
59
+ --font-family-primary:
60
+ "Segoe UI",
61
+ system-ui,
62
+ Roboto,
63
+ "Helvetica Neue",
64
+ Arial,
65
+ sans-serif,
66
+ "Apple Color Emoji",
67
+ "Segoe UI Emoji",
68
+ "Segoe UI Symbol",
69
+ "Noto Color Emoji";
70
+ --font-family-monospace:
71
+ ui-monospace,
72
+ Menlo,
73
+ Monaco,
74
+ "Cascadia Mono",
75
+ "Segoe UI Mono",
76
+ "Roboto Mono",
77
+ "Oxygen Mono",
78
+ "Ubuntu Monospace",
79
+ "Source Code Pro",
80
+ "Fira Mono",
81
+ "Droid Sans Mono",
82
+ "Courier New",
83
+ monospace,
84
+ "Apple Color Emoji",
85
+ "Segoe UI Emoji",
86
+ "Segoe UI Symbol",
87
+ "Noto Color Emoji";
88
+
89
+ color-scheme: light;
90
+ }
91
+
92
+ html, body {
93
+ height: 100%;
94
+ }
95
+
96
+ body {
97
+ margin: 0;
98
+ padding: 0;
99
+ font-size: 0.875rem;
100
+ font-family: var(--font-family-primary);
101
+ color: var(--body-fg);
102
+ background: var(--body-bg);
103
+ }
104
+
105
+ /* LINKS */
106
+
107
+ a:link, a:visited {
108
+ color: var(--link-fg);
109
+ text-decoration: none;
110
+ transition: color 0.15s, background 0.15s;
111
+ }
112
+
113
+ a:focus, a:hover {
114
+ color: var(--link-hover-color);
115
+ }
116
+
117
+ a:focus {
118
+ text-decoration: underline;
119
+ }
120
+
121
+ a img {
122
+ border: none;
123
+ }
124
+
125
+ a.section:link, a.section:visited {
126
+ color: var(--header-link-color);
127
+ text-decoration: none;
128
+ }
129
+
130
+ a.section:focus, a.section:hover {
131
+ text-decoration: underline;
132
+ }
133
+
134
+ /* GLOBAL DEFAULTS */
135
+
136
+ p, ol, ul, dl {
137
+ margin: .2em 0 .8em 0;
138
+ }
139
+
140
+ p {
141
+ padding: 0;
142
+ line-height: 140%;
143
+ }
144
+
145
+ h1,h2,h3,h4,h5 {
146
+ font-weight: bold;
147
+ }
148
+
149
+ h1 {
150
+ margin: 0 0 20px;
151
+ font-weight: 300;
152
+ font-size: 1.25rem;
153
+ }
154
+
155
+ h2 {
156
+ font-size: 1rem;
157
+ margin: 1em 0 .5em 0;
158
+ }
159
+
160
+ h2.subhead {
161
+ font-weight: normal;
162
+ margin-top: 0;
163
+ }
164
+
165
+ h3 {
166
+ font-size: 0.875rem;
167
+ margin: .8em 0 .3em 0;
168
+ color: var(--body-medium-color);
169
+ font-weight: bold;
170
+ }
171
+
172
+ h4 {
173
+ font-size: 0.75rem;
174
+ margin: 1em 0 .8em 0;
175
+ padding-bottom: 3px;
176
+ color: var(--body-medium-color);
177
+ }
178
+
179
+ h5 {
180
+ font-size: 0.625rem;
181
+ margin: 1.5em 0 .5em 0;
182
+ color: var(--body-quiet-color);
183
+ text-transform: uppercase;
184
+ letter-spacing: 1px;
185
+ }
186
+
187
+ ul > li {
188
+ list-style-type: square;
189
+ padding: 1px 0;
190
+ }
191
+
192
+ li ul {
193
+ margin-bottom: 0;
194
+ }
195
+
196
+ li, dt, dd {
197
+ font-size: 0.8125rem;
198
+ line-height: 1.25rem;
199
+ }
200
+
201
+ dt {
202
+ font-weight: bold;
203
+ margin-top: 4px;
204
+ }
205
+
206
+ dd {
207
+ margin-left: 0;
208
+ }
209
+
210
+ form {
211
+ margin: 0;
212
+ padding: 0;
213
+ }
214
+
215
+ fieldset {
216
+ margin: 0;
217
+ min-width: 0;
218
+ padding: 0;
219
+ border: none;
220
+ border-top: 1px solid var(--hairline-color);
221
+ }
222
+
223
+ details summary {
224
+ cursor: pointer;
225
+ }
226
+
227
+ blockquote {
228
+ font-size: 0.6875rem;
229
+ color: #777;
230
+ margin-left: 2px;
231
+ padding-left: 10px;
232
+ border-left: 5px solid #ddd;
233
+ }
234
+
235
+ code, pre {
236
+ font-family: var(--font-family-monospace);
237
+ color: var(--body-quiet-color);
238
+ font-size: 0.75rem;
239
+ overflow-x: auto;
240
+ }
241
+
242
+ pre.literal-block {
243
+ margin: 10px;
244
+ background: var(--darkened-bg);
245
+ padding: 6px 8px;
246
+ }
247
+
248
+ code strong {
249
+ color: #930;
250
+ }
251
+
252
+ hr {
253
+ clear: both;
254
+ color: var(--hairline-color);
255
+ background-color: var(--hairline-color);
256
+ height: 1px;
257
+ border: none;
258
+ margin: 0;
259
+ padding: 0;
260
+ line-height: 1px;
261
+ }
262
+
263
+ /* TEXT STYLES & MODIFIERS */
264
+
265
+ .small {
266
+ font-size: 0.6875rem;
267
+ }
268
+
269
+ .mini {
270
+ font-size: 0.625rem;
271
+ }
272
+
273
+ .help, p.help, form p.help, div.help, form div.help, div.help li {
274
+ font-size: 0.6875rem;
275
+ color: var(--body-quiet-color);
276
+ }
277
+
278
+ div.help ul {
279
+ margin-bottom: 0;
280
+ }
281
+
282
+ .help-tooltip {
283
+ cursor: help;
284
+ }
285
+
286
+ p img, h1 img, h2 img, h3 img, h4 img, td img {
287
+ vertical-align: middle;
288
+ }
289
+
290
+ .quiet, a.quiet:link, a.quiet:visited {
291
+ color: var(--body-quiet-color);
292
+ font-weight: normal;
293
+ }
294
+
295
+ .clear {
296
+ clear: both;
297
+ }
298
+
299
+ .nowrap {
300
+ white-space: nowrap;
301
+ }
302
+
303
+ .hidden {
304
+ display: none !important;
305
+ }
306
+
307
+ /* TABLES */
308
+
309
+ table {
310
+ border-collapse: collapse;
311
+ border-color: var(--border-color);
312
+ }
313
+
314
+ td, th {
315
+ font-size: 0.8125rem;
316
+ line-height: 1rem;
317
+ border-bottom: 1px solid var(--hairline-color);
318
+ vertical-align: top;
319
+ padding: 8px;
320
+ }
321
+
322
+ th {
323
+ font-weight: 500;
324
+ text-align: left;
325
+ }
326
+
327
+ thead th,
328
+ tfoot td {
329
+ color: var(--body-quiet-color);
330
+ padding: 5px 10px;
331
+ font-size: 0.6875rem;
332
+ background: var(--body-bg);
333
+ border: none;
334
+ border-top: 1px solid var(--hairline-color);
335
+ border-bottom: 1px solid var(--hairline-color);
336
+ }
337
+
338
+ tfoot td {
339
+ border-bottom: none;
340
+ border-top: 1px solid var(--hairline-color);
341
+ }
342
+
343
+ thead th.required {
344
+ font-weight: bold;
345
+ }
346
+
347
+ tr.alt {
348
+ background: var(--darkened-bg);
349
+ }
350
+
351
+ tr:nth-child(odd), .row-form-errors {
352
+ background: var(--body-bg);
353
+ }
354
+
355
+ tr:nth-child(even),
356
+ tr:nth-child(even) .errorlist,
357
+ tr:nth-child(odd) + .row-form-errors,
358
+ tr:nth-child(odd) + .row-form-errors .errorlist {
359
+ background: var(--darkened-bg);
360
+ }
361
+
362
+ /* SORTABLE TABLES */
363
+
364
+ thead th {
365
+ padding: 5px 10px;
366
+ line-height: normal;
367
+ text-transform: uppercase;
368
+ background: var(--darkened-bg);
369
+ }
370
+
371
+ thead th a:link, thead th a:visited {
372
+ color: var(--body-quiet-color);
373
+ }
374
+
375
+ thead th.sorted {
376
+ background: var(--selected-bg);
377
+ }
378
+
379
+ thead th.sorted .text {
380
+ padding-right: 42px;
381
+ }
382
+
383
+ table thead th .text span {
384
+ padding: 8px 10px;
385
+ display: block;
386
+ }
387
+
388
+ table thead th .text a {
389
+ display: block;
390
+ cursor: pointer;
391
+ padding: 8px 10px;
392
+ }
393
+
394
+ table thead th .text a:focus, table thead th .text a:hover {
395
+ background: var(--selected-bg);
396
+ }
397
+
398
+ thead th.sorted a.sortremove {
399
+ visibility: hidden;
400
+ }
401
+
402
+ table thead th.sorted:hover a.sortremove {
403
+ visibility: visible;
404
+ }
405
+
406
+ table thead th.sorted .sortoptions {
407
+ display: block;
408
+ padding: 9px 5px 0 5px;
409
+ float: right;
410
+ text-align: right;
411
+ }
412
+
413
+ table thead th.sorted .sortpriority {
414
+ font-size: .8em;
415
+ min-width: 12px;
416
+ text-align: center;
417
+ vertical-align: 3px;
418
+ margin-left: 2px;
419
+ margin-right: 2px;
420
+ }
421
+
422
+ table thead th.sorted .sortoptions a {
423
+ position: relative;
424
+ width: 14px;
425
+ height: 14px;
426
+ display: inline-block;
427
+ background: url(../img/sorting-icons.svg) 0 0 no-repeat;
428
+ background-size: 14px auto;
429
+ }
430
+
431
+ table thead th.sorted .sortoptions a.sortremove {
432
+ background-position: 0 0;
433
+ }
434
+
435
+ table thead th.sorted .sortoptions a.sortremove:after {
436
+ content: '\\';
437
+ position: absolute;
438
+ top: -6px;
439
+ left: 3px;
440
+ font-weight: 200;
441
+ font-size: 1.125rem;
442
+ color: var(--body-quiet-color);
443
+ }
444
+
445
+ table thead th.sorted .sortoptions a.sortremove:focus:after,
446
+ table thead th.sorted .sortoptions a.sortremove:hover:after {
447
+ color: var(--link-fg);
448
+ }
449
+
450
+ table thead th.sorted .sortoptions a.sortremove:focus,
451
+ table thead th.sorted .sortoptions a.sortremove:hover {
452
+ background-position: 0 -14px;
453
+ }
454
+
455
+ table thead th.sorted .sortoptions a.ascending {
456
+ background-position: 0 -28px;
457
+ }
458
+
459
+ table thead th.sorted .sortoptions a.ascending:focus,
460
+ table thead th.sorted .sortoptions a.ascending:hover {
461
+ background-position: 0 -42px;
462
+ }
463
+
464
+ table thead th.sorted .sortoptions a.descending {
465
+ top: 1px;
466
+ background-position: 0 -56px;
467
+ }
468
+
469
+ table thead th.sorted .sortoptions a.descending:focus,
470
+ table thead th.sorted .sortoptions a.descending:hover {
471
+ background-position: 0 -70px;
472
+ }
473
+
474
+ /* FORM DEFAULTS */
475
+
476
+ input, textarea, select, .form-row p, form .button {
477
+ margin: 2px 0;
478
+ padding: 2px 3px;
479
+ vertical-align: middle;
480
+ font-family: var(--font-family-primary);
481
+ font-weight: normal;
482
+ font-size: 0.8125rem;
483
+ }
484
+ .form-row div.help {
485
+ padding: 2px 3px;
486
+ }
487
+
488
+ textarea {
489
+ vertical-align: top;
490
+ }
491
+
492
+ /*
493
+ Minifiers remove the default (text) "type" attribute from "input" HTML tags.
494
+ Add input:not([type]) to make the CSS stylesheet work the same.
495
+ */
496
+ input:not([type]), input[type=text], input[type=password], input[type=email],
497
+ input[type=url], input[type=number], input[type=tel], textarea, select,
498
+ .vTextField {
499
+ border: 1px solid var(--border-color);
500
+ border-radius: 4px;
501
+ padding: 5px 6px;
502
+ margin-top: 0;
503
+ color: var(--body-fg);
504
+ background-color: var(--body-bg);
505
+ }
506
+
507
+ /*
508
+ Minifiers remove the default (text) "type" attribute from "input" HTML tags.
509
+ Add input:not([type]) to make the CSS stylesheet work the same.
510
+ */
511
+ input:not([type]):focus, input[type=text]:focus, input[type=password]:focus,
512
+ input[type=email]:focus, input[type=url]:focus, input[type=number]:focus,
513
+ input[type=tel]:focus, textarea:focus, select:focus, .vTextField:focus {
514
+ border-color: var(--body-quiet-color);
515
+ }
516
+
517
+ select {
518
+ height: 1.875rem;
519
+ }
520
+
521
+ select[multiple] {
522
+ /* Allow HTML size attribute to override the height in the rule above. */
523
+ height: auto;
524
+ min-height: 150px;
525
+ }
526
+
527
+ /* FORM BUTTONS */
528
+
529
+ .button, input[type=submit], input[type=button], .submit-row input, a.button {
530
+ background: var(--button-bg);
531
+ padding: 10px 15px;
532
+ border: none;
533
+ border-radius: 4px;
534
+ color: var(--button-fg);
535
+ cursor: pointer;
536
+ transition: background 0.15s;
537
+ }
538
+
539
+ a.button {
540
+ padding: 4px 5px;
541
+ }
542
+
543
+ .button:active, input[type=submit]:active, input[type=button]:active,
544
+ .button:focus, input[type=submit]:focus, input[type=button]:focus,
545
+ .button:hover, input[type=submit]:hover, input[type=button]:hover {
546
+ background: var(--button-hover-bg);
547
+ }
548
+
549
+ .button[disabled], input[type=submit][disabled], input[type=button][disabled] {
550
+ opacity: 0.4;
551
+ }
552
+
553
+ .button.default, input[type=submit].default, .submit-row input.default {
554
+ border: none;
555
+ font-weight: 400;
556
+ background: var(--default-button-bg);
557
+ }
558
+
559
+ .button.default:active, input[type=submit].default:active,
560
+ .button.default:focus, input[type=submit].default:focus,
561
+ .button.default:hover, input[type=submit].default:hover {
562
+ background: var(--default-button-hover-bg);
563
+ }
564
+
565
+ .button[disabled].default,
566
+ input[type=submit][disabled].default,
567
+ input[type=button][disabled].default {
568
+ opacity: 0.4;
569
+ }
570
+
571
+
572
+ /* MODULES */
573
+
574
+ .module {
575
+ border: none;
576
+ margin-bottom: 30px;
577
+ background: var(--body-bg);
578
+ }
579
+
580
+ .module p, .module ul, .module h3, .module h4, .module dl, .module pre {
581
+ padding-left: 10px;
582
+ padding-right: 10px;
583
+ }
584
+
585
+ .module blockquote {
586
+ margin-left: 12px;
587
+ }
588
+
589
+ .module ul, .module ol {
590
+ margin-left: 1.5em;
591
+ }
592
+
593
+ .module h3 {
594
+ margin-top: .6em;
595
+ }
596
+
597
+ .module h2, .module caption, .inline-group h2 {
598
+ margin: 0;
599
+ padding: 8px;
600
+ font-weight: 400;
601
+ font-size: 0.8125rem;
602
+ text-align: left;
603
+ background: var(--header-bg);
604
+ color: var(--header-link-color);
605
+ }
606
+
607
+ .module caption,
608
+ .inline-group h2 {
609
+ font-size: 0.75rem;
610
+ letter-spacing: 0.5px;
611
+ text-transform: uppercase;
612
+ }
613
+
614
+ .module table {
615
+ border-collapse: collapse;
616
+ }
617
+
618
+ /* MESSAGES & ERRORS */
619
+
620
+ ul.messagelist {
621
+ padding: 0;
622
+ margin: 0;
623
+ }
624
+
625
+ ul.messagelist li {
626
+ display: block;
627
+ font-weight: 400;
628
+ font-size: 0.8125rem;
629
+ padding: 10px 10px 10px 65px;
630
+ margin: 0 0 10px 0;
631
+ background: var(--message-success-bg) url(../img/icon-yes.svg) 40px 12px no-repeat;
632
+ background-size: 16px auto;
633
+ color: var(--body-fg);
634
+ word-break: break-word;
635
+ }
636
+
637
+ ul.messagelist li.warning {
638
+ background: var(--message-warning-bg) url(../img/icon-alert.svg) 40px 14px no-repeat;
639
+ background-size: 14px auto;
640
+ }
641
+
642
+ ul.messagelist li.error {
643
+ background: var(--message-error-bg) url(../img/icon-no.svg) 40px 12px no-repeat;
644
+ background-size: 16px auto;
645
+ }
646
+
647
+ .errornote {
648
+ font-size: 0.875rem;
649
+ font-weight: 700;
650
+ display: block;
651
+ padding: 10px 12px;
652
+ margin: 0 0 10px 0;
653
+ color: var(--error-fg);
654
+ border: 1px solid var(--error-fg);
655
+ border-radius: 4px;
656
+ background-color: var(--body-bg);
657
+ background-position: 5px 12px;
658
+ overflow-wrap: break-word;
659
+ }
660
+
661
+ ul.errorlist {
662
+ margin: 0 0 4px;
663
+ padding: 0;
664
+ color: var(--error-fg);
665
+ background: var(--body-bg);
666
+ }
667
+
668
+ ul.errorlist li {
669
+ font-size: 0.8125rem;
670
+ display: block;
671
+ margin-bottom: 4px;
672
+ overflow-wrap: break-word;
673
+ }
674
+
675
+ ul.errorlist li:first-child {
676
+ margin-top: 0;
677
+ }
678
+
679
+ ul.errorlist li a {
680
+ color: inherit;
681
+ text-decoration: underline;
682
+ }
683
+
684
+ td ul.errorlist {
685
+ margin: 0;
686
+ padding: 0;
687
+ }
688
+
689
+ td ul.errorlist li {
690
+ margin: 0;
691
+ }
692
+
693
+ .form-row.errors {
694
+ margin: 0;
695
+ border: none;
696
+ border-bottom: 1px solid var(--hairline-color);
697
+ background: none;
698
+ }
699
+
700
+ .form-row.errors ul.errorlist li {
701
+ padding-left: 0;
702
+ }
703
+
704
+ .errors input, .errors select, .errors textarea,
705
+ td ul.errorlist + input, td ul.errorlist + select, td ul.errorlist + textarea {
706
+ border: 1px solid var(--error-fg);
707
+ }
708
+
709
+ .description {
710
+ font-size: 0.75rem;
711
+ padding: 5px 0 0 12px;
712
+ }
713
+
714
+ /* BREADCRUMBS */
715
+
716
+ div.breadcrumbs {
717
+ background: var(--breadcrumbs-bg);
718
+ padding: 10px 40px;
719
+ border: none;
720
+ color: var(--breadcrumbs-fg);
721
+ text-align: left;
722
+ }
723
+
724
+ div.breadcrumbs a {
725
+ color: var(--breadcrumbs-link-fg);
726
+ }
727
+
728
+ div.breadcrumbs a:focus, div.breadcrumbs a:hover {
729
+ color: var(--breadcrumbs-fg);
730
+ }
731
+
732
+ /* ACTION ICONS */
733
+
734
+ .viewlink, .inlineviewlink {
735
+ padding-left: 16px;
736
+ background: url(../img/icon-viewlink.svg) 0 1px no-repeat;
737
+ }
738
+
739
+ .hidelink {
740
+ padding-left: 16px;
741
+ background: url(../img/icon-hidelink.svg) 0 1px no-repeat;
742
+ }
743
+
744
+ .addlink {
745
+ padding-left: 16px;
746
+ background: url(../img/icon-addlink.svg) 0 1px no-repeat;
747
+ }
748
+
749
+ .changelink, .inlinechangelink {
750
+ padding-left: 16px;
751
+ background: url(../img/icon-changelink.svg) 0 1px no-repeat;
752
+ }
753
+
754
+ .deletelink {
755
+ padding-left: 16px;
756
+ background: url(../img/icon-deletelink.svg) 0 1px no-repeat;
757
+ }
758
+
759
+ a.deletelink:link, a.deletelink:visited {
760
+ color: #CC3434; /* XXX Probably unused? */
761
+ }
762
+
763
+ a.deletelink:focus, a.deletelink:hover {
764
+ color: #993333; /* XXX Probably unused? */
765
+ text-decoration: none;
766
+ }
767
+
768
+ /* OBJECT TOOLS */
769
+
770
+ .object-tools {
771
+ font-size: 0.625rem;
772
+ font-weight: bold;
773
+ padding-left: 0;
774
+ float: right;
775
+ position: relative;
776
+ margin-top: -48px;
777
+ }
778
+
779
+ .object-tools li {
780
+ display: block;
781
+ float: left;
782
+ margin-left: 5px;
783
+ height: 1rem;
784
+ }
785
+
786
+ .object-tools a {
787
+ border-radius: 15px;
788
+ }
789
+
790
+ .object-tools a:link, .object-tools a:visited {
791
+ display: block;
792
+ float: left;
793
+ padding: 3px 12px;
794
+ background: var(--object-tools-bg);
795
+ color: var(--object-tools-fg);
796
+ font-weight: 400;
797
+ font-size: 0.6875rem;
798
+ text-transform: uppercase;
799
+ letter-spacing: 0.5px;
800
+ }
801
+
802
+ .object-tools a:focus, .object-tools a:hover {
803
+ background-color: var(--object-tools-hover-bg);
804
+ }
805
+
806
+ .object-tools a:focus{
807
+ text-decoration: none;
808
+ }
809
+
810
+ .object-tools a.viewsitelink, .object-tools a.addlink {
811
+ background-repeat: no-repeat;
812
+ background-position: right 7px center;
813
+ padding-right: 26px;
814
+ }
815
+
816
+ .object-tools a.viewsitelink {
817
+ background-image: url(../img/tooltag-arrowright.svg);
818
+ }
819
+
820
+ .object-tools a.addlink {
821
+ background-image: url(../img/tooltag-add.svg);
822
+ }
823
+
824
+ /* OBJECT HISTORY */
825
+
826
+ #change-history table {
827
+ width: 100%;
828
+ }
829
+
830
+ #change-history table tbody th {
831
+ width: 16em;
832
+ }
833
+
834
+ #change-history .paginator {
835
+ color: var(--body-quiet-color);
836
+ border-bottom: 1px solid var(--hairline-color);
837
+ background: var(--body-bg);
838
+ overflow: hidden;
839
+ }
840
+
841
+ /* PAGE STRUCTURE */
842
+
843
+ #container {
844
+ position: relative;
845
+ width: 100%;
846
+ min-width: 980px;
847
+ padding: 0;
848
+ display: flex;
849
+ flex-direction: column;
850
+ height: 100%;
851
+ }
852
+
853
+ #container > .main {
854
+ display: flex;
855
+ flex: 1 0 auto;
856
+ }
857
+
858
+ .main > .content {
859
+ flex: 1 0;
860
+ max-width: 100%;
861
+ }
862
+
863
+ .skip-to-content-link {
864
+ position: absolute;
865
+ top: -999px;
866
+ margin: 5px;
867
+ padding: 5px;
868
+ background: var(--body-bg);
869
+ z-index: 1;
870
+ }
871
+
872
+ .skip-to-content-link:focus {
873
+ left: 0px;
874
+ top: 0px;
875
+ }
876
+
877
+ #content {
878
+ padding: 20px 40px;
879
+ }
880
+
881
+ .dashboard #content {
882
+ width: 600px;
883
+ }
884
+
885
+ #content-main {
886
+ float: left;
887
+ width: 100%;
888
+ }
889
+
890
+ #content-related {
891
+ float: right;
892
+ width: 260px;
893
+ position: relative;
894
+ margin-right: -300px;
895
+ }
896
+
897
+ @media (forced-colors: active) {
898
+ #content-related {
899
+ border: 1px solid;
900
+ }
901
+ }
902
+
903
+ /* COLUMN TYPES */
904
+
905
+ .colMS {
906
+ margin-right: 300px;
907
+ }
908
+
909
+ .colSM {
910
+ margin-left: 300px;
911
+ }
912
+
913
+ .colSM #content-related {
914
+ float: left;
915
+ margin-right: 0;
916
+ margin-left: -300px;
917
+ }
918
+
919
+ .colSM #content-main {
920
+ float: right;
921
+ }
922
+
923
+ .popup .colM {
924
+ width: auto;
925
+ }
926
+
927
+ /* HEADER */
928
+
929
+ #header {
930
+ width: auto;
931
+ height: auto;
932
+ display: flex;
933
+ justify-content: space-between;
934
+ align-items: center;
935
+ padding: 10px 40px;
936
+ background: var(--header-bg);
937
+ color: var(--header-color);
938
+ }
939
+
940
+ #header a:link, #header a:visited, #logout-form button {
941
+ color: var(--header-link-color);
942
+ }
943
+
944
+ #header a:focus , #header a:hover {
945
+ text-decoration: underline;
946
+ }
947
+
948
+ @media (forced-colors: active) {
949
+ #header {
950
+ border-bottom: 1px solid;
951
+ }
952
+ }
953
+
954
+ #branding {
955
+ display: flex;
956
+ }
957
+
958
+ #site-name {
959
+ padding: 0;
960
+ margin: 0;
961
+ margin-inline-end: 20px;
962
+ font-weight: 300;
963
+ font-size: 1.5rem;
964
+ color: var(--header-branding-color);
965
+ }
966
+
967
+ #site-name a:link, #site-name a:visited {
968
+ color: var(--accent);
969
+ }
970
+
971
+ #branding h2 {
972
+ padding: 0 10px;
973
+ font-size: 0.875rem;
974
+ margin: -8px 0 8px 0;
975
+ font-weight: normal;
976
+ color: var(--header-color);
977
+ }
978
+
979
+ #branding a:hover {
980
+ text-decoration: none;
981
+ }
982
+
983
+ #logout-form {
984
+ display: inline;
985
+ }
986
+
987
+ #logout-form button {
988
+ background: none;
989
+ border: 0;
990
+ cursor: pointer;
991
+ font-family: var(--font-family-primary);
992
+ }
993
+
994
+ #user-tools {
995
+ float: right;
996
+ margin: 0 0 0 20px;
997
+ text-align: right;
998
+ }
999
+
1000
+ #user-tools, #logout-form button{
1001
+ padding: 0;
1002
+ font-weight: 300;
1003
+ font-size: 0.6875rem;
1004
+ letter-spacing: 0.5px;
1005
+ text-transform: uppercase;
1006
+ }
1007
+
1008
+ #user-tools a, #logout-form button {
1009
+ border-bottom: 1px solid rgba(255, 255, 255, 0.25);
1010
+ }
1011
+
1012
+ #user-tools a:focus, #user-tools a:hover,
1013
+ #logout-form button:active, #logout-form button:hover {
1014
+ text-decoration: none;
1015
+ border-bottom: 0;
1016
+ }
1017
+
1018
+ #logout-form button:active, #logout-form button:hover {
1019
+ margin-bottom: 1px;
1020
+ }
1021
+
1022
+ /* SIDEBAR */
1023
+
1024
+ #content-related {
1025
+ background: var(--darkened-bg);
1026
+ }
1027
+
1028
+ #content-related .module {
1029
+ background: none;
1030
+ }
1031
+
1032
+ #content-related h3 {
1033
+ color: var(--body-quiet-color);
1034
+ padding: 0 16px;
1035
+ margin: 0 0 16px;
1036
+ }
1037
+
1038
+ #content-related h4 {
1039
+ font-size: 0.8125rem;
1040
+ }
1041
+
1042
+ #content-related p {
1043
+ padding-left: 16px;
1044
+ padding-right: 16px;
1045
+ }
1046
+
1047
+ #content-related .actionlist {
1048
+ padding: 0;
1049
+ margin: 16px;
1050
+ }
1051
+
1052
+ #content-related .actionlist li {
1053
+ line-height: 1.2;
1054
+ margin-bottom: 10px;
1055
+ padding-left: 18px;
1056
+ }
1057
+
1058
+ #content-related .module h2 {
1059
+ background: none;
1060
+ padding: 16px;
1061
+ margin-bottom: 16px;
1062
+ border-bottom: 1px solid var(--hairline-color);
1063
+ font-size: 1.125rem;
1064
+ color: var(--body-fg);
1065
+ }
1066
+
1067
+ .delete-confirmation form input[type="submit"] {
1068
+ background: var(--delete-button-bg);
1069
+ border-radius: 4px;
1070
+ padding: 10px 15px;
1071
+ color: var(--button-fg);
1072
+ }
1073
+
1074
+ .delete-confirmation form input[type="submit"]:active,
1075
+ .delete-confirmation form input[type="submit"]:focus,
1076
+ .delete-confirmation form input[type="submit"]:hover {
1077
+ background: var(--delete-button-hover-bg);
1078
+ }
1079
+
1080
+ .delete-confirmation form .cancel-link {
1081
+ display: inline-block;
1082
+ vertical-align: middle;
1083
+ height: 0.9375rem;
1084
+ line-height: 0.9375rem;
1085
+ border-radius: 4px;
1086
+ padding: 10px 15px;
1087
+ color: var(--button-fg);
1088
+ background: var(--close-button-bg);
1089
+ margin: 0 0 0 10px;
1090
+ }
1091
+
1092
+ .delete-confirmation form .cancel-link:active,
1093
+ .delete-confirmation form .cancel-link:focus,
1094
+ .delete-confirmation form .cancel-link:hover {
1095
+ background: var(--close-button-hover-bg);
1096
+ }
1097
+
1098
+ /* POPUP */
1099
+ .popup #content {
1100
+ padding: 20px;
1101
+ }
1102
+
1103
+ .popup #container {
1104
+ min-width: 0;
1105
+ }
1106
+
1107
+ .popup #header {
1108
+ padding: 10px 20px;
1109
+ }
1110
+
1111
+ /* PAGINATOR */
1112
+
1113
+ .paginator {
1114
+ display: flex;
1115
+ align-items: center;
1116
+ gap: 4px;
1117
+ font-size: 0.8125rem;
1118
+ padding-top: 10px;
1119
+ padding-bottom: 10px;
1120
+ line-height: 22px;
1121
+ margin: 0;
1122
+ border-top: 1px solid var(--hairline-color);
1123
+ width: 100%;
1124
+ box-sizing: border-box;
1125
+ }
1126
+
1127
+ .paginator a:link, .paginator a:visited {
1128
+ padding: 2px 6px;
1129
+ background: var(--button-bg);
1130
+ text-decoration: none;
1131
+ color: var(--button-fg);
1132
+ }
1133
+
1134
+ .paginator a.showall {
1135
+ border: none;
1136
+ background: none;
1137
+ color: var(--link-fg);
1138
+ }
1139
+
1140
+ .paginator a.showall:focus, .paginator a.showall:hover {
1141
+ background: none;
1142
+ color: var(--link-hover-color);
1143
+ }
1144
+
1145
+ .paginator .end {
1146
+ margin-right: 6px;
1147
+ }
1148
+
1149
+ .paginator .this-page {
1150
+ padding: 2px 6px;
1151
+ font-weight: bold;
1152
+ font-size: 0.8125rem;
1153
+ vertical-align: top;
1154
+ }
1155
+
1156
+ .paginator a:focus, .paginator a:hover {
1157
+ color: white;
1158
+ background: var(--link-hover-color);
1159
+ }
1160
+
1161
+ .paginator input {
1162
+ margin-left: auto;
1163
+ }
1164
+
1165
+ .base-svgs {
1166
+ display: none;
1167
+ }
1168
+
1169
+ .visually-hidden {
1170
+ position: absolute;
1171
+ width: 1px;
1172
+ height: 1px;
1173
+ padding: 0;
1174
+ overflow: hidden;
1175
+ clip: rect(0,0,0,0);
1176
+ white-space: nowrap;
1177
+ border: 0;
1178
+ color: var(--body-fg);
1179
+ background-color: var(--body-bg);
1180
+ }
backend/staticfiles/admin/css/changelists.css ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* CHANGELISTS */
2
+
3
+ #changelist {
4
+ display: flex;
5
+ align-items: flex-start;
6
+ justify-content: space-between;
7
+ }
8
+
9
+ #changelist .changelist-form-container {
10
+ flex: 1 1 auto;
11
+ min-width: 0;
12
+ }
13
+
14
+ #changelist table {
15
+ width: 100%;
16
+ }
17
+
18
+ .change-list .hiddenfields { display:none; }
19
+
20
+ .change-list .filtered table {
21
+ border-right: none;
22
+ }
23
+
24
+ .change-list .filtered {
25
+ min-height: 400px;
26
+ }
27
+
28
+ .change-list .filtered .results, .change-list .filtered .paginator,
29
+ .filtered #toolbar, .filtered div.xfull {
30
+ width: auto;
31
+ }
32
+
33
+ .change-list .filtered table tbody th {
34
+ padding-right: 1em;
35
+ }
36
+
37
+ #changelist-form .results {
38
+ overflow-x: auto;
39
+ width: 100%;
40
+ }
41
+
42
+ #changelist .toplinks {
43
+ border-bottom: 1px solid var(--hairline-color);
44
+ }
45
+
46
+ #changelist .paginator {
47
+ color: var(--body-quiet-color);
48
+ border-bottom: 1px solid var(--hairline-color);
49
+ background: var(--body-bg);
50
+ overflow: hidden;
51
+ }
52
+
53
+ /* CHANGELIST TABLES */
54
+
55
+ #changelist table thead th {
56
+ padding: 0;
57
+ white-space: nowrap;
58
+ vertical-align: middle;
59
+ }
60
+
61
+ #changelist table thead th.action-checkbox-column {
62
+ width: 1.5em;
63
+ text-align: center;
64
+ }
65
+
66
+ #changelist table tbody td.action-checkbox {
67
+ text-align: center;
68
+ }
69
+
70
+ #changelist table tfoot {
71
+ color: var(--body-quiet-color);
72
+ }
73
+
74
+ /* TOOLBAR */
75
+
76
+ #toolbar {
77
+ padding: 8px 10px;
78
+ margin-bottom: 15px;
79
+ border-top: 1px solid var(--hairline-color);
80
+ border-bottom: 1px solid var(--hairline-color);
81
+ background: var(--darkened-bg);
82
+ color: var(--body-quiet-color);
83
+ }
84
+
85
+ #toolbar form input {
86
+ border-radius: 4px;
87
+ font-size: 0.875rem;
88
+ padding: 5px;
89
+ color: var(--body-fg);
90
+ }
91
+
92
+ #toolbar #searchbar {
93
+ height: 1.1875rem;
94
+ border: 1px solid var(--border-color);
95
+ padding: 2px 5px;
96
+ margin: 0;
97
+ vertical-align: top;
98
+ font-size: 0.8125rem;
99
+ max-width: 100%;
100
+ }
101
+
102
+ #toolbar #searchbar:focus {
103
+ border-color: var(--body-quiet-color);
104
+ }
105
+
106
+ #toolbar form input[type="submit"] {
107
+ border: 1px solid var(--border-color);
108
+ font-size: 0.8125rem;
109
+ padding: 4px 8px;
110
+ margin: 0;
111
+ vertical-align: middle;
112
+ background: var(--body-bg);
113
+ box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
114
+ cursor: pointer;
115
+ color: var(--body-fg);
116
+ }
117
+
118
+ #toolbar form input[type="submit"]:focus,
119
+ #toolbar form input[type="submit"]:hover {
120
+ border-color: var(--body-quiet-color);
121
+ }
122
+
123
+ #changelist-search img {
124
+ vertical-align: middle;
125
+ margin-right: 4px;
126
+ }
127
+
128
+ #changelist-search .help {
129
+ word-break: break-word;
130
+ }
131
+
132
+ /* FILTER COLUMN */
133
+
134
+ #changelist-filter {
135
+ flex: 0 0 240px;
136
+ order: 1;
137
+ background: var(--darkened-bg);
138
+ border-left: none;
139
+ margin: 0 0 0 30px;
140
+ }
141
+
142
+ @media (forced-colors: active) {
143
+ #changelist-filter {
144
+ border: 1px solid;
145
+ }
146
+ }
147
+
148
+ #changelist-filter h2 {
149
+ font-size: 0.875rem;
150
+ text-transform: uppercase;
151
+ letter-spacing: 0.5px;
152
+ padding: 5px 15px;
153
+ margin-bottom: 12px;
154
+ border-bottom: none;
155
+ }
156
+
157
+ #changelist-filter h3,
158
+ #changelist-filter details summary {
159
+ font-weight: 400;
160
+ padding: 0 15px;
161
+ margin-bottom: 10px;
162
+ }
163
+
164
+ #changelist-filter details summary > * {
165
+ display: inline;
166
+ }
167
+
168
+ #changelist-filter details > summary {
169
+ list-style-type: none;
170
+ }
171
+
172
+ #changelist-filter details > summary::-webkit-details-marker {
173
+ display: none;
174
+ }
175
+
176
+ #changelist-filter details > summary::before {
177
+ content: '→';
178
+ font-weight: bold;
179
+ color: var(--link-hover-color);
180
+ }
181
+
182
+ #changelist-filter details[open] > summary::before {
183
+ content: '↓';
184
+ }
185
+
186
+ #changelist-filter ul {
187
+ margin: 5px 0;
188
+ padding: 0 15px 15px;
189
+ border-bottom: 1px solid var(--hairline-color);
190
+ }
191
+
192
+ #changelist-filter ul:last-child {
193
+ border-bottom: none;
194
+ }
195
+
196
+ #changelist-filter li {
197
+ list-style-type: none;
198
+ margin-left: 0;
199
+ padding-left: 0;
200
+ }
201
+
202
+ #changelist-filter a {
203
+ display: block;
204
+ color: var(--body-quiet-color);
205
+ word-break: break-word;
206
+ }
207
+
208
+ #changelist-filter li.selected {
209
+ border-left: 5px solid var(--hairline-color);
210
+ padding-left: 10px;
211
+ margin-left: -15px;
212
+ }
213
+
214
+ #changelist-filter li.selected a {
215
+ color: var(--link-selected-fg);
216
+ }
217
+
218
+ #changelist-filter a:focus, #changelist-filter a:hover,
219
+ #changelist-filter li.selected a:focus,
220
+ #changelist-filter li.selected a:hover {
221
+ color: var(--link-hover-color);
222
+ }
223
+
224
+ #changelist-filter #changelist-filter-extra-actions {
225
+ font-size: 0.8125rem;
226
+ margin-bottom: 10px;
227
+ border-bottom: 1px solid var(--hairline-color);
228
+ }
229
+
230
+ /* DATE DRILLDOWN */
231
+
232
+ .change-list .toplinks {
233
+ display: flex;
234
+ padding-bottom: 5px;
235
+ flex-wrap: wrap;
236
+ gap: 3px 17px;
237
+ font-weight: bold;
238
+ }
239
+
240
+ .change-list .toplinks a {
241
+ font-size: 0.8125rem;
242
+ }
243
+
244
+ .change-list .toplinks .date-back {
245
+ color: var(--body-quiet-color);
246
+ }
247
+
248
+ .change-list .toplinks .date-back:focus,
249
+ .change-list .toplinks .date-back:hover {
250
+ color: var(--link-hover-color);
251
+ }
252
+
253
+ /* ACTIONS */
254
+
255
+ .filtered .actions {
256
+ border-right: none;
257
+ }
258
+
259
+ #changelist table input {
260
+ margin: 0;
261
+ vertical-align: baseline;
262
+ }
263
+
264
+ /* Once the :has() pseudo-class is supported by all browsers, the tr.selected
265
+ selector and the JS adding the class can be removed. */
266
+ #changelist tbody tr.selected {
267
+ background-color: var(--selected-row);
268
+ }
269
+
270
+ #changelist tbody tr:has(.action-select:checked) {
271
+ background-color: var(--selected-row);
272
+ }
273
+
274
+ @media (forced-colors: active) {
275
+ #changelist tbody tr.selected {
276
+ background-color: SelectedItem;
277
+ }
278
+ #changelist tbody tr:has(.action-select:checked) {
279
+ background-color: SelectedItem;
280
+ }
281
+ }
282
+
283
+ #changelist .actions {
284
+ padding: 10px;
285
+ background: var(--body-bg);
286
+ border-top: none;
287
+ border-bottom: none;
288
+ line-height: 1.5rem;
289
+ color: var(--body-quiet-color);
290
+ width: 100%;
291
+ }
292
+
293
+ #changelist .actions span.all,
294
+ #changelist .actions span.action-counter,
295
+ #changelist .actions span.clear,
296
+ #changelist .actions span.question {
297
+ font-size: 0.8125rem;
298
+ margin: 0 0.5em;
299
+ }
300
+
301
+ #changelist .actions:last-child {
302
+ border-bottom: none;
303
+ }
304
+
305
+ #changelist .actions select {
306
+ vertical-align: top;
307
+ height: 1.5rem;
308
+ color: var(--body-fg);
309
+ border: 1px solid var(--border-color);
310
+ border-radius: 4px;
311
+ font-size: 0.875rem;
312
+ padding: 0 0 0 4px;
313
+ margin: 0;
314
+ margin-left: 10px;
315
+ }
316
+
317
+ #changelist .actions select:focus {
318
+ border-color: var(--body-quiet-color);
319
+ }
320
+
321
+ #changelist .actions label {
322
+ display: inline-block;
323
+ vertical-align: middle;
324
+ font-size: 0.8125rem;
325
+ }
326
+
327
+ #changelist .actions .button {
328
+ font-size: 0.8125rem;
329
+ border: 1px solid var(--border-color);
330
+ border-radius: 4px;
331
+ background: var(--body-bg);
332
+ box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
333
+ cursor: pointer;
334
+ height: 1.5rem;
335
+ line-height: 1;
336
+ padding: 4px 8px;
337
+ margin: 0;
338
+ color: var(--body-fg);
339
+ }
340
+
341
+ #changelist .actions .button:focus, #changelist .actions .button:hover {
342
+ border-color: var(--body-quiet-color);
343
+ }
backend/staticfiles/admin/css/dark_mode.css ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @media (prefers-color-scheme: dark) {
2
+ :root {
3
+ --primary: #264b5d;
4
+ --primary-fg: #f7f7f7;
5
+
6
+ --body-fg: #eeeeee;
7
+ --body-bg: #121212;
8
+ --body-quiet-color: #d0d0d0;
9
+ --body-medium-color: #e0e0e0;
10
+ --body-loud-color: #ffffff;
11
+
12
+ --breadcrumbs-link-fg: #e0e0e0;
13
+ --breadcrumbs-bg: var(--primary);
14
+
15
+ --link-fg: #81d4fa;
16
+ --link-hover-color: #4ac1f7;
17
+ --link-selected-fg: #6f94c6;
18
+
19
+ --hairline-color: #272727;
20
+ --border-color: #353535;
21
+
22
+ --error-fg: #e35f5f;
23
+ --message-success-bg: #006b1b;
24
+ --message-warning-bg: #583305;
25
+ --message-error-bg: #570808;
26
+
27
+ --darkened-bg: #212121;
28
+ --selected-bg: #1b1b1b;
29
+ --selected-row: #00363a;
30
+
31
+ --close-button-bg: #333333;
32
+ --close-button-hover-bg: #666666;
33
+
34
+ color-scheme: dark;
35
+ }
36
+ }
37
+
38
+
39
+ html[data-theme="dark"] {
40
+ --primary: #264b5d;
41
+ --primary-fg: #f7f7f7;
42
+
43
+ --body-fg: #eeeeee;
44
+ --body-bg: #121212;
45
+ --body-quiet-color: #d0d0d0;
46
+ --body-medium-color: #e0e0e0;
47
+ --body-loud-color: #ffffff;
48
+
49
+ --breadcrumbs-link-fg: #e0e0e0;
50
+ --breadcrumbs-bg: var(--primary);
51
+
52
+ --link-fg: #81d4fa;
53
+ --link-hover-color: #4ac1f7;
54
+ --link-selected-fg: #6f94c6;
55
+
56
+ --hairline-color: #272727;
57
+ --border-color: #353535;
58
+
59
+ --error-fg: #e35f5f;
60
+ --message-success-bg: #006b1b;
61
+ --message-warning-bg: #583305;
62
+ --message-error-bg: #570808;
63
+
64
+ --darkened-bg: #212121;
65
+ --selected-bg: #1b1b1b;
66
+ --selected-row: #00363a;
67
+
68
+ --close-button-bg: #333333;
69
+ --close-button-hover-bg: #666666;
70
+
71
+ color-scheme: dark;
72
+ }
73
+
74
+ /* THEME SWITCH */
75
+ .theme-toggle {
76
+ cursor: pointer;
77
+ border: none;
78
+ padding: 0;
79
+ background: transparent;
80
+ vertical-align: middle;
81
+ margin-inline-start: 5px;
82
+ margin-top: -1px;
83
+ }
84
+
85
+ .theme-toggle svg {
86
+ vertical-align: middle;
87
+ height: 1.5rem;
88
+ width: 1.5rem;
89
+ display: none;
90
+ }
91
+
92
+ /*
93
+ Fully hide screen reader text so we only show the one matching the current
94
+ theme.
95
+ */
96
+ .theme-toggle .visually-hidden {
97
+ display: none;
98
+ }
99
+
100
+ html[data-theme="auto"] .theme-toggle .theme-label-when-auto {
101
+ display: block;
102
+ }
103
+
104
+ html[data-theme="dark"] .theme-toggle .theme-label-when-dark {
105
+ display: block;
106
+ }
107
+
108
+ html[data-theme="light"] .theme-toggle .theme-label-when-light {
109
+ display: block;
110
+ }
111
+
112
+ /* ICONS */
113
+ .theme-toggle svg.theme-icon-when-auto,
114
+ .theme-toggle svg.theme-icon-when-dark,
115
+ .theme-toggle svg.theme-icon-when-light {
116
+ fill: var(--header-link-color);
117
+ color: var(--header-bg);
118
+ }
119
+
120
+ html[data-theme="auto"] .theme-toggle svg.theme-icon-when-auto {
121
+ display: block;
122
+ }
123
+
124
+ html[data-theme="dark"] .theme-toggle svg.theme-icon-when-dark {
125
+ display: block;
126
+ }
127
+
128
+ html[data-theme="light"] .theme-toggle svg.theme-icon-when-light {
129
+ display: block;
130
+ }
backend/staticfiles/admin/css/dashboard.css ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* DASHBOARD */
2
+ .dashboard td, .dashboard th {
3
+ word-break: break-word;
4
+ }
5
+
6
+ .dashboard .module table th {
7
+ width: 100%;
8
+ }
9
+
10
+ .dashboard .module table td {
11
+ white-space: nowrap;
12
+ }
13
+
14
+ .dashboard .module table td a {
15
+ display: block;
16
+ padding-right: .6em;
17
+ }
18
+
19
+ /* RECENT ACTIONS MODULE */
20
+
21
+ .module ul.actionlist {
22
+ margin-left: 0;
23
+ }
24
+
25
+ ul.actionlist li {
26
+ list-style-type: none;
27
+ overflow: hidden;
28
+ text-overflow: ellipsis;
29
+ }
backend/staticfiles/admin/css/forms.css ADDED
@@ -0,0 +1,498 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import url('widgets.css');
2
+
3
+ /* FORM ROWS */
4
+
5
+ .form-row {
6
+ overflow: hidden;
7
+ padding: 10px;
8
+ font-size: 0.8125rem;
9
+ border-bottom: 1px solid var(--hairline-color);
10
+ }
11
+
12
+ .form-row img, .form-row input {
13
+ vertical-align: middle;
14
+ }
15
+
16
+ .form-row label input[type="checkbox"] {
17
+ margin-top: 0;
18
+ vertical-align: 0;
19
+ }
20
+
21
+ form .form-row p {
22
+ padding-left: 0;
23
+ }
24
+
25
+ .flex-container {
26
+ display: flex;
27
+ }
28
+
29
+ .form-multiline {
30
+ flex-wrap: wrap;
31
+ }
32
+
33
+ .form-multiline > div {
34
+ padding-bottom: 10px;
35
+ }
36
+
37
+ /* FORM LABELS */
38
+
39
+ label {
40
+ font-weight: normal;
41
+ color: var(--body-quiet-color);
42
+ font-size: 0.8125rem;
43
+ }
44
+
45
+ .required label, label.required {
46
+ font-weight: bold;
47
+ }
48
+
49
+ /* RADIO BUTTONS */
50
+
51
+ form div.radiolist div {
52
+ padding-right: 7px;
53
+ }
54
+
55
+ form div.radiolist.inline div {
56
+ display: inline-block;
57
+ }
58
+
59
+ form div.radiolist label {
60
+ width: auto;
61
+ }
62
+
63
+ form div.radiolist input[type="radio"] {
64
+ margin: -2px 4px 0 0;
65
+ padding: 0;
66
+ }
67
+
68
+ form ul.inline {
69
+ margin-left: 0;
70
+ padding: 0;
71
+ }
72
+
73
+ form ul.inline li {
74
+ float: left;
75
+ padding-right: 7px;
76
+ }
77
+
78
+ /* FIELDSETS */
79
+
80
+ fieldset .fieldset-heading,
81
+ fieldset .inline-heading,
82
+ :not(.inline-related) .collapse summary {
83
+ border: 1px solid var(--header-bg);
84
+ margin: 0;
85
+ padding: 8px;
86
+ font-weight: 400;
87
+ font-size: 0.8125rem;
88
+ background: var(--header-bg);
89
+ color: var(--header-link-color);
90
+ }
91
+
92
+ /* ALIGNED FIELDSETS */
93
+
94
+ .aligned label {
95
+ display: block;
96
+ padding: 4px 10px 0 0;
97
+ min-width: 160px;
98
+ width: 160px;
99
+ word-wrap: break-word;
100
+ }
101
+
102
+ .aligned label:not(.vCheckboxLabel):after {
103
+ content: '';
104
+ display: inline-block;
105
+ vertical-align: middle;
106
+ }
107
+
108
+ .aligned label + p, .aligned .checkbox-row + div.help, .aligned label + div.readonly {
109
+ padding: 6px 0;
110
+ margin-top: 0;
111
+ margin-bottom: 0;
112
+ margin-left: 0;
113
+ overflow-wrap: break-word;
114
+ }
115
+
116
+ .aligned ul label {
117
+ display: inline;
118
+ float: none;
119
+ width: auto;
120
+ }
121
+
122
+ .aligned .form-row input {
123
+ margin-bottom: 0;
124
+ }
125
+
126
+ .colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField {
127
+ width: 350px;
128
+ }
129
+
130
+ form .aligned ul {
131
+ margin-left: 160px;
132
+ padding-left: 10px;
133
+ }
134
+
135
+ form .aligned div.radiolist {
136
+ display: inline-block;
137
+ margin: 0;
138
+ padding: 0;
139
+ }
140
+
141
+ form .aligned p.help,
142
+ form .aligned div.help {
143
+ margin-top: 0;
144
+ margin-left: 160px;
145
+ padding-left: 10px;
146
+ }
147
+
148
+ form .aligned p.date div.help.timezonewarning,
149
+ form .aligned p.datetime div.help.timezonewarning,
150
+ form .aligned p.time div.help.timezonewarning {
151
+ margin-left: 0;
152
+ padding-left: 0;
153
+ font-weight: normal;
154
+ }
155
+
156
+ form .aligned p.help:last-child,
157
+ form .aligned div.help:last-child {
158
+ margin-bottom: 0;
159
+ padding-bottom: 0;
160
+ }
161
+
162
+ form .aligned input + p.help,
163
+ form .aligned textarea + p.help,
164
+ form .aligned select + p.help,
165
+ form .aligned input + div.help,
166
+ form .aligned textarea + div.help,
167
+ form .aligned select + div.help {
168
+ margin-left: 160px;
169
+ padding-left: 10px;
170
+ }
171
+
172
+ form .aligned select option:checked {
173
+ background-color: var(--selected-row);
174
+ }
175
+
176
+ form .aligned ul li {
177
+ list-style: none;
178
+ }
179
+
180
+ form .aligned table p {
181
+ margin-left: 0;
182
+ padding-left: 0;
183
+ }
184
+
185
+ .aligned .vCheckboxLabel {
186
+ padding: 1px 0 0 5px;
187
+ }
188
+
189
+ .aligned .vCheckboxLabel + p.help,
190
+ .aligned .vCheckboxLabel + div.help {
191
+ margin-top: -4px;
192
+ }
193
+
194
+ .colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
195
+ width: 610px;
196
+ }
197
+
198
+ fieldset .fieldBox {
199
+ margin-right: 20px;
200
+ }
201
+
202
+ /* WIDE FIELDSETS */
203
+
204
+ .wide label {
205
+ width: 200px;
206
+ }
207
+
208
+ form .wide p.help,
209
+ form .wide ul.errorlist,
210
+ form .wide div.help {
211
+ padding-left: 50px;
212
+ }
213
+
214
+ form div.help ul {
215
+ padding-left: 0;
216
+ margin-left: 0;
217
+ }
218
+
219
+ .colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField {
220
+ width: 450px;
221
+ }
222
+
223
+ /* COLLAPSIBLE FIELDSETS */
224
+
225
+ .collapse summary .fieldset-heading,
226
+ .collapse summary .inline-heading {
227
+ background: transparent;
228
+ border: none;
229
+ color: currentColor;
230
+ display: inline;
231
+ margin: 0;
232
+ padding: 0;
233
+ }
234
+
235
+ /* MONOSPACE TEXTAREAS */
236
+
237
+ fieldset.monospace textarea {
238
+ font-family: var(--font-family-monospace);
239
+ }
240
+
241
+ /* SUBMIT ROW */
242
+
243
+ .submit-row {
244
+ padding: 12px 14px 12px;
245
+ margin: 0 0 20px;
246
+ background: var(--darkened-bg);
247
+ border: 1px solid var(--hairline-color);
248
+ border-radius: 4px;
249
+ overflow: hidden;
250
+ display: flex;
251
+ gap: 10px;
252
+ flex-wrap: wrap;
253
+ }
254
+
255
+ body.popup .submit-row {
256
+ overflow: auto;
257
+ }
258
+
259
+ .submit-row input {
260
+ height: 2.1875rem;
261
+ line-height: 0.9375rem;
262
+ }
263
+
264
+ .submit-row input, .submit-row a {
265
+ margin: 0;
266
+ }
267
+
268
+ .submit-row input.default {
269
+ text-transform: uppercase;
270
+ }
271
+
272
+ .submit-row a.deletelink {
273
+ margin-left: auto;
274
+ }
275
+
276
+ .submit-row a.deletelink {
277
+ display: block;
278
+ background: var(--delete-button-bg);
279
+ border-radius: 4px;
280
+ padding: 0.625rem 0.9375rem;
281
+ height: 0.9375rem;
282
+ line-height: 0.9375rem;
283
+ color: var(--button-fg);
284
+ }
285
+
286
+ .submit-row a.closelink {
287
+ display: inline-block;
288
+ background: var(--close-button-bg);
289
+ border-radius: 4px;
290
+ padding: 10px 15px;
291
+ height: 0.9375rem;
292
+ line-height: 0.9375rem;
293
+ color: var(--button-fg);
294
+ }
295
+
296
+ .submit-row a.deletelink:focus,
297
+ .submit-row a.deletelink:hover,
298
+ .submit-row a.deletelink:active {
299
+ background: var(--delete-button-hover-bg);
300
+ text-decoration: none;
301
+ }
302
+
303
+ .submit-row a.closelink:focus,
304
+ .submit-row a.closelink:hover,
305
+ .submit-row a.closelink:active {
306
+ background: var(--close-button-hover-bg);
307
+ text-decoration: none;
308
+ }
309
+
310
+ /* CUSTOM FORM FIELDS */
311
+
312
+ .vSelectMultipleField {
313
+ vertical-align: top;
314
+ }
315
+
316
+ .vCheckboxField {
317
+ border: none;
318
+ }
319
+
320
+ .vDateField, .vTimeField {
321
+ margin-right: 2px;
322
+ margin-bottom: 4px;
323
+ }
324
+
325
+ .vDateField {
326
+ min-width: 6.85em;
327
+ }
328
+
329
+ .vTimeField {
330
+ min-width: 4.7em;
331
+ }
332
+
333
+ .vURLField {
334
+ width: 30em;
335
+ }
336
+
337
+ .vLargeTextField, .vXMLLargeTextField {
338
+ width: 48em;
339
+ }
340
+
341
+ .flatpages-flatpage #id_content {
342
+ height: 40.2em;
343
+ }
344
+
345
+ .module table .vPositiveSmallIntegerField {
346
+ width: 2.2em;
347
+ }
348
+
349
+ .vIntegerField {
350
+ width: 5em;
351
+ }
352
+
353
+ .vBigIntegerField {
354
+ width: 10em;
355
+ }
356
+
357
+ .vForeignKeyRawIdAdminField {
358
+ width: 5em;
359
+ }
360
+
361
+ .vTextField, .vUUIDField {
362
+ width: 20em;
363
+ }
364
+
365
+ /* INLINES */
366
+
367
+ .inline-group {
368
+ padding: 0;
369
+ margin: 0 0 30px;
370
+ }
371
+
372
+ .inline-group thead th {
373
+ padding: 8px 10px;
374
+ }
375
+
376
+ .inline-group .aligned label {
377
+ width: 160px;
378
+ }
379
+
380
+ .inline-related {
381
+ position: relative;
382
+ }
383
+
384
+ .inline-related h4,
385
+ .inline-related:not(.tabular) .collapse summary {
386
+ margin: 0;
387
+ color: var(--body-medium-color);
388
+ padding: 5px;
389
+ font-size: 0.8125rem;
390
+ background: var(--darkened-bg);
391
+ border: 1px solid var(--hairline-color);
392
+ border-left-color: var(--darkened-bg);
393
+ border-right-color: var(--darkened-bg);
394
+ }
395
+
396
+ .inline-related h3 span.delete {
397
+ float: right;
398
+ }
399
+
400
+ .inline-related h3 span.delete label {
401
+ margin-left: 2px;
402
+ font-size: 0.6875rem;
403
+ }
404
+
405
+ .inline-related fieldset {
406
+ margin: 0;
407
+ background: var(--body-bg);
408
+ border: none;
409
+ width: 100%;
410
+ }
411
+
412
+ .inline-group .tabular fieldset.module {
413
+ border: none;
414
+ }
415
+
416
+ .inline-related.tabular fieldset.module table {
417
+ width: 100%;
418
+ overflow-x: scroll;
419
+ }
420
+
421
+ .last-related fieldset {
422
+ border: none;
423
+ }
424
+
425
+ .inline-group .tabular tr.has_original td {
426
+ padding-top: 2em;
427
+ }
428
+
429
+ .inline-group .tabular tr td.original {
430
+ padding: 2px 0 0 0;
431
+ width: 0;
432
+ _position: relative;
433
+ }
434
+
435
+ .inline-group .tabular th.original {
436
+ width: 0px;
437
+ padding: 0;
438
+ }
439
+
440
+ .inline-group .tabular td.original p {
441
+ position: absolute;
442
+ left: 0;
443
+ height: 1.1em;
444
+ padding: 2px 9px;
445
+ overflow: hidden;
446
+ font-size: 0.5625rem;
447
+ font-weight: bold;
448
+ color: var(--body-quiet-color);
449
+ _width: 700px;
450
+ }
451
+
452
+ .inline-group div.add-row,
453
+ .inline-group .tabular tr.add-row td {
454
+ color: var(--body-quiet-color);
455
+ background: var(--darkened-bg);
456
+ padding: 8px 10px;
457
+ border-bottom: 1px solid var(--hairline-color);
458
+ }
459
+
460
+ .inline-group .tabular tr.add-row td {
461
+ padding: 8px 10px;
462
+ border-bottom: 1px solid var(--hairline-color);
463
+ }
464
+
465
+ .inline-group div.add-row a,
466
+ .inline-group .tabular tr.add-row td a {
467
+ font-size: 0.75rem;
468
+ }
469
+
470
+ .empty-form {
471
+ display: none;
472
+ }
473
+
474
+ /* RELATED FIELD ADD ONE / LOOKUP */
475
+
476
+ .related-lookup {
477
+ margin-left: 5px;
478
+ display: inline-block;
479
+ vertical-align: middle;
480
+ background-repeat: no-repeat;
481
+ background-size: 14px;
482
+ }
483
+
484
+ .related-lookup {
485
+ width: 1rem;
486
+ height: 1rem;
487
+ background-image: url(../img/search.svg);
488
+ }
489
+
490
+ form .related-widget-wrapper ul {
491
+ display: inline-block;
492
+ margin-left: 0;
493
+ padding-left: 0;
494
+ }
495
+
496
+ .clearable-file-input input {
497
+ margin-top: 0;
498
+ }
backend/staticfiles/admin/css/login.css ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* LOGIN FORM */
2
+
3
+ .login {
4
+ background: var(--darkened-bg);
5
+ height: auto;
6
+ }
7
+
8
+ .login #header {
9
+ height: auto;
10
+ padding: 15px 16px;
11
+ justify-content: center;
12
+ }
13
+
14
+ .login #header h1 {
15
+ font-size: 1.125rem;
16
+ margin: 0;
17
+ }
18
+
19
+ .login #header h1 a {
20
+ color: var(--header-link-color);
21
+ }
22
+
23
+ .login #content {
24
+ padding: 20px;
25
+ }
26
+
27
+ .login #container {
28
+ background: var(--body-bg);
29
+ border: 1px solid var(--hairline-color);
30
+ border-radius: 4px;
31
+ overflow: hidden;
32
+ width: 28em;
33
+ min-width: 300px;
34
+ margin: 100px auto;
35
+ height: auto;
36
+ }
37
+
38
+ .login .form-row {
39
+ padding: 4px 0;
40
+ }
41
+
42
+ .login .form-row label {
43
+ display: block;
44
+ line-height: 2em;
45
+ }
46
+
47
+ .login .form-row #id_username, .login .form-row #id_password {
48
+ padding: 8px;
49
+ width: 100%;
50
+ box-sizing: border-box;
51
+ }
52
+
53
+ .login .submit-row {
54
+ padding: 1em 0 0 0;
55
+ margin: 0;
56
+ text-align: center;
57
+ }
58
+
59
+ .login .password-reset-link {
60
+ text-align: center;
61
+ }
backend/staticfiles/admin/css/nav_sidebar.css ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .sticky {
2
+ position: sticky;
3
+ top: 0;
4
+ max-height: 100vh;
5
+ }
6
+
7
+ .toggle-nav-sidebar {
8
+ z-index: 20;
9
+ left: 0;
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ flex: 0 0 23px;
14
+ width: 23px;
15
+ border: 0;
16
+ border-right: 1px solid var(--hairline-color);
17
+ background-color: var(--body-bg);
18
+ cursor: pointer;
19
+ font-size: 1.25rem;
20
+ color: var(--link-fg);
21
+ padding: 0;
22
+ }
23
+
24
+ [dir="rtl"] .toggle-nav-sidebar {
25
+ border-left: 1px solid var(--hairline-color);
26
+ border-right: 0;
27
+ }
28
+
29
+ .toggle-nav-sidebar:hover,
30
+ .toggle-nav-sidebar:focus {
31
+ background-color: var(--darkened-bg);
32
+ }
33
+
34
+ #nav-sidebar {
35
+ z-index: 15;
36
+ flex: 0 0 275px;
37
+ left: -276px;
38
+ margin-left: -276px;
39
+ border-top: 1px solid transparent;
40
+ border-right: 1px solid var(--hairline-color);
41
+ background-color: var(--body-bg);
42
+ overflow: auto;
43
+ }
44
+
45
+ [dir="rtl"] #nav-sidebar {
46
+ border-left: 1px solid var(--hairline-color);
47
+ border-right: 0;
48
+ left: 0;
49
+ margin-left: 0;
50
+ right: -276px;
51
+ margin-right: -276px;
52
+ }
53
+
54
+ .toggle-nav-sidebar::before {
55
+ content: '\00BB';
56
+ }
57
+
58
+ .main.shifted .toggle-nav-sidebar::before {
59
+ content: '\00AB';
60
+ }
61
+
62
+ .main > #nav-sidebar {
63
+ visibility: hidden;
64
+ }
65
+
66
+ .main.shifted > #nav-sidebar {
67
+ margin-left: 0;
68
+ visibility: visible;
69
+ }
70
+
71
+ [dir="rtl"] .main.shifted > #nav-sidebar {
72
+ margin-right: 0;
73
+ }
74
+
75
+ #nav-sidebar .module th {
76
+ width: 100%;
77
+ overflow-wrap: anywhere;
78
+ }
79
+
80
+ #nav-sidebar .module th,
81
+ #nav-sidebar .module caption {
82
+ padding-left: 16px;
83
+ }
84
+
85
+ #nav-sidebar .module td {
86
+ white-space: nowrap;
87
+ }
88
+
89
+ [dir="rtl"] #nav-sidebar .module th,
90
+ [dir="rtl"] #nav-sidebar .module caption {
91
+ padding-left: 8px;
92
+ padding-right: 16px;
93
+ }
94
+
95
+ #nav-sidebar .current-app .section:link,
96
+ #nav-sidebar .current-app .section:visited {
97
+ color: var(--header-color);
98
+ font-weight: bold;
99
+ }
100
+
101
+ #nav-sidebar .current-model {
102
+ background: var(--selected-row);
103
+ }
104
+
105
+ @media (forced-colors: active) {
106
+ #nav-sidebar .current-model {
107
+ background-color: SelectedItem;
108
+ }
109
+ }
110
+
111
+ .main > #nav-sidebar + .content {
112
+ max-width: calc(100% - 23px);
113
+ }
114
+
115
+ .main.shifted > #nav-sidebar + .content {
116
+ max-width: calc(100% - 299px);
117
+ }
118
+
119
+ @media (max-width: 767px) {
120
+ #nav-sidebar, #toggle-nav-sidebar {
121
+ display: none;
122
+ }
123
+
124
+ .main > #nav-sidebar + .content,
125
+ .main.shifted > #nav-sidebar + .content {
126
+ max-width: 100%;
127
+ }
128
+ }
129
+
130
+ #nav-filter {
131
+ width: 100%;
132
+ box-sizing: border-box;
133
+ padding: 2px 5px;
134
+ margin: 5px 0;
135
+ border: 1px solid var(--border-color);
136
+ background-color: var(--darkened-bg);
137
+ color: var(--body-fg);
138
+ }
139
+
140
+ #nav-filter:focus {
141
+ border-color: var(--body-quiet-color);
142
+ }
143
+
144
+ #nav-filter.no-results {
145
+ background: var(--message-error-bg);
146
+ }
147
+
148
+ #nav-sidebar table {
149
+ width: 100%;
150
+ }
backend/staticfiles/admin/css/responsive.css ADDED
@@ -0,0 +1,904 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Tablets */
2
+
3
+ input[type="submit"], button {
4
+ -webkit-appearance: none;
5
+ appearance: none;
6
+ }
7
+
8
+ @media (max-width: 1024px) {
9
+ /* Basic */
10
+
11
+ html {
12
+ -webkit-text-size-adjust: 100%;
13
+ }
14
+
15
+ td, th {
16
+ padding: 10px;
17
+ font-size: 0.875rem;
18
+ }
19
+
20
+ .small {
21
+ font-size: 0.75rem;
22
+ }
23
+
24
+ /* Layout */
25
+
26
+ #container {
27
+ min-width: 0;
28
+ }
29
+
30
+ #content {
31
+ padding: 15px 20px 20px;
32
+ }
33
+
34
+ div.breadcrumbs {
35
+ padding: 10px 30px;
36
+ }
37
+
38
+ /* Header */
39
+
40
+ #header {
41
+ flex-direction: column;
42
+ padding: 15px 30px;
43
+ justify-content: flex-start;
44
+ }
45
+
46
+ #site-name {
47
+ margin: 0 0 8px;
48
+ line-height: 1.2;
49
+ }
50
+
51
+ #user-tools {
52
+ margin: 0;
53
+ font-weight: 400;
54
+ line-height: 1.85;
55
+ text-align: left;
56
+ }
57
+
58
+ #user-tools a {
59
+ display: inline-block;
60
+ line-height: 1.4;
61
+ }
62
+
63
+ /* Dashboard */
64
+
65
+ .dashboard #content {
66
+ width: auto;
67
+ }
68
+
69
+ #content-related {
70
+ margin-right: -290px;
71
+ }
72
+
73
+ .colSM #content-related {
74
+ margin-left: -290px;
75
+ }
76
+
77
+ .colMS {
78
+ margin-right: 290px;
79
+ }
80
+
81
+ .colSM {
82
+ margin-left: 290px;
83
+ }
84
+
85
+ .dashboard .module table td a {
86
+ padding-right: 0;
87
+ }
88
+
89
+ td .changelink, td .addlink {
90
+ font-size: 0.8125rem;
91
+ }
92
+
93
+ /* Changelist */
94
+
95
+ #toolbar {
96
+ border: none;
97
+ padding: 15px;
98
+ }
99
+
100
+ #changelist-search > div {
101
+ display: flex;
102
+ flex-wrap: nowrap;
103
+ max-width: 480px;
104
+ }
105
+
106
+ #changelist-search label {
107
+ line-height: 1.375rem;
108
+ }
109
+
110
+ #toolbar form #searchbar {
111
+ flex: 1 0 auto;
112
+ width: 0;
113
+ height: 1.375rem;
114
+ margin: 0 10px 0 6px;
115
+ }
116
+
117
+ #toolbar form input[type=submit] {
118
+ flex: 0 1 auto;
119
+ }
120
+
121
+ #changelist-search .quiet {
122
+ width: 0;
123
+ flex: 1 0 auto;
124
+ margin: 5px 0 0 25px;
125
+ }
126
+
127
+ #changelist .actions {
128
+ display: flex;
129
+ flex-wrap: wrap;
130
+ padding: 15px 0;
131
+ }
132
+
133
+ #changelist .actions label {
134
+ display: flex;
135
+ }
136
+
137
+ #changelist .actions select {
138
+ background: var(--body-bg);
139
+ }
140
+
141
+ #changelist .actions .button {
142
+ min-width: 48px;
143
+ margin: 0 10px;
144
+ }
145
+
146
+ #changelist .actions span.all,
147
+ #changelist .actions span.clear,
148
+ #changelist .actions span.question,
149
+ #changelist .actions span.action-counter {
150
+ font-size: 0.6875rem;
151
+ margin: 0 10px 0 0;
152
+ }
153
+
154
+ #changelist-filter {
155
+ flex-basis: 200px;
156
+ }
157
+
158
+ .change-list .filtered .results,
159
+ .change-list .filtered .paginator,
160
+ .filtered #toolbar,
161
+ .filtered .actions,
162
+
163
+ #changelist .paginator {
164
+ border-top-color: var(--hairline-color); /* XXX Is this used at all? */
165
+ }
166
+
167
+ #changelist .results + .paginator {
168
+ border-top: none;
169
+ }
170
+
171
+ /* Forms */
172
+
173
+ label {
174
+ font-size: 1rem;
175
+ }
176
+
177
+ /*
178
+ Minifiers remove the default (text) "type" attribute from "input" HTML
179
+ tags. Add input:not([type]) to make the CSS stylesheet work the same.
180
+ */
181
+ .form-row input:not([type]),
182
+ .form-row input[type=text],
183
+ .form-row input[type=password],
184
+ .form-row input[type=email],
185
+ .form-row input[type=url],
186
+ .form-row input[type=tel],
187
+ .form-row input[type=number],
188
+ .form-row textarea,
189
+ .form-row select,
190
+ .form-row .vTextField {
191
+ box-sizing: border-box;
192
+ margin: 0;
193
+ padding: 6px 8px;
194
+ min-height: 2.25rem;
195
+ font-size: 1rem;
196
+ }
197
+
198
+ .form-row select {
199
+ height: 2.25rem;
200
+ }
201
+
202
+ .form-row select[multiple] {
203
+ height: auto;
204
+ min-height: 0;
205
+ }
206
+
207
+ fieldset .fieldBox + .fieldBox {
208
+ margin-top: 10px;
209
+ padding-top: 10px;
210
+ border-top: 1px solid var(--hairline-color);
211
+ }
212
+
213
+ textarea {
214
+ max-width: 100%;
215
+ max-height: 120px;
216
+ }
217
+
218
+ .aligned label {
219
+ padding-top: 6px;
220
+ }
221
+
222
+ .aligned .related-lookup,
223
+ .aligned .datetimeshortcuts,
224
+ .aligned .related-lookup + strong {
225
+ align-self: center;
226
+ margin-left: 15px;
227
+ }
228
+
229
+ form .aligned div.radiolist {
230
+ margin-left: 2px;
231
+ }
232
+
233
+ .submit-row {
234
+ padding: 8px;
235
+ }
236
+
237
+ .submit-row a.deletelink {
238
+ padding: 10px 7px;
239
+ }
240
+
241
+ .button, input[type=submit], input[type=button], .submit-row input, a.button {
242
+ padding: 7px;
243
+ }
244
+
245
+ /* Selector */
246
+
247
+ .selector {
248
+ display: flex;
249
+ width: 100%;
250
+ }
251
+
252
+ .selector .selector-filter {
253
+ display: flex;
254
+ align-items: center;
255
+ }
256
+
257
+ .selector .selector-filter input {
258
+ width: 100%;
259
+ min-height: 0;
260
+ flex: 1 1;
261
+ }
262
+
263
+ .selector-available, .selector-chosen {
264
+ width: auto;
265
+ flex: 1 1;
266
+ display: flex;
267
+ flex-direction: column;
268
+ }
269
+
270
+ .selector select {
271
+ width: 100%;
272
+ flex: 1 0 auto;
273
+ margin-bottom: 5px;
274
+ }
275
+
276
+ .selector-chooseall, .selector-clearall {
277
+ align-self: center;
278
+ }
279
+
280
+ .stacked {
281
+ flex-direction: column;
282
+ max-width: 480px;
283
+ }
284
+
285
+ .stacked > * {
286
+ flex: 0 1 auto;
287
+ }
288
+
289
+ .stacked select {
290
+ margin-bottom: 0;
291
+ }
292
+
293
+ .stacked .selector-available, .stacked .selector-chosen {
294
+ width: auto;
295
+ }
296
+
297
+ .stacked ul.selector-chooser {
298
+ padding: 0 2px;
299
+ transform: none;
300
+ }
301
+
302
+ .stacked .selector-chooser li {
303
+ padding: 3px;
304
+ }
305
+
306
+ .help-tooltip, .selector .help-icon {
307
+ display: none;
308
+ }
309
+
310
+ .datetime input {
311
+ width: 50%;
312
+ max-width: 120px;
313
+ }
314
+
315
+ .datetime span {
316
+ font-size: 0.8125rem;
317
+ }
318
+
319
+ .datetime .timezonewarning {
320
+ display: block;
321
+ font-size: 0.6875rem;
322
+ color: var(--body-quiet-color);
323
+ }
324
+
325
+ .datetimeshortcuts {
326
+ color: var(--border-color); /* XXX Redundant, .datetime span also sets #ccc */
327
+ }
328
+
329
+ .form-row .datetime input.vDateField, .form-row .datetime input.vTimeField {
330
+ width: 75%;
331
+ }
332
+
333
+ .inline-group {
334
+ overflow: auto;
335
+ }
336
+
337
+ /* Messages */
338
+
339
+ ul.messagelist li {
340
+ padding-left: 55px;
341
+ background-position: 30px 12px;
342
+ }
343
+
344
+ ul.messagelist li.error {
345
+ background-position: 30px 12px;
346
+ }
347
+
348
+ ul.messagelist li.warning {
349
+ background-position: 30px 14px;
350
+ }
351
+
352
+ /* Login */
353
+
354
+ .login #header {
355
+ padding: 15px 20px;
356
+ }
357
+
358
+ .login #site-name {
359
+ margin: 0;
360
+ }
361
+
362
+ /* GIS */
363
+
364
+ div.olMap {
365
+ max-width: calc(100vw - 30px);
366
+ max-height: 300px;
367
+ }
368
+
369
+ .olMap + .clear_features {
370
+ display: block;
371
+ margin-top: 10px;
372
+ }
373
+
374
+ /* Docs */
375
+
376
+ .module table.xfull {
377
+ width: 100%;
378
+ }
379
+
380
+ pre.literal-block {
381
+ overflow: auto;
382
+ }
383
+ }
384
+
385
+ /* Mobile */
386
+
387
+ @media (max-width: 767px) {
388
+ /* Layout */
389
+
390
+ #header, #content {
391
+ padding: 15px;
392
+ }
393
+
394
+ div.breadcrumbs {
395
+ padding: 10px 15px;
396
+ }
397
+
398
+ /* Dashboard */
399
+
400
+ .colMS, .colSM {
401
+ margin: 0;
402
+ }
403
+
404
+ #content-related, .colSM #content-related {
405
+ width: 100%;
406
+ margin: 0;
407
+ }
408
+
409
+ #content-related .module {
410
+ margin-bottom: 0;
411
+ }
412
+
413
+ #content-related .module h2 {
414
+ padding: 10px 15px;
415
+ font-size: 1rem;
416
+ }
417
+
418
+ /* Changelist */
419
+
420
+ #changelist {
421
+ align-items: stretch;
422
+ flex-direction: column;
423
+ }
424
+
425
+ #toolbar {
426
+ padding: 10px;
427
+ }
428
+
429
+ #changelist-filter {
430
+ margin-left: 0;
431
+ }
432
+
433
+ #changelist .actions label {
434
+ flex: 1 1;
435
+ }
436
+
437
+ #changelist .actions select {
438
+ flex: 1 0;
439
+ width: 100%;
440
+ }
441
+
442
+ #changelist .actions span {
443
+ flex: 1 0 100%;
444
+ }
445
+
446
+ #changelist-filter {
447
+ position: static;
448
+ width: auto;
449
+ margin-top: 30px;
450
+ }
451
+
452
+ .object-tools {
453
+ float: none;
454
+ margin: 0 0 15px;
455
+ padding: 0;
456
+ overflow: hidden;
457
+ }
458
+
459
+ .object-tools li {
460
+ height: auto;
461
+ margin-left: 0;
462
+ }
463
+
464
+ .object-tools li + li {
465
+ margin-left: 15px;
466
+ }
467
+
468
+ /* Forms */
469
+
470
+ .form-row {
471
+ padding: 15px 0;
472
+ }
473
+
474
+ .aligned .form-row,
475
+ .aligned .form-row > div {
476
+ max-width: 100vw;
477
+ }
478
+
479
+ .aligned .form-row > div {
480
+ width: calc(100vw - 30px);
481
+ }
482
+
483
+ .flex-container {
484
+ flex-flow: column;
485
+ }
486
+
487
+ .flex-container.checkbox-row {
488
+ flex-flow: row;
489
+ }
490
+
491
+ textarea {
492
+ max-width: none;
493
+ }
494
+
495
+ .vURLField {
496
+ width: auto;
497
+ }
498
+
499
+ fieldset .fieldBox + .fieldBox {
500
+ margin-top: 15px;
501
+ padding-top: 15px;
502
+ }
503
+
504
+ .aligned label {
505
+ width: 100%;
506
+ min-width: auto;
507
+ padding: 0 0 10px;
508
+ }
509
+
510
+ .aligned label:after {
511
+ max-height: 0;
512
+ }
513
+
514
+ .aligned .form-row input,
515
+ .aligned .form-row select,
516
+ .aligned .form-row textarea {
517
+ flex: 1 1 auto;
518
+ max-width: 100%;
519
+ }
520
+
521
+ .aligned .checkbox-row input {
522
+ flex: 0 1 auto;
523
+ margin: 0;
524
+ }
525
+
526
+ .aligned .vCheckboxLabel {
527
+ flex: 1 0;
528
+ padding: 1px 0 0 5px;
529
+ }
530
+
531
+ .aligned label + p,
532
+ .aligned label + div.help,
533
+ .aligned label + div.readonly {
534
+ padding: 0;
535
+ margin-left: 0;
536
+ }
537
+
538
+ .aligned p.file-upload {
539
+ font-size: 0.8125rem;
540
+ }
541
+
542
+ span.clearable-file-input {
543
+ margin-left: 15px;
544
+ }
545
+
546
+ span.clearable-file-input label {
547
+ font-size: 0.8125rem;
548
+ padding-bottom: 0;
549
+ }
550
+
551
+ .aligned .timezonewarning {
552
+ flex: 1 0 100%;
553
+ margin-top: 5px;
554
+ }
555
+
556
+ form .aligned .form-row div.help {
557
+ width: 100%;
558
+ margin: 5px 0 0;
559
+ padding: 0;
560
+ }
561
+
562
+ form .aligned ul,
563
+ form .aligned ul.errorlist {
564
+ margin-left: 0;
565
+ padding-left: 0;
566
+ }
567
+
568
+ form .aligned div.radiolist {
569
+ margin-top: 5px;
570
+ margin-right: 15px;
571
+ margin-bottom: -3px;
572
+ }
573
+
574
+ form .aligned div.radiolist:not(.inline) div + div {
575
+ margin-top: 5px;
576
+ }
577
+
578
+ /* Related widget */
579
+
580
+ .related-widget-wrapper {
581
+ width: 100%;
582
+ display: flex;
583
+ align-items: flex-start;
584
+ }
585
+
586
+ .related-widget-wrapper .selector {
587
+ order: 1;
588
+ flex: 1 0 auto;
589
+ }
590
+
591
+ .related-widget-wrapper > a {
592
+ order: 2;
593
+ }
594
+
595
+ .related-widget-wrapper .radiolist ~ a {
596
+ align-self: flex-end;
597
+ }
598
+
599
+ .related-widget-wrapper > select ~ a {
600
+ align-self: center;
601
+ }
602
+
603
+ /* Selector */
604
+
605
+ .selector {
606
+ flex-direction: column;
607
+ gap: 10px 0;
608
+ }
609
+
610
+ .selector-available, .selector-chosen {
611
+ flex: 1 1 auto;
612
+ }
613
+
614
+ .selector select {
615
+ max-height: 96px;
616
+ }
617
+
618
+ .selector ul.selector-chooser {
619
+ display: flex;
620
+ width: 60px;
621
+ height: 30px;
622
+ padding: 0 2px;
623
+ transform: none;
624
+ }
625
+
626
+ .selector ul.selector-chooser li {
627
+ float: left;
628
+ }
629
+
630
+ .selector-remove {
631
+ background-position: 0 0;
632
+ }
633
+
634
+ :enabled.selector-remove:focus, :enabled.selector-remove:hover {
635
+ background-position: 0 -24px;
636
+ }
637
+
638
+ .selector-add {
639
+ background-position: 0 -48px;
640
+ }
641
+
642
+ :enabled.selector-add:focus, :enabled.selector-add:hover {
643
+ background-position: 0 -72px;
644
+ }
645
+
646
+ /* Inlines */
647
+
648
+ .inline-group[data-inline-type="stacked"] .inline-related {
649
+ border: 1px solid var(--hairline-color);
650
+ border-radius: 4px;
651
+ margin-top: 15px;
652
+ overflow: auto;
653
+ }
654
+
655
+ .inline-group[data-inline-type="stacked"] .inline-related > * {
656
+ box-sizing: border-box;
657
+ }
658
+
659
+ .inline-group[data-inline-type="stacked"] .inline-related .module {
660
+ padding: 0 10px;
661
+ }
662
+
663
+ .inline-group[data-inline-type="stacked"] .inline-related .module .form-row {
664
+ border-top: 1px solid var(--hairline-color);
665
+ border-bottom: none;
666
+ }
667
+
668
+ .inline-group[data-inline-type="stacked"] .inline-related .module .form-row:first-child {
669
+ border-top: none;
670
+ }
671
+
672
+ .inline-group[data-inline-type="stacked"] .inline-related h3 {
673
+ padding: 10px;
674
+ border-top-width: 0;
675
+ border-bottom-width: 2px;
676
+ display: flex;
677
+ flex-wrap: wrap;
678
+ align-items: center;
679
+ }
680
+
681
+ .inline-group[data-inline-type="stacked"] .inline-related h3 .inline_label {
682
+ margin-right: auto;
683
+ }
684
+
685
+ .inline-group[data-inline-type="stacked"] .inline-related h3 span.delete {
686
+ float: none;
687
+ flex: 1 1 100%;
688
+ margin-top: 5px;
689
+ }
690
+
691
+ .inline-group[data-inline-type="stacked"] .aligned .form-row > div:not([class]) {
692
+ width: 100%;
693
+ }
694
+
695
+ .inline-group[data-inline-type="stacked"] .aligned label {
696
+ width: 100%;
697
+ }
698
+
699
+ .inline-group[data-inline-type="stacked"] div.add-row {
700
+ margin-top: 15px;
701
+ border: 1px solid var(--hairline-color);
702
+ border-radius: 4px;
703
+ }
704
+
705
+ .inline-group div.add-row,
706
+ .inline-group .tabular tr.add-row td {
707
+ padding: 0;
708
+ }
709
+
710
+ .inline-group div.add-row a,
711
+ .inline-group .tabular tr.add-row td a {
712
+ display: block;
713
+ padding: 8px 10px 8px 26px;
714
+ background-position: 8px 9px;
715
+ }
716
+
717
+ /* Submit row */
718
+
719
+ .submit-row {
720
+ padding: 10px;
721
+ margin: 0 0 15px;
722
+ flex-direction: column;
723
+ gap: 8px;
724
+ }
725
+
726
+ .submit-row input, .submit-row input.default, .submit-row a {
727
+ text-align: center;
728
+ }
729
+
730
+ .submit-row a.closelink {
731
+ padding: 10px 0;
732
+ text-align: center;
733
+ }
734
+
735
+ .submit-row a.deletelink {
736
+ margin: 0;
737
+ }
738
+
739
+ /* Messages */
740
+
741
+ ul.messagelist li {
742
+ padding-left: 40px;
743
+ background-position: 15px 12px;
744
+ }
745
+
746
+ ul.messagelist li.error {
747
+ background-position: 15px 12px;
748
+ }
749
+
750
+ ul.messagelist li.warning {
751
+ background-position: 15px 14px;
752
+ }
753
+
754
+ /* Paginator */
755
+
756
+ .paginator .this-page, .paginator a:link, .paginator a:visited {
757
+ padding: 4px 10px;
758
+ }
759
+
760
+ /* Login */
761
+
762
+ body.login {
763
+ padding: 0 15px;
764
+ }
765
+
766
+ .login #container {
767
+ width: auto;
768
+ max-width: 480px;
769
+ margin: 50px auto;
770
+ }
771
+
772
+ .login #header,
773
+ .login #content {
774
+ padding: 15px;
775
+ }
776
+
777
+ .login #content-main {
778
+ float: none;
779
+ }
780
+
781
+ .login .form-row {
782
+ padding: 0;
783
+ }
784
+
785
+ .login .form-row + .form-row {
786
+ margin-top: 15px;
787
+ }
788
+
789
+ .login .form-row label {
790
+ margin: 0 0 5px;
791
+ line-height: 1.2;
792
+ }
793
+
794
+ .login .submit-row {
795
+ padding: 15px 0 0;
796
+ }
797
+
798
+ .login br {
799
+ display: none;
800
+ }
801
+
802
+ .login .submit-row input {
803
+ margin: 0;
804
+ text-transform: uppercase;
805
+ }
806
+
807
+ .errornote {
808
+ margin: 0 0 20px;
809
+ padding: 8px 12px;
810
+ font-size: 0.8125rem;
811
+ }
812
+
813
+ /* Calendar and clock */
814
+
815
+ .calendarbox, .clockbox {
816
+ position: fixed !important;
817
+ top: 50% !important;
818
+ left: 50% !important;
819
+ transform: translate(-50%, -50%);
820
+ margin: 0;
821
+ border: none;
822
+ overflow: visible;
823
+ }
824
+
825
+ .calendarbox:before, .clockbox:before {
826
+ content: '';
827
+ position: fixed;
828
+ top: 50%;
829
+ left: 50%;
830
+ width: 100vw;
831
+ height: 100vh;
832
+ background: rgba(0, 0, 0, 0.75);
833
+ transform: translate(-50%, -50%);
834
+ }
835
+
836
+ .calendarbox > *, .clockbox > * {
837
+ position: relative;
838
+ z-index: 1;
839
+ }
840
+
841
+ .calendarbox > div:first-child {
842
+ z-index: 2;
843
+ }
844
+
845
+ .calendarbox .calendar, .clockbox h2 {
846
+ border-radius: 4px 4px 0 0;
847
+ overflow: hidden;
848
+ }
849
+
850
+ .calendarbox .calendar-cancel, .clockbox .calendar-cancel {
851
+ border-radius: 0 0 4px 4px;
852
+ overflow: hidden;
853
+ }
854
+
855
+ .calendar-shortcuts {
856
+ padding: 10px 0;
857
+ font-size: 0.75rem;
858
+ line-height: 0.75rem;
859
+ }
860
+
861
+ .calendar-shortcuts a {
862
+ margin: 0 4px;
863
+ }
864
+
865
+ .timelist a {
866
+ background: var(--body-bg);
867
+ padding: 4px;
868
+ }
869
+
870
+ .calendar-cancel {
871
+ padding: 8px 10px;
872
+ }
873
+
874
+ .clockbox h2 {
875
+ padding: 8px 15px;
876
+ }
877
+
878
+ .calendar caption {
879
+ padding: 10px;
880
+ }
881
+
882
+ .calendarbox .calendarnav-previous, .calendarbox .calendarnav-next {
883
+ z-index: 1;
884
+ top: 10px;
885
+ }
886
+
887
+ /* History */
888
+
889
+ table#change-history tbody th, table#change-history tbody td {
890
+ font-size: 0.8125rem;
891
+ word-break: break-word;
892
+ }
893
+
894
+ table#change-history tbody th {
895
+ width: auto;
896
+ }
897
+
898
+ /* Docs */
899
+
900
+ table.model tbody th, table.model tbody td {
901
+ font-size: 0.8125rem;
902
+ word-break: break-word;
903
+ }
904
+ }
backend/staticfiles/admin/css/responsive_rtl.css ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* TABLETS */
2
+
3
+ @media (max-width: 1024px) {
4
+ [dir="rtl"] .colMS {
5
+ margin-right: 0;
6
+ }
7
+
8
+ [dir="rtl"] #user-tools {
9
+ text-align: right;
10
+ }
11
+
12
+ [dir="rtl"] #changelist .actions label {
13
+ padding-left: 10px;
14
+ padding-right: 0;
15
+ }
16
+
17
+ [dir="rtl"] #changelist .actions select {
18
+ margin-left: 0;
19
+ margin-right: 15px;
20
+ }
21
+
22
+ [dir="rtl"] .change-list .filtered .results,
23
+ [dir="rtl"] .change-list .filtered .paginator,
24
+ [dir="rtl"] .filtered #toolbar,
25
+ [dir="rtl"] .filtered div.xfull,
26
+ [dir="rtl"] .filtered .actions,
27
+ [dir="rtl"] #changelist-filter {
28
+ margin-left: 0;
29
+ }
30
+
31
+ [dir="rtl"] .inline-group div.add-row a,
32
+ [dir="rtl"] .inline-group .tabular tr.add-row td a {
33
+ padding: 8px 26px 8px 10px;
34
+ background-position: calc(100% - 8px) 9px;
35
+ }
36
+
37
+ [dir="rtl"] .object-tools li {
38
+ float: right;
39
+ }
40
+
41
+ [dir="rtl"] .object-tools li + li {
42
+ margin-left: 0;
43
+ margin-right: 15px;
44
+ }
45
+
46
+ [dir="rtl"] .dashboard .module table td a {
47
+ padding-left: 0;
48
+ padding-right: 16px;
49
+ }
50
+ }
51
+
52
+ /* MOBILE */
53
+
54
+ @media (max-width: 767px) {
55
+ [dir="rtl"] .aligned .related-lookup,
56
+ [dir="rtl"] .aligned .datetimeshortcuts {
57
+ margin-left: 0;
58
+ margin-right: 15px;
59
+ }
60
+
61
+ [dir="rtl"] .aligned ul,
62
+ [dir="rtl"] form .aligned ul.errorlist {
63
+ margin-right: 0;
64
+ }
65
+
66
+ [dir="rtl"] #changelist-filter {
67
+ margin-left: 0;
68
+ margin-right: 0;
69
+ }
70
+ [dir="rtl"] .aligned .vCheckboxLabel {
71
+ padding: 1px 5px 0 0;
72
+ }
73
+
74
+ [dir="rtl"] .selector-remove {
75
+ background-position: 0 0;
76
+ }
77
+
78
+ [dir="rtl"] :enabled.selector-remove:focus, :enabled.selector-remove:hover {
79
+ background-position: 0 -24px;
80
+ }
81
+
82
+ [dir="rtl"] .selector-add {
83
+ background-position: 0 -48px;
84
+ }
85
+
86
+ [dir="rtl"] :enabled.selector-add:focus, :enabled.selector-add:hover {
87
+ background-position: 0 -72px;
88
+ }
89
+ }
backend/staticfiles/admin/css/rtl.css ADDED
@@ -0,0 +1,293 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* GLOBAL */
2
+
3
+ th {
4
+ text-align: right;
5
+ }
6
+
7
+ .module h2, .module caption {
8
+ text-align: right;
9
+ }
10
+
11
+ .module ul, .module ol {
12
+ margin-left: 0;
13
+ margin-right: 1.5em;
14
+ }
15
+
16
+ .viewlink, .addlink, .changelink, .hidelink {
17
+ padding-left: 0;
18
+ padding-right: 16px;
19
+ background-position: 100% 1px;
20
+ }
21
+
22
+ .deletelink {
23
+ padding-left: 0;
24
+ padding-right: 16px;
25
+ background-position: 100% 1px;
26
+ }
27
+
28
+ .object-tools {
29
+ float: left;
30
+ }
31
+
32
+ thead th:first-child,
33
+ tfoot td:first-child {
34
+ border-left: none;
35
+ }
36
+
37
+ /* LAYOUT */
38
+
39
+ #user-tools {
40
+ right: auto;
41
+ left: 0;
42
+ text-align: left;
43
+ }
44
+
45
+ div.breadcrumbs {
46
+ text-align: right;
47
+ }
48
+
49
+ #content-main {
50
+ float: right;
51
+ }
52
+
53
+ #content-related {
54
+ float: left;
55
+ margin-left: -300px;
56
+ margin-right: auto;
57
+ }
58
+
59
+ .colMS {
60
+ margin-left: 300px;
61
+ margin-right: 0;
62
+ }
63
+
64
+ /* SORTABLE TABLES */
65
+
66
+ table thead th.sorted .sortoptions {
67
+ float: left;
68
+ }
69
+
70
+ thead th.sorted .text {
71
+ padding-right: 0;
72
+ padding-left: 42px;
73
+ }
74
+
75
+ /* dashboard styles */
76
+
77
+ .dashboard .module table td a {
78
+ padding-left: .6em;
79
+ padding-right: 16px;
80
+ }
81
+
82
+ /* changelists styles */
83
+
84
+ .change-list .filtered table {
85
+ border-left: none;
86
+ border-right: 0px none;
87
+ }
88
+
89
+ #changelist-filter {
90
+ border-left: none;
91
+ border-right: none;
92
+ margin-left: 0;
93
+ margin-right: 30px;
94
+ }
95
+
96
+ #changelist-filter li.selected {
97
+ border-left: none;
98
+ padding-left: 10px;
99
+ margin-left: 0;
100
+ border-right: 5px solid var(--hairline-color);
101
+ padding-right: 10px;
102
+ margin-right: -15px;
103
+ }
104
+
105
+ #changelist table tbody td:first-child, #changelist table tbody th:first-child {
106
+ border-right: none;
107
+ border-left: none;
108
+ }
109
+
110
+ .paginator .end {
111
+ margin-left: 6px;
112
+ margin-right: 0;
113
+ }
114
+
115
+ .paginator input {
116
+ margin-left: 0;
117
+ margin-right: auto;
118
+ }
119
+
120
+ /* FORMS */
121
+
122
+ .aligned label {
123
+ padding: 0 0 3px 1em;
124
+ }
125
+
126
+ .submit-row a.deletelink {
127
+ margin-left: 0;
128
+ margin-right: auto;
129
+ }
130
+
131
+ .vDateField, .vTimeField {
132
+ margin-left: 2px;
133
+ }
134
+
135
+ .aligned .form-row input {
136
+ margin-left: 5px;
137
+ }
138
+
139
+ form .aligned ul {
140
+ margin-right: 163px;
141
+ padding-right: 10px;
142
+ margin-left: 0;
143
+ padding-left: 0;
144
+ }
145
+
146
+ form ul.inline li {
147
+ float: right;
148
+ padding-right: 0;
149
+ padding-left: 7px;
150
+ }
151
+
152
+ form .aligned p.help,
153
+ form .aligned div.help {
154
+ margin-left: 0;
155
+ margin-right: 160px;
156
+ padding-right: 10px;
157
+ }
158
+
159
+ form div.help ul,
160
+ form .aligned .checkbox-row + .help,
161
+ form .aligned p.date div.help.timezonewarning,
162
+ form .aligned p.datetime div.help.timezonewarning,
163
+ form .aligned p.time div.help.timezonewarning {
164
+ margin-right: 0;
165
+ padding-right: 0;
166
+ }
167
+
168
+ form .wide p.help,
169
+ form .wide ul.errorlist,
170
+ form .wide div.help {
171
+ padding-left: 0;
172
+ padding-right: 50px;
173
+ }
174
+
175
+ .submit-row {
176
+ text-align: right;
177
+ }
178
+
179
+ fieldset .fieldBox {
180
+ margin-left: 20px;
181
+ margin-right: 0;
182
+ }
183
+
184
+ .errorlist li {
185
+ background-position: 100% 12px;
186
+ padding: 0;
187
+ }
188
+
189
+ .errornote {
190
+ background-position: 100% 12px;
191
+ padding: 10px 12px;
192
+ }
193
+
194
+ /* WIDGETS */
195
+
196
+ .calendarnav-previous {
197
+ top: 0;
198
+ left: auto;
199
+ right: 10px;
200
+ background: url(../img/calendar-icons.svg) 0 -15px no-repeat;
201
+ }
202
+
203
+ .calendarnav-next {
204
+ top: 0;
205
+ right: auto;
206
+ left: 10px;
207
+ background: url(../img/calendar-icons.svg) 0 0 no-repeat;
208
+ }
209
+
210
+ .calendar caption, .calendarbox h2 {
211
+ text-align: center;
212
+ }
213
+
214
+ .selector {
215
+ float: right;
216
+ }
217
+
218
+ .selector .selector-filter {
219
+ text-align: right;
220
+ }
221
+
222
+ .selector-add {
223
+ background: url(../img/selector-icons.svg) 0 -96px no-repeat;
224
+ background-size: 24px auto;
225
+ }
226
+
227
+ :enabled.selector-add:focus, :enabled.selector-add:hover {
228
+ background-position: 0 -120px;
229
+ }
230
+
231
+ .selector-remove {
232
+ background: url(../img/selector-icons.svg) 0 -144px no-repeat;
233
+ background-size: 24px auto;
234
+ }
235
+
236
+ :enabled.selector-remove:focus, :enabled.selector-remove:hover {
237
+ background-position: 0 -168px;
238
+ }
239
+
240
+ .selector-chooseall {
241
+ background: url(../img/selector-icons.svg) right -128px no-repeat;
242
+ }
243
+
244
+ :enabled.selector-chooseall:focus, :enabled.selector-chooseall:hover {
245
+ background-position: 100% -144px;
246
+ }
247
+
248
+ .selector-clearall {
249
+ background: url(../img/selector-icons.svg) 0 -160px no-repeat;
250
+ }
251
+
252
+ :enabled.selector-clearall:focus, :enabled.selector-clearall:hover {
253
+ background-position: 0 -176px;
254
+ }
255
+
256
+ .inline-deletelink {
257
+ float: left;
258
+ }
259
+
260
+ form .form-row p.datetime {
261
+ overflow: hidden;
262
+ }
263
+
264
+ .related-widget-wrapper {
265
+ float: right;
266
+ }
267
+
268
+ /* MISC */
269
+
270
+ .inline-related h2, .inline-group h2 {
271
+ text-align: right
272
+ }
273
+
274
+ .inline-related h3 span.delete {
275
+ padding-right: 20px;
276
+ padding-left: inherit;
277
+ left: 10px;
278
+ right: inherit;
279
+ float:left;
280
+ }
281
+
282
+ .inline-related h3 span.delete label {
283
+ margin-left: inherit;
284
+ margin-right: 2px;
285
+ }
286
+
287
+ .inline-group .tabular td.original p {
288
+ right: 0;
289
+ }
290
+
291
+ .selector .selector-chooser {
292
+ margin: 0;
293
+ }
backend/staticfiles/admin/css/unusable_password_field.css ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Hide warnings fields if usable password is selected */
2
+ form:has(#id_usable_password input[value="true"]:checked) .messagelist {
3
+ display: none;
4
+ }
5
+
6
+ /* Hide password fields if unusable password is selected */
7
+ form:has(#id_usable_password input[value="false"]:checked) .field-password1,
8
+ form:has(#id_usable_password input[value="false"]:checked) .field-password2 {
9
+ display: none;
10
+ }
11
+
12
+ /* Select appropriate submit button */
13
+ form:has(#id_usable_password input[value="true"]:checked) input[type="submit"].unset-password {
14
+ display: none;
15
+ }
16
+
17
+ form:has(#id_usable_password input[value="false"]:checked) input[type="submit"].set-password {
18
+ display: none;
19
+ }
backend/staticfiles/admin/css/vendor/select2/LICENSE-SELECT2.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
backend/staticfiles/admin/css/vendor/select2/select2.css ADDED
@@ -0,0 +1,481 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .select2-container {
2
+ box-sizing: border-box;
3
+ display: inline-block;
4
+ margin: 0;
5
+ position: relative;
6
+ vertical-align: middle; }
7
+ .select2-container .select2-selection--single {
8
+ box-sizing: border-box;
9
+ cursor: pointer;
10
+ display: block;
11
+ height: 28px;
12
+ user-select: none;
13
+ -webkit-user-select: none; }
14
+ .select2-container .select2-selection--single .select2-selection__rendered {
15
+ display: block;
16
+ padding-left: 8px;
17
+ padding-right: 20px;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap; }
21
+ .select2-container .select2-selection--single .select2-selection__clear {
22
+ position: relative; }
23
+ .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
24
+ padding-right: 8px;
25
+ padding-left: 20px; }
26
+ .select2-container .select2-selection--multiple {
27
+ box-sizing: border-box;
28
+ cursor: pointer;
29
+ display: block;
30
+ min-height: 32px;
31
+ user-select: none;
32
+ -webkit-user-select: none; }
33
+ .select2-container .select2-selection--multiple .select2-selection__rendered {
34
+ display: inline-block;
35
+ overflow: hidden;
36
+ padding-left: 8px;
37
+ text-overflow: ellipsis;
38
+ white-space: nowrap; }
39
+ .select2-container .select2-search--inline {
40
+ float: left; }
41
+ .select2-container .select2-search--inline .select2-search__field {
42
+ box-sizing: border-box;
43
+ border: none;
44
+ font-size: 100%;
45
+ margin-top: 5px;
46
+ padding: 0; }
47
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
48
+ -webkit-appearance: none; }
49
+
50
+ .select2-dropdown {
51
+ background-color: white;
52
+ border: 1px solid #aaa;
53
+ border-radius: 4px;
54
+ box-sizing: border-box;
55
+ display: block;
56
+ position: absolute;
57
+ left: -100000px;
58
+ width: 100%;
59
+ z-index: 1051; }
60
+
61
+ .select2-results {
62
+ display: block; }
63
+
64
+ .select2-results__options {
65
+ list-style: none;
66
+ margin: 0;
67
+ padding: 0; }
68
+
69
+ .select2-results__option {
70
+ padding: 6px;
71
+ user-select: none;
72
+ -webkit-user-select: none; }
73
+ .select2-results__option[aria-selected] {
74
+ cursor: pointer; }
75
+
76
+ .select2-container--open .select2-dropdown {
77
+ left: 0; }
78
+
79
+ .select2-container--open .select2-dropdown--above {
80
+ border-bottom: none;
81
+ border-bottom-left-radius: 0;
82
+ border-bottom-right-radius: 0; }
83
+
84
+ .select2-container--open .select2-dropdown--below {
85
+ border-top: none;
86
+ border-top-left-radius: 0;
87
+ border-top-right-radius: 0; }
88
+
89
+ .select2-search--dropdown {
90
+ display: block;
91
+ padding: 4px; }
92
+ .select2-search--dropdown .select2-search__field {
93
+ padding: 4px;
94
+ width: 100%;
95
+ box-sizing: border-box; }
96
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
97
+ -webkit-appearance: none; }
98
+ .select2-search--dropdown.select2-search--hide {
99
+ display: none; }
100
+
101
+ .select2-close-mask {
102
+ border: 0;
103
+ margin: 0;
104
+ padding: 0;
105
+ display: block;
106
+ position: fixed;
107
+ left: 0;
108
+ top: 0;
109
+ min-height: 100%;
110
+ min-width: 100%;
111
+ height: auto;
112
+ width: auto;
113
+ opacity: 0;
114
+ z-index: 99;
115
+ background-color: #fff;
116
+ filter: alpha(opacity=0); }
117
+
118
+ .select2-hidden-accessible {
119
+ border: 0 !important;
120
+ clip: rect(0 0 0 0) !important;
121
+ -webkit-clip-path: inset(50%) !important;
122
+ clip-path: inset(50%) !important;
123
+ height: 1px !important;
124
+ overflow: hidden !important;
125
+ padding: 0 !important;
126
+ position: absolute !important;
127
+ width: 1px !important;
128
+ white-space: nowrap !important; }
129
+
130
+ .select2-container--default .select2-selection--single {
131
+ background-color: #fff;
132
+ border: 1px solid #aaa;
133
+ border-radius: 4px; }
134
+ .select2-container--default .select2-selection--single .select2-selection__rendered {
135
+ color: #444;
136
+ line-height: 28px; }
137
+ .select2-container--default .select2-selection--single .select2-selection__clear {
138
+ cursor: pointer;
139
+ float: right;
140
+ font-weight: bold; }
141
+ .select2-container--default .select2-selection--single .select2-selection__placeholder {
142
+ color: #999; }
143
+ .select2-container--default .select2-selection--single .select2-selection__arrow {
144
+ height: 26px;
145
+ position: absolute;
146
+ top: 1px;
147
+ right: 1px;
148
+ width: 20px; }
149
+ .select2-container--default .select2-selection--single .select2-selection__arrow b {
150
+ border-color: #888 transparent transparent transparent;
151
+ border-style: solid;
152
+ border-width: 5px 4px 0 4px;
153
+ height: 0;
154
+ left: 50%;
155
+ margin-left: -4px;
156
+ margin-top: -2px;
157
+ position: absolute;
158
+ top: 50%;
159
+ width: 0; }
160
+
161
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
162
+ float: left; }
163
+
164
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
165
+ left: 1px;
166
+ right: auto; }
167
+
168
+ .select2-container--default.select2-container--disabled .select2-selection--single {
169
+ background-color: #eee;
170
+ cursor: default; }
171
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
172
+ display: none; }
173
+
174
+ .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
175
+ border-color: transparent transparent #888 transparent;
176
+ border-width: 0 4px 5px 4px; }
177
+
178
+ .select2-container--default .select2-selection--multiple {
179
+ background-color: white;
180
+ border: 1px solid #aaa;
181
+ border-radius: 4px;
182
+ cursor: text; }
183
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered {
184
+ box-sizing: border-box;
185
+ list-style: none;
186
+ margin: 0;
187
+ padding: 0 5px;
188
+ width: 100%; }
189
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
190
+ list-style: none; }
191
+ .select2-container--default .select2-selection--multiple .select2-selection__clear {
192
+ cursor: pointer;
193
+ float: right;
194
+ font-weight: bold;
195
+ margin-top: 5px;
196
+ margin-right: 10px;
197
+ padding: 1px; }
198
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
199
+ background-color: #e4e4e4;
200
+ border: 1px solid #aaa;
201
+ border-radius: 4px;
202
+ cursor: default;
203
+ float: left;
204
+ margin-right: 5px;
205
+ margin-top: 5px;
206
+ padding: 0 5px; }
207
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
208
+ color: #999;
209
+ cursor: pointer;
210
+ display: inline-block;
211
+ font-weight: bold;
212
+ margin-right: 2px; }
213
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
214
+ color: #333; }
215
+
216
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
217
+ float: right; }
218
+
219
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
220
+ margin-left: 5px;
221
+ margin-right: auto; }
222
+
223
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
224
+ margin-left: 2px;
225
+ margin-right: auto; }
226
+
227
+ .select2-container--default.select2-container--focus .select2-selection--multiple {
228
+ border: solid black 1px;
229
+ outline: 0; }
230
+
231
+ .select2-container--default.select2-container--disabled .select2-selection--multiple {
232
+ background-color: #eee;
233
+ cursor: default; }
234
+
235
+ .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
236
+ display: none; }
237
+
238
+ .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
239
+ border-top-left-radius: 0;
240
+ border-top-right-radius: 0; }
241
+
242
+ .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
243
+ border-bottom-left-radius: 0;
244
+ border-bottom-right-radius: 0; }
245
+
246
+ .select2-container--default .select2-search--dropdown .select2-search__field {
247
+ border: 1px solid #aaa; }
248
+
249
+ .select2-container--default .select2-search--inline .select2-search__field {
250
+ background: transparent;
251
+ border: none;
252
+ outline: 0;
253
+ box-shadow: none;
254
+ -webkit-appearance: textfield; }
255
+
256
+ .select2-container--default .select2-results > .select2-results__options {
257
+ max-height: 200px;
258
+ overflow-y: auto; }
259
+
260
+ .select2-container--default .select2-results__option[role=group] {
261
+ padding: 0; }
262
+
263
+ .select2-container--default .select2-results__option[aria-disabled=true] {
264
+ color: #999; }
265
+
266
+ .select2-container--default .select2-results__option[aria-selected=true] {
267
+ background-color: #ddd; }
268
+
269
+ .select2-container--default .select2-results__option .select2-results__option {
270
+ padding-left: 1em; }
271
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
272
+ padding-left: 0; }
273
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
274
+ margin-left: -1em;
275
+ padding-left: 2em; }
276
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
277
+ margin-left: -2em;
278
+ padding-left: 3em; }
279
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
280
+ margin-left: -3em;
281
+ padding-left: 4em; }
282
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
283
+ margin-left: -4em;
284
+ padding-left: 5em; }
285
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
286
+ margin-left: -5em;
287
+ padding-left: 6em; }
288
+
289
+ .select2-container--default .select2-results__option--highlighted[aria-selected] {
290
+ background-color: #5897fb;
291
+ color: white; }
292
+
293
+ .select2-container--default .select2-results__group {
294
+ cursor: default;
295
+ display: block;
296
+ padding: 6px; }
297
+
298
+ .select2-container--classic .select2-selection--single {
299
+ background-color: #f7f7f7;
300
+ border: 1px solid #aaa;
301
+ border-radius: 4px;
302
+ outline: 0;
303
+ background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
304
+ background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
305
+ background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
306
+ background-repeat: repeat-x;
307
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
308
+ .select2-container--classic .select2-selection--single:focus {
309
+ border: 1px solid #5897fb; }
310
+ .select2-container--classic .select2-selection--single .select2-selection__rendered {
311
+ color: #444;
312
+ line-height: 28px; }
313
+ .select2-container--classic .select2-selection--single .select2-selection__clear {
314
+ cursor: pointer;
315
+ float: right;
316
+ font-weight: bold;
317
+ margin-right: 10px; }
318
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder {
319
+ color: #999; }
320
+ .select2-container--classic .select2-selection--single .select2-selection__arrow {
321
+ background-color: #ddd;
322
+ border: none;
323
+ border-left: 1px solid #aaa;
324
+ border-top-right-radius: 4px;
325
+ border-bottom-right-radius: 4px;
326
+ height: 26px;
327
+ position: absolute;
328
+ top: 1px;
329
+ right: 1px;
330
+ width: 20px;
331
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
332
+ background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
333
+ background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
334
+ background-repeat: repeat-x;
335
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
336
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b {
337
+ border-color: #888 transparent transparent transparent;
338
+ border-style: solid;
339
+ border-width: 5px 4px 0 4px;
340
+ height: 0;
341
+ left: 50%;
342
+ margin-left: -4px;
343
+ margin-top: -2px;
344
+ position: absolute;
345
+ top: 50%;
346
+ width: 0; }
347
+
348
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
349
+ float: left; }
350
+
351
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
352
+ border: none;
353
+ border-right: 1px solid #aaa;
354
+ border-radius: 0;
355
+ border-top-left-radius: 4px;
356
+ border-bottom-left-radius: 4px;
357
+ left: 1px;
358
+ right: auto; }
359
+
360
+ .select2-container--classic.select2-container--open .select2-selection--single {
361
+ border: 1px solid #5897fb; }
362
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
363
+ background: transparent;
364
+ border: none; }
365
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
366
+ border-color: transparent transparent #888 transparent;
367
+ border-width: 0 4px 5px 4px; }
368
+
369
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
370
+ border-top: none;
371
+ border-top-left-radius: 0;
372
+ border-top-right-radius: 0;
373
+ background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
374
+ background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
375
+ background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
376
+ background-repeat: repeat-x;
377
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
378
+
379
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
380
+ border-bottom: none;
381
+ border-bottom-left-radius: 0;
382
+ border-bottom-right-radius: 0;
383
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
384
+ background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
385
+ background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
386
+ background-repeat: repeat-x;
387
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
388
+
389
+ .select2-container--classic .select2-selection--multiple {
390
+ background-color: white;
391
+ border: 1px solid #aaa;
392
+ border-radius: 4px;
393
+ cursor: text;
394
+ outline: 0; }
395
+ .select2-container--classic .select2-selection--multiple:focus {
396
+ border: 1px solid #5897fb; }
397
+ .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
398
+ list-style: none;
399
+ margin: 0;
400
+ padding: 0 5px; }
401
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear {
402
+ display: none; }
403
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice {
404
+ background-color: #e4e4e4;
405
+ border: 1px solid #aaa;
406
+ border-radius: 4px;
407
+ cursor: default;
408
+ float: left;
409
+ margin-right: 5px;
410
+ margin-top: 5px;
411
+ padding: 0 5px; }
412
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
413
+ color: #888;
414
+ cursor: pointer;
415
+ display: inline-block;
416
+ font-weight: bold;
417
+ margin-right: 2px; }
418
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
419
+ color: #555; }
420
+
421
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
422
+ float: right;
423
+ margin-left: 5px;
424
+ margin-right: auto; }
425
+
426
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
427
+ margin-left: 2px;
428
+ margin-right: auto; }
429
+
430
+ .select2-container--classic.select2-container--open .select2-selection--multiple {
431
+ border: 1px solid #5897fb; }
432
+
433
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
434
+ border-top: none;
435
+ border-top-left-radius: 0;
436
+ border-top-right-radius: 0; }
437
+
438
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
439
+ border-bottom: none;
440
+ border-bottom-left-radius: 0;
441
+ border-bottom-right-radius: 0; }
442
+
443
+ .select2-container--classic .select2-search--dropdown .select2-search__field {
444
+ border: 1px solid #aaa;
445
+ outline: 0; }
446
+
447
+ .select2-container--classic .select2-search--inline .select2-search__field {
448
+ outline: 0;
449
+ box-shadow: none; }
450
+
451
+ .select2-container--classic .select2-dropdown {
452
+ background-color: white;
453
+ border: 1px solid transparent; }
454
+
455
+ .select2-container--classic .select2-dropdown--above {
456
+ border-bottom: none; }
457
+
458
+ .select2-container--classic .select2-dropdown--below {
459
+ border-top: none; }
460
+
461
+ .select2-container--classic .select2-results > .select2-results__options {
462
+ max-height: 200px;
463
+ overflow-y: auto; }
464
+
465
+ .select2-container--classic .select2-results__option[role=group] {
466
+ padding: 0; }
467
+
468
+ .select2-container--classic .select2-results__option[aria-disabled=true] {
469
+ color: grey; }
470
+
471
+ .select2-container--classic .select2-results__option--highlighted[aria-selected] {
472
+ background-color: #3875d7;
473
+ color: white; }
474
+
475
+ .select2-container--classic .select2-results__group {
476
+ cursor: default;
477
+ display: block;
478
+ padding: 6px; }
479
+
480
+ .select2-container--classic.select2-container--open .select2-dropdown {
481
+ border-color: #5897fb; }
backend/staticfiles/admin/css/vendor/select2/select2.min.css ADDED
@@ -0,0 +1 @@
 
 
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}
backend/staticfiles/admin/css/widgets.css ADDED
@@ -0,0 +1,613 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* SELECTOR (FILTER INTERFACE) */
2
+
3
+ .selector {
4
+ display: flex;
5
+ flex: 1;
6
+ gap: 0 10px;
7
+ }
8
+
9
+ .selector select {
10
+ height: 17.2em;
11
+ flex: 1 0 auto;
12
+ overflow: scroll;
13
+ width: 100%;
14
+ }
15
+
16
+ .selector-available, .selector-chosen {
17
+ display: flex;
18
+ flex-direction: column;
19
+ flex: 1 1;
20
+ }
21
+
22
+ .selector-available-title, .selector-chosen-title {
23
+ border: 1px solid var(--border-color);
24
+ border-radius: 4px 4px 0 0;
25
+ }
26
+
27
+ .selector .helptext {
28
+ font-size: 0.6875rem;
29
+ }
30
+
31
+ .selector-chosen .list-footer-display {
32
+ border: 1px solid var(--border-color);
33
+ border-top: none;
34
+ border-radius: 0 0 4px 4px;
35
+ margin: 0 0 10px;
36
+ padding: 8px;
37
+ text-align: center;
38
+ background: var(--primary);
39
+ color: var(--header-link-color);
40
+ cursor: pointer;
41
+ }
42
+ .selector-chosen .list-footer-display__clear {
43
+ color: var(--breadcrumbs-fg);
44
+ }
45
+
46
+ .selector-chosen-title {
47
+ background: var(--secondary);
48
+ color: var(--header-link-color);
49
+ padding: 8px;
50
+ }
51
+
52
+ .aligned .selector-chosen-title label {
53
+ color: var(--header-link-color);
54
+ width: 100%;
55
+ }
56
+
57
+ .selector-available-title {
58
+ background: var(--darkened-bg);
59
+ color: var(--body-quiet-color);
60
+ padding: 8px;
61
+ }
62
+
63
+ .aligned .selector-available-title label {
64
+ width: 100%;
65
+ }
66
+
67
+ .selector .selector-filter {
68
+ border: 1px solid var(--border-color);
69
+ border-width: 0 1px;
70
+ padding: 8px;
71
+ color: var(--body-quiet-color);
72
+ font-size: 0.625rem;
73
+ margin: 0;
74
+ text-align: left;
75
+ display: flex;
76
+ gap: 8px;
77
+ }
78
+
79
+ .selector .selector-filter label,
80
+ .inline-group .aligned .selector .selector-filter label {
81
+ float: left;
82
+ margin: 7px 0 0;
83
+ width: 18px;
84
+ height: 18px;
85
+ padding: 0;
86
+ overflow: hidden;
87
+ line-height: 1;
88
+ min-width: auto;
89
+ }
90
+
91
+ .selector-filter input {
92
+ flex-grow: 1;
93
+ }
94
+
95
+ .selector ul.selector-chooser {
96
+ align-self: center;
97
+ width: 30px;
98
+ background-color: var(--selected-bg);
99
+ border-radius: 10px;
100
+ margin: 0;
101
+ padding: 0;
102
+ transform: translateY(-17px);
103
+ }
104
+
105
+ .selector-chooser li {
106
+ margin: 0;
107
+ padding: 3px;
108
+ list-style-type: none;
109
+ }
110
+
111
+ .selector select {
112
+ padding: 0 10px;
113
+ margin: 0 0 10px;
114
+ border-radius: 0 0 4px 4px;
115
+ }
116
+ .selector .selector-chosen--with-filtered select {
117
+ margin: 0;
118
+ border-radius: 0;
119
+ height: 14em;
120
+ }
121
+
122
+ .selector .selector-chosen:not(.selector-chosen--with-filtered) .list-footer-display {
123
+ display: none;
124
+ }
125
+
126
+ .selector-add, .selector-remove {
127
+ width: 24px;
128
+ height: 24px;
129
+ display: block;
130
+ text-indent: -3000px;
131
+ overflow: hidden;
132
+ cursor: default;
133
+ opacity: 0.55;
134
+ border: none;
135
+ }
136
+
137
+ :enabled.selector-add, :enabled.selector-remove {
138
+ opacity: 1;
139
+ }
140
+
141
+ :enabled.selector-add:hover, :enabled.selector-remove:hover {
142
+ cursor: pointer;
143
+ }
144
+
145
+ .selector-add {
146
+ background: url(../img/selector-icons.svg) 0 -144px no-repeat;
147
+ background-size: 24px auto;
148
+ }
149
+
150
+ :enabled.selector-add:focus, :enabled.selector-add:hover {
151
+ background-position: 0 -168px;
152
+ }
153
+
154
+ .selector-remove {
155
+ background: url(../img/selector-icons.svg) 0 -96px no-repeat;
156
+ background-size: 24px auto;
157
+ }
158
+
159
+ :enabled.selector-remove:focus, :enabled.selector-remove:hover {
160
+ background-position: 0 -120px;
161
+ }
162
+
163
+ .selector-chooseall, .selector-clearall {
164
+ display: inline-block;
165
+ height: 16px;
166
+ text-align: left;
167
+ margin: 0 auto;
168
+ overflow: hidden;
169
+ font-weight: bold;
170
+ line-height: 16px;
171
+ color: var(--body-quiet-color);
172
+ text-decoration: none;
173
+ opacity: 0.55;
174
+ border: none;
175
+ }
176
+
177
+ :enabled.selector-chooseall:focus, :enabled.selector-clearall:focus,
178
+ :enabled.selector-chooseall:hover, :enabled.selector-clearall:hover {
179
+ color: var(--link-fg);
180
+ }
181
+
182
+ :enabled.selector-chooseall, :enabled.selector-clearall {
183
+ opacity: 1;
184
+ }
185
+
186
+ :enabled.selector-chooseall:hover, :enabled.selector-clearall:hover {
187
+ cursor: pointer;
188
+ }
189
+
190
+ .selector-chooseall {
191
+ padding: 0 18px 0 0;
192
+ background: url(../img/selector-icons.svg) right -160px no-repeat;
193
+ cursor: default;
194
+ }
195
+
196
+ :enabled.selector-chooseall:focus, :enabled.selector-chooseall:hover {
197
+ background-position: 100% -176px;
198
+ }
199
+
200
+ .selector-clearall {
201
+ padding: 0 0 0 18px;
202
+ background: url(../img/selector-icons.svg) 0 -128px no-repeat;
203
+ cursor: default;
204
+ }
205
+
206
+ :enabled.selector-clearall:focus, :enabled.selector-clearall:hover {
207
+ background-position: 0 -144px;
208
+ }
209
+
210
+ /* STACKED SELECTORS */
211
+
212
+ .stacked {
213
+ float: left;
214
+ width: 490px;
215
+ display: block;
216
+ }
217
+
218
+ .stacked select {
219
+ width: 480px;
220
+ height: 10.1em;
221
+ }
222
+
223
+ .stacked .selector-available, .stacked .selector-chosen {
224
+ width: 480px;
225
+ }
226
+
227
+ .stacked .selector-available {
228
+ margin-bottom: 0;
229
+ }
230
+
231
+ .stacked .selector-available input {
232
+ width: 422px;
233
+ }
234
+
235
+ .stacked ul.selector-chooser {
236
+ display: flex;
237
+ height: 30px;
238
+ width: 64px;
239
+ margin: 0 0 10px 40%;
240
+ background-color: #eee;
241
+ border-radius: 10px;
242
+ transform: none;
243
+ }
244
+
245
+ .stacked .selector-chooser li {
246
+ float: left;
247
+ padding: 3px 3px 3px 5px;
248
+ }
249
+
250
+ .stacked .selector-chooseall, .stacked .selector-clearall {
251
+ display: none;
252
+ }
253
+
254
+ .stacked .selector-add {
255
+ background: url(../img/selector-icons.svg) 0 -48px no-repeat;
256
+ background-size: 24px auto;
257
+ cursor: default;
258
+ }
259
+
260
+ .stacked :enabled.selector-add {
261
+ background-position: 0 -48px;
262
+ cursor: pointer;
263
+ }
264
+
265
+ .stacked :enabled.selector-add:focus, .stacked :enabled.selector-add:hover {
266
+ background-position: 0 -72px;
267
+ cursor: pointer;
268
+ }
269
+
270
+ .stacked .selector-remove {
271
+ background: url(../img/selector-icons.svg) 0 0 no-repeat;
272
+ background-size: 24px auto;
273
+ cursor: default;
274
+ }
275
+
276
+ .stacked :enabled.selector-remove {
277
+ background-position: 0 0px;
278
+ cursor: pointer;
279
+ }
280
+
281
+ .stacked :enabled.selector-remove:focus, .stacked :enabled.selector-remove:hover {
282
+ background-position: 0 -24px;
283
+ cursor: pointer;
284
+ }
285
+
286
+ .selector .help-icon {
287
+ background: url(../img/icon-unknown.svg) 0 0 no-repeat;
288
+ display: inline-block;
289
+ vertical-align: middle;
290
+ margin: -2px 0 0 2px;
291
+ width: 13px;
292
+ height: 13px;
293
+ }
294
+
295
+ .selector .selector-chosen .help-icon {
296
+ background: url(../img/icon-unknown-alt.svg) 0 0 no-repeat;
297
+ }
298
+
299
+ .selector .search-label-icon {
300
+ background: url(../img/search.svg) 0 0 no-repeat;
301
+ display: inline-block;
302
+ height: 1.125rem;
303
+ width: 1.125rem;
304
+ }
305
+
306
+ /* DATE AND TIME */
307
+
308
+ p.datetime {
309
+ line-height: 20px;
310
+ margin: 0;
311
+ padding: 0;
312
+ color: var(--body-quiet-color);
313
+ font-weight: bold;
314
+ }
315
+
316
+ .datetime span {
317
+ white-space: nowrap;
318
+ font-weight: normal;
319
+ font-size: 0.6875rem;
320
+ color: var(--body-quiet-color);
321
+ }
322
+
323
+ .datetime input, .form-row .datetime input.vDateField, .form-row .datetime input.vTimeField {
324
+ margin-left: 5px;
325
+ margin-bottom: 4px;
326
+ }
327
+
328
+ table p.datetime {
329
+ font-size: 0.6875rem;
330
+ margin-left: 0;
331
+ padding-left: 0;
332
+ }
333
+
334
+ .datetimeshortcuts .clock-icon, .datetimeshortcuts .date-icon {
335
+ position: relative;
336
+ display: inline-block;
337
+ vertical-align: middle;
338
+ height: 24px;
339
+ width: 24px;
340
+ overflow: hidden;
341
+ }
342
+
343
+ .datetimeshortcuts .clock-icon {
344
+ background: url(../img/icon-clock.svg) 0 0 no-repeat;
345
+ background-size: 24px auto;
346
+ }
347
+
348
+ .datetimeshortcuts a:focus .clock-icon,
349
+ .datetimeshortcuts a:hover .clock-icon {
350
+ background-position: 0 -24px;
351
+ }
352
+
353
+ .datetimeshortcuts .date-icon {
354
+ background: url(../img/icon-calendar.svg) 0 0 no-repeat;
355
+ background-size: 24px auto;
356
+ top: -1px;
357
+ }
358
+
359
+ .datetimeshortcuts a:focus .date-icon,
360
+ .datetimeshortcuts a:hover .date-icon {
361
+ background-position: 0 -24px;
362
+ }
363
+
364
+ .timezonewarning {
365
+ font-size: 0.6875rem;
366
+ color: var(--body-quiet-color);
367
+ }
368
+
369
+ /* URL */
370
+
371
+ p.url {
372
+ line-height: 20px;
373
+ margin: 0;
374
+ padding: 0;
375
+ color: var(--body-quiet-color);
376
+ font-size: 0.6875rem;
377
+ font-weight: bold;
378
+ }
379
+
380
+ .url a {
381
+ font-weight: normal;
382
+ }
383
+
384
+ /* FILE UPLOADS */
385
+
386
+ p.file-upload {
387
+ line-height: 20px;
388
+ margin: 0;
389
+ padding: 0;
390
+ color: var(--body-quiet-color);
391
+ font-size: 0.6875rem;
392
+ font-weight: bold;
393
+ }
394
+
395
+ .file-upload a {
396
+ font-weight: normal;
397
+ }
398
+
399
+ .file-upload .deletelink {
400
+ margin-left: 5px;
401
+ }
402
+
403
+ span.clearable-file-input label {
404
+ color: var(--body-fg);
405
+ font-size: 0.6875rem;
406
+ display: inline;
407
+ float: none;
408
+ }
409
+
410
+ /* CALENDARS & CLOCKS */
411
+
412
+ .calendarbox, .clockbox {
413
+ margin: 5px auto;
414
+ font-size: 0.75rem;
415
+ width: 19em;
416
+ text-align: center;
417
+ background: var(--body-bg);
418
+ color: var(--body-fg);
419
+ border: 1px solid var(--hairline-color);
420
+ border-radius: 4px;
421
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
422
+ overflow: hidden;
423
+ position: relative;
424
+ }
425
+
426
+ .clockbox {
427
+ width: auto;
428
+ }
429
+
430
+ .calendar {
431
+ margin: 0;
432
+ padding: 0;
433
+ }
434
+
435
+ .calendar table {
436
+ margin: 0;
437
+ padding: 0;
438
+ border-collapse: collapse;
439
+ background: white;
440
+ width: 100%;
441
+ }
442
+
443
+ .calendar caption, .calendarbox h2 {
444
+ margin: 0;
445
+ text-align: center;
446
+ border-top: none;
447
+ font-weight: 700;
448
+ font-size: 0.75rem;
449
+ color: #333;
450
+ background: var(--accent);
451
+ }
452
+
453
+ .calendar th {
454
+ padding: 8px 5px;
455
+ background: var(--darkened-bg);
456
+ border-bottom: 1px solid var(--border-color);
457
+ font-weight: 400;
458
+ font-size: 0.75rem;
459
+ text-align: center;
460
+ color: var(--body-quiet-color);
461
+ }
462
+
463
+ .calendar td {
464
+ font-weight: 400;
465
+ font-size: 0.75rem;
466
+ text-align: center;
467
+ padding: 0;
468
+ border-top: 1px solid var(--hairline-color);
469
+ border-bottom: none;
470
+ }
471
+
472
+ .calendar td.selected a {
473
+ background: var(--secondary);
474
+ color: var(--button-fg);
475
+ }
476
+
477
+ .calendar td.nonday {
478
+ background: var(--darkened-bg);
479
+ }
480
+
481
+ .calendar td.today a {
482
+ font-weight: 700;
483
+ }
484
+
485
+ .calendar td a, .timelist a {
486
+ display: block;
487
+ font-weight: 400;
488
+ padding: 6px;
489
+ text-decoration: none;
490
+ color: var(--body-quiet-color);
491
+ }
492
+
493
+ .calendar td a:focus, .timelist a:focus,
494
+ .calendar td a:hover, .timelist a:hover {
495
+ background: var(--primary);
496
+ color: white;
497
+ }
498
+
499
+ .calendar td a:active, .timelist a:active {
500
+ background: var(--header-bg);
501
+ color: white;
502
+ }
503
+
504
+ .calendarnav {
505
+ font-size: 0.625rem;
506
+ text-align: center;
507
+ color: #ccc;
508
+ margin: 0;
509
+ padding: 1px 3px;
510
+ }
511
+
512
+ .calendarnav a:link, #calendarnav a:visited,
513
+ #calendarnav a:focus, #calendarnav a:hover {
514
+ color: var(--body-quiet-color);
515
+ }
516
+
517
+ .calendar-shortcuts {
518
+ background: var(--body-bg);
519
+ color: var(--body-quiet-color);
520
+ font-size: 0.6875rem;
521
+ line-height: 0.6875rem;
522
+ border-top: 1px solid var(--hairline-color);
523
+ padding: 8px 0;
524
+ }
525
+
526
+ .calendarbox .calendarnav-previous, .calendarbox .calendarnav-next {
527
+ display: block;
528
+ position: absolute;
529
+ top: 8px;
530
+ width: 15px;
531
+ height: 15px;
532
+ text-indent: -9999px;
533
+ padding: 0;
534
+ }
535
+
536
+ .calendarnav-previous {
537
+ left: 10px;
538
+ background: url(../img/calendar-icons.svg) 0 0 no-repeat;
539
+ }
540
+
541
+ .calendarnav-next {
542
+ right: 10px;
543
+ background: url(../img/calendar-icons.svg) 0 -15px no-repeat;
544
+ }
545
+
546
+ .calendar-cancel {
547
+ margin: 0;
548
+ padding: 4px 0;
549
+ font-size: 0.75rem;
550
+ background: var(--close-button-bg);
551
+ border-top: 1px solid var(--border-color);
552
+ color: var(--button-fg);
553
+ }
554
+
555
+ .calendar-cancel:focus, .calendar-cancel:hover {
556
+ background: var(--close-button-hover-bg);
557
+ }
558
+
559
+ .calendar-cancel a {
560
+ color: var(--button-fg);
561
+ display: block;
562
+ }
563
+
564
+ ul.timelist, .timelist li {
565
+ list-style-type: none;
566
+ margin: 0;
567
+ padding: 0;
568
+ }
569
+
570
+ .timelist a {
571
+ padding: 2px;
572
+ }
573
+
574
+ /* EDIT INLINE */
575
+
576
+ .inline-deletelink {
577
+ float: right;
578
+ text-indent: -9999px;
579
+ background: url(../img/inline-delete.svg) 0 0 no-repeat;
580
+ width: 1.5rem;
581
+ height: 1.5rem;
582
+ border: 0px none;
583
+ margin-bottom: .25rem;
584
+ }
585
+
586
+ .inline-deletelink:focus, .inline-deletelink:hover {
587
+ cursor: pointer;
588
+ }
589
+
590
+ /* RELATED WIDGET WRAPPER */
591
+ .related-widget-wrapper {
592
+ display: flex;
593
+ gap: 0 10px;
594
+ flex-grow: 1;
595
+ flex-wrap: wrap;
596
+ margin-bottom: 5px;
597
+ }
598
+
599
+ .related-widget-wrapper-link {
600
+ opacity: .6;
601
+ filter: grayscale(1);
602
+ }
603
+
604
+ .related-widget-wrapper-link:link {
605
+ opacity: 1;
606
+ filter: grayscale(0);
607
+ }
608
+
609
+ /* GIS MAPS */
610
+ .dj_map {
611
+ width: 600px;
612
+ height: 400px;
613
+ }
backend/staticfiles/admin/img/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Code Charm Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
backend/staticfiles/admin/img/README.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ All icons are taken from Font Awesome (https://fontawesome.com/) project.
2
+ The Font Awesome font is licensed under the SIL OFL 1.1:
3
+ - https://scripts.sil.org/OFL
4
+
5
+ SVG icons source: https://github.com/encharm/Font-Awesome-SVG-PNG
6
+ Font-Awesome-SVG-PNG is licensed under the MIT license (see file license
7
+ in current folder).
backend/staticfiles/admin/img/calendar-icons.svg ADDED
backend/staticfiles/admin/img/gis/move_vertex_off.svg ADDED
backend/staticfiles/admin/img/gis/move_vertex_on.svg ADDED
backend/staticfiles/admin/img/icon-addlink.svg ADDED
backend/staticfiles/admin/img/icon-alert.svg ADDED
backend/staticfiles/admin/img/icon-calendar.svg ADDED
backend/staticfiles/admin/img/icon-changelink.svg ADDED
backend/staticfiles/admin/img/icon-clock.svg ADDED
backend/staticfiles/admin/img/icon-deletelink.svg ADDED
backend/staticfiles/admin/img/icon-hidelink.svg ADDED
backend/staticfiles/admin/img/icon-no.svg ADDED
backend/staticfiles/admin/img/icon-unknown-alt.svg ADDED
backend/staticfiles/admin/img/icon-unknown.svg ADDED
backend/staticfiles/admin/img/icon-viewlink.svg ADDED
backend/staticfiles/admin/img/icon-yes.svg ADDED
backend/staticfiles/admin/img/inline-delete.svg ADDED
backend/staticfiles/admin/img/search.svg ADDED
backend/staticfiles/admin/img/selector-icons.svg ADDED
backend/staticfiles/admin/img/sorting-icons.svg ADDED
backend/staticfiles/admin/img/tooltag-add.svg ADDED
backend/staticfiles/admin/img/tooltag-arrowright.svg ADDED
backend/staticfiles/admin/js/SelectBox.js ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+ {
3
+ const SelectBox = {
4
+ cache: {},
5
+ init: function(id) {
6
+ const box = document.getElementById(id);
7
+ SelectBox.cache[id] = [];
8
+ const cache = SelectBox.cache[id];
9
+ for (const node of box.options) {
10
+ cache.push({value: node.value, text: node.text, displayed: 1});
11
+ }
12
+ },
13
+ redisplay: function(id) {
14
+ // Repopulate HTML select box from cache
15
+ const box = document.getElementById(id);
16
+ const scroll_value_from_top = box.scrollTop;
17
+ box.innerHTML = '';
18
+ for (const node of SelectBox.cache[id]) {
19
+ if (node.displayed) {
20
+ const new_option = new Option(node.text, node.value, false, false);
21
+ // Shows a tooltip when hovering over the option
22
+ new_option.title = node.text;
23
+ box.appendChild(new_option);
24
+ }
25
+ }
26
+ box.scrollTop = scroll_value_from_top;
27
+ },
28
+ filter: function(id, text) {
29
+ // Redisplay the HTML select box, displaying only the choices containing ALL
30
+ // the words in text. (It's an AND search.)
31
+ const tokens = text.toLowerCase().split(/\s+/);
32
+ for (const node of SelectBox.cache[id]) {
33
+ node.displayed = 1;
34
+ const node_text = node.text.toLowerCase();
35
+ for (const token of tokens) {
36
+ if (!node_text.includes(token)) {
37
+ node.displayed = 0;
38
+ break; // Once the first token isn't found we're done
39
+ }
40
+ }
41
+ }
42
+ SelectBox.redisplay(id);
43
+ },
44
+ get_hidden_node_count(id) {
45
+ const cache = SelectBox.cache[id] || [];
46
+ return cache.filter(node => node.displayed === 0).length;
47
+ },
48
+ delete_from_cache: function(id, value) {
49
+ let delete_index = null;
50
+ const cache = SelectBox.cache[id];
51
+ for (const [i, node] of cache.entries()) {
52
+ if (node.value === value) {
53
+ delete_index = i;
54
+ break;
55
+ }
56
+ }
57
+ cache.splice(delete_index, 1);
58
+ },
59
+ add_to_cache: function(id, option) {
60
+ SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1});
61
+ },
62
+ cache_contains: function(id, value) {
63
+ // Check if an item is contained in the cache
64
+ for (const node of SelectBox.cache[id]) {
65
+ if (node.value === value) {
66
+ return true;
67
+ }
68
+ }
69
+ return false;
70
+ },
71
+ move: function(from, to) {
72
+ const from_box = document.getElementById(from);
73
+ for (const option of from_box.options) {
74
+ const option_value = option.value;
75
+ if (option.selected && SelectBox.cache_contains(from, option_value)) {
76
+ SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1});
77
+ SelectBox.delete_from_cache(from, option_value);
78
+ }
79
+ }
80
+ SelectBox.redisplay(from);
81
+ SelectBox.redisplay(to);
82
+ },
83
+ move_all: function(from, to) {
84
+ const from_box = document.getElementById(from);
85
+ for (const option of from_box.options) {
86
+ const option_value = option.value;
87
+ if (SelectBox.cache_contains(from, option_value)) {
88
+ SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1});
89
+ SelectBox.delete_from_cache(from, option_value);
90
+ }
91
+ }
92
+ SelectBox.redisplay(from);
93
+ SelectBox.redisplay(to);
94
+ },
95
+ sort: function(id) {
96
+ SelectBox.cache[id].sort(function(a, b) {
97
+ a = a.text.toLowerCase();
98
+ b = b.text.toLowerCase();
99
+ if (a > b) {
100
+ return 1;
101
+ }
102
+ if (a < b) {
103
+ return -1;
104
+ }
105
+ return 0;
106
+ } );
107
+ },
108
+ select_all: function(id) {
109
+ const box = document.getElementById(id);
110
+ for (const option of box.options) {
111
+ option.selected = true;
112
+ }
113
+ }
114
+ };
115
+ window.SelectBox = SelectBox;
116
+ }
backend/staticfiles/admin/js/SelectFilter2.js ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global SelectBox, gettext, ngettext, interpolate, quickElement, SelectFilter*/
2
+ /*
3
+ SelectFilter2 - Turns a multiple-select box into a filter interface.
4
+
5
+ Requires core.js and SelectBox.js.
6
+ */
7
+ 'use strict';
8
+ {
9
+ window.SelectFilter = {
10
+ init: function(field_id, field_name, is_stacked) {
11
+ if (field_id.match(/__prefix__/)) {
12
+ // Don't initialize on empty forms.
13
+ return;
14
+ }
15
+ const from_box = document.getElementById(field_id);
16
+ from_box.id += '_from'; // change its ID
17
+ from_box.className = 'filtered';
18
+ from_box.setAttribute('aria-labelledby', field_id + '_from_title');
19
+
20
+ for (const p of from_box.parentNode.getElementsByTagName('p')) {
21
+ if (p.classList.contains("info")) {
22
+ // Remove <p class="info">, because it just gets in the way.
23
+ from_box.parentNode.removeChild(p);
24
+ } else if (p.classList.contains("help")) {
25
+ // Move help text up to the top so it isn't below the select
26
+ // boxes or wrapped off on the side to the right of the add
27
+ // button:
28
+ from_box.parentNode.insertBefore(p, from_box.parentNode.firstChild);
29
+ }
30
+ }
31
+
32
+ // <div class="selector"> or <div class="selector stacked">
33
+ const selector_div = quickElement('div', from_box.parentNode);
34
+ // Make sure the selector div is at the beginning so that the
35
+ // add link would be displayed to the right of the widget.
36
+ from_box.parentNode.prepend(selector_div);
37
+ selector_div.className = is_stacked ? 'selector stacked' : 'selector';
38
+
39
+ // <div class="selector-available">
40
+ const selector_available = quickElement('div', selector_div);
41
+ selector_available.className = 'selector-available';
42
+ const selector_available_title = quickElement('div', selector_available);
43
+ selector_available_title.id = field_id + '_from_title';
44
+ selector_available_title.className = 'selector-available-title';
45
+ quickElement('label', selector_available_title, interpolate(gettext('Available %s') + ' ', [field_name]), 'for', field_id + '_from');
46
+ quickElement(
47
+ 'p',
48
+ selector_available_title,
49
+ interpolate(gettext('Choose %s by selecting them and then select the "Choose" arrow button.'), [field_name]),
50
+ 'class', 'helptext'
51
+ );
52
+
53
+ const filter_p = quickElement('p', selector_available, '', 'id', field_id + '_filter');
54
+ filter_p.className = 'selector-filter';
55
+
56
+ const search_filter_label = quickElement('label', filter_p, '', 'for', field_id + '_input');
57
+
58
+ quickElement(
59
+ 'span', search_filter_label, '',
60
+ 'class', 'help-tooltip search-label-icon',
61
+ 'aria-label', interpolate(gettext("Type into this box to filter down the list of available %s."), [field_name])
62
+ );
63
+
64
+ filter_p.appendChild(document.createTextNode(' '));
65
+
66
+ const filter_input = quickElement('input', filter_p, '', 'type', 'text', 'placeholder', gettext("Filter"));
67
+ filter_input.id = field_id + '_input';
68
+
69
+ selector_available.appendChild(from_box);
70
+ const choose_all = quickElement(
71
+ 'button',
72
+ selector_available,
73
+ interpolate(gettext('Choose all %s'), [field_name]),
74
+ 'id', field_id + '_add_all',
75
+ 'class', 'selector-chooseall',
76
+ 'type', 'button'
77
+ );
78
+
79
+ // <ul class="selector-chooser">
80
+ const selector_chooser = quickElement('ul', selector_div);
81
+ selector_chooser.className = 'selector-chooser';
82
+ const add_button = quickElement(
83
+ 'button',
84
+ quickElement('li', selector_chooser),
85
+ interpolate(gettext('Choose selected %s'), [field_name]),
86
+ 'id', field_id + '_add',
87
+ 'class', 'selector-add',
88
+ 'type', 'button'
89
+ );
90
+ const remove_button = quickElement(
91
+ 'button',
92
+ quickElement('li', selector_chooser),
93
+ interpolate(gettext('Remove selected %s'), [field_name]),
94
+ 'id', field_id + '_remove',
95
+ 'class', 'selector-remove',
96
+ 'type', 'button'
97
+ );
98
+
99
+ // <div class="selector-chosen">
100
+ const selector_chosen = quickElement('div', selector_div, '', 'id', field_id + '_selector_chosen');
101
+ selector_chosen.className = 'selector-chosen';
102
+ const selector_chosen_title = quickElement('div', selector_chosen);
103
+ selector_chosen_title.className = 'selector-chosen-title';
104
+ selector_chosen_title.id = field_id + '_to_title';
105
+ quickElement('label', selector_chosen_title, interpolate(gettext('Chosen %s') + ' ', [field_name]), 'for', field_id + '_to');
106
+ quickElement(
107
+ 'p',
108
+ selector_chosen_title,
109
+ interpolate(gettext('Remove %s by selecting them and then select the "Remove" arrow button.'), [field_name]),
110
+ 'class', 'helptext'
111
+ );
112
+
113
+ const filter_selected_p = quickElement('p', selector_chosen, '', 'id', field_id + '_filter_selected');
114
+ filter_selected_p.className = 'selector-filter';
115
+
116
+ const search_filter_selected_label = quickElement('label', filter_selected_p, '', 'for', field_id + '_selected_input');
117
+
118
+ quickElement(
119
+ 'span', search_filter_selected_label, '',
120
+ 'class', 'help-tooltip search-label-icon',
121
+ 'aria-label', interpolate(gettext("Type into this box to filter down the list of selected %s."), [field_name])
122
+ );
123
+
124
+ filter_selected_p.appendChild(document.createTextNode(' '));
125
+
126
+ const filter_selected_input = quickElement('input', filter_selected_p, '', 'type', 'text', 'placeholder', gettext("Filter"));
127
+ filter_selected_input.id = field_id + '_selected_input';
128
+
129
+ quickElement(
130
+ 'select',
131
+ selector_chosen,
132
+ '',
133
+ 'id', field_id + '_to',
134
+ 'multiple', '',
135
+ 'size', from_box.size,
136
+ 'name', from_box.name,
137
+ 'aria-labelledby', field_id + '_to_title',
138
+ 'class', 'filtered'
139
+ );
140
+ const warning_footer = quickElement('div', selector_chosen, '', 'class', 'list-footer-display');
141
+ quickElement('span', warning_footer, '', 'id', field_id + '_list-footer-display-text');
142
+ quickElement('span', warning_footer, ' ' + gettext('(click to clear)'), 'class', 'list-footer-display__clear');
143
+ const clear_all = quickElement(
144
+ 'button',
145
+ selector_chosen,
146
+ interpolate(gettext('Remove all %s'), [field_name]),
147
+ 'id', field_id + '_remove_all',
148
+ 'class', 'selector-clearall',
149
+ 'type', 'button'
150
+ );
151
+
152
+ from_box.name = from_box.name + '_old';
153
+
154
+ // Set up the JavaScript event handlers for the select box filter interface
155
+ const move_selection = function(e, elem, move_func, from, to) {
156
+ if (!elem.hasAttribute('disabled')) {
157
+ move_func(from, to);
158
+ SelectFilter.refresh_icons(field_id);
159
+ SelectFilter.refresh_filtered_selects(field_id);
160
+ SelectFilter.refresh_filtered_warning(field_id);
161
+ }
162
+ e.preventDefault();
163
+ };
164
+ choose_all.addEventListener('click', function(e) {
165
+ move_selection(e, this, SelectBox.move_all, field_id + '_from', field_id + '_to');
166
+ });
167
+ add_button.addEventListener('click', function(e) {
168
+ move_selection(e, this, SelectBox.move, field_id + '_from', field_id + '_to');
169
+ });
170
+ remove_button.addEventListener('click', function(e) {
171
+ move_selection(e, this, SelectBox.move, field_id + '_to', field_id + '_from');
172
+ });
173
+ clear_all.addEventListener('click', function(e) {
174
+ move_selection(e, this, SelectBox.move_all, field_id + '_to', field_id + '_from');
175
+ });
176
+ warning_footer.addEventListener('click', function(e) {
177
+ filter_selected_input.value = '';
178
+ SelectBox.filter(field_id + '_to', '');
179
+ SelectFilter.refresh_filtered_warning(field_id);
180
+ SelectFilter.refresh_icons(field_id);
181
+ });
182
+ filter_input.addEventListener('keypress', function(e) {
183
+ SelectFilter.filter_key_press(e, field_id, '_from', '_to');
184
+ });
185
+ filter_input.addEventListener('keyup', function(e) {
186
+ SelectFilter.filter_key_up(e, field_id, '_from');
187
+ });
188
+ filter_input.addEventListener('keydown', function(e) {
189
+ SelectFilter.filter_key_down(e, field_id, '_from', '_to');
190
+ });
191
+ filter_selected_input.addEventListener('keypress', function(e) {
192
+ SelectFilter.filter_key_press(e, field_id, '_to', '_from');
193
+ });
194
+ filter_selected_input.addEventListener('keyup', function(e) {
195
+ SelectFilter.filter_key_up(e, field_id, '_to', '_selected_input');
196
+ });
197
+ filter_selected_input.addEventListener('keydown', function(e) {
198
+ SelectFilter.filter_key_down(e, field_id, '_to', '_from');
199
+ });
200
+ selector_div.addEventListener('change', function(e) {
201
+ if (e.target.tagName === 'SELECT') {
202
+ SelectFilter.refresh_icons(field_id);
203
+ }
204
+ });
205
+ selector_div.addEventListener('dblclick', function(e) {
206
+ if (e.target.tagName === 'OPTION') {
207
+ if (e.target.closest('select').id === field_id + '_to') {
208
+ SelectBox.move(field_id + '_to', field_id + '_from');
209
+ } else {
210
+ SelectBox.move(field_id + '_from', field_id + '_to');
211
+ }
212
+ SelectFilter.refresh_icons(field_id);
213
+ }
214
+ });
215
+ from_box.closest('form').addEventListener('submit', function() {
216
+ SelectBox.filter(field_id + '_to', '');
217
+ SelectBox.select_all(field_id + '_to');
218
+ });
219
+ SelectBox.init(field_id + '_from');
220
+ SelectBox.init(field_id + '_to');
221
+ // Move selected from_box options to to_box
222
+ SelectBox.move(field_id + '_from', field_id + '_to');
223
+
224
+ // Initial icon refresh
225
+ SelectFilter.refresh_icons(field_id);
226
+ },
227
+ any_selected: function(field) {
228
+ // Temporarily add the required attribute and check validity.
229
+ field.required = true;
230
+ const any_selected = field.checkValidity();
231
+ field.required = false;
232
+ return any_selected;
233
+ },
234
+ refresh_filtered_warning: function(field_id) {
235
+ const count = SelectBox.get_hidden_node_count(field_id + '_to');
236
+ const selector = document.getElementById(field_id + '_selector_chosen');
237
+ const warning = document.getElementById(field_id + '_list-footer-display-text');
238
+ selector.className = selector.className.replace('selector-chosen--with-filtered', '');
239
+ warning.textContent = interpolate(ngettext(
240
+ '%s selected option not visible',
241
+ '%s selected options not visible',
242
+ count
243
+ ), [count]);
244
+ if(count > 0) {
245
+ selector.className += ' selector-chosen--with-filtered';
246
+ }
247
+ },
248
+ refresh_filtered_selects: function(field_id) {
249
+ SelectBox.filter(field_id + '_from', document.getElementById(field_id + "_input").value);
250
+ SelectBox.filter(field_id + '_to', document.getElementById(field_id + "_selected_input").value);
251
+ },
252
+ refresh_icons: function(field_id) {
253
+ const from = document.getElementById(field_id + '_from');
254
+ const to = document.getElementById(field_id + '_to');
255
+ // Disabled if no items are selected.
256
+ document.getElementById(field_id + '_add').disabled = !SelectFilter.any_selected(from);
257
+ document.getElementById(field_id + '_remove').disabled = !SelectFilter.any_selected(to);
258
+ // Disabled if the corresponding box is empty.
259
+ document.getElementById(field_id + '_add_all').disabled = !from.querySelector('option');
260
+ document.getElementById(field_id + '_remove_all').disabled = !to.querySelector('option');
261
+ },
262
+ filter_key_press: function(event, field_id, source, target) {
263
+ const source_box = document.getElementById(field_id + source);
264
+ // don't submit form if user pressed Enter
265
+ if ((event.which && event.which === 13) || (event.keyCode && event.keyCode === 13)) {
266
+ source_box.selectedIndex = 0;
267
+ SelectBox.move(field_id + source, field_id + target);
268
+ source_box.selectedIndex = 0;
269
+ event.preventDefault();
270
+ }
271
+ },
272
+ filter_key_up: function(event, field_id, source, filter_input) {
273
+ const input = filter_input || '_input';
274
+ const source_box = document.getElementById(field_id + source);
275
+ const temp = source_box.selectedIndex;
276
+ SelectBox.filter(field_id + source, document.getElementById(field_id + input).value);
277
+ source_box.selectedIndex = temp;
278
+ SelectFilter.refresh_filtered_warning(field_id);
279
+ SelectFilter.refresh_icons(field_id);
280
+ },
281
+ filter_key_down: function(event, field_id, source, target) {
282
+ const source_box = document.getElementById(field_id + source);
283
+ // right key (39) or left key (37)
284
+ const direction = source === '_from' ? 39 : 37;
285
+ // right arrow -- move across
286
+ if ((event.which && event.which === direction) || (event.keyCode && event.keyCode === direction)) {
287
+ const old_index = source_box.selectedIndex;
288
+ SelectBox.move(field_id + source, field_id + target);
289
+ SelectFilter.refresh_filtered_selects(field_id);
290
+ SelectFilter.refresh_filtered_warning(field_id);
291
+ source_box.selectedIndex = (old_index === source_box.length) ? source_box.length - 1 : old_index;
292
+ return;
293
+ }
294
+ // down arrow -- wrap around
295
+ if ((event.which && event.which === 40) || (event.keyCode && event.keyCode === 40)) {
296
+ source_box.selectedIndex = (source_box.length === source_box.selectedIndex + 1) ? 0 : source_box.selectedIndex + 1;
297
+ }
298
+ // up arrow -- wrap around
299
+ if ((event.which && event.which === 38) || (event.keyCode && event.keyCode === 38)) {
300
+ source_box.selectedIndex = (source_box.selectedIndex === 0) ? source_box.length - 1 : source_box.selectedIndex - 1;
301
+ }
302
+ }
303
+ };
304
+
305
+ window.addEventListener('load', function(e) {
306
+ document.querySelectorAll('select.selectfilter, select.selectfilterstacked').forEach(function(el) {
307
+ const data = el.dataset;
308
+ SelectFilter.init(el.id, data.fieldName, parseInt(data.isStacked, 10));
309
+ });
310
+ });
311
+ }
backend/staticfiles/admin/js/actions.js ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global gettext, interpolate, ngettext, Actions*/
2
+ 'use strict';
3
+ {
4
+ function show(selector) {
5
+ document.querySelectorAll(selector).forEach(function(el) {
6
+ el.classList.remove('hidden');
7
+ });
8
+ }
9
+
10
+ function hide(selector) {
11
+ document.querySelectorAll(selector).forEach(function(el) {
12
+ el.classList.add('hidden');
13
+ });
14
+ }
15
+
16
+ function showQuestion(options) {
17
+ hide(options.acrossClears);
18
+ show(options.acrossQuestions);
19
+ hide(options.allContainer);
20
+ }
21
+
22
+ function showClear(options) {
23
+ show(options.acrossClears);
24
+ hide(options.acrossQuestions);
25
+ document.querySelector(options.actionContainer).classList.remove(options.selectedClass);
26
+ show(options.allContainer);
27
+ hide(options.counterContainer);
28
+ }
29
+
30
+ function reset(options) {
31
+ hide(options.acrossClears);
32
+ hide(options.acrossQuestions);
33
+ hide(options.allContainer);
34
+ show(options.counterContainer);
35
+ }
36
+
37
+ function clearAcross(options) {
38
+ reset(options);
39
+ const acrossInputs = document.querySelectorAll(options.acrossInput);
40
+ acrossInputs.forEach(function(acrossInput) {
41
+ acrossInput.value = 0;
42
+ });
43
+ document.querySelector(options.actionContainer).classList.remove(options.selectedClass);
44
+ }
45
+
46
+ function checker(actionCheckboxes, options, checked) {
47
+ if (checked) {
48
+ showQuestion(options);
49
+ } else {
50
+ reset(options);
51
+ }
52
+ actionCheckboxes.forEach(function(el) {
53
+ el.checked = checked;
54
+ el.closest('tr').classList.toggle(options.selectedClass, checked);
55
+ });
56
+ }
57
+
58
+ function updateCounter(actionCheckboxes, options) {
59
+ const sel = Array.from(actionCheckboxes).filter(function(el) {
60
+ return el.checked;
61
+ }).length;
62
+ const counter = document.querySelector(options.counterContainer);
63
+ // data-actions-icnt is defined in the generated HTML
64
+ // and contains the total amount of objects in the queryset
65
+ const actions_icnt = Number(counter.dataset.actionsIcnt);
66
+ counter.textContent = interpolate(
67
+ ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), {
68
+ sel: sel,
69
+ cnt: actions_icnt
70
+ }, true);
71
+ const allToggle = document.getElementById(options.allToggleId);
72
+ allToggle.checked = sel === actionCheckboxes.length;
73
+ if (allToggle.checked) {
74
+ showQuestion(options);
75
+ } else {
76
+ clearAcross(options);
77
+ }
78
+ }
79
+
80
+ const defaults = {
81
+ actionContainer: "div.actions",
82
+ counterContainer: "span.action-counter",
83
+ allContainer: "div.actions span.all",
84
+ acrossInput: "div.actions input.select-across",
85
+ acrossQuestions: "div.actions span.question",
86
+ acrossClears: "div.actions span.clear",
87
+ allToggleId: "action-toggle",
88
+ selectedClass: "selected"
89
+ };
90
+
91
+ window.Actions = function(actionCheckboxes, options) {
92
+ options = Object.assign({}, defaults, options);
93
+ let list_editable_changed = false;
94
+ let lastChecked = null;
95
+ let shiftPressed = false;
96
+
97
+ document.addEventListener('keydown', (event) => {
98
+ shiftPressed = event.shiftKey;
99
+ });
100
+
101
+ document.addEventListener('keyup', (event) => {
102
+ shiftPressed = event.shiftKey;
103
+ });
104
+
105
+ document.getElementById(options.allToggleId).addEventListener('click', function(event) {
106
+ checker(actionCheckboxes, options, this.checked);
107
+ updateCounter(actionCheckboxes, options);
108
+ });
109
+
110
+ document.querySelectorAll(options.acrossQuestions + " a").forEach(function(el) {
111
+ el.addEventListener('click', function(event) {
112
+ event.preventDefault();
113
+ const acrossInputs = document.querySelectorAll(options.acrossInput);
114
+ acrossInputs.forEach(function(acrossInput) {
115
+ acrossInput.value = 1;
116
+ });
117
+ showClear(options);
118
+ });
119
+ });
120
+
121
+ document.querySelectorAll(options.acrossClears + " a").forEach(function(el) {
122
+ el.addEventListener('click', function(event) {
123
+ event.preventDefault();
124
+ document.getElementById(options.allToggleId).checked = false;
125
+ clearAcross(options);
126
+ checker(actionCheckboxes, options, false);
127
+ updateCounter(actionCheckboxes, options);
128
+ });
129
+ });
130
+
131
+ function affectedCheckboxes(target, withModifier) {
132
+ const multiSelect = (lastChecked && withModifier && lastChecked !== target);
133
+ if (!multiSelect) {
134
+ return [target];
135
+ }
136
+ const checkboxes = Array.from(actionCheckboxes);
137
+ const targetIndex = checkboxes.findIndex(el => el === target);
138
+ const lastCheckedIndex = checkboxes.findIndex(el => el === lastChecked);
139
+ const startIndex = Math.min(targetIndex, lastCheckedIndex);
140
+ const endIndex = Math.max(targetIndex, lastCheckedIndex);
141
+ const filtered = checkboxes.filter((el, index) => (startIndex <= index) && (index <= endIndex));
142
+ return filtered;
143
+ };
144
+
145
+ Array.from(document.getElementById('result_list').tBodies).forEach(function(el) {
146
+ el.addEventListener('change', function(event) {
147
+ const target = event.target;
148
+ if (target.classList.contains('action-select')) {
149
+ const checkboxes = affectedCheckboxes(target, shiftPressed);
150
+ checker(checkboxes, options, target.checked);
151
+ updateCounter(actionCheckboxes, options);
152
+ lastChecked = target;
153
+ } else {
154
+ list_editable_changed = true;
155
+ }
156
+ });
157
+ });
158
+
159
+ document.querySelector('#changelist-form button[name=index]').addEventListener('click', function(event) {
160
+ if (list_editable_changed) {
161
+ const confirmed = confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."));
162
+ if (!confirmed) {
163
+ event.preventDefault();
164
+ }
165
+ }
166
+ });
167
+
168
+ const el = document.querySelector('#changelist-form input[name=_save]');
169
+ // The button does not exist if no fields are editable.
170
+ if (el) {
171
+ el.addEventListener('click', function(event) {
172
+ if (document.querySelector('[name=action]').value) {
173
+ const text = list_editable_changed
174
+ ? gettext("You have selected an action, but you haven’t saved your changes to individual fields yet. Please click OK to save. You’ll need to re-run the action.")
175
+ : gettext("You have selected an action, and you haven’t made any changes on individual fields. You’re probably looking for the Go button rather than the Save button.");
176
+ if (!confirm(text)) {
177
+ event.preventDefault();
178
+ }
179
+ }
180
+ });
181
+ }
182
+ // Sync counter when navigating to the page, such as through the back
183
+ // button.
184
+ window.addEventListener('pageshow', (event) => updateCounter(actionCheckboxes, options));
185
+ };
186
+
187
+ // Call function fn when the DOM is loaded and ready. If it is already
188
+ // loaded, call the function now.
189
+ // http://youmightnotneedjquery.com/#ready
190
+ function ready(fn) {
191
+ if (document.readyState !== 'loading') {
192
+ fn();
193
+ } else {
194
+ document.addEventListener('DOMContentLoaded', fn);
195
+ }
196
+ }
197
+
198
+ ready(function() {
199
+ const actionsEls = document.querySelectorAll('tr input.action-select');
200
+ if (actionsEls.length > 0) {
201
+ Actions(actionsEls);
202
+ }
203
+ });
204
+ }
backend/staticfiles/admin/js/admin/DateTimeShortcuts.js ADDED
@@ -0,0 +1,408 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global Calendar, findPosX, findPosY, get_format, gettext, gettext_noop, interpolate, ngettext, quickElement*/
2
+ // Inserts shortcut buttons after all of the following:
3
+ // <input type="text" class="vDateField">
4
+ // <input type="text" class="vTimeField">
5
+ 'use strict';
6
+ {
7
+ const DateTimeShortcuts = {
8
+ calendars: [],
9
+ calendarInputs: [],
10
+ clockInputs: [],
11
+ clockHours: {
12
+ default_: [
13
+ [gettext_noop('Now'), -1],
14
+ [gettext_noop('Midnight'), 0],
15
+ [gettext_noop('6 a.m.'), 6],
16
+ [gettext_noop('Noon'), 12],
17
+ [gettext_noop('6 p.m.'), 18]
18
+ ]
19
+ },
20
+ dismissClockFunc: [],
21
+ dismissCalendarFunc: [],
22
+ calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled
23
+ calendarDivName2: 'calendarin', // name of <div> that contains calendar
24
+ calendarLinkName: 'calendarlink', // name of the link that is used to toggle
25
+ clockDivName: 'clockbox', // name of clock <div> that gets toggled
26
+ clockLinkName: 'clocklink', // name of the link that is used to toggle
27
+ shortCutsClass: 'datetimeshortcuts', // class of the clock and cal shortcuts
28
+ timezoneWarningClass: 'timezonewarning', // class of the warning for timezone mismatch
29
+ timezoneOffset: 0,
30
+ init: function() {
31
+ const serverOffset = document.body.dataset.adminUtcOffset;
32
+ if (serverOffset) {
33
+ const localOffset = new Date().getTimezoneOffset() * -60;
34
+ DateTimeShortcuts.timezoneOffset = localOffset - serverOffset;
35
+ }
36
+
37
+ for (const inp of document.getElementsByTagName('input')) {
38
+ if (inp.type === 'text' && inp.classList.contains('vTimeField')) {
39
+ DateTimeShortcuts.addClock(inp);
40
+ DateTimeShortcuts.addTimezoneWarning(inp);
41
+ }
42
+ else if (inp.type === 'text' && inp.classList.contains('vDateField')) {
43
+ DateTimeShortcuts.addCalendar(inp);
44
+ DateTimeShortcuts.addTimezoneWarning(inp);
45
+ }
46
+ }
47
+ },
48
+ // Return the current time while accounting for the server timezone.
49
+ now: function() {
50
+ const serverOffset = document.body.dataset.adminUtcOffset;
51
+ if (serverOffset) {
52
+ const localNow = new Date();
53
+ const localOffset = localNow.getTimezoneOffset() * -60;
54
+ localNow.setTime(localNow.getTime() + 1000 * (serverOffset - localOffset));
55
+ return localNow;
56
+ } else {
57
+ return new Date();
58
+ }
59
+ },
60
+ // Add a warning when the time zone in the browser and backend do not match.
61
+ addTimezoneWarning: function(inp) {
62
+ const warningClass = DateTimeShortcuts.timezoneWarningClass;
63
+ let timezoneOffset = DateTimeShortcuts.timezoneOffset / 3600;
64
+
65
+ // Only warn if there is a time zone mismatch.
66
+ if (!timezoneOffset) {
67
+ return;
68
+ }
69
+
70
+ // Check if warning is already there.
71
+ if (inp.parentNode.querySelectorAll('.' + warningClass).length) {
72
+ return;
73
+ }
74
+
75
+ let message;
76
+ if (timezoneOffset > 0) {
77
+ message = ngettext(
78
+ 'Note: You are %s hour ahead of server time.',
79
+ 'Note: You are %s hours ahead of server time.',
80
+ timezoneOffset
81
+ );
82
+ }
83
+ else {
84
+ timezoneOffset *= -1;
85
+ message = ngettext(
86
+ 'Note: You are %s hour behind server time.',
87
+ 'Note: You are %s hours behind server time.',
88
+ timezoneOffset
89
+ );
90
+ }
91
+ message = interpolate(message, [timezoneOffset]);
92
+
93
+ const warning = document.createElement('div');
94
+ warning.classList.add('help', warningClass);
95
+ warning.textContent = message;
96
+ inp.parentNode.appendChild(warning);
97
+ },
98
+ // Add clock widget to a given field
99
+ addClock: function(inp) {
100
+ const num = DateTimeShortcuts.clockInputs.length;
101
+ DateTimeShortcuts.clockInputs[num] = inp;
102
+ DateTimeShortcuts.dismissClockFunc[num] = function() { DateTimeShortcuts.dismissClock(num); return true; };
103
+
104
+ // Shortcut links (clock icon and "Now" link)
105
+ const shortcuts_span = document.createElement('span');
106
+ shortcuts_span.className = DateTimeShortcuts.shortCutsClass;
107
+ inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling);
108
+ const now_link = document.createElement('a');
109
+ now_link.href = "#";
110
+ now_link.textContent = gettext('Now');
111
+ now_link.addEventListener('click', function(e) {
112
+ e.preventDefault();
113
+ DateTimeShortcuts.handleClockQuicklink(num, -1);
114
+ });
115
+ const clock_link = document.createElement('a');
116
+ clock_link.href = '#';
117
+ clock_link.id = DateTimeShortcuts.clockLinkName + num;
118
+ clock_link.addEventListener('click', function(e) {
119
+ e.preventDefault();
120
+ // avoid triggering the document click handler to dismiss the clock
121
+ e.stopPropagation();
122
+ DateTimeShortcuts.openClock(num);
123
+ });
124
+
125
+ quickElement(
126
+ 'span', clock_link, '',
127
+ 'class', 'clock-icon',
128
+ 'title', gettext('Choose a Time')
129
+ );
130
+ shortcuts_span.appendChild(document.createTextNode('\u00A0'));
131
+ shortcuts_span.appendChild(now_link);
132
+ shortcuts_span.appendChild(document.createTextNode('\u00A0|\u00A0'));
133
+ shortcuts_span.appendChild(clock_link);
134
+
135
+ // Create clock link div
136
+ //
137
+ // Markup looks like:
138
+ // <div id="clockbox1" class="clockbox module">
139
+ // <h2>Choose a time</h2>
140
+ // <ul class="timelist">
141
+ // <li><a href="#">Now</a></li>
142
+ // <li><a href="#">Midnight</a></li>
143
+ // <li><a href="#">6 a.m.</a></li>
144
+ // <li><a href="#">Noon</a></li>
145
+ // <li><a href="#">6 p.m.</a></li>
146
+ // </ul>
147
+ // <p class="calendar-cancel"><a href="#">Cancel</a></p>
148
+ // </div>
149
+
150
+ const clock_box = document.createElement('div');
151
+ clock_box.style.display = 'none';
152
+ clock_box.style.position = 'absolute';
153
+ clock_box.className = 'clockbox module';
154
+ clock_box.id = DateTimeShortcuts.clockDivName + num;
155
+ document.body.appendChild(clock_box);
156
+ clock_box.addEventListener('click', function(e) { e.stopPropagation(); });
157
+
158
+ quickElement('h2', clock_box, gettext('Choose a time'));
159
+ const time_list = quickElement('ul', clock_box);
160
+ time_list.className = 'timelist';
161
+ // The list of choices can be overridden in JavaScript like this:
162
+ // DateTimeShortcuts.clockHours.name = [['3 a.m.', 3]];
163
+ // where name is the name attribute of the <input>.
164
+ const name = typeof DateTimeShortcuts.clockHours[inp.name] === 'undefined' ? 'default_' : inp.name;
165
+ DateTimeShortcuts.clockHours[name].forEach(function(element) {
166
+ const time_link = quickElement('a', quickElement('li', time_list), gettext(element[0]), 'href', '#');
167
+ time_link.addEventListener('click', function(e) {
168
+ e.preventDefault();
169
+ DateTimeShortcuts.handleClockQuicklink(num, element[1]);
170
+ });
171
+ });
172
+
173
+ const cancel_p = quickElement('p', clock_box);
174
+ cancel_p.className = 'calendar-cancel';
175
+ const cancel_link = quickElement('a', cancel_p, gettext('Cancel'), 'href', '#');
176
+ cancel_link.addEventListener('click', function(e) {
177
+ e.preventDefault();
178
+ DateTimeShortcuts.dismissClock(num);
179
+ });
180
+
181
+ document.addEventListener('keyup', function(event) {
182
+ if (event.which === 27) {
183
+ // ESC key closes popup
184
+ DateTimeShortcuts.dismissClock(num);
185
+ event.preventDefault();
186
+ }
187
+ });
188
+ },
189
+ openClock: function(num) {
190
+ const clock_box = document.getElementById(DateTimeShortcuts.clockDivName + num);
191
+ const clock_link = document.getElementById(DateTimeShortcuts.clockLinkName + num);
192
+
193
+ // Recalculate the clockbox position
194
+ // is it left-to-right or right-to-left layout ?
195
+ if (window.getComputedStyle(document.body).direction !== 'rtl') {
196
+ clock_box.style.left = findPosX(clock_link) + 17 + 'px';
197
+ }
198
+ else {
199
+ // since style's width is in em, it'd be tough to calculate
200
+ // px value of it. let's use an estimated px for now
201
+ clock_box.style.left = findPosX(clock_link) - 110 + 'px';
202
+ }
203
+ clock_box.style.top = Math.max(0, findPosY(clock_link) - 30) + 'px';
204
+
205
+ // Show the clock box
206
+ clock_box.style.display = 'block';
207
+ document.addEventListener('click', DateTimeShortcuts.dismissClockFunc[num]);
208
+ },
209
+ dismissClock: function(num) {
210
+ document.getElementById(DateTimeShortcuts.clockDivName + num).style.display = 'none';
211
+ document.removeEventListener('click', DateTimeShortcuts.dismissClockFunc[num]);
212
+ },
213
+ handleClockQuicklink: function(num, val) {
214
+ let d;
215
+ if (val === -1) {
216
+ d = DateTimeShortcuts.now();
217
+ }
218
+ else {
219
+ d = new Date(1970, 1, 1, val, 0, 0, 0);
220
+ }
221
+ DateTimeShortcuts.clockInputs[num].value = d.strftime(get_format('TIME_INPUT_FORMATS')[0]);
222
+ DateTimeShortcuts.clockInputs[num].focus();
223
+ DateTimeShortcuts.dismissClock(num);
224
+ },
225
+ // Add calendar widget to a given field.
226
+ addCalendar: function(inp) {
227
+ const num = DateTimeShortcuts.calendars.length;
228
+
229
+ DateTimeShortcuts.calendarInputs[num] = inp;
230
+ DateTimeShortcuts.dismissCalendarFunc[num] = function() { DateTimeShortcuts.dismissCalendar(num); return true; };
231
+
232
+ // Shortcut links (calendar icon and "Today" link)
233
+ const shortcuts_span = document.createElement('span');
234
+ shortcuts_span.className = DateTimeShortcuts.shortCutsClass;
235
+ inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling);
236
+ const today_link = document.createElement('a');
237
+ today_link.href = '#';
238
+ today_link.appendChild(document.createTextNode(gettext('Today')));
239
+ today_link.addEventListener('click', function(e) {
240
+ e.preventDefault();
241
+ DateTimeShortcuts.handleCalendarQuickLink(num, 0);
242
+ });
243
+ const cal_link = document.createElement('a');
244
+ cal_link.href = '#';
245
+ cal_link.id = DateTimeShortcuts.calendarLinkName + num;
246
+ cal_link.addEventListener('click', function(e) {
247
+ e.preventDefault();
248
+ // avoid triggering the document click handler to dismiss the calendar
249
+ e.stopPropagation();
250
+ DateTimeShortcuts.openCalendar(num);
251
+ });
252
+ quickElement(
253
+ 'span', cal_link, '',
254
+ 'class', 'date-icon',
255
+ 'title', gettext('Choose a Date')
256
+ );
257
+ shortcuts_span.appendChild(document.createTextNode('\u00A0'));
258
+ shortcuts_span.appendChild(today_link);
259
+ shortcuts_span.appendChild(document.createTextNode('\u00A0|\u00A0'));
260
+ shortcuts_span.appendChild(cal_link);
261
+
262
+ // Create calendarbox div.
263
+ //
264
+ // Markup looks like:
265
+ //
266
+ // <div id="calendarbox3" class="calendarbox module">
267
+ // <h2>
268
+ // <a href="#" class="link-previous">&lsaquo;</a>
269
+ // <a href="#" class="link-next">&rsaquo;</a> February 2003
270
+ // </h2>
271
+ // <div class="calendar" id="calendarin3">
272
+ // <!-- (cal) -->
273
+ // </div>
274
+ // <div class="calendar-shortcuts">
275
+ // <a href="#">Yesterday</a> | <a href="#">Today</a> | <a href="#">Tomorrow</a>
276
+ // </div>
277
+ // <p class="calendar-cancel"><a href="#">Cancel</a></p>
278
+ // </div>
279
+ const cal_box = document.createElement('div');
280
+ cal_box.style.display = 'none';
281
+ cal_box.style.position = 'absolute';
282
+ cal_box.className = 'calendarbox module';
283
+ cal_box.id = DateTimeShortcuts.calendarDivName1 + num;
284
+ document.body.appendChild(cal_box);
285
+ cal_box.addEventListener('click', function(e) { e.stopPropagation(); });
286
+
287
+ // next-prev links
288
+ const cal_nav = quickElement('div', cal_box);
289
+ const cal_nav_prev = quickElement('a', cal_nav, '<', 'href', '#');
290
+ cal_nav_prev.className = 'calendarnav-previous';
291
+ cal_nav_prev.addEventListener('click', function(e) {
292
+ e.preventDefault();
293
+ DateTimeShortcuts.drawPrev(num);
294
+ });
295
+
296
+ const cal_nav_next = quickElement('a', cal_nav, '>', 'href', '#');
297
+ cal_nav_next.className = 'calendarnav-next';
298
+ cal_nav_next.addEventListener('click', function(e) {
299
+ e.preventDefault();
300
+ DateTimeShortcuts.drawNext(num);
301
+ });
302
+
303
+ // main box
304
+ const cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num);
305
+ cal_main.className = 'calendar';
306
+ DateTimeShortcuts.calendars[num] = new Calendar(DateTimeShortcuts.calendarDivName2 + num, DateTimeShortcuts.handleCalendarCallback(num));
307
+ DateTimeShortcuts.calendars[num].drawCurrent();
308
+
309
+ // calendar shortcuts
310
+ const shortcuts = quickElement('div', cal_box);
311
+ shortcuts.className = 'calendar-shortcuts';
312
+ let day_link = quickElement('a', shortcuts, gettext('Yesterday'), 'href', '#');
313
+ day_link.addEventListener('click', function(e) {
314
+ e.preventDefault();
315
+ DateTimeShortcuts.handleCalendarQuickLink(num, -1);
316
+ });
317
+ shortcuts.appendChild(document.createTextNode('\u00A0|\u00A0'));
318
+ day_link = quickElement('a', shortcuts, gettext('Today'), 'href', '#');
319
+ day_link.addEventListener('click', function(e) {
320
+ e.preventDefault();
321
+ DateTimeShortcuts.handleCalendarQuickLink(num, 0);
322
+ });
323
+ shortcuts.appendChild(document.createTextNode('\u00A0|\u00A0'));
324
+ day_link = quickElement('a', shortcuts, gettext('Tomorrow'), 'href', '#');
325
+ day_link.addEventListener('click', function(e) {
326
+ e.preventDefault();
327
+ DateTimeShortcuts.handleCalendarQuickLink(num, +1);
328
+ });
329
+
330
+ // cancel bar
331
+ const cancel_p = quickElement('p', cal_box);
332
+ cancel_p.className = 'calendar-cancel';
333
+ const cancel_link = quickElement('a', cancel_p, gettext('Cancel'), 'href', '#');
334
+ cancel_link.addEventListener('click', function(e) {
335
+ e.preventDefault();
336
+ DateTimeShortcuts.dismissCalendar(num);
337
+ });
338
+ document.addEventListener('keyup', function(event) {
339
+ if (event.which === 27) {
340
+ // ESC key closes popup
341
+ DateTimeShortcuts.dismissCalendar(num);
342
+ event.preventDefault();
343
+ }
344
+ });
345
+ },
346
+ openCalendar: function(num) {
347
+ const cal_box = document.getElementById(DateTimeShortcuts.calendarDivName1 + num);
348
+ const cal_link = document.getElementById(DateTimeShortcuts.calendarLinkName + num);
349
+ const inp = DateTimeShortcuts.calendarInputs[num];
350
+
351
+ // Determine if the current value in the input has a valid date.
352
+ // If so, draw the calendar with that date's year and month.
353
+ if (inp.value) {
354
+ const format = get_format('DATE_INPUT_FORMATS')[0];
355
+ const selected = inp.value.strptime(format);
356
+ const year = selected.getUTCFullYear();
357
+ const month = selected.getUTCMonth() + 1;
358
+ const re = /\d{4}/;
359
+ if (re.test(year.toString()) && month >= 1 && month <= 12) {
360
+ DateTimeShortcuts.calendars[num].drawDate(month, year, selected);
361
+ }
362
+ }
363
+
364
+ // Recalculate the clockbox position
365
+ // is it left-to-right or right-to-left layout ?
366
+ if (window.getComputedStyle(document.body).direction !== 'rtl') {
367
+ cal_box.style.left = findPosX(cal_link) + 17 + 'px';
368
+ }
369
+ else {
370
+ // since style's width is in em, it'd be tough to calculate
371
+ // px value of it. let's use an estimated px for now
372
+ cal_box.style.left = findPosX(cal_link) - 180 + 'px';
373
+ }
374
+ cal_box.style.top = Math.max(0, findPosY(cal_link) - 75) + 'px';
375
+
376
+ cal_box.style.display = 'block';
377
+ document.addEventListener('click', DateTimeShortcuts.dismissCalendarFunc[num]);
378
+ },
379
+ dismissCalendar: function(num) {
380
+ document.getElementById(DateTimeShortcuts.calendarDivName1 + num).style.display = 'none';
381
+ document.removeEventListener('click', DateTimeShortcuts.dismissCalendarFunc[num]);
382
+ },
383
+ drawPrev: function(num) {
384
+ DateTimeShortcuts.calendars[num].drawPreviousMonth();
385
+ },
386
+ drawNext: function(num) {
387
+ DateTimeShortcuts.calendars[num].drawNextMonth();
388
+ },
389
+ handleCalendarCallback: function(num) {
390
+ const format = get_format('DATE_INPUT_FORMATS')[0];
391
+ return function(y, m, d) {
392
+ DateTimeShortcuts.calendarInputs[num].value = new Date(y, m - 1, d).strftime(format);
393
+ DateTimeShortcuts.calendarInputs[num].focus();
394
+ document.getElementById(DateTimeShortcuts.calendarDivName1 + num).style.display = 'none';
395
+ };
396
+ },
397
+ handleCalendarQuickLink: function(num, offset) {
398
+ const d = DateTimeShortcuts.now();
399
+ d.setDate(d.getDate() + offset);
400
+ DateTimeShortcuts.calendarInputs[num].value = d.strftime(get_format('DATE_INPUT_FORMATS')[0]);
401
+ DateTimeShortcuts.calendarInputs[num].focus();
402
+ DateTimeShortcuts.dismissCalendar(num);
403
+ }
404
+ };
405
+
406
+ window.addEventListener('load', DateTimeShortcuts.init);
407
+ window.DateTimeShortcuts = DateTimeShortcuts;
408
+ }
backend/staticfiles/admin/js/admin/RelatedObjectLookups.js ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global SelectBox, interpolate*/
2
+ // Handles related-objects functionality: lookup link for raw_id_fields
3
+ // and Add Another links.
4
+ 'use strict';
5
+ {
6
+ const $ = django.jQuery;
7
+ let popupIndex = 0;
8
+ const relatedWindows = [];
9
+
10
+ function dismissChildPopups() {
11
+ relatedWindows.forEach(function(win) {
12
+ if(!win.closed) {
13
+ win.dismissChildPopups();
14
+ win.close();
15
+ }
16
+ });
17
+ }
18
+
19
+ function setPopupIndex() {
20
+ if(document.getElementsByName("_popup").length > 0) {
21
+ const index = window.name.lastIndexOf("__") + 2;
22
+ popupIndex = parseInt(window.name.substring(index));
23
+ } else {
24
+ popupIndex = 0;
25
+ }
26
+ }
27
+
28
+ function addPopupIndex(name) {
29
+ return name + "__" + (popupIndex + 1);
30
+ }
31
+
32
+ function removePopupIndex(name) {
33
+ return name.replace(new RegExp("__" + (popupIndex + 1) + "$"), '');
34
+ }
35
+
36
+ function showAdminPopup(triggeringLink, name_regexp, add_popup) {
37
+ const name = addPopupIndex(triggeringLink.id.replace(name_regexp, ''));
38
+ const href = new URL(triggeringLink.href);
39
+ if (add_popup) {
40
+ href.searchParams.set('_popup', 1);
41
+ }
42
+ const win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
43
+ relatedWindows.push(win);
44
+ win.focus();
45
+ return false;
46
+ }
47
+
48
+ function showRelatedObjectLookupPopup(triggeringLink) {
49
+ return showAdminPopup(triggeringLink, /^lookup_/, true);
50
+ }
51
+
52
+ function dismissRelatedLookupPopup(win, chosenId) {
53
+ const name = removePopupIndex(win.name);
54
+ const elem = document.getElementById(name);
55
+ if (elem.classList.contains('vManyToManyRawIdAdminField') && elem.value) {
56
+ elem.value += ',' + chosenId;
57
+ } else {
58
+ elem.value = chosenId;
59
+ }
60
+ $(elem).trigger('change');
61
+ const index = relatedWindows.indexOf(win);
62
+ if (index > -1) {
63
+ relatedWindows.splice(index, 1);
64
+ }
65
+ win.close();
66
+ }
67
+
68
+ function showRelatedObjectPopup(triggeringLink) {
69
+ return showAdminPopup(triggeringLink, /^(change|add|delete)_/, false);
70
+ }
71
+
72
+ function updateRelatedObjectLinks(triggeringLink) {
73
+ const $this = $(triggeringLink);
74
+ const siblings = $this.nextAll('.view-related, .change-related, .delete-related');
75
+ if (!siblings.length) {
76
+ return;
77
+ }
78
+ const value = $this.val();
79
+ if (value) {
80
+ siblings.each(function() {
81
+ const elm = $(this);
82
+ elm.attr('href', elm.attr('data-href-template').replace('__fk__', value));
83
+ elm.removeAttr('aria-disabled');
84
+ });
85
+ } else {
86
+ siblings.removeAttr('href');
87
+ siblings.attr('aria-disabled', true);
88
+ }
89
+ }
90
+
91
+ function updateRelatedSelectsOptions(currentSelect, win, objId, newRepr, newId, skipIds = []) {
92
+ // After create/edit a model from the options next to the current
93
+ // select (+ or :pencil:) update ForeignKey PK of the rest of selects
94
+ // in the page.
95
+
96
+ const path = win.location.pathname;
97
+ // Extract the model from the popup url '.../<model>/add/' or
98
+ // '.../<model>/<id>/change/' depending the action (add or change).
99
+ const modelName = path.split('/')[path.split('/').length - (objId ? 4 : 3)];
100
+ // Select elements with a specific model reference and context of "available-source".
101
+ const selectsRelated = document.querySelectorAll(`[data-model-ref="${modelName}"] [data-context="available-source"]`);
102
+
103
+ selectsRelated.forEach(function(select) {
104
+ if (currentSelect === select || skipIds && skipIds.includes(select.id)) {
105
+ return;
106
+ }
107
+
108
+ let option = select.querySelector(`option[value="${objId}"]`);
109
+
110
+ if (!option) {
111
+ option = new Option(newRepr, newId);
112
+ select.options.add(option);
113
+ // Update SelectBox cache for related fields.
114
+ if (window.SelectBox !== undefined && !SelectBox.cache[currentSelect.id]) {
115
+ SelectBox.add_to_cache(select.id, option);
116
+ SelectBox.redisplay(select.id);
117
+ }
118
+ return;
119
+ }
120
+
121
+ option.textContent = newRepr;
122
+ option.value = newId;
123
+ });
124
+ }
125
+
126
+ function dismissAddRelatedObjectPopup(win, newId, newRepr) {
127
+ const name = removePopupIndex(win.name);
128
+ const elem = document.getElementById(name);
129
+ if (elem) {
130
+ const elemName = elem.nodeName.toUpperCase();
131
+ if (elemName === 'SELECT') {
132
+ elem.options[elem.options.length] = new Option(newRepr, newId, true, true);
133
+ updateRelatedSelectsOptions(elem, win, null, newRepr, newId);
134
+ } else if (elemName === 'INPUT') {
135
+ if (elem.classList.contains('vManyToManyRawIdAdminField') && elem.value) {
136
+ elem.value += ',' + newId;
137
+ } else {
138
+ elem.value = newId;
139
+ }
140
+ }
141
+ // Trigger a change event to update related links if required.
142
+ $(elem).trigger('change');
143
+ } else {
144
+ const toId = name + "_to";
145
+ const toElem = document.getElementById(toId);
146
+ const o = new Option(newRepr, newId);
147
+ SelectBox.add_to_cache(toId, o);
148
+ SelectBox.redisplay(toId);
149
+ if (toElem && toElem.nodeName.toUpperCase() === 'SELECT') {
150
+ const skipIds = [name + "_from"];
151
+ updateRelatedSelectsOptions(toElem, win, null, newRepr, newId, skipIds);
152
+ }
153
+ }
154
+ const index = relatedWindows.indexOf(win);
155
+ if (index > -1) {
156
+ relatedWindows.splice(index, 1);
157
+ }
158
+ win.close();
159
+ }
160
+
161
+ function dismissChangeRelatedObjectPopup(win, objId, newRepr, newId) {
162
+ const id = removePopupIndex(win.name.replace(/^edit_/, ''));
163
+ const selectsSelector = interpolate('#%s, #%s_from, #%s_to', [id, id, id]);
164
+ const selects = $(selectsSelector);
165
+ selects.find('option').each(function() {
166
+ if (this.value === objId) {
167
+ this.textContent = newRepr;
168
+ this.value = newId;
169
+ }
170
+ }).trigger('change');
171
+ updateRelatedSelectsOptions(selects[0], win, objId, newRepr, newId);
172
+ selects.next().find('.select2-selection__rendered').each(function() {
173
+ // The element can have a clear button as a child.
174
+ // Use the lastChild to modify only the displayed value.
175
+ this.lastChild.textContent = newRepr;
176
+ this.title = newRepr;
177
+ });
178
+ const index = relatedWindows.indexOf(win);
179
+ if (index > -1) {
180
+ relatedWindows.splice(index, 1);
181
+ }
182
+ win.close();
183
+ }
184
+
185
+ function dismissDeleteRelatedObjectPopup(win, objId) {
186
+ const id = removePopupIndex(win.name.replace(/^delete_/, ''));
187
+ const selectsSelector = interpolate('#%s, #%s_from, #%s_to', [id, id, id]);
188
+ const selects = $(selectsSelector);
189
+ selects.find('option').each(function() {
190
+ if (this.value === objId) {
191
+ $(this).remove();
192
+ }
193
+ }).trigger('change');
194
+ const index = relatedWindows.indexOf(win);
195
+ if (index > -1) {
196
+ relatedWindows.splice(index, 1);
197
+ }
198
+ win.close();
199
+ }
200
+
201
+ window.showRelatedObjectLookupPopup = showRelatedObjectLookupPopup;
202
+ window.dismissRelatedLookupPopup = dismissRelatedLookupPopup;
203
+ window.showRelatedObjectPopup = showRelatedObjectPopup;
204
+ window.updateRelatedObjectLinks = updateRelatedObjectLinks;
205
+ window.dismissAddRelatedObjectPopup = dismissAddRelatedObjectPopup;
206
+ window.dismissChangeRelatedObjectPopup = dismissChangeRelatedObjectPopup;
207
+ window.dismissDeleteRelatedObjectPopup = dismissDeleteRelatedObjectPopup;
208
+ window.dismissChildPopups = dismissChildPopups;
209
+ window.relatedWindows = relatedWindows;
210
+
211
+ // Kept for backward compatibility
212
+ window.showAddAnotherPopup = showRelatedObjectPopup;
213
+ window.dismissAddAnotherPopup = dismissAddRelatedObjectPopup;
214
+
215
+ window.addEventListener('unload', function(evt) {
216
+ window.dismissChildPopups();
217
+ });
218
+
219
+ $(document).ready(function() {
220
+ setPopupIndex();
221
+ $("a[data-popup-opener]").on('click', function(event) {
222
+ event.preventDefault();
223
+ opener.dismissRelatedLookupPopup(window, $(this).data("popup-opener"));
224
+ });
225
+ $('body').on('click', '.related-widget-wrapper-link[data-popup="yes"]', function(e) {
226
+ e.preventDefault();
227
+ if (this.href) {
228
+ const event = $.Event('django:show-related', {href: this.href});
229
+ $(this).trigger(event);
230
+ if (!event.isDefaultPrevented()) {
231
+ showRelatedObjectPopup(this);
232
+ }
233
+ }
234
+ });
235
+ $('body').on('change', '.related-widget-wrapper select', function(e) {
236
+ const event = $.Event('django:update-related');
237
+ $(this).trigger(event);
238
+ if (!event.isDefaultPrevented()) {
239
+ updateRelatedObjectLinks(this);
240
+ }
241
+ });
242
+ $('.related-widget-wrapper select').trigger('change');
243
+ $('body').on('click', '.related-lookup', function(e) {
244
+ e.preventDefault();
245
+ const event = $.Event('django:lookup-related');
246
+ $(this).trigger(event);
247
+ if (!event.isDefaultPrevented()) {
248
+ showRelatedObjectLookupPopup(this);
249
+ }
250
+ });
251
+ });
252
+ }