File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 124124 };
125125
126126 ko .applyBindings (new viewModel (), $ (' #stage' ).get (0 ));
127-
128- $ (' #SoftDelete' ).change (function (e ) {
129- if (! this .checked ) {
130- $ (' #DeleteEmptyPackageRegistrationContainer' ).show ();
131- } else {
132- $ (' #DeleteEmptyPackageRegistrationContainer' ).hide ();
133- }
134- });
135-
136- $ (' #delete-form' ).submit (function (e ) {
137- if (! confirm (' Deleting these packages will make them unavailable for download and package restore. Are you sure you want to continue with the delete?' )) {
138- e .preventDefault ();
139- }
140- });
141127 });
142128 </script >
129+ @Scripts.Render( " ~/Scripts/gallery/page-delete-package.js" )
143130}
Original file line number Diff line number Diff line change 1+ $ ( function ( ) {
2+ 'use strict' ;
3+
4+ $ ( '#SoftDelete' ) . change ( function ( e ) {
5+ if ( ! this . checked ) {
6+ $ ( '#DeleteEmptyPackageRegistrationContainer' ) . show ( ) ;
7+ } else {
8+ $ ( '#DeleteEmptyPackageRegistrationContainer' ) . hide ( ) ;
9+ }
10+ } ) ;
11+
12+ $ ( '#delete-form' ) . submit ( function ( e ) {
13+ if ( ! confirm ( 'Deleting this package will make it unavailable for download and package restore. Are you sure you want to continue with the delete?' ) ) {
14+ e . preventDefault ( ) ;
15+ }
16+ } ) ;
17+ } ) ;
Original file line number Diff line number Diff line change 151151 $ (' #input-select-version' ).change (function () {
152152 window .location .href = this .value ;
153153 });
154-
155- $ (' #DeletePackagesRequest_SoftDelete' ).change (function (e ) {
156- if (! this .checked ) {
157- $ (' #DeleteEmptyPackageRegistrationContainer' ).show ();
158- } else {
159- $ (' #DeleteEmptyPackageRegistrationContainer' ).hide ();
160- }
161- });
162- $ (' #delete-form' ).submit (function (e ) {
163- if (! confirm (' Deleting this package will make it unavailable for download and package restore. Are you sure you want to continue with the delete?' )) {
164- e .preventDefault ();
165- }
166- });
167154 });
168155 </script >
156+ @Scripts.Render( " ~/Scripts/gallery/page-delete-package.js" )
169157}
You can’t perform that action at this time.
0 commit comments