From 772f97eca194f7149238edafb5ba501bfb7c896f Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 1 Feb 2016 16:18:44 -0300 Subject: [PATCH] remove scroll in send tab --- public/views/walletHome.html | 2 +- src/js/controllers/walletHome.js | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/public/views/walletHome.html b/public/views/walletHome.html index e34fec099..77b5e2037 100644 --- a/public/views/walletHome.html +++ b/public/views/walletHome.html @@ -395,7 +395,7 @@ -
+
{{home.error|translate}} diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index f44a61fc7..737849652 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $location, $anchorScroll, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, isMobile, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, txSignService) { +angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, isMobile, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, txSignService) { var self = this; window.ignoreMobilePause = false; @@ -97,12 +97,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi $rootScope.$digest(); }); - this.scrollUp = function(location){ - if(!location) return; - $location.hash(location); - $anchorScroll(); - }; - var accept_msg = gettextCatalog.getString('Accept'); var cancel_msg = gettextCatalog.getString('Cancel'); var confirm_msg = gettextCatalog.getString('Confirm'); @@ -602,7 +596,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi }); }; - // Send + // Send this.canShowAlternative = function() { return $scope.showAlternative; @@ -671,7 +665,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi this.hideAmount = true; } } - $timeout(function() { $rootScope.$digest(); }, 1); @@ -746,7 +739,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi fc.credentials.m > 1 ? gettextCatalog.getString('Could not create payment proposal') : gettextCatalog.getString('Could not send payment'); this.error = bwsError.msg(err, prefix); - this.scrollUp('notification'); + $timeout(function() { $scope.$digest(); }, 1); @@ -1083,7 +1076,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi } }; - // History + // History function strip(number) { return (parseFloat(number.toPrecision(12)));