243cbd8123
Not yet using the new APIs, but ready to. Still to do: - Send sync messages on trust decisions - Respond to received trust decision sync messages - Show trust decisions in the conversation history - In that rare situation where a sent message ends up with a key error make it easy to retry the send. FREEBIE
36 lines
919 B
JavaScript
36 lines
919 B
JavaScript
/*
|
|
* vim: ts=4:sw=4:expandtab
|
|
*/
|
|
(function () {
|
|
'use strict';
|
|
window.Whisper = window.Whisper || {};
|
|
|
|
Whisper.BannerView = Whisper.View.extend({
|
|
className: 'banner',
|
|
templateName: 'banner',
|
|
events: {
|
|
'click .dismiss': 'onDismiss',
|
|
'click .body': 'onClick',
|
|
},
|
|
initialize: function(options) {
|
|
this.message = options.message;
|
|
this.callbacks = {
|
|
onDismiss: options.onDismiss,
|
|
onClick: options.onClick
|
|
};
|
|
this.render();
|
|
},
|
|
render_attributes: function() {
|
|
return {
|
|
message: this.message
|
|
};
|
|
},
|
|
onDismiss: function(e) {
|
|
this.callbacks.onDismiss();
|
|
e.stopPropagation();
|
|
},
|
|
onClick: function() {
|
|
this.callbacks.onClick();
|
|
}
|
|
});
|
|
})();
|