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

This commit is contained in:
2016-03-01 14:20:31 +00:00
parent 3732d06a0c
commit 507ba6f2b7
14 changed files with 55 additions and 78 deletions
+8 -10
View File
@@ -4,7 +4,7 @@ define(['jquery', 'underscore', 'backbone',
'modules/sync/sync', 'modules/donation/donation','modules/settings/settings',
'modules/debug/debug','modules/maps/maps',
'model/note/noteCollection', 'model/category/categoryCollection', 'model/categoryItem/categoryItemCollection',
'model/item/itemCollection', 'model/item/ingredientiCollection', 'model/categoryItem/foundItemCollection','model/authors/authorCollection',
'model/item/itemCollection', 'model/item/ingredientiCollection', 'model/categoryItem/foundItemCollection',
'classes/cache', 'libs/fastclick',
'jqm', 'jQueryPlugins'],
function ($, _, Backbone,
@@ -13,7 +13,7 @@ define(['jquery', 'underscore', 'backbone',
SyncView, DonationView, SettingsView,
DebugView, MapsView,
NoteCollection, CategoryCollection, CategoryItemCollection,
ItemCollection, IngredientiCollection, FoundItemCollection, AuthorCollection,
ItemCollection, IngredientiCollection, FoundItemCollection,
Cache, FastClick) {
'use strict';
@@ -57,7 +57,7 @@ define(['jquery', 'underscore', 'backbone',
'debugView': 'showDebug',
'settingsView': 'showSettings',
'donationView': 'showDonation',
'search/:nresult/:categoria/:difficolta/*titolo': 'searchFn',
'search/:nresult/:categoria/:difficolta/:autore/*titolo': 'searchFn',
'converterView': 'showConverter',
'moreView': 'showMore',
'*actions': 'defaultAction' //default action
@@ -172,14 +172,12 @@ define(['jquery', 'underscore', 'backbone',
this.changePage(mapsView);
},
showSearch: function () {
var authors = new AuthorCollection();
// will render home view and navigate to homeView
var searchView = new SearchView({collection: authors});
//indexView.render();
searchView.bind('renderCompleted:Search', this.changePage, this);
var searchView = new SearchView();
searchView.render();
this.changePage(searchView);
},
searchFn: function (nresult, categoria, difficolta, titolo) {
var foundedItems = new FoundItemCollection({categoryId: categoria, difficolta: difficolta, titolo: titolo, nResult: nresult, indexItems: 0});
searchFn: function (nresult, categoria, difficolta, autore, titolo) {
var foundedItems = new FoundItemCollection({categoryId: categoria, difficolta: difficolta, titolo: titolo, autore: autore, nResult: nresult, indexItems: 0});
var foundView = new FoundView({collection: foundedItems});
foundView.render();