-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commit of the following: commit a97cc2a Author: Jeremy Dorn <[email protected]> Date: Mon Sep 15 16:17:10 2014 -0700 Version bump to 0.7.10 commit b75eec9 Author: Jeremy Dorn <[email protected]> Date: Mon Sep 15 16:15:30 2014 -0700 Add option to remove empty object properties from returned JSON. Fixes #220 commit 5dd3627 Author: Jeremy Dorn <[email protected]> Date: Mon Sep 15 16:07:07 2014 -0700 Fix array/minItems bug. Fixes #246 commit e7fbe17 Author: Jeremy Dorn <[email protected]> Date: Mon Sep 15 14:49:29 2014 -0700 Standardize all notify/change/watch calls. Fixes #247 Fixes #248 Probably fixes a lot more bugs too commit 4a5bd8a Merge: ba381f5 941e096 Author: Jeremy Dorn <[email protected]> Date: Mon Sep 15 14:39:29 2014 -0700 Merge branch 'keynslug-patch-1' commit 941e096 Author: Andrew Majorov <[email protected]> Date: Tue Sep 16 01:03:10 2014 +0400 Properly handle cases when number extremum is 0 The condition does not hold when `schema.minimum` or `schema.maximum` equals 0, even if the property actually defined. commit ba381f5 Author: Jeremy <[email protected]> Date: Mon Sep 1 07:40:12 2014 -0700 Register with npm commit 50f3831 Author: Jeremy <[email protected]> Date: Sun Aug 31 19:55:32 2014 -0700 Fix Select2 bugs, enum_titles support for strings, add Select2 example. Fixes #240 Related to #231
- Loading branch information
Andre Kampert
committed
Sep 17, 2014
1 parent
50b9ccf
commit e4d681c
Showing
18 changed files
with
393 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "json-editor", | ||
"version": "0.7.8", | ||
"version": "0.7.10", | ||
"authors": [ | ||
"Jeremy Dorn <[email protected]>" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>JSON Editor Select2 Integration Example</title> | ||
<script src="../dist/jsoneditor.js"></script> | ||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/select2/3.4.8/select2.min.js"></script> | ||
<link rel="stylesheet" href="//cdn.jsdelivr.net/select2/3.4.8/select2.css"> | ||
</head> | ||
<body> | ||
<h1>JSON Editor Select2 Integration Example</h1> | ||
|
||
<p style='margin-bottom:20px;'>This example demonstrates JSONEditor's integration with Select2</p> | ||
|
||
<div id='editor_holder'></div> | ||
<button id='submit'>Submit (console.log)</button> | ||
|
||
<script> | ||
// Global Select2 options | ||
JSONEditor.plugins.select2.width = "300px"; | ||
|
||
// Initialize the editor with a JSON schema | ||
var editor = new JSONEditor(document.getElementById('editor_holder'),{ | ||
schema: { | ||
type: "object", | ||
title: "Text", | ||
required: ["fontSize","color","font","weight","possibleFonts"], | ||
properties: { | ||
fontSize: { | ||
type: "integer", | ||
enum: [10,11,12,14,16,18,20,22,24,36,48,60,72,100], | ||
default: 24, | ||
options: { | ||
// Override defaullt options | ||
select2_options: { | ||
width: 'off' | ||
} | ||
} | ||
}, | ||
color: { | ||
type: "string", | ||
enum: ["black","red","green","blue","yellow","orange","purple","brown","white","cyan","maagenta"] | ||
}, | ||
font: { | ||
type: "string", | ||
enumSource: "possible_fonts", | ||
watch: { | ||
"possible_fonts": "root.possibleFonts" | ||
}, | ||
}, | ||
weight: { | ||
type: "string", | ||
enum: ["normal","bold","bolder","lighter"], | ||
options: { | ||
enum_titles: ["Normal (400)","Bold (700)","Bolder (900)","Lighter (200)"] | ||
} | ||
}, | ||
possibleFonts: { | ||
type: "array", | ||
format: 'table', | ||
items: { | ||
type: "string" | ||
}, | ||
default: ["Arial","Times","Helvetica","Comic Sans"], | ||
options: { | ||
collapsed: true | ||
} | ||
} | ||
} | ||
}, | ||
startval: { | ||
color: "red" | ||
} | ||
}); | ||
|
||
// Hook up the submit button to log to the console | ||
document.getElementById('submit').addEventListener('click',function() { | ||
// Get the value from the editor | ||
console.log(editor.getValue()); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
{ | ||
"name": "jquery-jsoneditor", | ||
"name": "json-editor", | ||
"title": "JSONEditor", | ||
"description": "JSON Schema based editor", | ||
"version": "0.7.10", | ||
"main": "dist/jsoneditor.js", | ||
"author": { | ||
"name": "Jeremy Dorn", | ||
"email": "[email protected]", | ||
"url": "http://jeremydorn.com" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/jdorn/json-editor/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jdorn/json-editor.git" | ||
}, | ||
"keywords": [ | ||
"json", | ||
"schema", | ||
"jsonschema", | ||
"editor" | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
}, | ||
|
@@ -9,5 +32,10 @@ | |
"grunt-contrib-watch": "~0.5.3", | ||
"grunt-contrib-jshint": "^0.10.0", | ||
"grunt": "~0.4.2" | ||
}, | ||
"scripts": { | ||
"build": "npm install && grunt", | ||
"start": "grunt watch", | ||
"test": "grunt" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.