Cable-Desktop/js/views/group_update_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
834 B
JavaScript

/*
* vim: ts=4:sw=4:expandtab
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.GroupUpdateView = Backbone.View.extend({
tagName: "div",
className: "group-update",
render: function() {
//TODO l10n
if (this.model.left) {
this.$el.text(this.model.left + ' left the group');
return this;
}
var messages = ['Updated the group.'];
if (this.model.name) {
messages.push("Title is now '" + this.model.name + "'.");
}
if (this.model.joined) {
messages.push(this.model.joined.join(', ') + ' joined the group');
}
this.$el.text(messages.join(' '));
return this;
}
});
})();