diff --git a/css/src/animation.css b/css/src/animation.css index b51c60c7c..3c86fca2b 100644 --- a/css/src/animation.css +++ b/css/src/animation.css @@ -20,56 +20,6 @@ transition: height 250ms ease-in; } -.w-popup-menu li { - -webkit-transition: all 300ms linear; - -moz-transition: all 300ms linear; - -o-transition: all 300ms linear; - -ms-transition: all 300ms linear; - transition: all 300ms linear; -} - -.w-popup-icon { - -webkit-transition: all 200ms linear; - -moz-transition: all 200ms linear; - -o-transition: all 200ms linear; - -ms-transition: all 200ms linear; - transition: all 200ms linear; -} - -.w-popup-main { - -webkit-transition: all 200ms linear; - -moz-transition: all 200ms linear; - -o-transition: all 200ms linear; - -ms-transition: all 200ms linear; - transition: all 200ms linear; -} - -.w-popup-sub { - -webkit-transition: all 200ms linear; - -moz-transition: all 200ms linear; - -o-transition: all 200ms linear; - -ms-transition: all 200ms linear; - transition: all 200ms linear; -} - -.w-popup-menu li:hover .w-popup-icon { - -webkit-animation: moveFromTop 400ms ease; - -moz-animation: moveFromTop 400ms ease; - -ms-animation: moveFromTop 400ms ease; -} - -.w-popup-menu li:hover .w-popup-main { - -webkit-animation: moveFromTop 300ms ease; - -moz-animation: moveFromTop 300ms ease; - -ms-animation: moveFromTop 300ms ease; -} - -.w-popup-menu li:hover .w-popup-sub { - -webkit-animation: moveFromBottom 500ms ease; - -moz-animation: moveFromBottom 500ms ease; - -ms-animation: moveFromBottom 500ms ease; -} - .icon-rotate { animation-name: rotateThis; animation-duration: 2s; @@ -1326,4 +1276,4 @@ stretchRight 0%{transform:rotate(0deg) scale(1);} 50%{transform:rotate(360deg) scale(1.3);} 100%{transform:rotate(720deg) scale(1);} -} \ No newline at end of file +} diff --git a/css/src/main.css b/css/src/main.css index bf16b694c..9a237e42a 100644 --- a/css/src/main.css +++ b/css/src/main.css @@ -268,7 +268,9 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill, inpu color: #FFF; } -.side-nav.wallets .avatar-wallet{ +.side-nav.wallets .avatar-wallet, +.wallet-selection.wallets .avatar-wallet +{ background-color: #7A8C9E; color: #213140; padding: 0.35rem 0.5rem; @@ -1168,6 +1170,28 @@ button.gray:focus, text-transform: uppercase; } +.wallet-selection.wallets { + background-color: #213140 ; +} + +ul.wallet-selection.wallets { + margin: 0; + overflow: hidden; +} + +.wallet-selection.wallets li { + overflow: hidden; + padding: 1rem; +} + +.wallet-selection.wallets li a { + display: block; +} + +.wallet-selection.wallets li:hover { + background-color: #3C4E60; +} + .side-nav.wallets li { margin: 1.2rem 0; padding: 0.3rem 0.1rem; @@ -1188,12 +1212,15 @@ button.gray:focus, height: 100%; } +.wallet-selection.wallets a.wallet-item, +.wallet-selection.wallets a.wallet-item:hover, .side-nav.wallets a.wallet-item, .side-nav.wallets a.wallet-item:hover { color: #7A8C9E; line-height: 20px; } +.wallet-selection.wallets .type-wallet, .side-nav.wallets .type-wallet { color: #AAB1B9; } diff --git a/js/controllers/walletForPayment.js b/js/controllers/walletForPayment.js index 958f82946..bbb40cc22 100644 --- a/js/controllers/walletForPayment.js +++ b/js/controllers/walletForPayment.js @@ -2,50 +2,47 @@ var bitcore = require('bitcore'); angular.module('copayApp.controllers').controller('walletForPaymentController', function($rootScope, $scope, $modal, identityService, go) { - $scope.selectWallet = function(cb) { - var ModalInstanceCtrl = function($scope, $modalInstance, identityService) { - $scope.loading = true; - preconditions.checkState($rootScope.iden); + // INIT: (not it a function, since there is no associated html) - var iden = $rootScope.iden; - iden.on('newWallet', function() { - $scope.setWallets(); - }); + var ModalInstanceCtrl = function($scope, $modalInstance, identityService) { + $scope.loading = true; + preconditions.checkState($rootScope.iden); - $scope.setWallets = function() { - $scope.wallets = $rootScope.iden.listWallets(); - }; + var iden = $rootScope.iden; + iden.on('newWallet', function() { + $scope.setWallets(); + }); - $scope.ok = function(w) { - $modalInstance.close(); - return cb(w); - }; - - $scope.cancel = function() { - $modalInstance.close(); - return cb(); - }; + $scope.setWallets = function() { + $scope.wallets = $rootScope.iden.listWallets(); }; - $modal.open({ - templateUrl: 'views/modals/walletSelection.html', - windowClass: 'tiny', - controller: ModalInstanceCtrl, - }); + $scope.ok = function(w) { + $modalInstance.close(w); + }; + + $scope.cancel = function() { + $rootScope.pendingPayment = null; + $modalInstance.close(); + }; }; + var modalInstance = $modal.open({ + templateUrl: 'views/modals/walletSelection.html', + windowClass: 'tiny', + controller: ModalInstanceCtrl, + }); - // INIT: (not it a function, since there is no associated html) - if (!$rootScope.pendingPayment) { + modalInstance.result.then(function(w) { + if (w) { + identityService.setFocusedWallet(w); + $rootScope.walletForPaymentSet = true; + } else { + $rootScope.pendingPayment = null; + } go.walletHome(); - } else { - $scope.selectWallet(function(w) { - if (w) { - identityService.setFocusedWallet(w); - go.send(); - } else { - go.walletHome(); - } - }); - }; + }, function() { + $rootScope.pendingPayment = null; + go.walletHome(); + }); }); diff --git a/js/services/go.js b/js/services/go.js index 095c72c2d..c0b82681d 100644 --- a/js/services/go.js +++ b/js/services/go.js @@ -65,7 +65,11 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope, root.path('copayers'); } else { if ($rootScope.pendingPayment) { - root.path('selectWalletForPayment'); + if ($rootScope.walletForPaymentSet) { + root.path('send'); + } else { + root.path('selectWalletForPayment'); + } } else { root.path('homeWallet'); } diff --git a/views/includes/walletbar-mobile.html b/views/includes/walletbar-mobile.html index 8aeb00f8b..5dc50cbd0 100644 --- a/views/includes/walletbar-mobile.html +++ b/views/includes/walletbar-mobile.html @@ -6,12 +6,12 @@