Skip to content

Commit b61f0d6

Browse files
committed
wrap cms js with pre and post files to solve conflict
1 parent 05d278d commit b61f0d6

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

cms/templates/admin/cms/page/change_form.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212

1313
{% block extrahead %}
1414
{{ block.super }}
15+
<!-- load nonconflict pre and post files on line 17 and 21 to fix conflict if there is another jQuery loaded -->
16+
<!-- the code is included by a external file because the code has to be loaded into a python file where the wizard is loaded as well -->
17+
<script src="{% static "cms/js/modules/jquery.noconflict.pre.js" %}" type="text/javascript"></script>
1518
<script src="{% static "admin/js/urlify.js" %}" type="text/javascript"></script>
1619
<script src="{% static "cms/js/dist/bundle.admin.base.min.js" %}" type="text/javascript"></script>
1720
<script src="{% static "cms/js/dist/bundle.admin.changeform.min.js" %}" type="text/javascript"></script>
21+
<script src="{% static "cms/js/modules/jquery.noconflict.post.js" %}" type="text/javascript"></script>
1822
{% endblock %}
1923

2024
{% block content_title %}

cms/templates/admin/cms/page/tree/base.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@
2828
{% block extrahead %}
2929
{{ block.super }}
3030
{% block jquery %}{% endblock %}
31+
<!-- load nonconflict pre and post files on line 33 and 63 to fix conflict if there is another jQuery loaded -->
32+
<!-- the code is included by a external file because the code has to be loaded into a python file where the wizard is loaded as well -->
3133
<script src="{% static "cms/js/modules/jquery.noconflict.pre.js" %}" type="text/javascript"></script>
3234
<script src="{% static "cms/js/dist/bundle.admin.base.min.js" %}" type="text/javascript"></script>
3335

3436
<!-- load changelist and jstree -->
3537
<script src="{% static "cms/js/dist/bundle.admin.changelist.min.js" %}" type="text/javascript"></script>
38+
3639
<script>
3740
(function($) {
3841
// CMS.$ will be passed for $

0 commit comments

Comments
 (0)