UNPKG

backgrid

Version:

Backgrid.js is a set of components for building semantic and easily stylable data grid widgets with Backbone.

40 lines (31 loc) 976 B
/* backgrid http://github.com/cloudflare/backgrid Copyright (c) 2013-present Cloudflare, Inc. and contributors Licensed under the MIT license. */ /** A Footer is a generic class that only defines a default tag `tfoot` and number of required parameters in the initializer. @abstract @class Backgrid.Footer @extends Backbone.View */ var Footer = Backgrid.Footer = Backbone.View.extend({ /** @property */ tagName: "tfoot", /** Initializer. @param {Object} options @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata. @param {Backbone.Collection} options.collection @throws {TypeError} If options.columns or options.collection is undefined. */ initialize: function (options) { this.columns = options.columns; if (!(this.columns instanceof Backbone.Collection)) { this.columns = new Backgrid.Columns(this.columns); } } });