PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/src/footer.js

https://github.com/antonyraj/backgrid
JavaScript | 41 lines | 10 code | 4 blank | 27 comment | 1 complexity | c23b8522bfbd239e9e547a730e4b0acb MD5 | raw file
Possible License(s): MIT
  1. /*
  2. backgrid
  3. http://github.com/wyuenho/backgrid
  4. Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
  5. Licensed under the MIT @license.
  6. */
  7. /**
  8. A Footer is a generic class that only defines a default tag `tfoot` and
  9. number of required parameters in the initializer.
  10. @abstract
  11. @class Backgrid.Footer
  12. @extends Backbone.View
  13. */
  14. var Footer = Backgrid.Footer = Backbone.View.extend({
  15. /** @property */
  16. tagName: "tfoot",
  17. /**
  18. Initializer.
  19. @param {Object} options
  20. @param {*} options.parent The parent view class of this footer.
  21. @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns
  22. Column metadata.
  23. @param {Backbone.Collection} options.collection
  24. @throws {TypeError} If options.columns or options.collection is undefined.
  25. */
  26. initialize: function (options) {
  27. Backgrid.requireOptions(options, ["columns", "collection"]);
  28. this.columns = options.columns;
  29. if (!(this.columns instanceof Backbone.Collection)) {
  30. this.columns = new Backgrid.Columns(this.columns);
  31. }
  32. }
  33. });