Cable-Desktop/js/views/confirmation_dialog_view.js
lilia f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
2015-09-07 14:58:42 -07:00

33 lines
855 B
JavaScript

/*
* vim: ts=4:sw=4:expandtab
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.ConfirmationDialogView = Whisper.View.extend({
className: 'confirmation-dialog',
template: $('#confirmation-dialog').html(),
initialize: function(options) {
this.message = options.message;
this.resolve = options.resolve;
this.reject = options.reject;
this.render();
},
events: {
'click .ok': 'ok',
'click .cancel': 'cancel',
},
render_attributes: function() {
return { message: this.message };
},
ok: function() {
this.remove();
this.resolve();
},
cancel: function() {
this.remove();
this.reject();
}
});
})();