replaced memo modal with input text field
This commit is contained in:
parent
310f23691b
commit
76afbb5a5b
3 changed files with 22 additions and 31 deletions
|
|
@ -178,33 +178,25 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
||||||
|
|
||||||
var updateTxDebounced = lodash.debounce(updateTx, 5000);
|
var updateTxDebounced = lodash.debounce(updateTx, 5000);
|
||||||
|
|
||||||
$scope.showCommentPopup = function() {
|
$scope.updateNote = function(text) {
|
||||||
var opts = {};
|
if (typeof text == "undefined") return;
|
||||||
if ($scope.btx.message) {
|
$scope.btx.note = {
|
||||||
opts.defaultText = $scope.btx.message;
|
body: text
|
||||||
}
|
};
|
||||||
if ($scope.btx.note && $scope.btx.note.body) opts.defaultText = $scope.btx.note.body;
|
|
||||||
|
|
||||||
popupService.showPrompt($scope.wallet.name, gettextCatalog.getString('Memo'), opts, function(text) {
|
$log.debug('Saving memo');
|
||||||
if (typeof text == "undefined") return;
|
|
||||||
|
|
||||||
$scope.btx.note = {
|
var args = {
|
||||||
body: text
|
txid: $scope.btx.txid,
|
||||||
};
|
body: text
|
||||||
$log.debug('Saving memo');
|
};
|
||||||
|
|
||||||
var args = {
|
walletService.editTxNote($scope.wallet, args, function(err, res) {
|
||||||
txid: $scope.btx.txid,
|
if (err) {
|
||||||
body: text
|
$log.debug('Could not save tx comment ' + err);
|
||||||
};
|
}
|
||||||
|
|
||||||
walletService.editTxNote($scope.wallet, args, function(err, res) {
|
|
||||||
if (err) {
|
|
||||||
$log.debug('Could not save tx comment ' + err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
$scope.viewOnBlockchain = function() {
|
$scope.viewOnBlockchain = function() {
|
||||||
var btx = $scope.btx;
|
var btx = $scope.btx;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
}
|
}
|
||||||
.info {
|
.info {
|
||||||
span {
|
span {
|
||||||
display: block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.badge {
|
.badge {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|
|
||||||
|
|
@ -105,13 +105,12 @@
|
||||||
<time>{{ (btx.ts || btx.createdOn || btx.time) * 1000 | amDateFormat:'MM/DD/YYYY hh:mm a'}}</time>
|
<time>{{ (btx.ts || btx.createdOn || btx.time) * 1000 | amDateFormat:'MM/DD/YYYY hh:mm a'}}</time>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a class="item item-icon-right" ng-class="{'single-line': !btx.note.body && !btx.message}" ng-click="showCommentPopup()">
|
<div class="item single-line">
|
||||||
<span class="label" translate>Memo</span>
|
<span class="label" translate>
|
||||||
<div class="item-note" style="display: block; float: none; margin-bottom: .25rem;">
|
Memo:  
|
||||||
{{btx.note.body || btx.message}}
|
<input style="display:inline-block;" class="label" type="text" placeholder="{{btx.note.body || btx.message || 'Enter text here'}}" ng-model="btx.note.body" ng-blur="updateNote(btx.note.body)"/>
|
||||||
</div>
|
</span>
|
||||||
<i class="icon bp-arrow-right"></i>
|
</div>
|
||||||
</a>
|
|
||||||
<div class="item" ng-if="btx.action != 'received'">
|
<div class="item" ng-if="btx.action != 'received'">
|
||||||
<span class="label" translate>Fee</span>
|
<span class="label" translate>Fee</span>
|
||||||
<span class="m10l">{{btx.feeStr || '...'}}</span>
|
<span class="m10l">{{btx.feeStr || '...'}}</span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue