28 lines
866 B
JavaScript
28 lines
866 B
JavaScript
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;
|
|
});
|
|
|
|
|