How to use human-view - 6 common examples

To help you get started, we’ve selected a few human-view examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AmpersandJS / ampersand / template / clientapp / pages / base.js View on Github external
/*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;
github mozilla / openbadges-discovery / clientapp / views / includes / add-item.js View on Github external
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;
  }
});
github mozilla / openbadges-discovery / clientapp / views / includes / user-summary.js View on Github external
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;
  }
});
github mozilla / openbadges-discovery / clientapp / views / includes / pathway-title.js View on Github external
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;
  },
});
github AmpersandJS / ampersand / build / clientapp / views / person.js View on Github external
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();
    }
github lukekarrys / spa-crawler / sample / clientapp / router.js View on Github external
home: function () {
        var Page = PageView.extend({
            pageTitle: 'Home',
            template: templates.home,
            render: function () {
                this.renderAndBind();
            }
        });
        this.trigger('newPage', new Page());
    },
    page1: function () {

human-view

A smart base view for Backbone apps, to make it easy to bind collections and properties to the DOM.

MIT
Latest version published 10 years ago

Package Health Score

46 / 100
Full package analysis

Popular human-view functions