1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +00:00

from state passed around

This commit is contained in:
Kyle Spearrin
2016-12-07 00:07:01 -05:00
parent 4476eb7389
commit d16b9920ec
8 changed files with 34 additions and 19 deletions

View File

@@ -6,7 +6,7 @@ angular
$scope.i18n = i18nService;
var returnScrollY = $stateParams.returnScrollY;
var returnSearchText = $stateParams.returnSearchText;
var fromCurrent = $stateParams.fromCurrent;
var from = $stateParams.from;
$scope.site = null;
siteService.get($stateParams.siteId, function (site) {
@@ -49,16 +49,23 @@ angular
fromView: true,
returnScrollY: returnScrollY || 0,
returnSearchText: returnSearchText,
fromCurrent: fromCurrent
from: from
});
};
$scope.close = function () {
if (fromCurrent) {
if (from === 'current') {
$state.go('tabs.current', {
animation: 'out-slide-down'
});
}
else if (from === 'folder') {
$state.go('viewFolder', {
animation: 'out-slide-down',
scrollY: returnScrollY || 0,
searchText: returnSearchText
});
}
else {
$state.go('tabs.vault', {
animation: 'out-slide-down',