File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
rest_framework_docs/static/rest_framework_docs/js Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,14 @@ var jsonPP = {
2222
2323$ ( document ) . ready ( function ( ) {
2424
25- var cleanResponse = function ( ) {
25+ var resetForm = function ( ) {
26+ $ ( '#methods' ) . empty ( ) ;
27+ $ ( '#fields' ) . empty ( ) ;
28+ } ;
2629
30+ var cleanResponse = function ( ) {
2731 $ ( '#responseStatusCode' ) . removeClass ( function ( index , css ) {
28- return ( css . match ( / ( ^ | \s ) l a b e l - \S + / g) || [ ] ) . join ( ' ' ) ;
32+ return ( css . match ( / ( ^ | \s ) l a b e l - \S + / g) || [ ] ) . join ( ' ' ) ;
2933 } ) ;
3034 $ ( '#responseStatusText' ) . text ( '' ) ;
3135 $ ( '#responseData' ) . html ( '' ) ;
@@ -130,6 +134,9 @@ $( document ).ready(function() {
130134 } ;
131135
132136 var setupForm = function ( data ) {
137+ // Reset Form - Remove Methods & Fields
138+ resetForm ( ) ;
139+
133140 $ ( '#urlInput' ) . val ( data . path ) ;
134141
135142 _setupMethods ( data . methods ) ;
You can’t perform that action at this time.
0 commit comments