signal-desktop/js/views/banner_view.js
Scott Nonnenberg 43a44793c5 Remove jshint - move everything over to eslint
Also removed all hints of previous linters
2018-07-17 15:54:32 -07:00

37 lines
762 B
JavaScript

/* global Whisper */
// eslint-disable-next-line func-names
(function() {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.BannerView = Whisper.View.extend({
className: 'banner',
templateName: 'banner',
events: {
'click .dismiss': 'onDismiss',
'click .body': 'onClick',
},
initialize(options) {
this.message = options.message;
this.callbacks = {
onDismiss: options.onDismiss,
onClick: options.onClick,
};
this.render();
},
render_attributes() {
return {
message: this.message,
};
},
onDismiss(e) {
this.callbacks.onDismiss();
e.stopPropagation();
},
onClick() {
this.callbacks.onClick();
},
});
})();