Skip to content

Commit 9d09d34

Browse files
author
Alexander Bogushov
committed
Support for bootstrap 4
1 parent 4ce91c1 commit 9d09d34

File tree

12 files changed

+17
-309
lines changed

12 files changed

+17
-309
lines changed

django_admin_json_editor/admin.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def __init__(self, schema, collapsed=True, sceditor=False, editor_options=None):
1515
self._sceditor = sceditor
1616

1717
self._editor_options = {
18-
'theme': 'bootstrap3',
18+
'theme': 'bootstrap4',
1919
'iconlib': 'fontawesome4',
2020
}
2121
self._editor_options.update(editor_options or {})
@@ -35,7 +35,6 @@ def render(self, name, value, attrs=None, renderer=None):
3535
context = {
3636
'name': name,
3737
'data': value,
38-
'sceditor': int(self._sceditor),
3938
'editor_options': json.dumps(editor_options),
4039
}
4140
return mark_safe(render_to_string(self.template_name, context))
@@ -52,10 +51,10 @@ def media(self):
5251
'django_admin_json_editor/jsoneditor/jsoneditor.min.js',
5352
]
5453

55-
if self._editor_options['theme'] == 'bootstrap3':
54+
if self._editor_options['theme'] == 'bootstrap4':
5655
css['all'].append('django_admin_json_editor/bootstrap/css/bootstrap.min.css')
57-
js.append('django_admin_json_editor/jquery/jquery.min.js')
58-
js.append('django_admin_json_editor/bootstrap/js/bootstrap.min.js')
56+
js.append('django_admin_json_editor/jquery/jquery-3.5.1.slim.min.js')
57+
js.append('django_admin_json_editor/bootstrap/js/bootstrap.bundle.min.js')
5958

6059
if self._sceditor:
6160
css['all'].append('django_admin_json_editor/sceditor/themes/default.min.css')

django_admin_json_editor/static/django_admin_json_editor/bootstrap/css/bootstrap.min.css

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-19.7 KB
Binary file not shown.

django_admin_json_editor/static/django_admin_json_editor/bootstrap/fonts/glyphicons-halflings-regular.svg

Lines changed: 0 additions & 288 deletions
This file was deleted.
-44.3 KB
Binary file not shown.
-22.9 KB
Binary file not shown.
-17.6 KB
Binary file not shown.

django_admin_json_editor/static/django_admin_json_editor/bootstrap/js/bootstrap.bundle.min.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

django_admin_json_editor/static/django_admin_json_editor/bootstrap/js/bootstrap.min.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

django_admin_json_editor/static/django_admin_json_editor/jquery/jquery-3.5.1.slim.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)