/src/footer.js
JavaScript | 40 lines | 10 code | 4 blank | 26 comment | 1 complexity | 299fe3d9bd7c752ebfb0bec4a08bc7c3 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 {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);
- }
- }
- });