kai-jacobsen/kontentblocks

View on GitHub
js/src/fieldsAPI/definitions/link.js

Summary

Maintainability
A
0 mins
Test Coverage
var BaseView = require('fieldsAPI/definitions/baseView');
module.exports = BaseView.extend({
  templatePath: 'fields/Link',
  template: require('templates/fields/Link.hbs'),
  type: 'link',
  render: function () {
    return this.template({
      i18n: _.extend(KB.i18n.Refields.link, KB.i18n.Refields.common),
      model: this.model.toJSON()
    });
  },
  getDefaults: function(){
    return {
      link: '',
      linktext: '',
      linktitle: ''
    }
  }
});