Released version `5.10.1`
This commit is contained in:
parent
9e105276d9
commit
c4cff2e1a0
|
@ -24,7 +24,7 @@
|
|||
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
|
||||
*
|
||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||
* @version 5.10.0
|
||||
* @version 5.10.1
|
||||
* @date 2017-11-15
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
|
@ -9103,15 +9103,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
|
||||
if (options.statusBar) {
|
||||
|
||||
util.addClassName(this.content, 'has-status-bar');
|
||||
if (this.mode === 'code') {
|
||||
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');
|
||||
lnLabel.className = 'jsoneditor-curserinfo-label';
|
||||
lnLabel.innerText = 'Ln:';
|
||||
|
@ -9136,23 +9135,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
this.curserInfoElements.colVal = colVal;
|
||||
this.curserInfoElements.lnVal = lnVal;
|
||||
}
|
||||
|
||||
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';
|
||||
var countLabel = document.createElement('span');
|
||||
countLabel.className = 'jsoneditor-curserinfo-label';
|
||||
countLabel.innerText = 'characters selected';
|
||||
countLabel.style.display = 'none';
|
||||
|
||||
this.curserInfoElements.countLabel = countLabel;
|
||||
this.curserInfoElements.countVal = countVal;
|
||||
var countVal = document.createElement('span');
|
||||
countVal.className = 'jsoneditor-curserinfo-count';
|
||||
countVal.innerText = 0;
|
||||
countVal.style.display = 'none';
|
||||
|
||||
statusBar.appendChild(countVal);
|
||||
statusBar.appendChild(countLabel);
|
||||
this.curserInfoElements.countLabel = countLabel;
|
||||
this.curserInfoElements.countVal = countVal;
|
||||
|
||||
statusBar.appendChild(countVal);
|
||||
statusBar.appendChild(countLabel);
|
||||
}
|
||||
}
|
||||
|
||||
this.setSchema(this.options.schema, this.options.schemaRefs);
|
||||
|
@ -9191,9 +9190,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
if (selectionRange.start !== selectionRange.end) {
|
||||
this._setSelectionCountDisplay(Math.abs(selectionRange.end - selectionRange.start));
|
||||
}
|
||||
} else if (this.aceEditor) {
|
||||
} else if (this.aceEditor && this.curserInfoElements) {
|
||||
var curserPos = this.aceEditor.getCursorPosition();
|
||||
var selectedText = this.aceEditor.getSelectedText();
|
||||
|
||||
this.curserInfoElements.lnVal.innerText = curserPos.row + 1;
|
||||
this.curserInfoElements.colVal.innerText = curserPos.column + 1;
|
||||
this._setSelectionCountDisplay(selectedText.length);
|
||||
|
@ -9249,8 +9249,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
};
|
||||
|
||||
textmode._setSelectionCountDisplay = function (value) {
|
||||
if (this.options.statusBar) {
|
||||
if (value && this.curserInfoElements.countVal) {
|
||||
if (this.options.statusBar && this.curserInfoElements) {
|
||||
if (value && this.curserInfoElements && this.curserInfoElements.countVal) {
|
||||
this.curserInfoElements.countVal.innerText = value;
|
||||
this.curserInfoElements.countVal.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
|
@ -234,8 +234,8 @@ div.jsoneditor-outer.has-nav-bar {
|
|||
}
|
||||
|
||||
div.jsoneditor-outer.has-status-bar {
|
||||
margin: -35px 0 -16px 0;
|
||||
padding: 35px 0 16px 0;
|
||||
margin: -35px 0 -26px 0;
|
||||
padding: 35px 0 26px 0;
|
||||
}
|
||||
|
||||
textarea.jsoneditor-text,
|
||||
|
@ -265,7 +265,7 @@ textarea.jsoneditor-text {
|
|||
|
||||
tr.jsoneditor-highlight,
|
||||
tr.jsoneditor-selected {
|
||||
background-color: #e6e6e6;
|
||||
background-color: #d3d3d3;
|
||||
}
|
||||
|
||||
tr.jsoneditor-selected button.jsoneditor-dragarea,
|
||||
|
@ -992,7 +992,7 @@ div.jsoneditor div.autocomplete.hint {
|
|||
left: 4px;
|
||||
}
|
||||
div.jsoneditor-treepath {
|
||||
padding: 3px 0 2px 5px;
|
||||
padding: 0 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
@ -1019,11 +1019,16 @@ div.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover {
|
|||
text-decoration: underline;
|
||||
}
|
||||
div.jsoneditor-statusbar {
|
||||
line-height: 17px;
|
||||
height: 17px;
|
||||
line-height: 26px;
|
||||
height: 26px;
|
||||
margin-top: -26px;
|
||||
color: #808080;
|
||||
background-color: #dcdcdc;
|
||||
margin-top: -17px;
|
||||
background-color: #ebebeb;
|
||||
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 {
|
||||
|
@ -1031,43 +1036,30 @@ div.jsoneditor-statusbar > .jsoneditor-curserinfo-label {
|
|||
}
|
||||
|
||||
div.jsoneditor-statusbar > .jsoneditor-curserinfo-val {
|
||||
margin-right: 4px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
div.jsoneditor-statusbar > .jsoneditor-curserinfo-count {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
div.jsoneditor-statusbar > span {
|
||||
font-size: 12px;
|
||||
}
|
||||
div.jsoneditor-navigation-bar {
|
||||
width: 100%;
|
||||
height: 26px;
|
||||
padding: 2px;
|
||||
line-height: 26px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid #d3d3d3;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: #808080;
|
||||
background-color: #dcdcdc;
|
||||
}
|
||||
|
||||
div.jsoneditor-navigation-bar:before {
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: white;
|
||||
opacity: 0.8;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
margin-top: -3px;
|
||||
background-color: #ebebeb;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
div.jsoneditor-navigation-bar.nav-bar-empty:after {
|
||||
content: 'Select a node ...';
|
||||
color: rgba(104, 104, 91, 0.56);
|
||||
position: absolute;
|
||||
margin-left: 6px;
|
||||
margin-top: -1px;
|
||||
margin-left: 5px;
|
||||
}
|
|
@ -24,7 +24,7 @@
|
|||
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
|
||||
*
|
||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||
* @version 5.10.0
|
||||
* @version 5.10.1
|
||||
* @date 2017-11-15
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
|
@ -16614,15 +16614,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
|
||||
if (options.statusBar) {
|
||||
|
||||
util.addClassName(this.content, 'has-status-bar');
|
||||
if (this.mode === 'code') {
|
||||
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');
|
||||
lnLabel.className = 'jsoneditor-curserinfo-label';
|
||||
lnLabel.innerText = 'Ln:';
|
||||
|
@ -16647,23 +16646,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
this.curserInfoElements.colVal = colVal;
|
||||
this.curserInfoElements.lnVal = lnVal;
|
||||
}
|
||||
|
||||
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';
|
||||
var countLabel = document.createElement('span');
|
||||
countLabel.className = 'jsoneditor-curserinfo-label';
|
||||
countLabel.innerText = 'characters selected';
|
||||
countLabel.style.display = 'none';
|
||||
|
||||
this.curserInfoElements.countLabel = countLabel;
|
||||
this.curserInfoElements.countVal = countVal;
|
||||
var countVal = document.createElement('span');
|
||||
countVal.className = 'jsoneditor-curserinfo-count';
|
||||
countVal.innerText = 0;
|
||||
countVal.style.display = 'none';
|
||||
|
||||
statusBar.appendChild(countVal);
|
||||
statusBar.appendChild(countLabel);
|
||||
this.curserInfoElements.countLabel = countLabel;
|
||||
this.curserInfoElements.countVal = countVal;
|
||||
|
||||
statusBar.appendChild(countVal);
|
||||
statusBar.appendChild(countLabel);
|
||||
}
|
||||
}
|
||||
|
||||
this.setSchema(this.options.schema, this.options.schemaRefs);
|
||||
|
@ -16702,9 +16701,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
if (selectionRange.start !== selectionRange.end) {
|
||||
this._setSelectionCountDisplay(Math.abs(selectionRange.end - selectionRange.start));
|
||||
}
|
||||
} else if (this.aceEditor) {
|
||||
} else if (this.aceEditor && this.curserInfoElements) {
|
||||
var curserPos = this.aceEditor.getCursorPosition();
|
||||
var selectedText = this.aceEditor.getSelectedText();
|
||||
|
||||
this.curserInfoElements.lnVal.innerText = curserPos.row + 1;
|
||||
this.curserInfoElements.colVal.innerText = curserPos.column + 1;
|
||||
this._setSelectionCountDisplay(selectedText.length);
|
||||
|
@ -16760,8 +16760,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
};
|
||||
|
||||
textmode._setSelectionCountDisplay = function (value) {
|
||||
if (this.options.statusBar) {
|
||||
if (value && this.curserInfoElements.countVal) {
|
||||
if (this.options.statusBar && this.curserInfoElements) {
|
||||
if (value && this.curserInfoElements && this.curserInfoElements.countVal) {
|
||||
this.curserInfoElements.countVal.innerText = value;
|
||||
this.curserInfoElements.countVal.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
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "jsoneditor",
|
||||
"version": "5.10.0",
|
||||
"version": "5.10.1",
|
||||
"main": "./index",
|
||||
"description": "A web-based tool to view, edit, format, and validate JSON",
|
||||
"tags": [
|
||||
|
|
Loading…
Reference in New Issue