administrate-field-json 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/LICENSE.md +21 -0
- data/README.md +8 -0
- data/administrate-field-json.gemspec +21 -0
- data/app/assets/javascripts/administrate-field-json/application.js +14 -0
- data/app/assets/javascripts/administrate-field-json/components/editor.js +22 -0
- data/app/assets/stylesheets/administrate-field-json/application.css +5 -0
- data/app/assets/stylesheets/administrate-field-json/editor.css +8 -0
- data/app/views/fields/json/_form.html.erb +19 -0
- data/app/views/fields/json/_index.html.erb +18 -0
- data/app/views/fields/json/_show.html.erb +22 -0
- data/lib/administrate/field/json.rb +24 -0
- data/package.json +12 -0
- data/screenshot.png +0 -0
- data/spec/lib/administrate/field/json_spec.rb +34 -0
- data/vendor/assets/images/jsoneditor-icons.svg +893 -0
- data/vendor/assets/javascripts/.gitkeep +0 -0
- data/vendor/assets/javascripts/jsoneditor.js +36340 -0
- data/vendor/assets/stylesheets/.gitkeep +0 -0
- data/vendor/assets/stylesheets/jsoneditor.css +922 -0
- data/vendor/assets/stylesheets/jsoneditor.css.bak +922 -0
- metadata +94 -0
@@ -0,0 +1,922 @@
|
|
1
|
+
/* reset styling (prevent conflicts with bootstrap, materialize.css, etc.) */
|
2
|
+
|
3
|
+
div.jsoneditor input {
|
4
|
+
height: auto;
|
5
|
+
border: inherit;
|
6
|
+
}
|
7
|
+
|
8
|
+
div.jsoneditor input:focus {
|
9
|
+
border: none !important;
|
10
|
+
box-shadow: none !important;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.jsoneditor table {
|
14
|
+
border-collapse: collapse;
|
15
|
+
width: auto;
|
16
|
+
}
|
17
|
+
|
18
|
+
div.jsoneditor td,
|
19
|
+
div.jsoneditor th {
|
20
|
+
padding: 0;
|
21
|
+
display: table-cell;
|
22
|
+
text-align: left;
|
23
|
+
vertical-align: inherit;
|
24
|
+
border-radius: inherit;
|
25
|
+
}
|
26
|
+
div.jsoneditor-field,
|
27
|
+
div.jsoneditor-value,
|
28
|
+
div.jsoneditor-readonly {
|
29
|
+
border: 1px solid transparent;
|
30
|
+
min-height: 16px;
|
31
|
+
min-width: 32px;
|
32
|
+
padding: 2px;
|
33
|
+
margin: 1px;
|
34
|
+
word-wrap: break-word;
|
35
|
+
float: left;
|
36
|
+
}
|
37
|
+
|
38
|
+
/* adjust margin of p elements inside editable divs, needed for Opera, IE */
|
39
|
+
|
40
|
+
div.jsoneditor-field p,
|
41
|
+
div.jsoneditor-value p {
|
42
|
+
margin: 0;
|
43
|
+
}
|
44
|
+
|
45
|
+
div.jsoneditor-value {
|
46
|
+
word-break: break-word;
|
47
|
+
}
|
48
|
+
|
49
|
+
div.jsoneditor-readonly {
|
50
|
+
min-width: 16px;
|
51
|
+
color: gray;
|
52
|
+
}
|
53
|
+
|
54
|
+
div.jsoneditor-empty {
|
55
|
+
border-color: lightgray;
|
56
|
+
border-style: dashed;
|
57
|
+
border-radius: 2px;
|
58
|
+
}
|
59
|
+
|
60
|
+
div.jsoneditor-field.jsoneditor-empty::after,
|
61
|
+
div.jsoneditor-value.jsoneditor-empty::after {
|
62
|
+
pointer-events: none;
|
63
|
+
color: lightgray;
|
64
|
+
font-size: 8pt;
|
65
|
+
}
|
66
|
+
|
67
|
+
div.jsoneditor-field.jsoneditor-empty::after {
|
68
|
+
content: "field";
|
69
|
+
}
|
70
|
+
|
71
|
+
div.jsoneditor-value.jsoneditor-empty::after {
|
72
|
+
content: "value";
|
73
|
+
}
|
74
|
+
|
75
|
+
div.jsoneditor-value.jsoneditor-url,
|
76
|
+
a.jsoneditor-value.jsoneditor-url {
|
77
|
+
color: green;
|
78
|
+
text-decoration: underline;
|
79
|
+
}
|
80
|
+
|
81
|
+
a.jsoneditor-value.jsoneditor-url {
|
82
|
+
display: inline-block;
|
83
|
+
padding: 2px;
|
84
|
+
margin: 2px;
|
85
|
+
}
|
86
|
+
|
87
|
+
a.jsoneditor-value.jsoneditor-url:hover,
|
88
|
+
a.jsoneditor-value.jsoneditor-url:focus {
|
89
|
+
color: #ee422e;
|
90
|
+
}
|
91
|
+
|
92
|
+
div.jsoneditor td.jsoneditor-separator {
|
93
|
+
padding: 3px 0;
|
94
|
+
vertical-align: top;
|
95
|
+
color: gray;
|
96
|
+
}
|
97
|
+
|
98
|
+
div.jsoneditor-field[contenteditable=true]:focus,
|
99
|
+
div.jsoneditor-field[contenteditable=true]:hover,
|
100
|
+
div.jsoneditor-value[contenteditable=true]:focus,
|
101
|
+
div.jsoneditor-value[contenteditable=true]:hover,
|
102
|
+
div.jsoneditor-field.jsoneditor-highlight,
|
103
|
+
div.jsoneditor-value.jsoneditor-highlight {
|
104
|
+
background-color: #FFFFAB;
|
105
|
+
border: 1px solid yellow;
|
106
|
+
border-radius: 2px;
|
107
|
+
}
|
108
|
+
|
109
|
+
div.jsoneditor-field.jsoneditor-highlight-active,
|
110
|
+
div.jsoneditor-field.jsoneditor-highlight-active:focus,
|
111
|
+
div.jsoneditor-field.jsoneditor-highlight-active:hover,
|
112
|
+
div.jsoneditor-value.jsoneditor-highlight-active,
|
113
|
+
div.jsoneditor-value.jsoneditor-highlight-active:focus,
|
114
|
+
div.jsoneditor-value.jsoneditor-highlight-active:hover {
|
115
|
+
background-color: #ffee00;
|
116
|
+
border: 1px solid #ffc700;
|
117
|
+
border-radius: 2px;
|
118
|
+
}
|
119
|
+
|
120
|
+
div.jsoneditor-value.jsoneditor-string {
|
121
|
+
color: #008000;
|
122
|
+
}
|
123
|
+
|
124
|
+
div.jsoneditor-value.jsoneditor-object,
|
125
|
+
div.jsoneditor-value.jsoneditor-array {
|
126
|
+
min-width: 16px;
|
127
|
+
color: #808080;
|
128
|
+
}
|
129
|
+
|
130
|
+
div.jsoneditor-value.jsoneditor-number {
|
131
|
+
color: #ee422e;
|
132
|
+
}
|
133
|
+
|
134
|
+
div.jsoneditor-value.jsoneditor-boolean {
|
135
|
+
color: #ff8c00;
|
136
|
+
}
|
137
|
+
|
138
|
+
div.jsoneditor-value.jsoneditor-null {
|
139
|
+
color: #004ED0;
|
140
|
+
}
|
141
|
+
|
142
|
+
div.jsoneditor-value.jsoneditor-invalid {
|
143
|
+
color: #000000;
|
144
|
+
}
|
145
|
+
|
146
|
+
div.jsoneditor-tree button {
|
147
|
+
width: 24px;
|
148
|
+
height: 24px;
|
149
|
+
padding: 0;
|
150
|
+
margin: 0;
|
151
|
+
border: none;
|
152
|
+
cursor: pointer;
|
153
|
+
background: transparent url("img/jsoneditor-icons.svg");
|
154
|
+
}
|
155
|
+
|
156
|
+
div.jsoneditor-mode-view tr.jsoneditor-expandable td.jsoneditor-tree,
|
157
|
+
div.jsoneditor-mode-form tr.jsoneditor-expandable td.jsoneditor-tree {
|
158
|
+
cursor: pointer;
|
159
|
+
}
|
160
|
+
|
161
|
+
div.jsoneditor-tree button.jsoneditor-collapsed {
|
162
|
+
background-position: 0 -48px;
|
163
|
+
}
|
164
|
+
|
165
|
+
div.jsoneditor-tree button.jsoneditor-expanded {
|
166
|
+
background-position: 0 -72px;
|
167
|
+
}
|
168
|
+
|
169
|
+
div.jsoneditor-tree button.jsoneditor-contextmenu {
|
170
|
+
background-position: -48px -72px;
|
171
|
+
}
|
172
|
+
|
173
|
+
div.jsoneditor-tree button.jsoneditor-contextmenu:hover,
|
174
|
+
div.jsoneditor-tree button.jsoneditor-contextmenu:focus,
|
175
|
+
div.jsoneditor-tree button.jsoneditor-contextmenu.jsoneditor-selected,
|
176
|
+
tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu {
|
177
|
+
background-position: -48px -48px;
|
178
|
+
}
|
179
|
+
|
180
|
+
div.jsoneditor-tree *:focus {
|
181
|
+
outline: none;
|
182
|
+
}
|
183
|
+
|
184
|
+
div.jsoneditor-tree button:focus {
|
185
|
+
/* TODO: nice outline for buttons with focus
|
186
|
+
outline: #97B0F8 solid 2px;
|
187
|
+
box-shadow: 0 0 8px #97B0F8;
|
188
|
+
*/
|
189
|
+
background-color: #f5f5f5;
|
190
|
+
outline: #e5e5e5 solid 1px;
|
191
|
+
}
|
192
|
+
|
193
|
+
div.jsoneditor-tree button.jsoneditor-invisible {
|
194
|
+
visibility: hidden;
|
195
|
+
background: none;
|
196
|
+
}
|
197
|
+
|
198
|
+
div.jsoneditor {
|
199
|
+
color: #1A1A1A;
|
200
|
+
border: 1px solid #3883fa;
|
201
|
+
-moz-box-sizing: border-box;
|
202
|
+
-webkit-box-sizing: border-box;
|
203
|
+
box-sizing: border-box;
|
204
|
+
width: 100%;
|
205
|
+
height: 100%;
|
206
|
+
overflow: hidden;
|
207
|
+
position: relative;
|
208
|
+
padding: 0;
|
209
|
+
line-height: 100%;
|
210
|
+
}
|
211
|
+
|
212
|
+
div.jsoneditor-tree table.jsoneditor-tree {
|
213
|
+
border-collapse: collapse;
|
214
|
+
border-spacing: 0;
|
215
|
+
width: 100%;
|
216
|
+
margin: 0;
|
217
|
+
}
|
218
|
+
|
219
|
+
div.jsoneditor-outer {
|
220
|
+
width: 100%;
|
221
|
+
height: 100%;
|
222
|
+
margin: -35px 0 0 0;
|
223
|
+
padding: 35px 0 0 0;
|
224
|
+
-moz-box-sizing: border-box;
|
225
|
+
-webkit-box-sizing: border-box;
|
226
|
+
box-sizing: border-box;
|
227
|
+
}
|
228
|
+
|
229
|
+
div.jsoneditor-tree {
|
230
|
+
width: 100%;
|
231
|
+
height: 100%;
|
232
|
+
position: relative;
|
233
|
+
overflow: auto;
|
234
|
+
}
|
235
|
+
|
236
|
+
textarea.jsoneditor-text {
|
237
|
+
width: 100%;
|
238
|
+
height: 100%;
|
239
|
+
margin: 0;
|
240
|
+
-moz-box-sizing: border-box;
|
241
|
+
-webkit-box-sizing: border-box;
|
242
|
+
box-sizing: border-box;
|
243
|
+
outline-width: 0;
|
244
|
+
border: none;
|
245
|
+
background-color: white;
|
246
|
+
resize: none;
|
247
|
+
}
|
248
|
+
|
249
|
+
tr.jsoneditor-highlight,
|
250
|
+
tr.jsoneditor-selected {
|
251
|
+
background-color: #e6e6e6;
|
252
|
+
}
|
253
|
+
|
254
|
+
tr.jsoneditor-selected button.jsoneditor-dragarea,
|
255
|
+
tr.jsoneditor-selected button.jsoneditor-contextmenu {
|
256
|
+
visibility: hidden;
|
257
|
+
}
|
258
|
+
|
259
|
+
tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea,
|
260
|
+
tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu {
|
261
|
+
visibility: visible;
|
262
|
+
}
|
263
|
+
|
264
|
+
div.jsoneditor-tree button.jsoneditor-dragarea {
|
265
|
+
background: url("img/jsoneditor-icons.svg") -72px -72px;
|
266
|
+
cursor: move;
|
267
|
+
}
|
268
|
+
|
269
|
+
div.jsoneditor-tree button.jsoneditor-dragarea:hover,
|
270
|
+
div.jsoneditor-tree button.jsoneditor-dragarea:focus,
|
271
|
+
tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea {
|
272
|
+
background-position: -72px -48px;
|
273
|
+
}
|
274
|
+
|
275
|
+
div.jsoneditor tr,
|
276
|
+
div.jsoneditor th,
|
277
|
+
div.jsoneditor td {
|
278
|
+
padding: 0;
|
279
|
+
margin: 0;
|
280
|
+
}
|
281
|
+
|
282
|
+
div.jsoneditor td {
|
283
|
+
vertical-align: top;
|
284
|
+
}
|
285
|
+
|
286
|
+
div.jsoneditor td.jsoneditor-tree {
|
287
|
+
vertical-align: top;
|
288
|
+
}
|
289
|
+
|
290
|
+
div.jsoneditor-field,
|
291
|
+
div.jsoneditor-value,
|
292
|
+
div.jsoneditor td,
|
293
|
+
div.jsoneditor th,
|
294
|
+
div.jsoneditor textarea,
|
295
|
+
.jsoneditor-schema-error {
|
296
|
+
font-family: droid sans mono, consolas, monospace, courier new, courier, sans-serif;
|
297
|
+
font-size: 10pt;
|
298
|
+
color: #1A1A1A;
|
299
|
+
}
|
300
|
+
|
301
|
+
/* popover */
|
302
|
+
|
303
|
+
.jsoneditor-schema-error {
|
304
|
+
cursor: default;
|
305
|
+
display: inline-block;
|
306
|
+
/*font-family: arial, sans-serif;*/
|
307
|
+
height: 24px;
|
308
|
+
line-height: 24px;
|
309
|
+
position: relative;
|
310
|
+
text-align: center;
|
311
|
+
width: 24px;
|
312
|
+
}
|
313
|
+
|
314
|
+
div.jsoneditor-tree .jsoneditor-schema-error {
|
315
|
+
width: 24px;
|
316
|
+
height: 24px;
|
317
|
+
padding: 0;
|
318
|
+
margin: 0 4px 0 0;
|
319
|
+
background: url("img/jsoneditor-icons.svg") -168px -48px;
|
320
|
+
}
|
321
|
+
|
322
|
+
.jsoneditor-schema-error .jsoneditor-popover {
|
323
|
+
background-color: #4c4c4c;
|
324
|
+
border-radius: 3px;
|
325
|
+
box-shadow: 0 0 5px rgba(0,0,0,0.4);
|
326
|
+
color: #fff;
|
327
|
+
display: none;
|
328
|
+
padding: 7px 10px;
|
329
|
+
position: absolute;
|
330
|
+
width: 200px;
|
331
|
+
z-index: 4;
|
332
|
+
}
|
333
|
+
|
334
|
+
.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-above {
|
335
|
+
bottom: 32px;
|
336
|
+
left: -98px;
|
337
|
+
}
|
338
|
+
|
339
|
+
.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-below {
|
340
|
+
top: 32px;
|
341
|
+
left: -98px;
|
342
|
+
}
|
343
|
+
|
344
|
+
.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-left {
|
345
|
+
top: -7px;
|
346
|
+
right: 32px;
|
347
|
+
}
|
348
|
+
|
349
|
+
.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-right {
|
350
|
+
top: -7px;
|
351
|
+
left: 32px;
|
352
|
+
}
|
353
|
+
|
354
|
+
.jsoneditor-schema-error .jsoneditor-popover:before {
|
355
|
+
border-right: 7px solid transparent;
|
356
|
+
border-left: 7px solid transparent;
|
357
|
+
content: '';
|
358
|
+
display: block;
|
359
|
+
left: 50%;
|
360
|
+
margin-left: -7px;
|
361
|
+
position: absolute;
|
362
|
+
}
|
363
|
+
|
364
|
+
.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-above:before {
|
365
|
+
border-top: 7px solid #4c4c4c;
|
366
|
+
bottom: -7px;
|
367
|
+
}
|
368
|
+
|
369
|
+
.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-below:before {
|
370
|
+
border-bottom: 7px solid #4c4c4c;
|
371
|
+
top: -7px;
|
372
|
+
}
|
373
|
+
|
374
|
+
.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-left:before {
|
375
|
+
border-left: 7px solid #4c4c4c;
|
376
|
+
border-top: 7px solid transparent;
|
377
|
+
border-bottom: 7px solid transparent;
|
378
|
+
content: '';
|
379
|
+
top: 19px;
|
380
|
+
right: -14px;
|
381
|
+
left: inherit;
|
382
|
+
margin-left: inherit;
|
383
|
+
margin-top: -7px;
|
384
|
+
position: absolute;
|
385
|
+
}
|
386
|
+
|
387
|
+
.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-right:before {
|
388
|
+
border-right: 7px solid #4c4c4c;
|
389
|
+
border-top: 7px solid transparent;
|
390
|
+
border-bottom: 7px solid transparent;
|
391
|
+
content: '';
|
392
|
+
top: 19px;
|
393
|
+
left: -14px;
|
394
|
+
margin-left: inherit;
|
395
|
+
margin-top: -7px;
|
396
|
+
position: absolute;
|
397
|
+
}
|
398
|
+
|
399
|
+
.jsoneditor-schema-error:hover .jsoneditor-popover,
|
400
|
+
.jsoneditor-schema-error:focus .jsoneditor-popover {
|
401
|
+
display: block;
|
402
|
+
-webkit-animation: fade-in .3s linear 1, move-up .3s linear 1;
|
403
|
+
-moz-animation: fade-in .3s linear 1, move-up .3s linear 1;
|
404
|
+
-ms-animation: fade-in .3s linear 1, move-up .3s linear 1;
|
405
|
+
}
|
406
|
+
|
407
|
+
@-webkit-keyframes fade-in {
|
408
|
+
from {
|
409
|
+
opacity: 0;
|
410
|
+
}
|
411
|
+
|
412
|
+
to {
|
413
|
+
opacity: 1;
|
414
|
+
}
|
415
|
+
}
|
416
|
+
|
417
|
+
@-moz-keyframes fade-in {
|
418
|
+
from {
|
419
|
+
opacity: 0;
|
420
|
+
}
|
421
|
+
|
422
|
+
to {
|
423
|
+
opacity: 1;
|
424
|
+
}
|
425
|
+
}
|
426
|
+
|
427
|
+
@-ms-keyframes fade-in {
|
428
|
+
from {
|
429
|
+
opacity: 0;
|
430
|
+
}
|
431
|
+
|
432
|
+
to {
|
433
|
+
opacity: 1;
|
434
|
+
}
|
435
|
+
}
|
436
|
+
|
437
|
+
/*@-webkit-keyframes move-up {*/
|
438
|
+
|
439
|
+
/*from { bottom: 24px; }*/
|
440
|
+
|
441
|
+
/*to { bottom: 32px; }*/
|
442
|
+
|
443
|
+
/*}*/
|
444
|
+
|
445
|
+
/*@-moz-keyframes move-up {*/
|
446
|
+
|
447
|
+
/*from { bottom: 24px; }*/
|
448
|
+
|
449
|
+
/*to { bottom: 32px; }*/
|
450
|
+
|
451
|
+
/*}*/
|
452
|
+
|
453
|
+
/*@-ms-keyframes move-up {*/
|
454
|
+
|
455
|
+
/*from { bottom: 24px; }*/
|
456
|
+
|
457
|
+
/*to { bottom: 32px; }*/
|
458
|
+
|
459
|
+
/*}*/
|
460
|
+
|
461
|
+
/* JSON schema errors displayed at the bottom of the editor in mode text and code */
|
462
|
+
|
463
|
+
.jsoneditor .jsoneditor-text-errors {
|
464
|
+
width: 100%;
|
465
|
+
border-collapse: collapse;
|
466
|
+
background-color: #ffef8b;
|
467
|
+
border-top: 1px solid #ffd700;
|
468
|
+
}
|
469
|
+
|
470
|
+
.jsoneditor .jsoneditor-text-errors td {
|
471
|
+
padding: 3px 6px;
|
472
|
+
vertical-align: middle;
|
473
|
+
}
|
474
|
+
|
475
|
+
.jsoneditor-text-errors .jsoneditor-schema-error {
|
476
|
+
border: none;
|
477
|
+
width: 24px;
|
478
|
+
height: 24px;
|
479
|
+
padding: 0;
|
480
|
+
margin: 0 4px 0 0;
|
481
|
+
background: url("img/jsoneditor-icons.svg") -168px -48px;
|
482
|
+
}
|
483
|
+
/* ContextMenu - main menu */
|
484
|
+
|
485
|
+
div.jsoneditor-contextmenu-root {
|
486
|
+
position: relative;
|
487
|
+
width: 0;
|
488
|
+
height: 0;
|
489
|
+
}
|
490
|
+
|
491
|
+
div.jsoneditor-contextmenu {
|
492
|
+
position: absolute;
|
493
|
+
box-sizing: content-box;
|
494
|
+
z-index: 99999;
|
495
|
+
}
|
496
|
+
|
497
|
+
div.jsoneditor-contextmenu ul,
|
498
|
+
div.jsoneditor-contextmenu li {
|
499
|
+
box-sizing: content-box;
|
500
|
+
}
|
501
|
+
|
502
|
+
div.jsoneditor-contextmenu ul {
|
503
|
+
position: relative;
|
504
|
+
left: 0;
|
505
|
+
top: 0;
|
506
|
+
width: 124px;
|
507
|
+
background: white;
|
508
|
+
border: 1px solid #d3d3d3;
|
509
|
+
box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3);
|
510
|
+
list-style: none;
|
511
|
+
margin: 0;
|
512
|
+
padding: 0;
|
513
|
+
}
|
514
|
+
|
515
|
+
div.jsoneditor-contextmenu ul li button {
|
516
|
+
padding: 0;
|
517
|
+
margin: 0;
|
518
|
+
width: 124px;
|
519
|
+
height: 24px;
|
520
|
+
border: none;
|
521
|
+
cursor: pointer;
|
522
|
+
color: #4d4d4d;
|
523
|
+
background: transparent;
|
524
|
+
font-size: 10pt;
|
525
|
+
font-family: arial, sans-serif;
|
526
|
+
box-sizing: border-box;
|
527
|
+
line-height: 26px;
|
528
|
+
text-align: left;
|
529
|
+
}
|
530
|
+
|
531
|
+
/* Fix button padding in firefox */
|
532
|
+
|
533
|
+
div.jsoneditor-contextmenu ul li button::-moz-focus-inner {
|
534
|
+
padding: 0;
|
535
|
+
border: 0;
|
536
|
+
}
|
537
|
+
|
538
|
+
div.jsoneditor-contextmenu ul li button:hover,
|
539
|
+
div.jsoneditor-contextmenu ul li button:focus {
|
540
|
+
color: #1a1a1a;
|
541
|
+
background-color: #f5f5f5;
|
542
|
+
outline: none;
|
543
|
+
}
|
544
|
+
|
545
|
+
div.jsoneditor-contextmenu ul li button.jsoneditor-default {
|
546
|
+
width: 92px;
|
547
|
+
}
|
548
|
+
|
549
|
+
div.jsoneditor-contextmenu ul li button.jsoneditor-expand {
|
550
|
+
float: right;
|
551
|
+
width: 32px;
|
552
|
+
height: 24px;
|
553
|
+
border-left: 1px solid #e5e5e5;
|
554
|
+
}
|
555
|
+
|
556
|
+
div.jsoneditor-contextmenu div.jsoneditor-icon {
|
557
|
+
float: left;
|
558
|
+
width: 24px;
|
559
|
+
height: 24px;
|
560
|
+
border: none;
|
561
|
+
padding: 0;
|
562
|
+
margin: 0;
|
563
|
+
background-image: url("img/jsoneditor-icons.svg");
|
564
|
+
}
|
565
|
+
|
566
|
+
div.jsoneditor-contextmenu ul li button div.jsoneditor-expand {
|
567
|
+
float: right;
|
568
|
+
width: 24px;
|
569
|
+
height: 24px;
|
570
|
+
padding: 0;
|
571
|
+
margin: 0 4px 0 0;
|
572
|
+
background: url("img/jsoneditor-icons.svg") 0 -72px;
|
573
|
+
opacity: 0.4;
|
574
|
+
}
|
575
|
+
|
576
|
+
div.jsoneditor-contextmenu ul li button:hover div.jsoneditor-expand,
|
577
|
+
div.jsoneditor-contextmenu ul li button:focus div.jsoneditor-expand,
|
578
|
+
div.jsoneditor-contextmenu ul li.jsoneditor-selected div.jsoneditor-expand,
|
579
|
+
div.jsoneditor-contextmenu ul li button.jsoneditor-expand:hover div.jsoneditor-expand,
|
580
|
+
div.jsoneditor-contextmenu ul li button.jsoneditor-expand:focus div.jsoneditor-expand {
|
581
|
+
opacity: 1;
|
582
|
+
}
|
583
|
+
|
584
|
+
div.jsoneditor-contextmenu div.jsoneditor-separator {
|
585
|
+
height: 0;
|
586
|
+
border-top: 1px solid #e5e5e5;
|
587
|
+
padding-top: 5px;
|
588
|
+
margin-top: 5px;
|
589
|
+
}
|
590
|
+
|
591
|
+
div.jsoneditor-contextmenu button.jsoneditor-remove > div.jsoneditor-icon {
|
592
|
+
background-position: -24px -24px;
|
593
|
+
}
|
594
|
+
|
595
|
+
div.jsoneditor-contextmenu button.jsoneditor-remove:hover > div.jsoneditor-icon,
|
596
|
+
div.jsoneditor-contextmenu button.jsoneditor-remove:focus > div.jsoneditor-icon {
|
597
|
+
background-position: -24px 0;
|
598
|
+
}
|
599
|
+
|
600
|
+
div.jsoneditor-contextmenu button.jsoneditor-append > div.jsoneditor-icon {
|
601
|
+
background-position: 0 -24px;
|
602
|
+
}
|
603
|
+
|
604
|
+
div.jsoneditor-contextmenu button.jsoneditor-append:hover > div.jsoneditor-icon,
|
605
|
+
div.jsoneditor-contextmenu button.jsoneditor-append:focus > div.jsoneditor-icon {
|
606
|
+
background-position: 0 0;
|
607
|
+
}
|
608
|
+
|
609
|
+
div.jsoneditor-contextmenu button.jsoneditor-insert > div.jsoneditor-icon {
|
610
|
+
background-position: 0 -24px;
|
611
|
+
}
|
612
|
+
|
613
|
+
div.jsoneditor-contextmenu button.jsoneditor-insert:hover > div.jsoneditor-icon,
|
614
|
+
div.jsoneditor-contextmenu button.jsoneditor-insert:focus > div.jsoneditor-icon {
|
615
|
+
background-position: 0 0;
|
616
|
+
}
|
617
|
+
|
618
|
+
div.jsoneditor-contextmenu button.jsoneditor-duplicate > div.jsoneditor-icon {
|
619
|
+
background-position: -48px -24px;
|
620
|
+
}
|
621
|
+
|
622
|
+
div.jsoneditor-contextmenu button.jsoneditor-duplicate:hover > div.jsoneditor-icon,
|
623
|
+
div.jsoneditor-contextmenu button.jsoneditor-duplicate:focus > div.jsoneditor-icon {
|
624
|
+
background-position: -48px 0;
|
625
|
+
}
|
626
|
+
|
627
|
+
div.jsoneditor-contextmenu button.jsoneditor-sort-asc > div.jsoneditor-icon {
|
628
|
+
background-position: -168px -24px;
|
629
|
+
}
|
630
|
+
|
631
|
+
div.jsoneditor-contextmenu button.jsoneditor-sort-asc:hover > div.jsoneditor-icon,
|
632
|
+
div.jsoneditor-contextmenu button.jsoneditor-sort-asc:focus > div.jsoneditor-icon {
|
633
|
+
background-position: -168px 0;
|
634
|
+
}
|
635
|
+
|
636
|
+
div.jsoneditor-contextmenu button.jsoneditor-sort-desc > div.jsoneditor-icon {
|
637
|
+
background-position: -192px -24px;
|
638
|
+
}
|
639
|
+
|
640
|
+
div.jsoneditor-contextmenu button.jsoneditor-sort-desc:hover > div.jsoneditor-icon,
|
641
|
+
div.jsoneditor-contextmenu button.jsoneditor-sort-desc:focus > div.jsoneditor-icon {
|
642
|
+
background-position: -192px 0;
|
643
|
+
}
|
644
|
+
|
645
|
+
/* ContextMenu - sub menu */
|
646
|
+
|
647
|
+
div.jsoneditor-contextmenu ul li button.jsoneditor-selected,
|
648
|
+
div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover,
|
649
|
+
div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus {
|
650
|
+
color: white;
|
651
|
+
background-color: #ee422e;
|
652
|
+
}
|
653
|
+
|
654
|
+
div.jsoneditor-contextmenu ul li {
|
655
|
+
overflow: hidden;
|
656
|
+
}
|
657
|
+
|
658
|
+
div.jsoneditor-contextmenu ul li ul {
|
659
|
+
display: none;
|
660
|
+
position: relative;
|
661
|
+
left: -10px;
|
662
|
+
top: 0;
|
663
|
+
border: none;
|
664
|
+
box-shadow: inset 0 0 10px rgba(128, 128, 128, 0.5);
|
665
|
+
padding: 0 10px;
|
666
|
+
/* TODO: transition is not supported on IE8-9 */
|
667
|
+
-webkit-transition: all 0.3s ease-out;
|
668
|
+
-moz-transition: all 0.3s ease-out;
|
669
|
+
-o-transition: all 0.3s ease-out;
|
670
|
+
transition: all 0.3s ease-out;
|
671
|
+
}
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
div.jsoneditor-contextmenu ul li ul li button {
|
676
|
+
padding-left: 24px;
|
677
|
+
animation: all ease-in-out 1s;
|
678
|
+
}
|
679
|
+
|
680
|
+
div.jsoneditor-contextmenu ul li ul li button:hover,
|
681
|
+
div.jsoneditor-contextmenu ul li ul li button:focus {
|
682
|
+
background-color: #f5f5f5;
|
683
|
+
}
|
684
|
+
|
685
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-string > div.jsoneditor-icon {
|
686
|
+
background-position: -144px -24px;
|
687
|
+
}
|
688
|
+
|
689
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-string:hover > div.jsoneditor-icon,
|
690
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-string:focus > div.jsoneditor-icon,
|
691
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-string.jsoneditor-selected > div.jsoneditor-icon {
|
692
|
+
background-position: -144px 0;
|
693
|
+
}
|
694
|
+
|
695
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-auto > div.jsoneditor-icon {
|
696
|
+
background-position: -120px -24px;
|
697
|
+
}
|
698
|
+
|
699
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-auto:hover > div.jsoneditor-icon,
|
700
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-auto:focus > div.jsoneditor-icon,
|
701
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-auto.jsoneditor-selected > div.jsoneditor-icon {
|
702
|
+
background-position: -120px 0;
|
703
|
+
}
|
704
|
+
|
705
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-object > div.jsoneditor-icon {
|
706
|
+
background-position: -72px -24px;
|
707
|
+
}
|
708
|
+
|
709
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-object:hover > div.jsoneditor-icon,
|
710
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-object:focus > div.jsoneditor-icon,
|
711
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-object.jsoneditor-selected > div.jsoneditor-icon {
|
712
|
+
background-position: -72px 0;
|
713
|
+
}
|
714
|
+
|
715
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-array > div.jsoneditor-icon {
|
716
|
+
background-position: -96px -24px;
|
717
|
+
}
|
718
|
+
|
719
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-array:hover > div.jsoneditor-icon,
|
720
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-array:focus > div.jsoneditor-icon,
|
721
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-array.jsoneditor-selected > div.jsoneditor-icon {
|
722
|
+
background-position: -96px 0;
|
723
|
+
}
|
724
|
+
|
725
|
+
div.jsoneditor-contextmenu button.jsoneditor-type-modes > div.jsoneditor-icon {
|
726
|
+
background-image: none;
|
727
|
+
width: 6px;
|
728
|
+
}
|
729
|
+
div.jsoneditor-menu {
|
730
|
+
width: 100%;
|
731
|
+
height: 35px;
|
732
|
+
padding: 2px;
|
733
|
+
margin: 0;
|
734
|
+
-moz-box-sizing: border-box;
|
735
|
+
-webkit-box-sizing: border-box;
|
736
|
+
box-sizing: border-box;
|
737
|
+
color: white;
|
738
|
+
background-color: #3883fa;
|
739
|
+
border-bottom: 1px solid #3883fa;
|
740
|
+
}
|
741
|
+
|
742
|
+
div.jsoneditor-menu > button,
|
743
|
+
div.jsoneditor-menu > div.jsoneditor-modes > button {
|
744
|
+
width: 26px;
|
745
|
+
height: 26px;
|
746
|
+
margin: 2px;
|
747
|
+
padding: 0;
|
748
|
+
border-radius: 2px;
|
749
|
+
border: 1px solid transparent;
|
750
|
+
background: transparent url("img/jsoneditor-icons.svg");
|
751
|
+
color: white;
|
752
|
+
opacity: 0.8;
|
753
|
+
font-family: arial, sans-serif;
|
754
|
+
font-size: 10pt;
|
755
|
+
float: left;
|
756
|
+
}
|
757
|
+
|
758
|
+
div.jsoneditor-menu > button:hover,
|
759
|
+
div.jsoneditor-menu > div.jsoneditor-modes > button:hover {
|
760
|
+
background-color: rgba(255,255,255,0.2);
|
761
|
+
border: 1px solid rgba(255,255,255,0.4);
|
762
|
+
}
|
763
|
+
|
764
|
+
div.jsoneditor-menu > button:focus,
|
765
|
+
div.jsoneditor-menu > button:active,
|
766
|
+
div.jsoneditor-menu > div.jsoneditor-modes > button:focus,
|
767
|
+
div.jsoneditor-menu > div.jsoneditor-modes > button:active {
|
768
|
+
background-color: rgba(255,255,255,0.3);
|
769
|
+
}
|
770
|
+
|
771
|
+
div.jsoneditor-menu > button:disabled,
|
772
|
+
div.jsoneditor-menu > div.jsoneditor-modes > button:disabled {
|
773
|
+
opacity: 0.5;
|
774
|
+
}
|
775
|
+
|
776
|
+
div.jsoneditor-menu > button.jsoneditor-collapse-all {
|
777
|
+
background-position: 0 -96px;
|
778
|
+
}
|
779
|
+
|
780
|
+
div.jsoneditor-menu > button.jsoneditor-expand-all {
|
781
|
+
background-position: 0 -120px;
|
782
|
+
}
|
783
|
+
|
784
|
+
div.jsoneditor-menu > button.jsoneditor-undo {
|
785
|
+
background-position: -24px -96px;
|
786
|
+
}
|
787
|
+
|
788
|
+
div.jsoneditor-menu > button.jsoneditor-undo:disabled {
|
789
|
+
background-position: -24px -120px;
|
790
|
+
}
|
791
|
+
|
792
|
+
div.jsoneditor-menu > button.jsoneditor-redo {
|
793
|
+
background-position: -48px -96px;
|
794
|
+
}
|
795
|
+
|
796
|
+
div.jsoneditor-menu > button.jsoneditor-redo:disabled {
|
797
|
+
background-position: -48px -120px;
|
798
|
+
}
|
799
|
+
|
800
|
+
div.jsoneditor-menu > button.jsoneditor-compact {
|
801
|
+
background-position: -72px -96px;
|
802
|
+
}
|
803
|
+
|
804
|
+
div.jsoneditor-menu > button.jsoneditor-format {
|
805
|
+
background-position: -72px -120px;
|
806
|
+
}
|
807
|
+
|
808
|
+
div.jsoneditor-menu > div.jsoneditor-modes {
|
809
|
+
display: inline-block;
|
810
|
+
float: left;
|
811
|
+
}
|
812
|
+
|
813
|
+
div.jsoneditor-menu > div.jsoneditor-modes > button {
|
814
|
+
background-image: none;
|
815
|
+
width: auto;
|
816
|
+
padding-left: 6px;
|
817
|
+
padding-right: 6px;
|
818
|
+
}
|
819
|
+
|
820
|
+
div.jsoneditor-menu > button.jsoneditor-separator,
|
821
|
+
div.jsoneditor-menu > div.jsoneditor-modes > button.jsoneditor-separator {
|
822
|
+
margin-left: 10px;
|
823
|
+
}
|
824
|
+
|
825
|
+
div.jsoneditor-menu a {
|
826
|
+
font-family: arial, sans-serif;
|
827
|
+
font-size: 10pt;
|
828
|
+
color: white;
|
829
|
+
opacity: 0.8;
|
830
|
+
vertical-align: middle;
|
831
|
+
}
|
832
|
+
|
833
|
+
div.jsoneditor-menu a:hover {
|
834
|
+
opacity: 1;
|
835
|
+
}
|
836
|
+
|
837
|
+
div.jsoneditor-menu a.jsoneditor-poweredBy {
|
838
|
+
font-size: 8pt;
|
839
|
+
position: absolute;
|
840
|
+
right: 0;
|
841
|
+
top: 0;
|
842
|
+
padding: 10px;
|
843
|
+
}
|
844
|
+
table.jsoneditor-search input,
|
845
|
+
table.jsoneditor-search div.jsoneditor-results {
|
846
|
+
font-family: arial, sans-serif;
|
847
|
+
font-size: 10pt;
|
848
|
+
color: #1A1A1A;
|
849
|
+
background: transparent;
|
850
|
+
/* For Firefox */
|
851
|
+
}
|
852
|
+
|
853
|
+
table.jsoneditor-search div.jsoneditor-results {
|
854
|
+
color: white;
|
855
|
+
padding-right: 5px;
|
856
|
+
line-height: 24px;
|
857
|
+
}
|
858
|
+
|
859
|
+
table.jsoneditor-search {
|
860
|
+
position: absolute;
|
861
|
+
right: 4px;
|
862
|
+
top: 4px;
|
863
|
+
border-collapse: collapse;
|
864
|
+
border-spacing: 0;
|
865
|
+
}
|
866
|
+
|
867
|
+
table.jsoneditor-search div.jsoneditor-frame {
|
868
|
+
border: 1px solid transparent;
|
869
|
+
background-color: white;
|
870
|
+
padding: 0 2px;
|
871
|
+
margin: 0;
|
872
|
+
}
|
873
|
+
|
874
|
+
table.jsoneditor-search div.jsoneditor-frame table {
|
875
|
+
border-collapse: collapse;
|
876
|
+
}
|
877
|
+
|
878
|
+
table.jsoneditor-search input {
|
879
|
+
width: 120px;
|
880
|
+
border: none;
|
881
|
+
outline: none;
|
882
|
+
margin: 1px;
|
883
|
+
line-height: 20px;
|
884
|
+
}
|
885
|
+
|
886
|
+
table.jsoneditor-search button {
|
887
|
+
width: 16px;
|
888
|
+
height: 24px;
|
889
|
+
padding: 0;
|
890
|
+
margin: 0;
|
891
|
+
border: none;
|
892
|
+
background: url("img/jsoneditor-icons.svg");
|
893
|
+
vertical-align: top;
|
894
|
+
}
|
895
|
+
|
896
|
+
table.jsoneditor-search button:hover {
|
897
|
+
background-color: transparent;
|
898
|
+
}
|
899
|
+
|
900
|
+
table.jsoneditor-search button.jsoneditor-refresh {
|
901
|
+
width: 18px;
|
902
|
+
background-position: -99px -73px;
|
903
|
+
}
|
904
|
+
|
905
|
+
table.jsoneditor-search button.jsoneditor-next {
|
906
|
+
cursor: pointer;
|
907
|
+
background-position: -124px -73px;
|
908
|
+
}
|
909
|
+
|
910
|
+
table.jsoneditor-search button.jsoneditor-next:hover {
|
911
|
+
background-position: -124px -49px;
|
912
|
+
}
|
913
|
+
|
914
|
+
table.jsoneditor-search button.jsoneditor-previous {
|
915
|
+
cursor: pointer;
|
916
|
+
background-position: -148px -73px;
|
917
|
+
margin-right: 2px;
|
918
|
+
}
|
919
|
+
|
920
|
+
table.jsoneditor-search button.jsoneditor-previous:hover {
|
921
|
+
background-position: -148px -49px;
|
922
|
+
}
|