Merge pull request #2583 from matiaspando/bug/hideMenu
Hiding menu on send.js
This commit is contained in:
commit
58d58e416f
4 changed files with 20 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<div
|
<div
|
||||||
ng-show="!index.noFocusedWallet"
|
ng-show="!index.noFocusedWallet && !hideMenuBar"
|
||||||
class="bottom-bar row collapse"
|
class="bottom-bar row collapse"
|
||||||
ng-controller="menuController as menu">
|
ng-controller="menuController as menu">
|
||||||
<div class="medium-3 small-3 columns text-center bottombar-item" ng-repeat="item in menu.menu">
|
<div class="medium-3 small-3 columns text-center bottombar-item" ng-repeat="item in menu.menu">
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.onGoingProcess = {};
|
self.onGoingProcess = {};
|
||||||
self.limitHistory = 5;
|
self.limitHistory = 5;
|
||||||
|
|
||||||
|
self.hideMenuBar = false;
|
||||||
|
|
||||||
function strip(number) {
|
function strip(number) {
|
||||||
return (parseFloat(number.toPrecision(12)));
|
return (parseFloat(number.toPrecision(12)));
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('sendController',
|
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 fc = profileService.focusedClient;
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
|
@ -48,6 +48,7 @@ angular.module('copayApp.controllers').controller('sendController',
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on('$destroy', function() {
|
$scope.$on('$destroy', function() {
|
||||||
|
$rootScope.hideMenuBar = false;
|
||||||
openScannerCordova();
|
openScannerCordova();
|
||||||
paymentUri();
|
paymentUri();
|
||||||
});
|
});
|
||||||
|
|
@ -55,7 +56,18 @@ angular.module('copayApp.controllers').controller('sendController',
|
||||||
this.setInputs();
|
this.setInputs();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var hideMenuBar = lodash.debounce(function(hide) {
|
||||||
|
if (hide) {
|
||||||
|
$rootScope.hideMenuBar = true;
|
||||||
|
} else {
|
||||||
|
$rootScope.hideMenuBar = false;
|
||||||
|
}
|
||||||
|
$rootScope.$digest();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
|
||||||
this.formFocus = function(what) {
|
this.formFocus = function(what) {
|
||||||
|
hideMenuBar(what);
|
||||||
if (!this.isWindowsPhoneApp) return
|
if (!this.isWindowsPhoneApp) return
|
||||||
|
|
||||||
if (!what) {
|
if (!what) {
|
||||||
|
|
@ -277,7 +289,7 @@ angular.module('copayApp.controllers').controller('sendController',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.resetForm = function(form) {
|
this.resetForm = function(form) {
|
||||||
this.resetError();
|
this.resetError();
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, notification, txStatus, isCordova, profileService, lodash) {
|
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) {
|
$scope.openCopayersModal = function(copayers, copayerId) {
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
|
|
@ -160,11 +161,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
|
||||||
// Hacky: request tries to parse an empty response
|
// 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.error = err.message || 'Transaction could not be deleted. Please try again.';
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$modalInstance.close();
|
$modalInstance.close();
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue