Repository: django-import-export/django-import-export

Issue:
Format field is always shown on Django 2.2
After upgrading to Django 2.2, the `Format` field is always shown in admins where I inherit from `ImportExportActionModelAdmin`, even thougt the export action is not selected. Here is a screenshot:
![Skærmbillede fra 2019-10-02 16-05-52](https://user-images.githubusercontent.com/724716/66051066-9904dd80-e52e-11e9-94e4-128178bb9aa3.png)



Discussion:
I get the following error in the JS console:
```
Uncaught TypeError: $ is not a function
    at action_formats.js:2
    at action_formats.js:22
```
after some debugging it seems that the issue is that `action_formats.js` is run before `jQuery.init.js`.
Inspecting the HTML reveals that the scripts are loaded in this order:
```html
<script type="text/javascript" src="/static/admin/js/vendor/jquery/jquery.js"></script>
<script type="text/javascript" src="/static/import_export/action_formats.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>
<script type="text/javascript" src="/static/admin/js/core.js"></script>
<script type="text/javascript" src="/static/admin/js/admin/RelatedObjectLookups.js"></script>
<script type="text/javascript" src="/static/admin/js/actions.js"></script>
<script type="text/javascript" src="/static/admin/js/urlify.js"></script>
<script type="text/javascript" src="/static/admin/js/prepopulate.js"></script>
<script type="text/javascript" src="/static/admin/js/vendor/xregexp/xregexp.js"></script>
```

I can fix this order by changing `import_export/admin.py` the following way:
```python
class ExportActionMixin(ExportMixin):
    ...
    class Media:
        js = ['import_export/action_formats.js']
```
to
```python
from django import forms
...
class ExportActionMixin(ExportMixin):
    ...
    @property
    def media(self):
        super_media = super().media
        return forms.Media(js=super_media._js + ['import_export/action_formats.js'], css=super_media._js)
```
But even though the JS error is gone, the contents of `$(document).on('ready', function() {` in `import_export/static/import_export/action_formats.js` is never run.
Changing `$(document).on('ready', function() {` to `$(document).ready(function() {` however fixes the problem.

This is because, as per [the official documentation](https://api.jquery.com/ready/) and [this ticket](https://bugs.jquery.com/ticket/11719), `$(document).on("ready", fn);` has been deprecated since v1.8 of jQuery, and it is completely gone in Django 2.2, which uses jQuery 3.3 for the admin.

I would like to make a pull request for these changes, but first I would like to know whether 2.0 is coming soon, or I should make changes to the 1.x branch as well, to get a v 1.2.1 out quickly? 

Resolving patch:
diff --git a/import_export/admin.py b/import_export/admin.py
--- a/import_export/admin.py
+++ b/import_export/admin.py
@@ -1,6 +1,7 @@
 from datetime import datetime
 
 import django
+from django import forms
 from django.conf import settings
 from django.conf.urls import url
 from django.contrib import admin, messages
@@ -567,8 +568,10 @@ def export_admin_action(self, request, queryset):
 
     actions = [export_admin_action]
 
-    class Media:
-        js = ['import_export/action_formats.js']
+    @property
+    def media(self):
+        super_media = super().media
+        return forms.Media(js=super_media._js + ['import_export/action_formats.js'], css=super_media._css)
 
 
 class ExportActionModelAdmin(ExportActionMixin, admin.ModelAdmin):


Test patch: