PageRenderTime 36ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/src/footer.js

https://github.com/TechnotronicOz/backgrid
JavaScript | 39 lines | 9 code | 4 blank | 26 comment | 1 complexity | d187a0d90424bbfb5cefee89767b250b 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. this.columns = options.columns;
  27. if (!(this.columns instanceof Backbone.Collection)) {
  28. this.columns = new Backgrid.Columns(this.columns);
  29. }
  30. }
  31. });