git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@71 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
+8
-10
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user