Changed DssModel to Backbone.RelationalModel

This commit is contained in:
Fergal Moran
2013-11-25 21:09:28 +00:00
parent 4f461f38d6
commit bd04df0d63
4 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
define(['backbone'], function (Backbone) {
define(['backbone', 'backbone.relational'], function (Backbone) {
var TastypieModel = Backbone.Model.extend({
var TastypieModel = Backbone.RelationalModel.extend({
base_url: function () {
var temp_url = Backbone.Model.prototype.url.call(this);
return (temp_url.charAt(temp_url.length - 1) == '/' ? temp_url : temp_url + '/');

View File

@@ -24,7 +24,7 @@ define ['marionette',
addComment: ->
commen = new
comment = "123"
onRender: ->
view = new MixItemView({tagName: "div", className: "mix-listing audio-listing-single", model: @model})

View File

@@ -28,7 +28,10 @@
"click #btn-add-comment": "addComment"
};
MixDetailView.prototype.addComment = function() {};
MixDetailView.prototype.addComment = function() {
var comment;
return comment = "123";
};
MixDetailView.prototype.onRender = function() {
var view;

View File

@@ -6,6 +6,7 @@ requirejs.config({
site: 'app/site',
jquery: 'lib/jquery',
backbone: 'lib/backbone',
'backbone.relational': 'lib/backbone.relational',
'backbone.syphon': 'lib/backbone.syphon',
marionette: 'lib/backbone.marionette',
bootstrap: 'lib/bootstrap',