File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/twirl/gitbucket/gist Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ <h1 style="margin: 0px;">New snippet</h1>
81
81
} ) ;
82
82
83
83
$ ( '#add_file' ) . click ( function ( ) {
84
- var count = $ ( '#count' ) . val ( ) ;
84
+ var count = parseInt ( $ ( '#count' ) . val ( ) ) ;
85
85
$ . get ( '@path/gist/_add?count=' + count , function ( html ) {
86
86
$ ( '#editors' ) . append ( html ) ;
87
87
$ ( '#count' ) . val ( count + 1 ) ;
@@ -95,7 +95,7 @@ <h1 style="margin: 0px;">New snippet</h1>
95
95
} ) ;
96
96
97
97
$ ( '.submit_snippet' ) . click ( function ( ) {
98
- var count = $ ( '#count' ) . val ( ) ;
98
+ var count = parseInt ( $ ( '#count' ) . val ( ) ) ;
99
99
if ( count == 0 ) {
100
100
displayError ( 'File is required.' ) ;
101
101
return false ;
@@ -130,4 +130,4 @@ <h1 style="margin: 0px;">New snippet</h1>
130
130
}
131
131
} ) ;
132
132
</ script >
133
- }
133
+ }
You can’t perform that action at this time.
0 commit comments