Permalink
Browse files

docs added

  • Loading branch information...
1 parent 4b189e5 commit bde21557040bdb76f834990a92e835980562844a @cmilfont cmilfont committed Sep 13, 2011
Showing with 483 additions and 57 deletions.
  1. +33 −6 README
  2. +360 −0 docs/index.html
  3. +79 −49 lib/jsonform.js
  4. +5 −0 minified/jsonform.min.js
  5. +2 −1 package.json
  6. +4 −1 testrunner
View
39 README
@@ -1,6 +1,33 @@
-Install nodejs and npm https://github.com/joyent/node/wiki/Installation
-git clone git://github.com/milfont/jsonform.git
-cd jsonform
-npm install
-sudo chmod 777 testrunner
-./testrunner
+Example: with ID for legacy code
+ var lancamento = {
+ empresa: {id: 2, name: "Teste"},
+ partidas: [
+ {conta: {codigo:"1.02.0002", nome: "Compras"}, natureza: "1"},
+ {conta: {codigo:"1.02.0001", nome: "Banco"}, natureza: "-1"}
+ ],
+ description: "Teste",
+ value: "125,67",
+ date: "12/03/1999"
+ };
+ $('#form_id').populate(lancamento, true);
+
+Example: with name [default]
+ var lancamento = {
+ empresa: {id: 2, name: "Teste"},
+ partidas: [
+ {conta: {codigo:"1.02.0002", nome: "Compras"}, natureza: "1"},
+ {conta: {codigo:"1.02.0001", nome: "Banco"}, natureza: "-1"}
+ ],
+ description: "Teste",
+ value: "125,67",
+ date: "12/03/1999"
+ };
+ $("[name='form_name'").populate(lancamento);
+
+Running Tests:
+ Install nodejs and npm https://github.com/joyent/node/wiki/Installation
+ git clone git://github.com/milfont/jsonform.git
+ cd jsonform
+ npm install
+ sudo chmod 777 testrunner
+ ./testrunner
Oops, something went wrong.

0 comments on commit bde2155

Please sign in to comment.