Released version `5.10.1`

This commit is contained in:
jos 2017-11-15 11:52:35 +01:00
parent 9e105276d9
commit c4cff2e1a0
9 changed files with 79 additions and 87 deletions

View File

@ -24,7 +24,7 @@
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org * Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
* *
* @author Jos de Jong, <wjosdejong@gmail.com> * @author Jos de Jong, <wjosdejong@gmail.com>
* @version 5.10.0 * @version 5.10.1
* @date 2017-11-15 * @date 2017-11-15
*/ */
(function webpackUniversalModuleDefinition(root, factory) { (function webpackUniversalModuleDefinition(root, factory) {
@ -9103,15 +9103,14 @@ return /******/ (function(modules) { // webpackBootstrap
} }
if (options.statusBar) { if (options.statusBar) {
if (this.mode === 'code') {
util.addClassName(this.content, 'has-status-bar');
util.addClassName(this.content, 'has-status-bar'); this.curserInfoElements = {};
var statusBar = document.createElement('div');
statusBar.className = 'jsoneditor-statusbar';
this.frame.appendChild(statusBar);
this.curserInfoElements = {};
var statusBar = document.createElement('div');
statusBar.className = 'jsoneditor-statusbar';
this.frame.appendChild(statusBar);
if (this.mode == 'code') {
var lnLabel = document.createElement('span'); var lnLabel = document.createElement('span');
lnLabel.className = 'jsoneditor-curserinfo-label'; lnLabel.className = 'jsoneditor-curserinfo-label';
lnLabel.innerText = 'Ln:'; lnLabel.innerText = 'Ln:';
@ -9136,23 +9135,23 @@ return /******/ (function(modules) { // webpackBootstrap
this.curserInfoElements.colVal = colVal; this.curserInfoElements.colVal = colVal;
this.curserInfoElements.lnVal = lnVal; this.curserInfoElements.lnVal = lnVal;
var countLabel = document.createElement('span');
countLabel.className = 'jsoneditor-curserinfo-label';
countLabel.innerText = 'characters selected';
countLabel.style.display = 'none';
var countVal = document.createElement('span');
countVal.className = 'jsoneditor-curserinfo-count';
countVal.innerText = 0;
countVal.style.display = 'none';
this.curserInfoElements.countLabel = countLabel;
this.curserInfoElements.countVal = countVal;
statusBar.appendChild(countVal);
statusBar.appendChild(countLabel);
} }
var countLabel = document.createElement('span');
countLabel.className = 'jsoneditor-curserinfo-label';
countLabel.innerText = 'selected';
countLabel.style.display = 'none';
var countVal = document.createElement('span');
countVal.className = 'jsoneditor-curserinfo-count';
countVal.innerText = 0;
countVal.style.display = 'none';
this.curserInfoElements.countLabel = countLabel;
this.curserInfoElements.countVal = countVal;
statusBar.appendChild(countVal);
statusBar.appendChild(countLabel);
} }
this.setSchema(this.options.schema, this.options.schemaRefs); this.setSchema(this.options.schema, this.options.schemaRefs);
@ -9191,9 +9190,10 @@ return /******/ (function(modules) { // webpackBootstrap
if (selectionRange.start !== selectionRange.end) { if (selectionRange.start !== selectionRange.end) {
this._setSelectionCountDisplay(Math.abs(selectionRange.end - selectionRange.start)); this._setSelectionCountDisplay(Math.abs(selectionRange.end - selectionRange.start));
} }
} else if (this.aceEditor) { } else if (this.aceEditor && this.curserInfoElements) {
var curserPos = this.aceEditor.getCursorPosition(); var curserPos = this.aceEditor.getCursorPosition();
var selectedText = this.aceEditor.getSelectedText(); var selectedText = this.aceEditor.getSelectedText();
this.curserInfoElements.lnVal.innerText = curserPos.row + 1; this.curserInfoElements.lnVal.innerText = curserPos.row + 1;
this.curserInfoElements.colVal.innerText = curserPos.column + 1; this.curserInfoElements.colVal.innerText = curserPos.column + 1;
this._setSelectionCountDisplay(selectedText.length); this._setSelectionCountDisplay(selectedText.length);
@ -9249,8 +9249,8 @@ return /******/ (function(modules) { // webpackBootstrap
}; };
textmode._setSelectionCountDisplay = function (value) { textmode._setSelectionCountDisplay = function (value) {
if (this.options.statusBar) { if (this.options.statusBar && this.curserInfoElements) {
if (value && this.curserInfoElements.countVal) { if (value && this.curserInfoElements && this.curserInfoElements.countVal) {
this.curserInfoElements.countVal.innerText = value; this.curserInfoElements.countVal.innerText = value;
this.curserInfoElements.countVal.style.display = 'inline'; this.curserInfoElements.countVal.style.display = 'inline';
this.curserInfoElements.countLabel.style.display = 'inline'; this.curserInfoElements.countLabel.style.display = 'inline';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

48
dist/jsoneditor.css vendored
View File

@ -234,8 +234,8 @@ div.jsoneditor-outer.has-nav-bar {
} }
div.jsoneditor-outer.has-status-bar { div.jsoneditor-outer.has-status-bar {
margin: -35px 0 -16px 0; margin: -35px 0 -26px 0;
padding: 35px 0 16px 0; padding: 35px 0 26px 0;
} }
textarea.jsoneditor-text, textarea.jsoneditor-text,
@ -265,7 +265,7 @@ textarea.jsoneditor-text {
tr.jsoneditor-highlight, tr.jsoneditor-highlight,
tr.jsoneditor-selected { tr.jsoneditor-selected {
background-color: #e6e6e6; background-color: #d3d3d3;
} }
tr.jsoneditor-selected button.jsoneditor-dragarea, tr.jsoneditor-selected button.jsoneditor-dragarea,
@ -992,7 +992,7 @@ div.jsoneditor div.autocomplete.hint {
left: 4px; left: 4px;
} }
div.jsoneditor-treepath { div.jsoneditor-treepath {
padding: 3px 0 2px 5px; padding: 0 5px;
overflow: hidden; overflow: hidden;
} }
@ -1019,11 +1019,16 @@ div.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover {
text-decoration: underline; text-decoration: underline;
} }
div.jsoneditor-statusbar { div.jsoneditor-statusbar {
line-height: 17px; line-height: 26px;
height: 17px; height: 26px;
margin-top: -26px;
color: #808080; color: #808080;
background-color: #dcdcdc; background-color: #ebebeb;
margin-top: -17px; border-top: 1px solid #d3d3d3;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 10pt;
} }
div.jsoneditor-statusbar > .jsoneditor-curserinfo-label { div.jsoneditor-statusbar > .jsoneditor-curserinfo-label {
@ -1031,43 +1036,30 @@ div.jsoneditor-statusbar > .jsoneditor-curserinfo-label {
} }
div.jsoneditor-statusbar > .jsoneditor-curserinfo-val { div.jsoneditor-statusbar > .jsoneditor-curserinfo-val {
margin-right: 4px; margin-right: 12px;
} }
div.jsoneditor-statusbar > .jsoneditor-curserinfo-count { div.jsoneditor-statusbar > .jsoneditor-curserinfo-count {
margin-left: 4px; margin-left: 4px;
} }
div.jsoneditor-statusbar > span {
font-size: 12px;
}
div.jsoneditor-navigation-bar { div.jsoneditor-navigation-bar {
width: 100%; width: 100%;
height: 26px; height: 26px;
padding: 2px; line-height: 26px;
padding: 0;
margin: 0; margin: 0;
border-bottom: 1px solid #d3d3d3;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
color: #808080; color: #808080;
background-color: #dcdcdc; background-color: #ebebeb;
} font-size: 10pt;
div.jsoneditor-navigation-bar:before {
content: '';
width: 100%;
height: 1px;
background-color: white;
opacity: 0.8;
position: absolute;
left: 0;
margin-top: -3px;
} }
div.jsoneditor-navigation-bar.nav-bar-empty:after { div.jsoneditor-navigation-bar.nav-bar-empty:after {
content: 'Select a node ...'; content: 'Select a node ...';
color: rgba(104, 104, 91, 0.56); color: rgba(104, 104, 91, 0.56);
position: absolute; position: absolute;
margin-left: 6px; margin-left: 5px;
margin-top: -1px;
} }

54
dist/jsoneditor.js vendored
View File

@ -24,7 +24,7 @@
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org * Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
* *
* @author Jos de Jong, <wjosdejong@gmail.com> * @author Jos de Jong, <wjosdejong@gmail.com>
* @version 5.10.0 * @version 5.10.1
* @date 2017-11-15 * @date 2017-11-15
*/ */
(function webpackUniversalModuleDefinition(root, factory) { (function webpackUniversalModuleDefinition(root, factory) {
@ -16614,15 +16614,14 @@ return /******/ (function(modules) { // webpackBootstrap
} }
if (options.statusBar) { if (options.statusBar) {
if (this.mode === 'code') {
util.addClassName(this.content, 'has-status-bar');
util.addClassName(this.content, 'has-status-bar'); this.curserInfoElements = {};
var statusBar = document.createElement('div');
statusBar.className = 'jsoneditor-statusbar';
this.frame.appendChild(statusBar);
this.curserInfoElements = {};
var statusBar = document.createElement('div');
statusBar.className = 'jsoneditor-statusbar';
this.frame.appendChild(statusBar);
if (this.mode == 'code') {
var lnLabel = document.createElement('span'); var lnLabel = document.createElement('span');
lnLabel.className = 'jsoneditor-curserinfo-label'; lnLabel.className = 'jsoneditor-curserinfo-label';
lnLabel.innerText = 'Ln:'; lnLabel.innerText = 'Ln:';
@ -16647,23 +16646,23 @@ return /******/ (function(modules) { // webpackBootstrap
this.curserInfoElements.colVal = colVal; this.curserInfoElements.colVal = colVal;
this.curserInfoElements.lnVal = lnVal; this.curserInfoElements.lnVal = lnVal;
var countLabel = document.createElement('span');
countLabel.className = 'jsoneditor-curserinfo-label';
countLabel.innerText = 'characters selected';
countLabel.style.display = 'none';
var countVal = document.createElement('span');
countVal.className = 'jsoneditor-curserinfo-count';
countVal.innerText = 0;
countVal.style.display = 'none';
this.curserInfoElements.countLabel = countLabel;
this.curserInfoElements.countVal = countVal;
statusBar.appendChild(countVal);
statusBar.appendChild(countLabel);
} }
var countLabel = document.createElement('span');
countLabel.className = 'jsoneditor-curserinfo-label';
countLabel.innerText = 'selected';
countLabel.style.display = 'none';
var countVal = document.createElement('span');
countVal.className = 'jsoneditor-curserinfo-count';
countVal.innerText = 0;
countVal.style.display = 'none';
this.curserInfoElements.countLabel = countLabel;
this.curserInfoElements.countVal = countVal;
statusBar.appendChild(countVal);
statusBar.appendChild(countLabel);
} }
this.setSchema(this.options.schema, this.options.schemaRefs); this.setSchema(this.options.schema, this.options.schemaRefs);
@ -16702,9 +16701,10 @@ return /******/ (function(modules) { // webpackBootstrap
if (selectionRange.start !== selectionRange.end) { if (selectionRange.start !== selectionRange.end) {
this._setSelectionCountDisplay(Math.abs(selectionRange.end - selectionRange.start)); this._setSelectionCountDisplay(Math.abs(selectionRange.end - selectionRange.start));
} }
} else if (this.aceEditor) { } else if (this.aceEditor && this.curserInfoElements) {
var curserPos = this.aceEditor.getCursorPosition(); var curserPos = this.aceEditor.getCursorPosition();
var selectedText = this.aceEditor.getSelectedText(); var selectedText = this.aceEditor.getSelectedText();
this.curserInfoElements.lnVal.innerText = curserPos.row + 1; this.curserInfoElements.lnVal.innerText = curserPos.row + 1;
this.curserInfoElements.colVal.innerText = curserPos.column + 1; this.curserInfoElements.colVal.innerText = curserPos.column + 1;
this._setSelectionCountDisplay(selectedText.length); this._setSelectionCountDisplay(selectedText.length);
@ -16760,8 +16760,8 @@ return /******/ (function(modules) { // webpackBootstrap
}; };
textmode._setSelectionCountDisplay = function (value) { textmode._setSelectionCountDisplay = function (value) {
if (this.options.statusBar) { if (this.options.statusBar && this.curserInfoElements) {
if (value && this.curserInfoElements.countVal) { if (value && this.curserInfoElements && this.curserInfoElements.countVal) {
this.curserInfoElements.countVal.innerText = value; this.curserInfoElements.countVal.innerText = value;
this.curserInfoElements.countVal.style.display = 'inline'; this.curserInfoElements.countVal.style.display = 'inline';
this.curserInfoElements.countLabel.style.display = 'inline'; this.curserInfoElements.countLabel.style.display = 'inline';

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", "name": "jsoneditor",
"version": "5.10.0", "version": "5.10.1",
"main": "./index", "main": "./index",
"description": "A web-based tool to view, edit, format, and validate JSON", "description": "A web-based tool to view, edit, format, and validate JSON",
"tags": [ "tags": [