Plato on Github
Report Home
ampersand/template/shared/client/views/person.js
Maintainability
86.40
Lines of code
32
Difficulty
6.06
Estimated Errors
0.17
Function weight
By Complexity
By SLOC
var View = require('ampersand-view'); var templates = require('../templates'); module.exports = View.extend({ template: templates.includes.person, bindings: { 'model.fullName': '[data-hook~=name]', 'model.avatar': { type: 'attribute', hook: 'avatar', name: 'src' }, 'model.editUrl': { type: 'attribute', hook: 'action-edit', name: 'href' }, 'model.viewUrl': { type: 'attribute', hook: 'name', name: 'href' } }, events: { 'click [data-hook~=action-delete]': 'handleRemoveClick' }, handleRemoveClick: function () { this.model.destroy(); return false; } });