File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,9 @@ CloudPebble.PublishedMedia = (function() {
202202 } ) ;
203203 // Set up the delete button
204204 delete_btn . click ( function ( ) {
205- self . delete ( ) ;
205+ CloudPebble . Prompts . Confirm ( gettext ( "Do you want to delete this Published Media entry?" ) , gettext ( "This cannot be undone." ) , function ( ) {
206+ self . delete ( ) ;
207+ } ) ;
206208 } ) ;
207209
208210 this . setupOptions ( ) ;
@@ -245,7 +247,7 @@ CloudPebble.PublishedMedia = (function() {
245247 /** Save the whole form. If any names are incomplete or resources are invalid, it simply refuses to save without error. */
246248 function save_forms ( event ) {
247249 var data = get_form_data ( ) ;
248- var do_cancel = event . type != 'submit' ;
250+ var do_cancel = ! event || event . type != 'submit' ;
249251 var items = get_media_items ( ) ;
250252 var identifiers = get_eligible_identifiers ( ) ;
251253 function maybe_error ( text ) {
You can’t perform that action at this time.
0 commit comments