Released version 5.9.3

This commit is contained in:
jos 2017-07-24 11:56:21 +02:00
parent 06bbf2d1a5
commit c51db94f88
11 changed files with 87 additions and 38 deletions

View File

@ -3,9 +3,9 @@
https://github.com/josdejong/jsoneditor
## not yet released, version 5.9.3
## 2017-07-24, version 5.9.3
- Fixed broken multi-selection.
- Fixed broken multi-selection (regression).
## 2017-07-13, version 5.9.2

View File

@ -24,8 +24,8 @@
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
*
* @author Jos de Jong, <wjosdejong@gmail.com>
* @version 5.9.2
* @date 2017-07-13
* @version 5.9.3
* @date 2017-07-24
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
@ -1187,7 +1187,7 @@ return /******/ (function(modules) { // webpackBootstrap
};
this.menu.appendChild(expandAll);
// create expand all button
// create collapse all button
var collapseAll = document.createElement('button');
collapseAll.type = 'button';
collapseAll.title = 'Collapse all fields';
@ -1685,7 +1685,7 @@ return /******/ (function(modules) { // webpackBootstrap
/**
* Show a contextmenu for this node.
* Used for multiselection
* @param {HTMLElement} anchor Anchor element to attache the context menu to.
* @param {HTMLElement} anchor Anchor element to attach the context menu to.
* @param {function} [onClose] Callback method called when the context menu
* is being closed.
*/
@ -3769,7 +3769,11 @@ return /******/ (function(modules) { // webpackBootstrap
var divIcon = document.createElement('div');
divIcon.className = 'jsoneditor-icon';
button.appendChild(divIcon);
button.appendChild(document.createTextNode(item.text));
var divText = document.createElement('div');
divText.className = 'jsoneditor-text' +
(item.click ? '' : ' jsoneditor-right-margin');
divText.appendChild(document.createTextNode(item.text));
button.appendChild(divText);
var buttonSubmenu;
if (item.click) {
@ -3816,7 +3820,8 @@ return /******/ (function(modules) { // webpackBootstrap
}
else {
// no submenu, just a button with clickhandler
button.innerHTML = '<div class="jsoneditor-icon"></div>' + item.text;
button.innerHTML = '<div class="jsoneditor-icon"></div>' +
'<div class="jsoneditor-text">' + item.text + '</div>';
}
domItems.push(domItem);
@ -4521,6 +4526,16 @@ return /******/ (function(modules) { // webpackBootstrap
return (this.parent ? this.parent.getLevel() + 1 : 0);
};
/**
* Get jsonpath of the current node
* @return {Node[]} Returns an array with nodes
*/
Node.prototype.getNodePath = function () {
var path = this.parent ? this.parent.getNodePath() : [];
path.push(this);
return path;
};
/**
* Create a clone of a node
* The complete state of a clone is copied, including whether it is expanded or
@ -7934,7 +7949,7 @@ return /******/ (function(modules) { // webpackBootstrap
var items = [
// create append button
{
'text': 'Append!',
'text': 'Append',
'title': 'Append a new field with type \'auto\' (Ctrl+Shift+Ins)',
'submenuTitle': 'Select the type of the field to be appended',
'className': 'jsoneditor-insert',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

35
dist/jsoneditor.css vendored
View File

@ -504,13 +504,14 @@ div.jsoneditor-contextmenu {
div.jsoneditor-contextmenu ul,
div.jsoneditor-contextmenu li {
box-sizing: content-box;
position: relative;
}
div.jsoneditor-contextmenu ul {
position: relative;
left: 0;
top: 0;
width: 124px;
width: 128px;
background: white;
border: 1px solid #d3d3d3;
box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3);
@ -520,10 +521,11 @@ div.jsoneditor-contextmenu ul {
}
div.jsoneditor-contextmenu ul li button {
padding: 0;
position: relative;
padding: 0 4px 0 0;
margin: 0;
width: 124px;
height: 24px;
width: 128px;
height: auto;
border: none;
cursor: pointer;
color: #4d4d4d;
@ -531,7 +533,6 @@ div.jsoneditor-contextmenu ul li button {
font-size: 10pt;
font-family: arial, sans-serif;
box-sizing: border-box;
line-height: 26px;
text-align: left;
}
@ -550,7 +551,8 @@ div.jsoneditor-contextmenu ul li button:focus {
}
div.jsoneditor-contextmenu ul li button.jsoneditor-default {
width: 92px;
width: 96px;
/* 128px - 32px */
}
div.jsoneditor-contextmenu ul li button.jsoneditor-expand {
@ -561,7 +563,9 @@ div.jsoneditor-contextmenu ul li button.jsoneditor-expand {
}
div.jsoneditor-contextmenu div.jsoneditor-icon {
float: left;
position: absolute;
top: 0;
left: 0;
width: 24px;
height: 24px;
border: none;
@ -570,8 +574,23 @@ div.jsoneditor-contextmenu div.jsoneditor-icon {
background-image: url("img/jsoneditor-icons.svg");
}
div.jsoneditor-contextmenu ul li ul div.jsoneditor-icon {
margin-left: 24px;
}
div.jsoneditor-contextmenu div.jsoneditor-text {
padding: 4px 0 4px 24px;
word-wrap: break-word;
}
div.jsoneditor-contextmenu div.jsoneditor-text.jsoneditor-right-margin {
padding-right: 24px;
}
div.jsoneditor-contextmenu ul li button div.jsoneditor-expand {
float: right;
position: absolute;
top: 0;
right: 0;
width: 24px;
height: 24px;
padding: 0;

29
dist/jsoneditor.js vendored
View File

@ -24,8 +24,8 @@
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
*
* @author Jos de Jong, <wjosdejong@gmail.com>
* @version 5.9.2
* @date 2017-07-13
* @version 5.9.3
* @date 2017-07-24
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
@ -9163,7 +9163,7 @@ return /******/ (function(modules) { // webpackBootstrap
};
this.menu.appendChild(expandAll);
// create expand all button
// create collapse all button
var collapseAll = document.createElement('button');
collapseAll.type = 'button';
collapseAll.title = 'Collapse all fields';
@ -9661,7 +9661,7 @@ return /******/ (function(modules) { // webpackBootstrap
/**
* Show a contextmenu for this node.
* Used for multiselection
* @param {HTMLElement} anchor Anchor element to attache the context menu to.
* @param {HTMLElement} anchor Anchor element to attach the context menu to.
* @param {function} [onClose] Callback method called when the context menu
* is being closed.
*/
@ -11745,7 +11745,11 @@ return /******/ (function(modules) { // webpackBootstrap
var divIcon = document.createElement('div');
divIcon.className = 'jsoneditor-icon';
button.appendChild(divIcon);
button.appendChild(document.createTextNode(item.text));
var divText = document.createElement('div');
divText.className = 'jsoneditor-text' +
(item.click ? '' : ' jsoneditor-right-margin');
divText.appendChild(document.createTextNode(item.text));
button.appendChild(divText);
var buttonSubmenu;
if (item.click) {
@ -11792,7 +11796,8 @@ return /******/ (function(modules) { // webpackBootstrap
}
else {
// no submenu, just a button with clickhandler
button.innerHTML = '<div class="jsoneditor-icon"></div>' + item.text;
button.innerHTML = '<div class="jsoneditor-icon"></div>' +
'<div class="jsoneditor-text">' + item.text + '</div>';
}
domItems.push(domItem);
@ -12497,6 +12502,16 @@ return /******/ (function(modules) { // webpackBootstrap
return (this.parent ? this.parent.getLevel() + 1 : 0);
};
/**
* Get jsonpath of the current node
* @return {Node[]} Returns an array with nodes
*/
Node.prototype.getNodePath = function () {
var path = this.parent ? this.parent.getNodePath() : [];
path.push(this);
return path;
};
/**
* Create a clone of a node
* The complete state of a clone is copied, including whether it is expanded or
@ -15910,7 +15925,7 @@ return /******/ (function(modules) { // webpackBootstrap
var items = [
// create append button
{
'text': 'Append!',
'text': 'Append',
'title': 'Append a new field with type \'auto\' (Ctrl+Shift+Ins)',
'submenuTitle': 'Select the type of the field to be appended',
'className': 'jsoneditor-insert',

2
dist/jsoneditor.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "jsoneditor",
"version": "5.9.2",
"version": "5.9.3",
"main": "./index",
"description": "A web-based tool to view, edit, format, and validate JSON",
"tags": [

View File

@ -172,7 +172,7 @@ function appendNodeFactory(Node) {
var items = [
// create append button
{
'text': 'Append!',
'text': 'Append',
'title': 'Append a new field with type \'auto\' (Ctrl+Shift+Ins)',
'submenuTitle': 'Select the type of the field to be appended',
'className': 'jsoneditor-insert',