Skip to content

Commit fde158e

Browse files
author
Joseph Atkins-Turkish
committed
Quick fix and a delete prompt.
1 parent 25a3e86 commit fde158e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ide/static/ide/js/published_media.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)