Fixed #41: there was a dragarea visible for the root node, which shouldn't be available.

This commit is contained in:
josdejong 2013-02-26 20:38:20 +01:00
parent d9a561b695
commit 809cbec31d
7 changed files with 17 additions and 12 deletions

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "JSON Editor", "name": "JSON Editor",
"version": "2.0.1", "version": "2.0.2",
"description": "JSON Editor is a tool to view, edit, and format JSON. It shows your data in an editable treeview and in formatted plain text.", "description": "JSON Editor is a tool to view, edit, and format JSON. It shows your data in an editable treeview and in formatted plain text.",
"app": { "app": {
"urls": [ "urls": [

View File

@ -26,7 +26,7 @@
* Copyright (C) 2011-2013 Jos de Jong, http://jsoneditoronline.org * Copyright (C) 2011-2013 Jos de Jong, http://jsoneditoronline.org
* *
* @author Jos de Jong, <wjosdejong@gmail.com> * @author Jos de Jong, <wjosdejong@gmail.com>
* @date 2013-02-21 * @date 2013-02-26
*/ */

View File

@ -37,7 +37,7 @@
Copyright (C) 2011-2013 Jos de Jong, http://jsoneditoronline.org Copyright (C) 2011-2013 Jos de Jong, http://jsoneditoronline.org
@author Jos de Jong, <wjosdejong@gmail.com> @author Jos de Jong, <wjosdejong@gmail.com>
@date 2013-02-21 @date 2013-02-26
--> -->
<meta name="description" content="JSON Editor Online is a web-based tool to view, edit, and format JSON. It shows your data side by side in a clear, editable treeview and in formatted plain text."> <meta name="description" content="JSON Editor Online is a web-based tool to view, edit, and format JSON. It shows your data side by side in a clear, editable treeview and in formatted plain text.">
@ -152,7 +152,7 @@
<div id="footer"> <div id="footer">
<div id="footer-inner"> <div id="footer-inner">
<a href="http://jsoneditoronline.org" class="footer">JSON Editor Online 2.0.1</a> <a href="http://jsoneditoronline.org" class="footer">JSON Editor Online 2.0.2</a>
&bull; &bull;
<a href="changelog.txt" target="_blank" class="footer">Changelog</a> <a href="changelog.txt" target="_blank" class="footer">Changelog</a>
&bull; &bull;

View File

@ -36,7 +36,7 @@
Copyright (C) 2011-2013 Jos de Jong, http://jsoneditoronline.org Copyright (C) 2011-2013 Jos de Jong, http://jsoneditoronline.org
@author Jos de Jong, <wjosdejong@gmail.com> @author Jos de Jong, <wjosdejong@gmail.com>
@date 2013-02-20 @date 2013-02-26
--> -->
<meta name="description" content="JSON Editor Online is a web-based tool to view, edit, and format JSON. It shows your data side by side in a clear, editable treeview and in formatted plain text."> <meta name="description" content="JSON Editor Online is a web-based tool to view, edit, and format JSON. It shows your data side by side in a clear, editable treeview and in formatted plain text.">
@ -181,7 +181,7 @@
<div id="footer"> <div id="footer">
<div id="footer-inner"> <div id="footer-inner">
<a href="http://jsoneditoronline.org" class="footer">JSON Editor Online 2.0.1</a> <a href="http://jsoneditoronline.org" class="footer">JSON Editor Online 2.0.2</a>
&bull; &bull;
<a href="../../changelog.txt" target="_blank" class="footer">Changelog</a> <a href="../../changelog.txt" target="_blank" class="footer">Changelog</a>
&bull; &bull;

View File

@ -2,7 +2,7 @@
<project name="jsoneditor-builder" default="main"> <project name="jsoneditor-builder" default="main">
<!-- the version number of must be updated here (according to changelog.txt) --> <!-- the version number of must be updated here (according to changelog.txt) -->
<property name="version" value="2.0.1"/> <property name="version" value="2.0.2"/>
<!-- compression tools --> <!-- compression tools -->
<property name="compressor" value="tools/yuicompressor-2.4.7.jar" /> <property name="compressor" value="tools/yuicompressor-2.4.7.jar" />

View File

@ -3,6 +3,11 @@
http://jsoneditoronline.org http://jsoneditoronline.org
## 2013-02-26, version 2.0.2
- Fixed: dragarea of the root node was wrongly visible is removed now.
## 2013-02-21, version 2.0.1 ## 2013-02-21, version 2.0.1
- Fixed undefined variable in the redo method. - Fixed undefined variable in the redo method.

View File

@ -1148,11 +1148,11 @@ jsoneditor.Node.prototype.getDom = function() {
if (this.editor.mode.editor) { if (this.editor.mode.editor) {
// create draggable area // create draggable area
var tdDrag = document.createElement('td'); var tdDrag = document.createElement('td');
var domDrag = document.createElement('button'); if (this.parent) {
dom.drag = domDrag; var domDrag = document.createElement('button');
domDrag.className = 'dragarea'; dom.drag = domDrag;
domDrag.title = 'Drag to move this field (Alt+Shift+Arrows)'; domDrag.className = 'dragarea';
if (domDrag) { domDrag.title = 'Drag to move this field (Alt+Shift+Arrows)';
tdDrag.appendChild(domDrag); tdDrag.appendChild(domDrag);
} }
dom.tr.appendChild(tdDrag); dom.tr.appendChild(tdDrag);