File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -160,10 +160,12 @@ class ComponentDialog {
160160
161161 this . title . text ( data . id ) ;
162162
163- // Disable the ability to close the dialog by clicking outside the dialog or pressing the escape key.
163+ // Disable the ability to close the dialog by clicking outside
164+ // the dialog or pressing the escape key.
164165 this . dialog . modal ( { backdrop : "static" , keyboard : false } ) ;
165166
166- // Retrieve any previously-saved values -- use below in _closeComponent() to compare with any new edits before closing the dialog.
167+ // Retrieve any previously-saved values -- use below in _closeComponent()
168+ // to compare with any new edits before closing the dialog.
167169 this . initialSerialization = this . dialog . find ( "form" ) . serialize ( ) ;
168170
169171 this . dialog . modal ( 'show' ) ;
@@ -175,10 +177,7 @@ class ComponentDialog {
175177 this . currentSerialization = this . dialog . find ( "form" ) . serialize ( ) ;
176178
177179 if ( this . initialSerialization !== this . currentSerialization ) {
178- if ( ! confirm ( 'Any edits you\'ve made will be lost if you close without saving. \n\nClick "OK" if you don\'t want to save your edits.' ) ) {
179- // This closes the alert and leaves the modal open if "Cancel" is clicked.
180- return false ;
181- }
180+ return confirm ( 'Your new changes haven\'t been saved. \n\nAre you sure you want to exit without saving?' )
182181 }
183182 }
184183
You can’t perform that action at this time.
0 commit comments