fix new variable names
This commit is contained in:
parent
d7e8ca4404
commit
d296601d09
2 changed files with 9 additions and 7 deletions
|
|
@ -156,8 +156,8 @@
|
||||||
<span class="text-gray" translate>See it on the blockchain</span>
|
<span class="text-gray" translate>See it on the blockchain</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button outline round dark-gray tiny" ng-click="showCommentPopup()">
|
<button class="button outline round dark-gray tiny" ng-click="showCommentPopup()">
|
||||||
<span class="text-gray" translate ng-show="!comment">Add a comment</i></span>
|
<span class="text-gray" translate ng-show="!btx.note">Add a comment</i></span>
|
||||||
<span class="text-gray" translate ng-show="comment">Edit comment</span>
|
<span class="text-gray" translate ng-show="btx.note">Edit comment</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
||||||
$scope.isShared = fc.credentials.n > 1;
|
$scope.isShared = fc.credentials.n > 1;
|
||||||
$scope.showCommentPopup = function() {
|
$scope.showCommentPopup = function() {
|
||||||
$scope.data = {
|
$scope.data = {
|
||||||
comment: ''
|
comment: $scope.btx.note.body
|
||||||
};
|
};
|
||||||
|
|
||||||
var commentPopup = $ionicPopup.show({
|
var commentPopup = $ionicPopup.show({
|
||||||
|
|
@ -27,17 +27,19 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.commentPopupSave = function() {
|
$scope.commentPopupSave = function() {
|
||||||
|
$log.debug('Saving note');
|
||||||
fc.editTxNote({
|
fc.editTxNote({
|
||||||
txid: $scope.btx.txid,
|
txid: $scope.btx.txid,
|
||||||
body: $scope.data.comment
|
body: $scope.data.comment,
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
$log.debug('Could not save tx comment');
|
$log.debug('Could not save tx comment');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$scope.comment = $scope.data.comment;
|
// This is only to refresh the current screen data
|
||||||
$scope.editedBy = gettextCatalog.getString('Edited by') + ' ' + fc.credentials.copayerName;
|
$scope.btx.note.body = $scope.data.comment;
|
||||||
$scope.createdOn = Math.floor(Date.now() / 1000);
|
$scope.btx.note.editedByName = fc.credentials.copayerName;
|
||||||
|
$scope.btx.note.editedOn = Math.floor(Date.now() / 1000);
|
||||||
commentPopup.close();
|
commentPopup.close();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue