From 575e99b490e44370aaf2e4ef8bfeac8bb033293f Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Fri, 13 Feb 2015 16:34:12 -0300 Subject: [PATCH] Disable Sendform when sending a transaction --- js/controllers/send.js | 44 ++++++++++++++++++++---------------------- views/send.html | 27 ++++++-------------------- 2 files changed, 27 insertions(+), 44 deletions(-) diff --git a/js/controllers/send.js b/js/controllers/send.js index c5a8b0793..100531945 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -183,35 +183,33 @@ angular.module('copayApp.controllers').controller('SendController', } $scope.loading = true; - $scope.creatingTX = true; if ($scope.isWindowsPhoneApp) $rootScope.wpInputFocused = true; $timeout(function () { - var comment = form.comment.$modelValue; - var merchantData = $scope._merchantData; - var address, amount; - if (!merchantData) { - address = form.address.$modelValue; - amount = parseInt((form.amount.$modelValue * unitToSat).toFixed(0)); - } + var comment = form.comment.$modelValue; + var merchantData = $scope._merchantData; + var address, amount; + if (!merchantData) { + address = form.address.$modelValue; + amount = parseInt((form.amount.$modelValue * unitToSat).toFixed(0)); + } - w.spend({ - merchantData: merchantData, - toAddress: address, - amountSat: amount, - comment: comment, - }, function (err, txid, status) { - $scope.loading = false; - $scope.creatingTX = false; - if ($scope.isWindowsPhoneApp) - $rootScope.wpInputFocused = false; + w.spend({ + merchantData: merchantData, + toAddress: address, + amountSat: amount, + comment: comment, + }, function (err, txid, status) { + $scope.loading = false; + if ($scope.isWindowsPhoneApp) + $rootScope.wpInputFocused = false; - if (err) - return $scope.setError(err); - txStatus.notify(status); - $scope.resetForm(); - }); + if (err) + return $scope.setError(err); + txStatus.notify(status); + $scope.resetForm(); + }); }, 100); }; diff --git a/views/send.html b/views/send.html index fe173d962..f3a6fdd3d 100644 --- a/views/send.html +++ b/views/send.html @@ -1,5 +1,5 @@
-
+
@@ -32,25 +32,9 @@
-
-
-
-
-
- -
- - Creating Transaction... - -
-
-
-
- - -
+
-
+
@@ -159,7 +143,7 @@
@@ -171,7 +155,8 @@
- Cancel + Cancel