Released v5.5.5
This commit is contained in:
parent
c8de51d03f
commit
f084180730
|
@ -3,7 +3,7 @@
|
|||
https://github.com/josdejong/jsoneditor
|
||||
|
||||
|
||||
## not yet released, version 5.5.5
|
||||
## 2016-05-24, version 5.5.5
|
||||
|
||||
- Fixed #298: Switch mode button disappears when switching from text/code to
|
||||
tree/form/view mode when the JSON contained errors.
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* Copyright (c) 2011-2016 Jos de Jong, http://jsoneditoronline.org
|
||||
*
|
||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||
* @version 5.5.4
|
||||
* @date 2016-05-22
|
||||
* @version 5.5.5
|
||||
* @date 2016-05-24
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
|
@ -4103,7 +4103,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
var node = this;
|
||||
var path = [];
|
||||
while (node) {
|
||||
var field = (!node.parent || node.parent.type != 'array')
|
||||
var field = !node.parent
|
||||
? undefined // do not add an (optional) field name of the root node
|
||||
: (node.parent.type != 'array')
|
||||
? node.field
|
||||
: node.index;
|
||||
|
||||
|
@ -5285,8 +5287,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
this.dom.checkbox.checked = this.value;
|
||||
}
|
||||
//If the node has an enum property and it is editable lets create the select element
|
||||
else if (this.enum && this.editable.value) {
|
||||
else {
|
||||
// cleanup checkbox when displayed
|
||||
if (this.dom.tdCheckbox) {
|
||||
this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox);
|
||||
delete this.dom.tdCheckbox;
|
||||
delete this.dom.checkbox;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.enum && this.editable.value) {
|
||||
// create select box when this node has an enum object
|
||||
if (!this.dom.select) {
|
||||
this.dom.select = document.createElement('select');
|
||||
this.id = this.field + "_" + new Date().getUTCMilliseconds();
|
||||
|
@ -5314,12 +5325,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
this.dom.tdSelect.className = 'jsoneditor-tree';
|
||||
this.dom.tdSelect.appendChild(this.dom.select);
|
||||
this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect, this.dom.tdValue);
|
||||
}
|
||||
|
||||
//If the enum is inside a composite type display both the simple input and the dropdown field
|
||||
if(this.schema !== undefined && (
|
||||
// If the enum is inside a composite type display
|
||||
// both the simple input and the dropdown field
|
||||
if(this.schema && (
|
||||
!this.schema.hasOwnProperty("oneOf") &&
|
||||
!this.schema.hasOwnProperty("anyOf") &&
|
||||
!this.schema.hasOwnProperty("anyOf") &&
|
||||
!this.schema.hasOwnProperty("allOf"))
|
||||
) {
|
||||
this.valueFieldHTML = this.dom.tdValue.innerHTML;
|
||||
|
@ -5329,14 +5341,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
delete this.valueFieldHTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// cleanup checkbox when displayed
|
||||
if (this.dom.tdCheckbox) {
|
||||
this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox);
|
||||
delete this.dom.tdCheckbox;
|
||||
delete this.dom.checkbox;
|
||||
} else if (this.dom.tdSelect) {
|
||||
// cleanup select box when displayed
|
||||
if (this.dom.tdSelect) {
|
||||
this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect);
|
||||
delete this.dom.tdSelect;
|
||||
delete this.dom.select;
|
||||
|
@ -8079,8 +8086,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
// create mode box
|
||||
if (this.options && this.options.modes && this.options.modes.length) {
|
||||
this.modeSwitcher = new ModeSwitcher(this.menu, this.options.modes, this.options.mode, function onSwitch(mode) {
|
||||
me.modeSwitcher.destroy();
|
||||
|
||||
// switch mode and restore focus
|
||||
me.setMode(mode);
|
||||
me.modeSwitcher.focus();
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -24,8 +24,8 @@
|
|||
* Copyright (c) 2011-2016 Jos de Jong, http://jsoneditoronline.org
|
||||
*
|
||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||
* @version 5.5.4
|
||||
* @date 2016-05-22
|
||||
* @version 5.5.5
|
||||
* @date 2016-05-24
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
|
@ -12002,7 +12002,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
var node = this;
|
||||
var path = [];
|
||||
while (node) {
|
||||
var field = (!node.parent || node.parent.type != 'array')
|
||||
var field = !node.parent
|
||||
? undefined // do not add an (optional) field name of the root node
|
||||
: (node.parent.type != 'array')
|
||||
? node.field
|
||||
: node.index;
|
||||
|
||||
|
@ -13184,8 +13186,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
this.dom.checkbox.checked = this.value;
|
||||
}
|
||||
//If the node has an enum property and it is editable lets create the select element
|
||||
else if (this.enum && this.editable.value) {
|
||||
else {
|
||||
// cleanup checkbox when displayed
|
||||
if (this.dom.tdCheckbox) {
|
||||
this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox);
|
||||
delete this.dom.tdCheckbox;
|
||||
delete this.dom.checkbox;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.enum && this.editable.value) {
|
||||
// create select box when this node has an enum object
|
||||
if (!this.dom.select) {
|
||||
this.dom.select = document.createElement('select');
|
||||
this.id = this.field + "_" + new Date().getUTCMilliseconds();
|
||||
|
@ -13213,12 +13224,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
this.dom.tdSelect.className = 'jsoneditor-tree';
|
||||
this.dom.tdSelect.appendChild(this.dom.select);
|
||||
this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect, this.dom.tdValue);
|
||||
}
|
||||
|
||||
//If the enum is inside a composite type display both the simple input and the dropdown field
|
||||
if(this.schema !== undefined && (
|
||||
// If the enum is inside a composite type display
|
||||
// both the simple input and the dropdown field
|
||||
if(this.schema && (
|
||||
!this.schema.hasOwnProperty("oneOf") &&
|
||||
!this.schema.hasOwnProperty("anyOf") &&
|
||||
!this.schema.hasOwnProperty("anyOf") &&
|
||||
!this.schema.hasOwnProperty("allOf"))
|
||||
) {
|
||||
this.valueFieldHTML = this.dom.tdValue.innerHTML;
|
||||
|
@ -13228,14 +13240,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
delete this.valueFieldHTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// cleanup checkbox when displayed
|
||||
if (this.dom.tdCheckbox) {
|
||||
this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox);
|
||||
delete this.dom.tdCheckbox;
|
||||
delete this.dom.checkbox;
|
||||
} else if (this.dom.tdSelect) {
|
||||
// cleanup select box when displayed
|
||||
if (this.dom.tdSelect) {
|
||||
this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect);
|
||||
delete this.dom.tdSelect;
|
||||
delete this.dom.select;
|
||||
|
@ -15978,8 +15985,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
// create mode box
|
||||
if (this.options && this.options.modes && this.options.modes.length) {
|
||||
this.modeSwitcher = new ModeSwitcher(this.menu, this.options.modes, this.options.mode, function onSwitch(mode) {
|
||||
me.modeSwitcher.destroy();
|
||||
|
||||
// switch mode and restore focus
|
||||
me.setMode(mode);
|
||||
me.modeSwitcher.focus();
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "jsoneditor",
|
||||
"version": "5.5.4",
|
||||
"version": "5.5.5",
|
||||
"main": "./index",
|
||||
"description": "A web-based tool to view, edit, format, and validate JSON",
|
||||
"tags": [
|
||||
|
|
Loading…
Reference in New Issue