PageRenderTime 62ms CodeModel.GetById 37ms RepoModel.GetById 1ms app.codeStats 0ms

/static/scripts/mvc/data.js

https://bitbucket.org/james_taylor/galaxy-webapp-refactoring
JavaScript | 26 lines | 18 code | 4 blank | 4 comment | 0 complexity | c97bf296800d0f75ee24f3b40b2db78d MD5 | raw file
  1. define(["libs/backbone/backbone-relational"], function() {
  2. /**
  3. * A dataset. In Galaxy, datasets are associated with a history, so
  4. * this object is also known as a HistoryDatasetAssociation.
  5. */
  6. var Dataset = Backbone.RelationalModel.extend({
  7. defaults: {
  8. id: '',
  9. type: '',
  10. name: '',
  11. hda_ldda: 'hda'
  12. },
  13. urlRoot: galaxy_paths.get('datasets_url')
  14. });
  15. var DatasetCollection = Backbone.Collection.extend({
  16. model: Dataset
  17. });
  18. return {
  19. Dataset: Dataset,
  20. DatasetCollection: DatasetCollection
  21. };
  22. });