From 73c2b4488a69e7d51ff4ffea2ba7195fffe38be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Thu, 22 Dec 2016 15:13:53 -0300 Subject: [PATCH 1/3] fix design issue on specific amount feature --- src/js/controllers/addresses.js | 7 +++++++ src/js/controllers/tab-receive.js | 30 +++--------------------------- src/js/routes.js | 2 +- src/sass/views/addresses.scss | 1 - www/views/addresses.html | 15 +++++++++------ www/views/tab-receive.html | 5 ----- 6 files changed, 20 insertions(+), 40 deletions(-) diff --git a/src/js/controllers/addresses.js b/src/js/controllers/addresses.js index 90cf0bb5e..d5289295d 100644 --- a/src/js/controllers/addresses.js +++ b/src/js/controllers/addresses.js @@ -100,6 +100,13 @@ angular.module('copayApp.controllers').controller('addressesController', functio }); }; + $scope.requestSpecificAmount = function() { + $state.go('tabs.receive.amount', { + customAmount: true, + toAddress: $stateParams.toAddress + }); + } + $scope.showInformation = function() { $timeout(function() { $scope.showInfo = !$scope.showInfo; diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 3aeb9d577..9607e6c91 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -50,8 +50,9 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi }; $scope.showAddresses = function() { - $state.transitionTo('tabs.receive.addresses', { - walletId: $scope.wallet.credentials.walletId + $state.go('tabs.receive.addresses', { + walletId: $scope.wallet.credentials.walletId, + toAddress: $scope.addr }); }; @@ -140,31 +141,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi }); }; - var goRequestAmount = function() { - $scope.menu.hide(); - $state.go('tabs.receive.amount', { - customAmount: true, - toAddress: $scope.addr - }); - } - - $scope.showMenu = function(allAddresses, $event) { - var requestAmountObj = { - text: gettextCatalog.getString('Request Specific amount'), - action: goRequestAmount, - }; - - $scope.items = [requestAmountObj]; - $scope.height = $scope.items.length * MENU_ITEM_HEIGHT; - - $ionicPopover.fromTemplateUrl('views/includes/menu-popover.html', { - scope: $scope - }).then(function(popover) { - $scope.menu = popover; - $scope.menu.show($event); - }); - }; - $scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.wallets = profileService.getWallets(); diff --git a/src/js/routes.js b/src/js/routes.js index 278d24646..290f2393b 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -614,7 +614,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr */ .state('tabs.receive.addresses', { - url: '/addresses/:walletId', + url: '/addresses/:walletId/:toAddress', views: { 'tab-receive@tabs': { controller: 'addressesController', diff --git a/src/sass/views/addresses.scss b/src/sass/views/addresses.scss index 5401945f7..f8bb4ced6 100644 --- a/src/sass/views/addresses.scss +++ b/src/sass/views/addresses.scss @@ -47,7 +47,6 @@ font-size: .9rem; } &.view-all { - margin: 20px 0px 20px 0px; cursor: pointer; cursor: hand; i { diff --git a/www/views/addresses.html b/www/views/addresses.html index b7c9a4c90..30c4a2371 100644 --- a/www/views/addresses.html +++ b/www/views/addresses.html @@ -26,11 +26,19 @@
- It's a good idea to avoid reusing addresses-this both protects your privacy and keeps your bitcoins secure against hypothetical attacks by quantum computers. Hide + It's a good idea to avoid reusing addresses - this both protects your privacy and keeps your bitcoins secure against hypothetical attacks by quantum computers. Hide
+
+ Request Specific amount + +
+
+ View All Addresses + +
Unused Addresses @@ -61,11 +69,6 @@
{{w.balanceStr}}
- -
- View All Addresses - -
diff --git a/www/views/tab-receive.html b/www/views/tab-receive.html index fed491ad4..d07713685 100644 --- a/www/views/tab-receive.html +++ b/www/views/tab-receive.html @@ -1,11 +1,6 @@ {{'Receive' | translate}} - - -
From f9a821ba70c7a94abf79f83065fe1a22955f1875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Thu, 22 Dec 2016 15:16:14 -0300 Subject: [PATCH 2/3] remove unused variable --- src/js/controllers/tab-receive.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 9607e6c91..a7eb191cb 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -3,7 +3,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError) { var listeners = []; - var MENU_ITEM_HEIGHT = 55; $scope.isCordova = platformInfo.isCordova; $scope.isNW = platformInfo.isNW; $scope.walletAddrs = {}; From 3fd5f50c84f841330c0d9a53ec8414ffa06bb198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 23 Dec 2016 11:12:05 -0300 Subject: [PATCH 3/3] fix finish button --- src/js/controllers/customAmount.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js/controllers/customAmount.js b/src/js/controllers/customAmount.js index ea3e56ceb..b3c17137f 100644 --- a/src/js/controllers/customAmount.js +++ b/src/js/controllers/customAmount.js @@ -18,8 +18,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func $scope.finish = function() { $ionicHistory.nextViewOptions({ - disableAnimate: false, - historyRoot: true + disableAnimate: false }); $ionicHistory.goBack(-2); };