mirror of https://github.com/BTCPrivate/copay.git
Hiding menu on send.js
This commit is contained in:
parent
4b30c651dd
commit
a8a1df04b1
|
@ -1,5 +1,5 @@
|
|||
<div
|
||||
ng-show="!index.noFocusedWallet"
|
||||
ng-show="!index.noFocusedWallet && !hideMenuBar"
|
||||
class="bottom-bar row collapse"
|
||||
ng-controller="menuController as 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.limitHistory = 5;
|
||||
|
||||
self.hideMenuBar = false;
|
||||
|
||||
function strip(number) {
|
||||
return (parseFloat(number.toPrecision(12)));
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue