send form
This commit is contained in:
parent
237a707719
commit
22a533377b
4 changed files with 259 additions and 228 deletions
|
|
@ -13,9 +13,16 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
|
||||
preconditions.checkState(w.settings.unitToSatoshi);
|
||||
|
||||
$scope.isMobile = isMobile.any();
|
||||
$scope.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
||||
|
||||
// TODO
|
||||
$scope.isWindowsPhoneApp = 1;
|
||||
$rootScope.wpInputFocused = false;
|
||||
|
||||
$scope.isShared = w.isShared();
|
||||
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
||||
$rootScope.title =$scope.requiresMultipleSignatures ? 'Send Proposal' : 'Send';
|
||||
$rootScope.title = $scope.requiresMultipleSignatures ? 'Send Proposal' : 'Send';
|
||||
$scope.loading = false;
|
||||
$scope.error = $scope.success = null;
|
||||
|
||||
|
|
@ -44,7 +51,30 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
$scope.isRateAvailable = true;
|
||||
$scope.$digest();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.formFocus = function(what) {
|
||||
if (!$scope.isWindowsPhoneApp) return
|
||||
|
||||
if (!what) {
|
||||
$rootScope.wpInputFocused = false;
|
||||
$scope.hideAddress = false;
|
||||
$scope.hideAmount = false;
|
||||
|
||||
} else {
|
||||
$rootScope.wpInputFocused = true;
|
||||
if (what == 'amount') {
|
||||
$scope.hideAddress = true;
|
||||
} else if (what == 'msg') {
|
||||
$scope.hideAddress = true;
|
||||
$scope.hideAmount = true;
|
||||
}
|
||||
|
||||
}
|
||||
$timeout(function() {
|
||||
$rootScope.$digest();
|
||||
}, 1);
|
||||
};
|
||||
|
||||
$scope.setInputs = function() {
|
||||
var w = $rootScope.wallet;
|
||||
|
|
@ -291,7 +321,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
window.ignoreMobilePause = true;
|
||||
cordova.plugins.barcodeScanner.scan(
|
||||
function onSuccess(result) {
|
||||
$timeout(function(){
|
||||
$timeout(function() {
|
||||
window.ignoreMobilePause = false;
|
||||
}, 100);
|
||||
if (result.cancelled) return;
|
||||
|
|
@ -305,7 +335,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
}, 1000);
|
||||
},
|
||||
function onError(error) {
|
||||
$timeout(function(){
|
||||
$timeout(function() {
|
||||
window.ignoreMobilePause = false;
|
||||
}, 100);
|
||||
alert('Scanning error');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue