git-svn-id: https://msi/svn/firstRepo/WebClient/trunk@13 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2014-12-10 14:58:10 +00:00
parent 90e0252f4b
commit 876ee18579
238 changed files with 35068 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
define(['app', 'jquery', 'underscore', 'backbone', 'model/item/ingredientiModel'],
function (app, $, _, Backbone, Ingrediente){
var Ingredienti=Backbone.Collection.extend({
ricettaId: null,
initialize: function (options) {
this.ricettaId = options.ricettaId;
},
// Book is the model of the collection
model:Ingrediente,
url: function() {
return myManifest.Settings.DefaultURL + "/api/ricetta/ingredienti/" + this.ricettaId;
}
});
return Ingredienti;
});
+19
View File
@@ -0,0 +1,19 @@
define(['jquery', 'underscore', 'backbone'],
function ($, _, Backbone){
var Ingrediente=Backbone.Model.extend({
//default attributes
defaults:{
id_tipo_ingredienti: -1,
nome_ingrediente: "",
quantita: -1,
id_tipo_quantita: -1,
unita: '',
note: '',
posizione: 0
}
});
return Ingrediente;
});
+21
View File
@@ -0,0 +1,21 @@
define(['app', 'jquery', 'underscore', 'backbone', 'model/item/itemModel'],
function (app, $, _, Backbone, Item){
var Items=Backbone.Collection.extend({
ricettaId: null,
initialize: function (options) {
this.ricettaId = options.ricettaId;
},
// Book is the model of the collection
model:Item,
url: function() {
return myManifest.Settings.DefaultURL + "/api/ricetta/header/" + this.ricettaId;
}
});
return Items;
});
+22
View File
@@ -0,0 +1,22 @@
define(['jquery', 'underscore', 'backbone'],
function ($, _, Backbone){
var Item=Backbone.Model.extend({
//default attributes
defaults:{
id_categoria: "",
categoria_name: '',
ricetta_id: -1,
titolo: '',
procedimento: '',
autore: '',
link_fonte: '',
link_youtube: '',
valutazione: 0,
ingredienti: []
}
});
return Item;
});