Merge pull request #5427 from cmgustavo/bug/import-adv-button

Fix advanced button after change tab
This commit is contained in:
Javier Donadío 2017-01-09 16:04:56 -03:00 committed by GitHub
commit 33b46dff2a
2 changed files with 7 additions and 4 deletions

View file

@ -358,7 +358,9 @@ angular.module('copayApp.controllers').controller('importController',
$scope.showAdvChange = function() { $scope.showAdvChange = function() {
$scope.showAdv = !$scope.showAdv; $scope.showAdv = !$scope.showAdv;
$scope.resizeView(); $timeout(function() {
$scope.resizeView();
}, 100);
}; };
$scope.resizeView = function() { $scope.resizeView = function() {
@ -368,6 +370,7 @@ angular.module('copayApp.controllers').controller('importController',
}; };
$scope.$on("$ionicView.afterEnter", function(event, data) { $scope.$on("$ionicView.afterEnter", function(event, data) {
$scope.showAdv = false;
$scope.init(); $scope.init();
}); });

View file

@ -7,15 +7,15 @@
<ion-content ng-init="phrase = true"> <ion-content ng-init="phrase = true">
<div class="row text-center top-tabs"> <div class="row text-center top-tabs">
<div class="col" ng-click="phrase = true; file = hardware = false; showAdv = false" ng-style="phrase && <div class="col" ng-click="phrase = true; file = hardware = false" ng-style="phrase &&
{'border-bottom-style': 'solid'}"> {'border-bottom-style': 'solid'}">
<span translate>Recovery phrase</span> <span translate>Recovery phrase</span>
</div> </div>
<div class="col" ng-click="file = true; phrase = hardware = false; showAdv = false" ng-style="file && <div class="col" ng-click="file = true; phrase = hardware = false" ng-style="file &&
{'border-bottom-style': 'solid'}"> {'border-bottom-style': 'solid'}">
<span translate>File/Text</span> <span translate>File/Text</span>
</div> </div>
<div class="col" ng-click="hardware = true; phrase = file = false; showAdv = false" ng-style="hardware && <div class="col" ng-click="hardware = true; phrase = file = false" ng-style="hardware &&
{'border-bottom-style': 'solid'}" ng-show="isCopay && (isChromeApp || isDevel)"> {'border-bottom-style': 'solid'}" ng-show="isCopay && (isChromeApp || isDevel)">
<span translate>Hardware wallet</span> <span translate>Hardware wallet</span>
</div> </div>