Skip to content

Commit b614a6a

Browse files
committed
Always apply jQuery.noConflict to our jQuery instance
People can easily access feincms.jQuery (or django.jQuery for that matter).
1 parent 07ea964 commit b614a6a

File tree

4 files changed

+1
-27
lines changed

4 files changed

+1
-27
lines changed

docs/settings.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ which is passed to the template mentioned above. Please refer to the templates
4545
directly to see all available variables.
4646

4747

48-
Admin media settings
49-
====================
50-
51-
``FEINCMS_JQUERY_NO_CONFLICT``: Defaults to ``False``. Django admin's jQuery is
52-
not available as ``$`` or ``jQuery`` in the browser, but only as
53-
``django.jQuery``. FeinCMS' jQuery can be made available only as
54-
``feincms.jQuery`` by setting this variable to ``True``. Scripts should use
55-
``feincms.jQuery`` anyway.
56-
57-
5848
Settings for the tree editor
5949
============================
6050

feincms/admin/item_editor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ def get_extra_context(self, request):
139139
self.model, '_feincms_templates', ()),
140140
'has_parent_attribute': hasattr(self.model, 'parent'),
141141
'content_types': self.get_content_type_map(request),
142-
'FEINCMS_JQUERY_NO_CONFLICT': settings.FEINCMS_JQUERY_NO_CONFLICT,
143142
'FEINCMS_CONTENT_FIELDSET_NAME': FEINCMS_CONTENT_FIELDSET_NAME,
144143
}
145144

feincms/default_settings.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@
4545
}
4646
)
4747

48-
# ------------------------------------------------------------------------
49-
# Admin media settings
50-
51-
#: avoid jQuery conflicts -- scripts should use feincms.jQuery instead of $
52-
FEINCMS_JQUERY_NO_CONFLICT = getattr(
53-
settings,
54-
'FEINCMS_JQUERY_NO_CONFLICT',
55-
False)
56-
5748
# ------------------------------------------------------------------------
5849
# Settings for the page module
5950

feincms/templates/admin/feincms/load-jquery.include

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,5 @@ or load more plugins or whatnot
88
<script type="text/javascript" src="{% static 'feincms/jquery-ui-1.10.3.custom.min.js' %}"></script>
99

1010
<script type="text/javascript">
11-
var feincms = {
12-
{% if FEINCMS_JQUERY_NO_CONFLICT %}
13-
"jQuery": jQuery.noConflict(true)
14-
{% else %}
15-
"jQuery": jQuery
16-
{% endif %}
17-
};
11+
var feincms = {jQuery: jQuery.noConflict(true)};
1812
</script>

0 commit comments

Comments
 (0)