Update auf Version 1.8.5
This commit is contained in:
1 parent
ce9b7db8c5
commit
3a39e4a5e6
6 files changed
+59
-27
No files matched your search
+52
-20
@@ -6,7 +6,7 @@ import sys
|
|||||||
THEME_REPO_URL = "https://git.falkenthal.me/falkenthal/pretix-falkenthal-theme"
|
THEME_REPO_URL = "https://git.falkenthal.me/falkenthal/pretix-falkenthal-theme"
|
||||||
PLATFORM_IMPRINT_URL = "https://tickets.falkenthal.me/impressum"
|
PLATFORM_IMPRINT_URL = "https://tickets.falkenthal.me/impressum"
|
||||||
PLATFORM_PRIVACY_URL = "https://tickets.falkenthal.me/datenschutz"
|
PLATFORM_PRIVACY_URL = "https://tickets.falkenthal.me/datenschutz"
|
||||||
ASSET_VERSION = "1.8.4"
|
ASSET_VERSION = "1.8.5"
|
||||||
|
|
||||||
control_files = [
|
control_files = [
|
||||||
'/pretix/src/pretix/control/templates/pretixcontrol/base.html',
|
'/pretix/src/pretix/control/templates/pretixcontrol/base.html',
|
||||||
@@ -138,8 +138,8 @@ for err_name in ['400.html', '403.html', '403_csrf.html', '404.html', '500.html'
|
|||||||
with open(err_path, 'w', encoding='utf-8') as f:
|
with open(err_path, 'w', encoding='utf-8') as f:
|
||||||
f.write(ec)
|
f.write(ec)
|
||||||
|
|
||||||
# 4. Eingebettetes Pretix-Widget (widget.js / v1.*.js):
|
# 4. Eingebettetes Pretix-Widget (/widget/v1.*.js & widget.py):
|
||||||
# Einheitliche Plattform-Pflichtangaben auch direkt unter dem Inline-Widget auf externen Veranstalter-Websites!
|
# Einheitliche Plattform-Pflichtangaben garantiert in jedem <pretix-widget> (auch auf Jimdo & bei leeren Events)!
|
||||||
widget_platform_bar_js = r"""
|
widget_platform_bar_js = r"""
|
||||||
;(function(){
|
;(function(){
|
||||||
if (typeof document === 'undefined' || window.__falkenthalWidgetPatched) return;
|
if (typeof document === 'undefined' || window.__falkenthalWidgetPatched) return;
|
||||||
@@ -149,17 +149,18 @@ widget_platform_bar_js = r"""
|
|||||||
' · <a href="https://tickets.falkenthal.me/datenschutz" target="_blank" rel="noopener" style="color:inherit;text-decoration:underline;">Plattform-Datenschutz</a>' +
|
' · <a href="https://tickets.falkenthal.me/datenschutz" target="_blank" rel="noopener" style="color:inherit;text-decoration:underline;">Plattform-Datenschutz</a>' +
|
||||||
' · <a href="https://git.falkenthal.me/falkenthal/pretix-falkenthal-theme" target="_blank" rel="noopener" style="color:inherit;text-decoration:underline;">Theme & Quellcode (AGPLv3)</a>';
|
' · <a href="https://git.falkenthal.me/falkenthal/pretix-falkenthal-theme" target="_blank" rel="noopener" style="color:inherit;text-decoration:underline;">Theme & Quellcode (AGPLv3)</a>';
|
||||||
function injectWidgetBar() {
|
function injectWidgetBar() {
|
||||||
var footers = document.querySelectorAll('.pretix-widget-attribution');
|
var containers = document.querySelectorAll('.pretix-widget-attribution, .pretix-widget');
|
||||||
for (var i = 0; i < footers.length; i++) {
|
for (var i = 0; i < containers.length; i++) {
|
||||||
var el = footers[i];
|
var el = containers[i];
|
||||||
if (!el.getAttribute('data-falkenthal-bar')) {
|
var widgetRoot = el.classList.contains('pretix-widget') ? el : el.closest('.pretix-widget');
|
||||||
el.setAttribute('data-falkenthal-bar', '1');
|
var checkTarget = widgetRoot || el;
|
||||||
var bar = document.createElement('div');
|
if (checkTarget.querySelector('.pretix-widget-falkenthal-bar')) continue;
|
||||||
bar.className = 'pretix-widget-falkenthal-bar';
|
var target = checkTarget.querySelector('.pretix-widget-attribution') || checkTarget;
|
||||||
bar.style.cssText = 'margin-top:6px;padding-top:6px;border-top:1px solid rgba(128,128,128,0.2);font-size:11px;line-height:1.5;text-align:center;opacity:0.85;';
|
var bar = document.createElement('div');
|
||||||
bar.innerHTML = BAR_HTML;
|
bar.className = 'pretix-widget-falkenthal-bar';
|
||||||
el.appendChild(bar);
|
bar.style.cssText = 'margin-top:8px;padding-top:8px;border-top:1px solid rgba(128,128,128,0.22);font-size:11px;line-height:1.5;text-align:center;opacity:0.85;clear:both;';
|
||||||
}
|
bar.innerHTML = BAR_HTML;
|
||||||
|
target.appendChild(bar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (document.readyState === 'loading') {
|
if (document.readyState === 'loading') {
|
||||||
@@ -175,21 +176,52 @@ widget_platform_bar_js = r"""
|
|||||||
if (document.body) startObs();
|
if (document.body) startObs();
|
||||||
else document.addEventListener('DOMContentLoaded', startObs);
|
else document.addEventListener('DOMContentLoaded', startObs);
|
||||||
}
|
}
|
||||||
setInterval(injectWidgetBar, 1500);
|
setInterval(injectWidgetBar, 1000);
|
||||||
})();
|
})();
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# 4a. Alle statischen Widget-JS-Dateien im gesamten Pretix-Baum finden (z.B. ui/widget.js, widget/*.js, static.dist)
|
||||||
widget_js_candidates = (
|
widget_js_candidates = (
|
||||||
glob.glob('/pretix/src/pretix/presale/static/pretixpresale/js/widget/*.js')
|
glob.glob('/pretix/src/pretix/presale/static/**/*widget*.js', recursive=True)
|
||||||
+ glob.glob('/pretix/src/pretix/static.dist/**/widget/*.js', recursive=True)
|
+ glob.glob('/pretix/src/pretix/static.dist/**/*widget*.js', recursive=True)
|
||||||
)
|
)
|
||||||
for wjs in widget_js_candidates:
|
patched_js_count = 0
|
||||||
if os.path.isfile(wjs):
|
for wjs in set(widget_js_candidates):
|
||||||
|
if os.path.isfile(wjs) and not wjs.endswith('.min.js.map'):
|
||||||
with open(wjs, 'r', encoding='utf-8') as f:
|
with open(wjs, 'r', encoding='utf-8') as f:
|
||||||
wc = f.read()
|
wc = f.read()
|
||||||
if '__falkenthalWidgetPatched' not in wc:
|
if '__falkenthalWidgetPatched' not in wc:
|
||||||
with open(wjs, 'a', encoding='utf-8') as f:
|
with open(wjs, 'a', encoding='utf-8') as f:
|
||||||
f.write('\n' + widget_platform_bar_js)
|
f.write('\n' + widget_platform_bar_js)
|
||||||
|
patched_js_count += 1
|
||||||
|
|
||||||
print(f"Pretix templates and widget assets patched and verified successfully (v{ASSET_VERSION}).")
|
# 4b. Zusätzlich direkt die Django-View /pretix/src/pretix/presale/views/widget.py patchen,
|
||||||
|
# da Pretix /widget/v1.de.js dynamisch über diese View generiert, im Dateisystem speichert und ausliefert!
|
||||||
|
widget_view_py = '/pretix/src/pretix/presale/views/widget.py'
|
||||||
|
if os.path.exists(widget_view_py):
|
||||||
|
with open(widget_view_py, 'r', encoding='utf-8') as f:
|
||||||
|
wpy = f.read()
|
||||||
|
if '__falkenthalWidgetPatched' not in wpy:
|
||||||
|
wpy_patch = (
|
||||||
|
f"\n\n# --- FALKENTHAL PLATFORM LEGAL BAR INJECTION ---\n"
|
||||||
|
f"_FALKENTHAL_WIDGET_JS = {repr(widget_platform_bar_js)}\n"
|
||||||
|
f"if 'generate_widget_js' in globals():\n"
|
||||||
|
f" _orig_generate_widget_js = generate_widget_js\n"
|
||||||
|
f" def generate_widget_js(lang):\n"
|
||||||
|
f" code = _orig_generate_widget_js(lang)\n"
|
||||||
|
f" if '__falkenthalWidgetPatched' not in code:\n"
|
||||||
|
f" code = code + '\\n' + _FALKENTHAL_WIDGET_JS\n"
|
||||||
|
f" return code\n"
|
||||||
|
f"if 'widget_js' in globals():\n"
|
||||||
|
f" _orig_widget_js = widget_js\n"
|
||||||
|
f" def widget_js(request, *args, **kwargs):\n"
|
||||||
|
f" resp = _orig_widget_js(request, *args, **kwargs)\n"
|
||||||
|
f" if hasattr(resp, 'content') and b'__falkenthalWidgetPatched' not in resp.content:\n"
|
||||||
|
f" resp.content = resp.content + _FALKENTHAL_WIDGET_JS.encode('utf-8')\n"
|
||||||
|
f" return resp\n"
|
||||||
|
)
|
||||||
|
with open(widget_view_py, 'a', encoding='utf-8') as f:
|
||||||
|
f.write(wpy_patch)
|
||||||
|
|
||||||
|
print(f"Pretix templates and widget assets ({patched_js_count} JS files + widget.py) patched and verified successfully (v{ASSET_VERSION}).")
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ class WhiteLabelApp(AppConfig):
|
|||||||
"Custom Slate & Blue-Violet theme plugin for pretix control and presale UI."
|
"Custom Slate & Blue-Violet theme plugin for pretix control and presale UI."
|
||||||
)
|
)
|
||||||
visible = False
|
visible = False
|
||||||
version = "1.8.4"
|
version = "1.8.5"
|
||||||
category = "CUSTOMIZATION"
|
category = "CUSTOMIZATION"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Pretix signal receivers for pretix-falkenthal-theme (v1.8.4).
|
Pretix signal receivers for pretix-falkenthal-theme (v1.8.5).
|
||||||
|
|
||||||
Hinweis zur Architektur:
|
Hinweis zur Architektur:
|
||||||
Die Plattform-Pflichtangaben (Plattform-Impressum, Plattform-Datenschutz sowie
|
Die Plattform-Pflichtangaben (Plattform-Impressum, Plattform-Datenschutz sowie
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ==========================================================================
|
/* ==========================================================================
|
||||||
FALKENTHAL ADMIN BACKEND & LOGIN THEME (control.css - v1.8.4)
|
FALKENTHAL ADMIN BACKEND & LOGIN THEME (control.css - v1.8.5)
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
@@ -63,7 +63,7 @@ nav.navbar-inverse {
|
|||||||
a.navbar-brand {
|
a.navbar-brand {
|
||||||
font-size: 0 !important;
|
font-size: 0 !important;
|
||||||
color: transparent !important;
|
color: transparent !important;
|
||||||
background-image: url('/static/whitelabel/logo.svg?v=1.8.4') !important;
|
background-image: url('/static/whitelabel/logo.svg?v=1.8.5') !important;
|
||||||
background-repeat: no-repeat !important;
|
background-repeat: no-repeat !important;
|
||||||
background-position: 14px center !important;
|
background-position: 14px center !important;
|
||||||
background-size: auto 34px !important;
|
background-size: auto 34px !important;
|
||||||
@@ -868,7 +868,7 @@ body:not(:has(#wrapper)):has(img.logo) > .container [class*="col-"] {
|
|||||||
body.falkenthal-auth-body .container img.logo,
|
body.falkenthal-auth-body .container img.logo,
|
||||||
body:not(:has(#wrapper)):has(img.logo) .container img.logo,
|
body:not(:has(#wrapper)):has(img.logo) .container img.logo,
|
||||||
.form-signin img.logo {
|
.form-signin img.logo {
|
||||||
content: url('/static/whitelabel/login-logo.svg?v=1.8.4') !important;
|
content: url('/static/whitelabel/login-logo.svg?v=1.8.5') !important;
|
||||||
height: 115px !important;
|
height: 115px !important;
|
||||||
max-height: 115px !important;
|
max-height: 115px !important;
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* ==========================================================================
|
/* ==========================================================================
|
||||||
FALKENTHAL MODERN SHOP UI/UX UPGRADE (presale.css - v1.8.4)
|
FALKENTHAL MODERN SHOP UI/UX UPGRADE (presale.css - v1.8.5)
|
||||||
Farb-, Geometrie- & Kontrastneutral: Respektiert 100 % der Veranstalter-Farben,
|
Farb-, Geometrie- & Kontrastneutral: Respektiert 100 % der Veranstalter-Farben,
|
||||||
Logos, Bootstrap-Input-Groups sowie helle UND dunkle Veranstalter-Hintergründe!
|
Logos, Bootstrap-Input-Groups sowie helle UND dunkle Veranstalter-Hintergründe!
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ with open("README.md", encoding="utf-8") as f:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pretix-falkenthal-theme",
|
name="pretix-falkenthal-theme",
|
||||||
version="1.8.4",
|
version="1.8.5",
|
||||||
description="Modern Slate & Blue-Violet White-Label Theme Plugin for pretix",
|
description="Modern Slate & Blue-Violet White-Label Theme Plugin for pretix",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
|||||||
Reference in new issue
Block a user