Skip to content

Commit 95d6468

Browse files
committed
set CDN location
1 parent 3b42d72 commit 95d6468

File tree

1 file changed

+107
-102
lines changed

1 file changed

+107
-102
lines changed

README.md

Lines changed: 107 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,107 @@
1-
# json-forms
2-
[![bower version](https://img.shields.io/bower/v/json-forms.svg?style=flat-square)](#bower)
3-
[![Build Status](https://api.travis-ci.org/brutusin/json-forms.svg?branch=master)](https://travis-ci.org/brutusin/json-forms)
4-
5-
`org.brutusin:json-forms` is a javascript library that generates HTML forms from JSON Schemas.
6-
7-
`Documentation in progress`
8-
9-
**Table of Contents:**
10-
11-
- [org.brutusin:json-forms](#)
12-
- [Features](#features)
13-
- [Usage](#usage)
14-
- [Demo](#demo)
15-
- [Dynamic schemas](#dynamic-schemas)
16-
- [API](#api)
17-
- [Extensions](#extensions)
18-
- [TODO](#todo)
19-
- [See also](#see-also)
20-
- [Support, bugs and requests](#support-bugs-and-requests)
21-
- [Authors](#authors)
22-
- [License](#license)
23-
24-
## Features
25-
* Dynamic schemas support
26-
* Extensible and customizable
27-
* No external libraries needed
28-
* Validation
29-
* Multiple forms per document supported
30-
31-
## Usage
32-
Include the main library dependencies:
33-
```html
34-
<link rel="stylesheet" href='dist/css/brutusin-json-forms.min.css'/>
35-
<script src="dist/js/brutusin-json-forms.min.js"></script>
36-
```
37-
Optionally, include the bootstrap extension (requires bootstrap):
38-
```html
39-
<script src="dist/js/brutusin-json-forms-bootstrap.min.js"></script>
40-
```
41-
Create the javascript `BrutusinForms` instance, being `schema` a javascript `object` representing the schema structure:
42-
```javascript
43-
var BrutusinForms = brutusin["json-forms"];
44-
var bf = BrutusinForms.create(schema);
45-
```
46-
And finally, render the form inside a container, with optional JSON initial `data` preloaded:
47-
```javascript
48-
var container = document.getElementById('container');
49-
bf.render(container, data);
50-
```
51-
52-
## Demo
53-
[![demo](http://brutusin.org/json-forms/img/json-forms.png)](http://brutusin.org/json-forms/)
54-
http://brutusin.org/json-forms/
55-
56-
## Dynamic schemas
57-
This library supports dynamic schemas, that is, subschemas that can change depending on the value of other parts of the data.
58-
59-
This lets creating **dynamic forms** that vary their shape depending on the values entered by the user. This is extremely useful for big autogenerated schemas, that aggregates lots of subschemas and have functional bindings, given that it allows to show the user a simpler, non-error-prone form, also avoiding asking for unneeded data.
60-
61-
Dynamic schemas are built upon two main blocks:
62-
* Custom (non-standard) schema property called `dependsOn`, to build the subschemas dependency graph
63-
* [Brutusin DSL for path expressions](https://github.com/brutusin/json#path-expressions), for identifying subschemas.
64-
65-
### `dependsOn` schema extension
66-
### Dynamic schema resolution
67-
68-
## API
69-
### Static members:
70-
71-
Member|Description
72-
------| -------
73-
`BrutusinForms.create(schema)`|BrutusinForms factory method
74-
`BrutusinForms.addDecorator(f(htmlElement, schema))`| Register a callback function to be notified after an HTML element has been rendered (passed as parameter). See [brutusin-json-forms-bootstrap.js](src/js/brutusin-json-forms-bootstrap.js) for an example of *bootstrap* decorator.
75-
`BrutusinForms.postRender(instance)`|Callback function to be notified after a BrutusinForms instance has been rendered (passed as parameter)
76-
`BrutusinForms.instances`|Array containing all the BrutusinForms instances created in the document by the factory method.
77-
78-
### Instance members:
79-
80-
Member|Description
81-
------| -------
82-
`bf.render(container, data)`| Renders the form inside the the container, with the specified data preloaded
83-
`bf.validate()`| Returns `true` if the input data entered by the user passes validation
84-
`bf.getData()`| Returns the javascript object with the data entered by the user
85-
`bf.schemaResolver(schemaIdArray, data)`| Schema resolver for [dynamic schemas](#dynamic-schemas)
86-
87-
## Extensions
88-
89-
90-
##See also
91-
92-
## Support bugs and requests
93-
https://github.com/brutusin/json/issues
94-
95-
## Authors
96-
97-
- Ignacio del Valle Alles (<https://github.com/idelvall/>)
98-
99-
Contributions are always welcome and greatly appreciated!
100-
101-
##License
102-
Apache License, Version 2.0
1+
# json-forms
2+
[![bower version](https://img.shields.io/bower/v/json-forms.svg?style=flat-square)](#bower)
3+
[![Build Status](https://api.travis-ci.org/brutusin/json-forms.svg?branch=master)](https://travis-ci.org/brutusin/json-forms)
4+
5+
`org.brutusin:json-forms` is a javascript library that generates HTML forms from JSON Schemas.
6+
7+
`Documentation in progress`
8+
9+
**Table of Contents:**
10+
11+
- [org.brutusin:json-forms](#)
12+
- [Features](#features)
13+
- [Usage](#usage)
14+
- [Demo](#demo)
15+
- [Dynamic schemas](#dynamic-schemas)
16+
- [API](#api)
17+
- [Extensions](#extensions)
18+
- [TODO](#todo)
19+
- [CDN](#cdn)
20+
- [See also](#see-also)
21+
- [Support, bugs and requests](#support-bugs-and-requests)
22+
- [Authors](#authors)
23+
- [License](#license)
24+
25+
## Features
26+
* Dynamic schemas support
27+
* Extensible and customizable
28+
* No external libraries needed
29+
* Validation
30+
* Multiple forms per document supported
31+
32+
## Usage
33+
Include the main library dependencies:
34+
```html
35+
<link rel="stylesheet" href='dist/css/brutusin-json-forms.min.css'/>
36+
<script src="dist/js/brutusin-json-forms.min.js"></script>
37+
```
38+
Optionally, include the bootstrap extension (requires bootstrap):
39+
```html
40+
<script src="dist/js/brutusin-json-forms-bootstrap.min.js"></script>
41+
```
42+
Create the javascript `BrutusinForms` instance, being `schema` a javascript `object` representing the schema structure:
43+
```javascript
44+
var BrutusinForms = brutusin["json-forms"];
45+
var bf = BrutusinForms.create(schema);
46+
```
47+
And finally, render the form inside a container, with optional JSON initial `data` preloaded:
48+
```javascript
49+
var container = document.getElementById('container');
50+
bf.render(container, data);
51+
```
52+
53+
## Demo
54+
[![demo](http://brutusin.org/json-forms/img/json-forms.png)](http://brutusin.org/json-forms/)
55+
http://brutusin.org/json-forms/
56+
57+
## Dynamic schemas
58+
This library supports dynamic schemas, that is, subschemas that can change depending on the value of other parts of the data.
59+
60+
This lets creating **dynamic forms** that vary their shape depending on the values entered by the user. This is extremely useful for big autogenerated schemas, that aggregates lots of subschemas and have functional bindings, given that it allows to show the user a simpler, non-error-prone form, also avoiding asking for unneeded data.
61+
62+
Dynamic schemas are built upon two main blocks:
63+
* Custom (non-standard) schema property called `dependsOn`, to build the subschemas dependency graph
64+
* [Brutusin DSL for path expressions](https://github.com/brutusin/json#path-expressions), for identifying subschemas.
65+
66+
### `dependsOn` schema extension
67+
### Dynamic schema resolution
68+
69+
## API
70+
### Static members:
71+
72+
Member|Description
73+
------| -------
74+
`BrutusinForms.create(schema)`|BrutusinForms factory method
75+
`BrutusinForms.addDecorator(f(htmlElement, schema))`| Register a callback function to be notified after an HTML element has been rendered (passed as parameter). See [brutusin-json-forms-bootstrap.js](src/js/brutusin-json-forms-bootstrap.js) for an example of *bootstrap* decorator.
76+
`BrutusinForms.postRender(instance)`|Callback function to be notified after a BrutusinForms instance has been rendered (passed as parameter)
77+
`BrutusinForms.instances`|Array containing all the BrutusinForms instances created in the document by the factory method.
78+
79+
### Instance members:
80+
81+
Member|Description
82+
------| -------
83+
`bf.render(container, data)`| Renders the form inside the the container, with the specified data preloaded
84+
`bf.validate()`| Returns `true` if the input data entered by the user passes validation
85+
`bf.getData()`| Returns the javascript object with the data entered by the user
86+
`bf.schemaResolver(schemaIdArray, data)`| Schema resolver for [dynamic schemas](#dynamic-schemas)
87+
88+
## Extensions
89+
90+
91+
##See also
92+
93+
##CDN
94+
95+
http://www.jsdelivr.com/projects/brutusin.json-forms
96+
97+
## Support bugs and requests
98+
https://github.com/brutusin/json/issues
99+
100+
## Authors
101+
102+
- Ignacio del Valle Alles (<https://github.com/idelvall/>)
103+
104+
Contributions are always welcome and greatly appreciated!
105+
106+
##License
107+
Apache License, Version 2.0

0 commit comments

Comments
 (0)