diff --git a/public/views/includes/menu.html b/public/views/includes/menu.html index 299858f88..6a1d5f8aa 100644 --- a/public/views/includes/menu.html +++ b/public/views/includes/menu.html @@ -1,5 +1,5 @@
diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index da3ffeb23..79b857876 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -6,6 +6,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r self.onGoingProcess = {}; self.limitHistory = 5; + self.hideMenuBar = false; + function strip(number) { return (parseFloat(number.toPrecision(12))); }; diff --git a/src/js/controllers/send.js b/src/js/controllers/send.js index f61b7a716..ac68085af 100644 --- a/src/js/controllers/send.js +++ b/src/js/controllers/send.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('sendController', - function($rootScope, $scope, $window, $timeout, $modal, $filter, $log, notification, isMobile, txStatus, isCordova, bitcore, profileService, configService, rateService, isChromeApp) { + function($rootScope, $scope, $window, $timeout, $modal, $filter, $log, notification, isMobile, txStatus, isCordova, bitcore, profileService, configService, rateService, isChromeApp, lodash) { var fc = profileService.focusedClient; var self = this; @@ -48,6 +48,7 @@ angular.module('copayApp.controllers').controller('sendController', }); $scope.$on('$destroy', function() { + $rootScope.hideMenuBar = false; openScannerCordova(); paymentUri(); }); @@ -55,7 +56,18 @@ angular.module('copayApp.controllers').controller('sendController', this.setInputs(); }; + var hideMenuBar = lodash.debounce(function(hide) { + if (hide) { + $rootScope.hideMenuBar = true; + } else { + $rootScope.hideMenuBar = false; + } + $rootScope.$digest(); + }, 100); + + this.formFocus = function(what) { + hideMenuBar(what); if (!this.isWindowsPhoneApp) return if (!what) { @@ -277,7 +289,7 @@ angular.module('copayApp.controllers').controller('sendController', } }; - + this.resetForm = function(form) { this.resetError(); diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index c1b3386f6..dbb0aa999 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -2,6 +2,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, notification, txStatus, isCordova, profileService, lodash) { + $rootScope.hideMenuBar = false; $scope.openCopayersModal = function(copayers, copayerId) { var fc = profileService.focusedClient; @@ -160,11 +161,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi $scope.loading = false; // Hacky: request tries to parse an empty response - if (err && !(err.message && err.message.match(/Unexpected/)) ) { + if (err && !(err.message && err.message.match(/Unexpected/))) { $scope.error = err.message || 'Transaction could not be deleted. Please try again.'; $scope.$digest(); return; - } + } $modalInstance.close(); }); }, 100);