Skip to content

Commit

Permalink
remove all links to the old family tree search
Browse files Browse the repository at this point in the history
  • Loading branch information
Inna-r committed Jun 8, 2017
1 parent 1ec930d commit 2f62c4d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
8 changes: 3 additions & 5 deletions js/modules/main/src/controllers/GeneralSearchController.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,12 @@ GeneralSearchController.prototype = {
this.handle_search_modifiers(search_params);
search_params = this.search_params;
search_params.more = this.$stateParams.more;

// search_params.more = this.$stateParams.more;
/*var prev_search = this.$window.sessionStorage.getItem('ftrees_search_params');
var prev_search = this.$window.sessionStorage.getItem('persons_search');
if (JSON.stringify(search_params) === prev_search) {
self.notification.put(20);
}*/
}
this.$state.go('general-search', search_params, {inherit: false});
//this.$window.sessionStorage.setItem('ftrees_search_params', JSON.stringify(search_params));
this.$window.sessionStorage.setItem('persons_search', JSON.stringify(search_params));
},


Expand Down
10 changes: 5 additions & 5 deletions js/modules/main/src/controllers/itemCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ ItemCtrl.prototype = {
goto_persons: function() {
var lang = this.lang[0].toUpperCase() + this.lang.slice(1),
params = {};
params.collection = 'persons';

if (this.search_result.name.Header)
params.last_name = this.search_result.name.Header[lang]
else if (this.search_result.place.Header)
params.place = this.search_result.place.Header[lang];

this.$state.go('persons', params);
params.q = this.search_result.name.Header[lang]
else if (this.search_result.place.Header)
params.q = this.search_result.place.Header[lang];
this.$state.go('general-search', params);
},

showPrev: function () {
Expand Down
2 changes: 1 addition & 1 deletion js/modules/main/src/controllers/personViewController.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var PersonViewController = function ($http, $window, $document, $rootScope,
this.langManager = langManager;
this.notification = notification;
this.$location = $location;
this.ftrees_search_params = JSON.parse(this.$window.sessionStorage.getItem('ftrees_search_params'));
this.persons_search = JSON.parse(this.$window.sessionStorage.getItem('persons_search'));

// renderer
this.rootId = "ftree-layout";
Expand Down
9 changes: 5 additions & 4 deletions js/modules/main/src/controllers/startController.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ var StartController = function($rootScope, $scope, langManager, $state, wizard,
}
else {
var params = {};
params.collection = 'persons';
if (self.wizard.last_search.name != '')
params.last_name = self.wizard.last_search.name;
params.q = self.wizard.last_search.name;
else {
if (self.wizard.last_search.place.name != '' ) {
params.place = self.wizard.last_search.place;
if (self.wizard.last_search.place != '' ) {
params.q = self.wizard.last_search.place;
}
}
$state.go('persons', params);
$state.go('general-search', params);
}
});
$rootScope.title = langManager.lang == 'en'?'Databases: Images, Name Meanings, Family Trees, Communities | BH':'מאגרים: תמונות, פירוש שם, אילן יוחסין, קהילות | בית התפוצות';
Expand Down
2 changes: 1 addition & 1 deletion templates/main/ftrees/person.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3>
<icon class="twitter-icon" position="[-305, -443]"></icon>
<icon class="mail-icon" position="[-340, -443]"></icon>
<mjs-widget item="ctrl.node"></mjs-widget>
<div class="ftree-title__back" ng-click="ctrl.$state.go('persons', ctrl.ftrees_search_params)">
<div class="ftree-title__back" ng-click="ctrl.$state.go('general-search', ctrl.persons_search)">
<icon class="ftree-title__back-icon" position="[-313, -700]"></icon>
<h3>
<en>Exit Tree</en>
Expand Down

0 comments on commit 2f62c4d

Please sign in to comment.