git-svn-id: https://msi/svn/firstRepo/WebClient/trunk@15 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
@@ -11,7 +11,7 @@ var CategoryItems=Backbone.Collection.extend({
|
||||
model:Category,
|
||||
|
||||
url: function() {
|
||||
return myManifest.Settings.DefaultURL + "/api/categoryitems/" + this.categoryId;
|
||||
return myManifest.Settings.DefaultURL + "/api/ricette/" + this.categoryId;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
define(['jquery', 'underscore', 'backbone'],
|
||||
function ($, _, Backbone){
|
||||
function($, _, Backbone) {
|
||||
|
||||
var CategoryItem = Backbone.Model.extend({
|
||||
//default attributes
|
||||
@@ -13,6 +13,6 @@ function ($, _, Backbone){
|
||||
}
|
||||
});
|
||||
|
||||
return CategoryItem;
|
||||
});
|
||||
return CategoryItem;
|
||||
});
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ define(['app', 'jquery', 'underscore', 'backbone', 'model/categoryItem/categoryI
|
||||
model:Category,
|
||||
|
||||
url: function() {
|
||||
var u = myManifest.Settings.DefaultURL + "/api/categoryitems/search/" + this.numItems +
|
||||
var u = myManifest.Settings.DefaultURL + "/api/ricette/search/" + this.numItems +
|
||||
"/" + this.dataFilter.categoryId +
|
||||
"/" + this.dataFilter.difficolta;
|
||||
if(this.dataFilter.titolo !== null)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
define(['app', 'jquery', 'underscore', 'backbone', 'model/lastRicette/lastRicetteModel'],
|
||||
function (app, $, _, Backbone, LastRicette){
|
||||
|
||||
var lastRicette=Backbone.Collection.extend({
|
||||
|
||||
profileID: null,
|
||||
initialize: function (options) {
|
||||
this.profileID = options.profileID;
|
||||
},
|
||||
// Book is the model of the collection
|
||||
model:LastRicette,
|
||||
|
||||
url: function() {
|
||||
return myManifest.Settings.DefaultURL + "/api/ricette/lastinserted/" + this.profileID;
|
||||
}
|
||||
});
|
||||
|
||||
return lastRicette;
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
define(['jquery', 'underscore', 'backbone'],
|
||||
function($, _, Backbone) {
|
||||
|
||||
var LastRicette = Backbone.Model.extend({
|
||||
//default attributes
|
||||
defaults: {
|
||||
ricetta_id: "",
|
||||
titolo: '',
|
||||
autore: '',
|
||||
valutazione: 0,
|
||||
difficolta: 0,
|
||||
categoria_name: ''
|
||||
}
|
||||
});
|
||||
|
||||
return LastRicette;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user