Skip to content

Commit 71dac3d

Browse files
authored
Backpack version 6 (#9)
1 parent 80c20c0 commit 71dac3d

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"keywords": ["Laravel", "Backpack", "Backpack for Laravel", "Addon", "Admin Panel", "Json", "Field"],
1919
"require": {
2020
"ext-json": "*",
21-
"backpack/crud": "^4.1.0|^5.0"
21+
"backpack/crud": "^4.1.0|^5.0|^6.0"
2222
},
2323
"autoload": {
2424
"psr-4": {

readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# JSON Field for Backpack 5
1+
# JSON Field for Backpack 5 and 6
22

33
[![Latest Version on Packagist][ico-version]][link-packagist]
44
[![Total Downloads][ico-downloads]][link-downloads]
@@ -19,6 +19,9 @@ Of course, this field should only be used when the admin is savvy enough to know
1919

2020
![https://user-images.githubusercontent.com/1032474/97699650-e2e92b80-1a80-11eb-8320-3ac35e8a59a1.gif](https://user-images.githubusercontent.com/1032474/97699650-e2e92b80-1a80-11eb-8320-3ac35e8a59a1.gif)
2121

22+
Backpack v6 with Tabler, light and dark modes
23+
![https://github.com/ziming/json-field-for-backpack/assets/82019078/bdd36562-d46c-4966-ad02-4e765675eae4](https://github.com/ziming/json-field-for-backpack/assets/82019078/bdd36562-d46c-4966-ad02-4e765675eae4)
24+
2225
## Installation
2326

2427
Via Composer

src/resources/views/fields/json.blade.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424

2525
@if ($crud->checkIfFieldIsFirstOfItsType($field, $fields))
2626
@push('crud_fields_styles')
27-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.9.2/jsoneditor.min.css" />
27+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.10.2/jsoneditor.min.css" />
2828
@endpush
2929

3030
@push('crud_fields_scripts')
31-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.9.2/jsoneditor.min.js"></script>
31+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.10.2/jsoneditor.min.js"></script>
3232
<script>
3333
let container, jsonString, options, editor;
3434
</script>
@@ -65,4 +65,10 @@
6565
window['editor_{{ $field['name'] }}'] = new JSONEditor(container, options, JSON.parse(jsonString));
6666
document.getElementById('{{ $field['name'] }}').value = window['editor_{{ $field['name'] }}'].getText();
6767
</script>
68+
<style>
69+
div.jsoneditor.jsoneditor-mode-preview pre.jsoneditor-preview, .jsoneditor input {
70+
background: #FFF;
71+
}
72+
73+
</style>
6874
@endpush

0 commit comments

Comments
 (0)