Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*global $*/
// base view for pages
var HumanView = require('human-view');
var _ = require('underscore');
//var key = require('keymaster');
module.exports = HumanView.extend({
// register keyboard handlers
registerKeyboardShortcuts: function () {
/*
var self = this;
_.each(this.keyboardShortcuts, function (value, k) {
// register key handler scoped to this page
key(k, self.cid, _.bind(self[value], self));
});
key.setScope(this.cid);
*/
},
unregisterKeyboardShortcuts: function () {
//key.deleteScope(this.cid);
},
show: function (animation) {
var self = this;
var HumanView = require('human-view');
var templates = require('templates');
module.exports = HumanView.extend({
template: templates.includes.addItem,
classBindings: {
userAddBadge: '.js-add-badge-icon'
},
render: function () {
this.renderAndBind(this.model);
return this;
}
});
var HumanView = require('human-view');
var templates = require('templates');
module.exports = HumanView.extend({
template: templates.includes.userSummary,
textBindings: {
email: '.user-email'
},
render: function () {
this.renderAndBind(this.model);
return this;
}
});
var HumanView = require('human-view');
var templates = require('templates');
module.exports = HumanView.extend({
template: templates.includes.pathwayTitle,
initialize: function (opts) {
this.pathway = opts.model;
this.listenTo(this.pathway, 'change', this.render);
},
render: function() {
this.renderAndBind({
pathway: this.pathway
});
return this;
},
});
var HumanView = require('human-view');
var templates = require('../templates');
module.exports = HumanView.extend({
template: templates.includes.person,
textBindings: {
fullName: '.name'
},
srcBindings: {
'avatar': '.avatar'
},
events: {
'click .delete': 'handleRemoveClick'
},
render: function () {
this.renderAndBind();
},
handleRemoveClick: function () {
this.model.destroy();
}
home: function () {
var Page = PageView.extend({
pageTitle: 'Home',
template: templates.home,
render: function () {
this.renderAndBind();
}
});
this.trigger('newPage', new Page());
},
page1: function () {