ConfirmationDialogView: Make showCancel an explicit option

Also, don't call resolve/reject callbacks if they weren't provided.

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-07-12 17:14:22 -07:00
parent 14765599f3
commit aa80cdd74d
2 changed files with 10 additions and 5 deletions

View file

@ -96,11 +96,11 @@
var dialog = new Whisper.ConfirmationDialogView({
message: i18n('deleteWarning'),
okText: i18n('delete'),
hideCancel: true,
resolve: function() {
this.model.destroy();
this.resetPanel();
}.bind(this),
reject: function() {}
}.bind(this)
});
this.$el.prepend(dialog.el);