diff --git a/public/views/confirm.html b/public/views/confirm.html index dac9298d6..0f21a0ce2 100644 --- a/public/views/confirm.html +++ b/public/views/confirm.html @@ -23,7 +23,7 @@
-
Fee: {{feeLevel}} +
Fee: {{feeLevel}} {{fee || '...'}} @@ -49,7 +49,7 @@
  • - {{item.name || item.id}} + {{item.name || item.id}} {{item.availableBalanceStr}} @@ -61,9 +61,11 @@
-
- Add Description (not yet working...) - +
+ Add Description + {{comment}} + +
diff --git a/public/views/includes/note.html b/public/views/includes/note.html index a4af02532..ee7b59894 100644 --- a/public/views/includes/note.html +++ b/public/views/includes/note.html @@ -1,15 +1,11 @@ -
- +
-
-
- +
+
+
-
- +
+
-
+
\ No newline at end of file diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index e793c2709..6eeb7756c 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -1,12 +1,12 @@ 'use strict'; -angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, txStatus, gettext, txFormatService) { +angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, txStatus, gettext, txFormatService) { var cachedTxp = {}; // An alert dialog var showAlert = function(title, msg, cb) { - $log.warn(title + ":" + msg); + $log.warn(title + ": " + msg); var alertPopup = $ionicPopup.alert({ title: title, template: msg @@ -17,6 +17,22 @@ angular.module('copayApp.controllers').controller('confirmController', function( alertPopup.then(cb); }; + $scope.showCommentPopup = function() { + var commentPopup = $ionicPopup.show({ + templateUrl: "views/includes/note.html", + title: $scope.data.comment ? gettextCatalog.getString('Edit comment') : gettextCatalog.getString('Add comment'), + scope: $scope, + }); + $scope.commentPopupClose = function() { + commentPopup.close(); + }; + $scope.commentPopupSave = function() { + $log.debug('Saving comment'); + $scope.comment = $scope.data.comment; + commentPopup.close(); + }; + }; + $scope.init = function() { // TODO (URL , etc) @@ -160,6 +176,8 @@ angular.module('copayApp.controllers').controller('confirmController', function( $scope.approve = function() { + console.log($scope.comment); + return; var wallet = $scope.wallet; var txp = $scope.txp; if (!wallet) {