Skip to content

Commit 5045963

Browse files
committed
fix(forms): add script to load jQuery globally
Adds jQuery to global vars (window.jQuery) if it was removed by Grappelli, since other packages expect it to be there. Related to modlinltd#49
1 parent fd88fef commit 5045963

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

advanced_filters/forms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ class Meta:
248248
class Media:
249249
required_js = [static('admin/js/%sjquery.min.js' %
250250
('vendor/jquery/' if USE_VENDOR_DIR else '')),
251+
static('advanced-filters/jquery_adder.js'),
251252
static('orig_inlines%s.js' %
252253
('' if settings.DEBUG else '.min')),
253254
static('magnific-popup/jquery.magnific-popup.js'),
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(function($) {
2+
if (!window.jQuery) window.jQuery = $;
3+
})(window._jq || jQuery || grp.jQuery);

0 commit comments

Comments
 (0)