/src/footer.js
JavaScript | 41 lines | 10 code | 4 blank | 27 comment | 1 complexity | c23b8522bfbd239e9e547a730e4b0acb MD5 | raw file
Possible License(s): MIT
- /*
- backgrid
- http://github.com/wyuenho/backgrid
- Copyright (c) 2013 Jimmy Yuen Ho Wong 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 {*} options.parent The parent view class of this footer.
- @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) {
- Backgrid.requireOptions(options, ["columns", "collection"]);
- this.columns = options.columns;
- if (!(this.columns instanceof Backbone.Collection)) {
- this.columns = new Backgrid.Columns(this.columns);
- }
- }
- });