Skip to content

Commit

Permalink
Released version 5.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Jul 24, 2017
1 parent 06bbf2d commit c51db94
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 38 deletions.
4 changes: 2 additions & 2 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 22 additions & 7 deletions dist/jsoneditor-minimalist.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
*
* @author Jos de Jong, <[email protected]>
* @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')
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion dist/jsoneditor-minimalist.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/jsoneditor-minimalist.min.js

Large diffs are not rendered by default.

35 changes: 27 additions & 8 deletions dist/jsoneditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -520,18 +521,18 @@ 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;
background: transparent;
font-size: 10pt;
font-family: arial, sans-serif;
box-sizing: border-box;
line-height: 26px;
text-align: left;
}

Expand All @@ -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 {
Expand All @@ -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;
Expand All @@ -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;
Expand Down
29 changes: 22 additions & 7 deletions dist/jsoneditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
*
* @author Jos de Jong, <[email protected]>
* @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')
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion dist/jsoneditor.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jsoneditor.min.css

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/jsoneditor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion src/js/appendNodeFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit c51db94

Please sign in to comment.