File tree Expand file tree Collapse file tree 2 files changed +22
-1169
lines changed
src/ServiceStack.MovieRest Expand file tree Collapse file tree 2 files changed +22
-1169
lines changed Original file line number Diff line number Diff line change 55
66 < link href ="default.css " rel ="stylesheet " type ="text/css " />
77 < script type ="text/javascript " src ="jquery-1.7.1.min.js "> </ script >
8- < script type ="text/javascript " src ="jquery.form.js "> </ script >
98
109 < script type ="text/javascript ">
1110 $ ( function ( )
129128 $ ( "FORM" ) . fadeIn ( 'fast' ) ;
130129 } ;
131130
132- $ ( "#btnAdd" ) . click ( function ( )
133- {
131+ $ ( "#btnAdd" ) . click ( function ( ) {
134132 showDetailsForm ( ) ;
135133 } ) ;
136134
137- $ ( 'FORM' ) . ajaxForm ( {
138- success : function ( )
139- {
140- restLog ( $ ( 'FORM' ) . attr ( 'method' ) , $ ( 'FORM' ) . attr ( 'action' ) ) ;
141- $ ( "FORM" ) . hide ( ) ;
142- refreshExistingMovies ( ) ;
143- }
135+ $ ( "FORM" ) . submit ( function ( e ) {
136+ e . preventDefault ( ) ;
137+
138+ var data = { } ;
139+ $ ( "FORM INPUT[type=text]" ) . each ( function ( ) {
140+ data [ this . name ] = this . value ;
141+ } ) ;
142+ $ . ajax ( {
143+ url : $ ( "FORM" ) . attr ( "action" ) ,
144+ type : "POST" ,
145+ data : data ,
146+ success : function ( )
147+ {
148+ restLog ( $ ( 'FORM' ) . attr ( 'method' ) , $ ( 'FORM' ) . attr ( 'action' ) ) ;
149+ $ ( "FORM" ) . hide ( ) ;
150+ refreshExistingMovies ( ) ;
151+ }
152+ } ) ;
144153 } ) ;
145-
146- $ ( "#csvformat B" ) . click ( function ( )
154+
155+
156+ $ ( "#csvformat B" ) . click ( function ( )
147157 {
148158 restLog ( "GET" , "movies?format=csv" ) ;
149159 location . href = "movies?format=csv" ;
You can’t perform that action at this time.
0 commit comments