From 8a4d46e31b2ca21ea426a3cd834b29e885d54335 Mon Sep 17 00:00:00 2001 From: Brandon Navra Date: Wed, 18 Nov 2020 17:57:55 +1100 Subject: [PATCH] Rename feincms dom elements so they don't clash with Django 3.1 --- feincms/static/feincms/item_editor.css | 6 +++--- feincms/static/feincms/item_editor.js | 10 +++++----- feincms/templates/admin/feincms/content_editor.html | 4 ++-- feincms/templates/admin/feincms/item_editor.html | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/feincms/static/feincms/item_editor.css b/feincms/static/feincms/item_editor.css index 260e73d1a..d3464bc78 100644 --- a/feincms/static/feincms/item_editor.css +++ b/feincms/static/feincms/item_editor.css @@ -16,7 +16,7 @@ border-color: #79aec8; } -#main { +#main_feincms { clear:both; padding: 10px 10px 10px 10px; border: 1px solid #eee; @@ -90,7 +90,7 @@ select { max-width: 580px; } -#main_wrapper { +#main_feincms_wrapper { margin: 10px 0 30px 0; } @@ -245,7 +245,7 @@ div.order-machine div.inline-related > h3{ /* django suit hacks */ /*********************/ -#suit-center #main { +#suit-center #main_feincms { clear:none; } diff --git a/feincms/static/feincms/item_editor.js b/feincms/static/feincms/item_editor.js index 570898a1f..565503c96 100644 --- a/feincms/static/feincms/item_editor.js +++ b/feincms/static/feincms/item_editor.js @@ -52,7 +52,7 @@ if (!Array.prototype.indexOf) { SELECTS = {}; function save_content_type_selects() { - $('#main>.panel').each(function() { + $('#main_feincms>.panel').each(function() { SELECTS[this.id.replace(/_body$/, '')] = $("select[name=order-machine-add-select]", this).clone().removeAttr("name"); }); } @@ -259,7 +259,7 @@ if (!Array.prototype.indexOf) { } function init_content_type_buttons() { - $('#main > .panel').each(function() { + $('#main_feincms > .panel').each(function() { var $select = $('select[name=order-machine-add-select]', this), to_remove = []; @@ -358,7 +358,7 @@ if (!Array.prototype.indexOf) { $(document).ready(function($){ hide_form_rows_with_hidden_widgets(); - create_tabbed('#main_wrapper', '#main', function(tab_str){ + create_tabbed('#main_feincms_wrapper', '#main_feincms', function(tab_str){ ACTIVE_REGION = REGION_MAP.indexOf(tab_str); // make it possible to open current tab on page reload window.location.replace('#tab_'+tab_str); @@ -564,7 +564,7 @@ if (!Array.prototype.indexOf) { }); - var errors = $('#main div.errors'); + var errors = $('#main_feincms div.errors'); if(errors.length) { var id = errors.parents('fieldset[id$=_body], div[id$=_body]').attr('id'); @@ -579,7 +579,7 @@ if (!Array.prototype.indexOf) { } } - $('#main_wrapper>div.navi_tab:first-child').trigger('click'); + $('#main_feincms_wrapper>div.navi_tab:first-child').trigger('click'); } }); diff --git a/feincms/templates/admin/feincms/content_editor.html b/feincms/templates/admin/feincms/content_editor.html index 7a4ab607c..c27aa24c4 100644 --- a/feincms/templates/admin/feincms/content_editor.html +++ b/feincms/templates/admin/feincms/content_editor.html @@ -1,10 +1,10 @@ {% load i18n %} {% load feincms_admin_tags %} -
+
{% for region in original.template.regions %} {% endfor %} -
+
{% for region in original.template.regions %}
diff --git a/feincms/templates/admin/feincms/item_editor.html b/feincms/templates/admin/feincms/item_editor.html index a58856bf6..e0560ace7 100644 --- a/feincms/templates/admin/feincms/item_editor.html +++ b/feincms/templates/admin/feincms/item_editor.html @@ -51,7 +51,7 @@
{% endblock %}