Skip to content

Commit

Permalink
Quick fix and a delete prompt.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Atkins-Turkish committed Aug 30, 2016
1 parent 25a3e86 commit fde158e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ide/static/ide/js/published_media.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ CloudPebble.PublishedMedia = (function() {
});
// Set up the delete button
delete_btn.click(function() {
self.delete();
CloudPebble.Prompts.Confirm(gettext("Do you want to delete this Published Media entry?"), gettext("This cannot be undone."), function () {
self.delete();
});
});

this.setupOptions();
Expand Down Expand Up @@ -245,7 +247,7 @@ CloudPebble.PublishedMedia = (function() {
/** Save the whole form. If any names are incomplete or resources are invalid, it simply refuses to save without error. */
function save_forms(event) {
var data = get_form_data();
var do_cancel = event.type != 'submit';
var do_cancel = !event || event.type != 'submit';
var items = get_media_items();
var identifiers = get_eligible_identifiers();
function maybe_error(text) {
Expand Down

0 comments on commit fde158e

Please sign in to comment.