VCommon.js 790 B

1234567891011121314151617181920212223
  1. define([ "require", "utils/Globals", "models/BaseModel", "utils/UrlLinks" ], function(require, Globals, VBaseModel, UrlLinks) {
  2. "use strict";
  3. var VCommon = VBaseModel.extend({
  4. urlRoot: UrlLinks.baseUrl + "",
  5. defaults: {},
  6. serverSchema: {},
  7. idAttribute: "id",
  8. initialize: function() {
  9. this.modelName = "VCommon";
  10. },
  11. toString: function() {
  12. return this.get("name");
  13. },
  14. aboutUs: function(url, options) {
  15. var url = url;
  16. return options = _.extend({
  17. contentType: "application/json",
  18. dataType: "json"
  19. }, options), this.constructor.nonCrudOperation.call(this, url, "GET", options);
  20. }
  21. }, {});
  22. return VCommon;
  23. });