git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_2.2.3@29 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2015-02-01 22:28:34 +00:00
parent 12bfd218c2
commit 6ce1700ef4
20 changed files with 338 additions and 265 deletions
+4 -5
View File
@@ -89,8 +89,9 @@ define(['jquery', 'underscore', 'backbone',
var categories = new CategoryCollection();
// will render home view and navigate to homeView
var indexView = new IndexView({collection: categories});
//indexView.render();
indexView.bind('renderCompleted:Categories', this.changePage, this);
indexView.render();
this.changePage(indexView);
//indexView.bind('renderCompleted:Categories', this.changePage, this);
},
showCategory: function (categoryName, categoryId) {
var categories = new CategoryItemCollection({categoryId: categoryId});
@@ -137,9 +138,7 @@ define(['jquery', 'underscore', 'backbone',
searchView.bind('renderCompleted:Search', this.changePage, this);
},
searchFn: function (nresult, categoria, difficolta, titolo) {
//console.log("Search by Titolo: " + titolo + ", Categoria: " + categoria + ", Difficoltà: " + difficolta);
var foundedItems = new FoundItemCollection({categoryId: categoria, difficolta: difficolta, titolo: titolo, nResult: nresult});
var foundedItems = new FoundItemCollection({categoryId: categoria, difficolta: difficolta, titolo: titolo, nResult: nresult, indexItems: 0});
var foundView = new FoundView({collection: foundedItems});
foundView.render();