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

This commit is contained in:
2014-12-10 14:48:17 +00:00
parent 9ce880f5cc
commit a3e66c67a7
595 changed files with 52238 additions and 0 deletions
@@ -0,0 +1,21 @@
define(['app', 'jquery', 'underscore', 'backbone', 'model/categoryItem/categoryItemModel'],
function (app, $, _, Backbone, Category){
var CategoryItems=Backbone.Collection.extend({
categoryId: null,
initialize: function (options) {
this.categoryId = options.categoryId;
},
// Book is the model of the collection
model:Category,
url: function() {
return myManifest.Settings.DefaultURL + "/serviceapp.php?method=getCategoryItems&id=" + this.categoryId;
}
});
return CategoryItems;
});
@@ -0,0 +1,17 @@
define(['jquery', 'underscore', 'backbone'],
function ($, _, Backbone){
var CategoryItem=Backbone.Model.extend({
//default attributes
defaults:{
ricetta_id: "",
titolo: '',
autore: '',
valutazione: 0,
difficolta: 0
}
});
return CategoryItem;
});
@@ -0,0 +1,27 @@
define(['app', 'jquery', 'underscore', 'backbone', 'model/categoryItem/categoryItemModel'],
function (app, $, _, Backbone, Category){
var FoundItems=Backbone.Collection.extend({
dataFilter: null,
initialize: function (options) {
this.dataFilter = {
titolo: options.titolo,
difficolta: options.difficolta,
categoryId: options.categoryId
}
this.numItems = options.nResult;
},
// Book is the model of the collection
model:Category,
url: function() {
return myManifest.Settings.DefaultURL + "/serviceapp.php?method=getFilterCategoryItems&numItems=" + this.numItems;
}
});
return FoundItems;
});