forked from CGM_Public/pretix_original
Replace SCSS compilation with CSS variables (#4191)
* Replace SCSS compilation with CSS variables * Update tests * Update src/pretix/presale/style.py Co-authored-by: Mira <weller@rami.io> * Update src/pretix/presale/context.py Co-authored-by: Mira <weller@rami.io> * Update src/pretix/presale/views/widget.py Co-authored-by: Mira <weller@rami.io> * Update src/pretix/presale/context.py Co-authored-by: Mira <weller@rami.io> * Update src/pretix/static/pretixbase/scss/_variables.scss Co-authored-by: Richard Schreiber <schreiber@rami.io> * Last minor changes * Rename file --------- Co-authored-by: Mira <weller@rami.io> Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -789,8 +789,6 @@ class Event(EventMixin, LoggedModel):
|
||||
), tz)
|
||||
|
||||
def copy_data_from(self, other, skip_meta_data=False):
|
||||
from pretix.presale.style import regenerate_css
|
||||
|
||||
from ..signals import event_copy_data
|
||||
from . import (
|
||||
Discount, Item, ItemAddOn, ItemBundle, ItemCategory, ItemMetaValue,
|
||||
@@ -1011,10 +1009,10 @@ class Event(EventMixin, LoggedModel):
|
||||
s.product = item_map[s.product_id]
|
||||
s.save(force_insert=True)
|
||||
|
||||
has_custom_style = other.settings.presale_css_file or other.settings.presale_widget_css_file
|
||||
skip_settings = (
|
||||
'ticket_secrets_pretix_sig1_pubkey',
|
||||
'ticket_secrets_pretix_sig1_privkey',
|
||||
# no longer used, but we still don't need to copy them
|
||||
'presale_css_file',
|
||||
'presale_css_checksum',
|
||||
'presale_widget_css_file',
|
||||
@@ -1057,9 +1055,6 @@ class Event(EventMixin, LoggedModel):
|
||||
question_map=question_map, checkin_list_map=checkin_list_map, quota_map=quota_map,
|
||||
)
|
||||
|
||||
if has_custom_style:
|
||||
regenerate_css.apply_async(args=(self.pk,))
|
||||
|
||||
def get_payment_providers(self, cached=False) -> dict:
|
||||
"""
|
||||
Returns a dictionary of initialized payment providers mapped by their identifiers.
|
||||
@@ -1337,18 +1332,12 @@ class Event(EventMixin, LoggedModel):
|
||||
|
||||
def enable_plugin(self, module, allow_restricted=frozenset()):
|
||||
plugins_active = self.get_plugins()
|
||||
from pretix.presale.style import regenerate_css
|
||||
|
||||
if module not in plugins_active:
|
||||
plugins_active.append(module)
|
||||
self.set_active_plugins(plugins_active, allow_restricted=allow_restricted)
|
||||
|
||||
regenerate_css.apply_async(args=(self.pk,))
|
||||
|
||||
def disable_plugin(self, module):
|
||||
plugins_active = self.get_plugins()
|
||||
from pretix.presale.style import regenerate_css
|
||||
|
||||
if module in plugins_active:
|
||||
plugins_active.remove(module)
|
||||
self.set_active_plugins(plugins_active)
|
||||
@@ -1357,8 +1346,6 @@ class Event(EventMixin, LoggedModel):
|
||||
if module in plugins_available and hasattr(plugins_available[module].app, 'uninstalled'):
|
||||
getattr(plugins_available[module].app, 'uninstalled')(self)
|
||||
|
||||
regenerate_css.apply_async(args=(self.pk,))
|
||||
|
||||
@staticmethod
|
||||
def clean_has_subevents(event, has_subevents):
|
||||
if event is not None and event.has_subevents is not None:
|
||||
|
||||
@@ -2851,22 +2851,6 @@ Your {organizer} team""")) # noqa: W291
|
||||
**primary_font_kwargs()
|
||||
),
|
||||
},
|
||||
'presale_css_file': {
|
||||
'default': None,
|
||||
'type': str
|
||||
},
|
||||
'presale_css_checksum': {
|
||||
'default': None,
|
||||
'type': str
|
||||
},
|
||||
'presale_widget_css_file': {
|
||||
'default': None,
|
||||
'type': str
|
||||
},
|
||||
'presale_widget_css_checksum': {
|
||||
'default': None,
|
||||
'type': str
|
||||
},
|
||||
'logo_image': {
|
||||
'default': None,
|
||||
'type': File,
|
||||
@@ -3396,10 +3380,6 @@ Your {organizer} team""")) # noqa: W291
|
||||
'type': str,
|
||||
}
|
||||
}
|
||||
SETTINGS_AFFECTING_CSS = {
|
||||
'primary_color', 'theme_color_success', 'theme_color_danger', 'primary_font',
|
||||
'theme_color_background', 'theme_round_borders'
|
||||
}
|
||||
PERSON_NAME_TITLE_GROUPS = OrderedDict([
|
||||
('english_common', (_('Most common English titles'), (
|
||||
'Mr',
|
||||
|
||||
Reference in New Issue
Block a user