From fc7a87f83a8b48857dc69ab5d6d481408f7dbb26 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 10 Sep 2015 14:58:06 -0300 Subject: [PATCH] Fix animation and text for log out --- public/views/preferencesGlidera.html | 2 +- src/js/controllers/preferencesGlidera.js | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/public/views/preferencesGlidera.html b/public/views/preferencesGlidera.html index 4cffa4fd5..3d53632c3 100644 --- a/public/views/preferencesGlidera.html +++ b/public/views/preferencesGlidera.html @@ -257,7 +257,7 @@
  • - Revoke Token + Log out
  • diff --git a/src/js/controllers/preferencesGlidera.js b/src/js/controllers/preferencesGlidera.js index 43d270f31..b90ae39c0 100644 --- a/src/js/controllers/preferencesGlidera.js +++ b/src/js/controllers/preferencesGlidera.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesGlideraController', - function($scope, $modal, $timeout, profileService, applicationService, glideraService, storageService) { + function($scope, $modal, $timeout, profileService, applicationService, glideraService, storageService, isChromeApp) { this.getEmail = function(token) { var self = this; @@ -31,6 +31,14 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController' }); }; + // DISABLE ANIMATION ON CHROMEAPP + if (isChromeApp) { + var animatedSlideRight = 'full'; + } + else { + var animatedSlideRight = 'full animated slideInRight'; + } + this.revokeToken = function() { var fc = profileService.focusedClient; var ModalInstanceCtrl = function($scope, $modalInstance) { @@ -44,9 +52,10 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController' var modalInstance = $modal.open({ templateUrl: 'views/modals/glidera-confirmation.html', - windowClass: 'full', + windowClass: animatedSlideRight, controller: ModalInstanceCtrl }); + modalInstance.result.then(function(ok) { if (ok) { storageService.removeGlideraToken(fc.credentials.network, function() { @@ -56,6 +65,11 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController' }); } }); + + modalInstance.result.finally(function() { + var m = angular.element(document.getElementsByClassName('reveal-modal')); + m.addClass('slideOutRight'); + }); }; });