PageRenderTime 270ms CodeModel.GetById 54ms RepoModel.GetById 21ms app.codeStats 0ms

/src/footer.js

https://github.com/rhinoman/backgrid
JavaScript | 40 lines | 10 code | 4 blank | 26 comment | 1 complexity | 299fe3d9bd7c752ebfb0bec4a08bc7c3 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 {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns
  21. Column metadata.
  22. @param {Backbone.Collection} options.collection
  23. @throws {TypeError} If options.columns or options.collection is undefined.
  24. */
  25. initialize: function (options) {
  26. Backgrid.requireOptions(options, ["columns", "collection"]);
  27. this.columns = options.columns;
  28. if (!(this.columns instanceof Backbone.Collection)) {
  29. this.columns = new Backgrid.Columns(this.columns);
  30. }
  31. }
  32. });