diff --git a/gulpfile.js b/gulpfile.js index eef5f43160..fc430ecaf7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -65,6 +65,10 @@ gulp.task('lib', ['clean:lib'], function () { src: paths.npmDir + 'angular/angular*.js', dest: paths.libDir + 'angular' }, + { + src: paths.npmDir + 'angular-animate/angular-animate.js', + dest: paths.libDir + 'angular-animate' + }, { src: paths.npmDir + 'angular-ui-bootstrap/dist/*tpls*.js', dest: paths.libDir + 'angular-ui-bootstrap' diff --git a/src/popup/app/app.js b/src/popup/app/app.js index 9576bda24c..ea4f9b958a 100644 --- a/src/popup/app/app.js +++ b/src/popup/app/app.js @@ -2,6 +2,7 @@ .module('bit', [ 'ui.router', 'angular-jwt', + 'ngAnimate', 'bit.services', diff --git a/src/popup/app/config.js b/src/popup/app/config.js index a102933911..389ba24838 100644 --- a/src/popup/app/config.js +++ b/src/popup/app/config.js @@ -30,20 +30,23 @@ url: "/login", controller: 'accountsLoginController', templateUrl: "app/accounts/views/accountsLogin.html", - data: { authorize: false } + data: { authorize: false }, + params: { animation: null } }) .state('twoFactor', { url: "/two-factor", controller: 'accountsLoginController', templateUrl: "app/accounts/views/accountsLoginTwoFactor.html", - data: { authorize: false } + data: { authorize: false }, + params: { animation: null } }) .state('tabs', { url: "/tab", abstract: true, templateUrl: "app/global/tabs.html", - data: { authorize: true } + data: { authorize: true }, + params: { animation: null } }) .state('tabs.current', { url: "/current", @@ -70,19 +73,22 @@ url: "/view-site?siteId", templateUrl: "app/vault/views/vaultViewSite.html", controller: 'vaultViewSiteController', - data: { authorize: true } + data: { authorize: true }, + params: { animation: null } }) .state('addSite', { url: "/add-site", templateUrl: "app/vault/views/vaultAddSite.html", controller: 'vaultAddSiteController', - data: { authorize: true } + data: { authorize: true }, + params: { animation: null } }) .state('editSite', { url: "/edit-site?siteId", templateUrl: "app/vault/views/vaultEditSite.html", controller: 'vaultEditSiteController', - data: { authorize: true } + data: { authorize: true }, + params: { animation: null } }); }) .run(function ($rootScope, userService, loginService, tokenService, $state) { diff --git a/src/popup/app/global/mainController.js b/src/popup/app/global/mainController.js index 0d42af1024..40ce959ac2 100644 --- a/src/popup/app/global/mainController.js +++ b/src/popup/app/global/mainController.js @@ -2,9 +2,17 @@ .module('bit.global') .controller('mainController', function ($scope, $state) { - $scope.currentYear = new Date().getFullYear(); + var self = this; + self.currentYear = new Date().getFullYear(); + self.animation = ''; $scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) { - + if (toParams.animation) { + self.animation = toParams.animation; + return; + } + else { + self.animation = ''; + } }); }); diff --git a/src/popup/app/vault/vaultModule.js b/src/popup/app/vault/vaultModule.js index f223546912..02b6c4f5a2 100644 --- a/src/popup/app/vault/vaultModule.js +++ b/src/popup/app/vault/vaultModule.js @@ -1,2 +1,2 @@ angular - .module('bit.vault', []); + .module('bit.vault', ['ngAnimate']); diff --git a/src/popup/app/vault/views/vault.html b/src/popup/app/vault/views/vault.html index fb50773b5b..2a7b657acf 100644 --- a/src/popup/app/vault/views/vault.html +++ b/src/popup/app/vault/views/vault.html @@ -1,5 +1,5 @@