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

This commit is contained in:
2014-12-10 15:06:13 +00:00
parent 876ee18579
commit f57f55e2a9
58 changed files with 873 additions and 487 deletions
@@ -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;
}
});
+3 -3
View File
@@ -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;
});
+1 -1
View File
@@ -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;
});
+18
View File
@@ -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;
});