diff --git a/public/views/modals/searchTransactions.html b/public/views/modals/searchTransactions.html new file mode 100644 index 000000000..e7e5ef22c --- /dev/null +++ b/public/views/modals/searchTransactions.html @@ -0,0 +1,68 @@ + + +

Search Transactions

+ + {{'Close'|translate}} + +
+ + + + +
+
+
+ sync + sync + sync +
+
+ Received + + {{index.addressbook[btx.addressTo]}} + + {{btx.message}} + + + Sent + + + Moved + Invalid +
+
+ +
+ + + + - + + (possible double spend) + + + {{btx.amountStr}} + + +
+ + + Unconfirmed + +
+
+
+ +
+
+
+
\ No newline at end of file diff --git a/public/views/walletHome.html b/public/views/walletHome.html index 0643f38b5..d3447c9ea 100644 --- a/public/views/walletHome.html +++ b/public/views/walletHome.html @@ -178,7 +178,7 @@
-

+

Activity

@@ -201,7 +201,7 @@
-
+
@@ -215,25 +215,9 @@
- -
+ +
diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index 213db5443..d83792e53 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -1,11 +1,11 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $modal, $log, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit) { +angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $modal, $log, $ionicModal, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit) { var isCordova = platformInfo.isCordova; var isWP = platformInfo.isWP; var isAndroid = platformInfo.isAndroid; - var isChromeApp = platformInfo.isChromeApp; + var isChromeApp = platformInfo.isChromeApp; var self = this; window.ignoreMobilePause = false; @@ -287,7 +287,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi $modalInstance.close(addr); }); - } + } }); }; }; @@ -431,7 +431,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi var client = profileService.focusedClient; $scope.error = null; $scope.loading = true; - + fingerprintService.check(client, function(err) { if (err) { $scope.loading = false; @@ -451,7 +451,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi if (err) { $scope.loading = false; $scope.error = err; - return; + return; } if (signedTxp.status == 'accepted') { @@ -955,7 +955,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi txp.sendMax = true; txp.inputs = self.sendMaxInfo.inputs; txp.fee = self.sendMaxInfo.fee; - }else { + } else { txp.amount = amount; } @@ -988,7 +988,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi }); }, 100); - }; + }; this.confirmTx = function(txp) { var client = profileService.focusedClient; @@ -1018,11 +1018,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi if (err) { $scope.$emit('Local/TxProposalAction'); return self.setSendError( - err.message ? - err.message : - gettext('The payment was created but could not be completed. Please try again from home screen')); + err.message ? + err.message : + gettext('The payment was created but could not be completed. Please try again from home screen')); } - + if (signedTxp.status == 'accepted') { self.setOngoingProcess(gettextCatalog.getString('Broadcasting transaction')); walletService.broadcastTx(client, signedTxp, function(err, broadcastedTxp) { @@ -1049,6 +1049,22 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi }); }; + $ionicModal.fromTemplateUrl('views/modals/searchTransactions.html', { + scope: $scope, + focusFirstInput: true, + animation: 'slide-in-up' + }).then(function(modal) { + $scope.modal = modal; + }); + + $scope.openModal = function() { + $scope.modal.show(); + }; + + $scope.closeModal = function() { + $scope.modal.hide(); + }; + this.setForm = function(to, amount, comment) { var form = $scope.sendForm; if (to) {