File tree 3 files changed +9
-11
lines changed
3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,16 @@ This is meant to be an example CouchApp and to ship with most of the CouchApp go
4
4
5
5
Install with
6
6
7
- couchapp push . http://localhost:5984/proto
7
+ couchapp push . http://localhost:5984/example
8
8
9
9
or (if you have security turned on)
10
10
11
- couchapp push . http://myname:mypass@localhost:5984/proto
11
+ couchapp push . http://myname:mypass@localhost:5984/example
12
12
13
13
You can also create this app by running
14
14
15
15
couchapp generate proto && cd proto
16
- couchapp push . http://localhost:5984/proto
16
+ couchapp push . http://localhost:5984/example
17
17
18
18
## Todo
19
19
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ <h1>Example CouchApp</h1>
26
26
< script src ="vendor/couchapp/jquery.couchLogin.js "> </ script >
27
27
< script src ="vendor/couchapp/jquery.couchProfile.js "> </ script >
28
28
< script src ="vendor/couchapp/md5.js "> </ script >
29
- < script src ="vendor/couchapp/jquery.couchForm.js "> </ script >
30
29
< script src ="vendor/couchapp/jquery.mustache.js "> </ script >
31
30
32
31
<!-- templates used by app.js -->
Original file line number Diff line number Diff line change @@ -31,14 +31,13 @@ $(function() {
31
31
loggedIn : function ( r ) {
32
32
$ ( "#profile" ) . couchProfile ( r , {
33
33
profileReady : function ( profile ) {
34
- $ ( "#create-message" ) . couchForm ( {
35
- beforeSave : function ( doc ) {
34
+ $ ( "#create-message" ) . submit ( function ( ) {
35
+ var form = this , doc = { } ;
36
36
doc . created_at = new Date ( ) ;
37
- doc . profile = profile ;
38
- return doc ;
39
- }
40
- } ) ;
41
- $ ( "#create-message" ) . find ( "input" ) . focus ( ) ;
37
+ doc . profile = profile ;
38
+ db . saveDoc ( doc , { success : function ( ) { form . reset ( ) ; } } ) ;
39
+ return false ;
40
+ } ) . find ( "input" ) . focus ( ) ;
42
41
}
43
42
} ) ;
44
43
} ,
You can’t perform that action at this time.
0 commit comments