PageRenderTime 43ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/public/js/app/collections/BaseCollection.js

https://github.com/Reflen/spinel
JavaScript | 24 lines | 14 code | 6 blank | 4 comment | 0 complexity | 87304f999835f9ebf71dc8174ef0cb60 MD5 | raw file
  1. // BaseCollection.js
  2. // -------------
  3. define(["jquery", "backbone", "mixins/CommonMixin"],
  4. function($, Backbone, CommonMixin) {
  5. // Base Collection
  6. var Collection = Backbone.Collection.extend({
  7. initialize: function(options) {
  8. _.extend(this, options);
  9. },
  10. parse: function(response) {
  11. return response.data;
  12. }
  13. });
  14. _.extend(Collection.prototype, CommonMixin);
  15. // Returns the Model class
  16. return Collection;
  17. }
  18. );