You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
628 B
JavaScript

define(['underscore', 'backbone'], function SlideModelDefine(_, Backbone) {
'use strict';
var Model = Backbone.Model;
function SlideModel() {
Model.apply(this, arguments);
}
SlideModel.prototype = new Model();
_.extend(SlideModel.prototype, {
defaults: function defaults() {
return {
copy: '',
slug: ''
};
},
url: function url() {
return '/slide/' + this.get('id');
},
fetch: function fetch() {
if (this.get('copy') !== '') {
return;
}
return Model.prototype.fetch.apply(this, arguments);
}
});
return SlideModel;
});