for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
define([
'oronote/js/app/views/note-view',
'autolinker'
], function(NoteView, autolinker) {
'use strict';
var CommentView;
CommentView = NoteView.extend({
/**
* @inheritDoc
*/
constructor: function CommentView() {
CommentView.__super__.constructor.apply(this, arguments);
},
* Returns class name for root element
* @returns {string}
className: function() {
return 'list-item' + (this.model.get('public') ? '' : ' private');
* @return {Object}
getTemplateData: function() {
var data = this.model.toJSON();
data.collapsed = this.collapsed;
data.message = autolinker.link(data.message, {className: 'no-hash'});
data.briefMessage = autolinker.link(data.briefMessage, {className: 'no-hash'});
return data;
}
});
return CommentView;