|
|
@ -7,12 +7,10 @@ define(
|
|
|
|
|
|
|
|
|
|
|
|
return Marionette.ItemView.extend({
|
|
|
|
return Marionette.ItemView.extend({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initialize: function () {
|
|
|
|
initialize: function () {
|
|
|
|
this.listenTo(this.model, 'change', this.render);
|
|
|
|
this.listenTo(this.model, 'change', this.render);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render: function () {
|
|
|
|
render: function () {
|
|
|
|
if (!this.model.get('message') || !this.model.get('sendUpdatesToClient')) {
|
|
|
|
if (!this.model.get('message') || !this.model.get('sendUpdatesToClient')) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -37,7 +35,13 @@ define(
|
|
|
|
message.hideAfter = 0;
|
|
|
|
message.hideAfter = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Messenger.show(message);
|
|
|
|
if (this.messenger) {
|
|
|
|
|
|
|
|
this.messenger.update(message);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
this.messenger = Messenger.show(message);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
console.log(message.message);
|
|
|
|
console.log(message.message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|