VRelationshipList.js 833 B

1234567891011121314151617181920
  1. define([ "require", "utils/Globals", "collection/BaseCollection", "models/VRelationship", "utils/UrlLinks" ], function(require, Globals, BaseCollection, VRelationship, UrlLinks) {
  2. "use strict";
  3. var VRelationshipList = BaseCollection.extend({
  4. url: UrlLinks.baseURL,
  5. model: VRelationship,
  6. initialize: function() {
  7. this.modelName = "VRelationship", this.modelAttrName = "results";
  8. },
  9. getRelationship: function(id, options) {
  10. var url = UrlLinks.relationshipApiUrl(id);
  11. return options = _.extend({
  12. contentType: "application/json",
  13. dataType: "json"
  14. }, options), this.constructor.nonCrudOperation.call(this, url, "GET", options);
  15. }
  16. }, {
  17. tableCols: {}
  18. });
  19. return VRelationshipList;
  20. });