add comment to search
This commit is contained in:
parent
c50fab16cb
commit
b1a15d56c0
4 changed files with 15 additions and 9 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
<span ng-show="!comment" translate>Enter a new comment</span>
|
<span ng-show="!comment" translate>Enter a new comment</span>
|
||||||
<span ng-show="comment" translate>Edit comment</span>
|
<span ng-show="comment" translate>Edit comment</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" ng-model="data.comment">
|
<input type="text" ng-model="data.comment" autofocus>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-6 columns">
|
<div class="small-6 columns">
|
||||||
<button class="round outline dark-gray expand" ng-click="commentPopupClose()" translate>CANCEL</button>
|
<button class="round outline dark-gray expand" ng-click="commentPopupClose()" translate>CANCEL</button>
|
||||||
|
|
|
||||||
|
|
@ -31,14 +31,18 @@
|
||||||
<img src="img/icon-moved.svg" alt="sync" width="40" ng-show="btx.action == 'moved'">
|
<img src="img/icon-moved.svg" alt="sync" width="40" ng-show="btx.action == 'moved'">
|
||||||
</div>
|
</div>
|
||||||
<div class="m10t">
|
<div class="m10t">
|
||||||
<span ng-show="btx.action == 'received'" translate>Received</span>
|
<span ng-show="btx.action == 'received'">
|
||||||
<span ng-show="btx.action == 'sent'">
|
<span class="ellipsis">
|
||||||
{{index.addressbook[btx.addressTo]}}
|
<span ng-if="btx.note.body">{{btx.note.body}}</span>
|
||||||
<span ng-show="!index.addressbook[btx.addressTo] && btx.message">
|
<span ng-if="!btx.note.body" translate> Received</span>
|
||||||
<span class="ellipsis">{{btx.message}}</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span ng-show="!index.addressbook[btx.addressTo] && !btx.message">
|
</span>
|
||||||
<span translate> Sent</span>
|
<span ng-show="btx.action == 'sent'">
|
||||||
|
<span class="ellipsis">
|
||||||
|
<span ng-if="btx.message">{{btx.message}}</span>
|
||||||
|
<span ng-if="!btx.message && btx.note.body">{{btx.note.body}}</span>
|
||||||
|
<span ng-if="!btx.message && !btx.note.body && index.addressbook[btx.addressTo]">{{index.addressbook[btx.addressTo]}}</span>
|
||||||
|
<span ng-if="!btx.message && !btx.note.body && !index.addressbook[btx.addressTo]" translate> Sent</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span ng-show="btx.action == 'moved'" translate>Moved</span>
|
<span ng-show="btx.action == 'moved'" translate>Moved</span>
|
||||||
|
|
|
||||||
|
|
@ -913,8 +913,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
if (tx.addressTo && self.addressbook && self.addressbook[tx.addressTo]) addrbook = self.addressbook[tx.addressTo] || '';
|
if (tx.addressTo && self.addressbook && self.addressbook[tx.addressTo]) addrbook = self.addressbook[tx.addressTo] || '';
|
||||||
var searchableDate = computeSearchableDate(new Date(tx.time * 1000));
|
var searchableDate = computeSearchableDate(new Date(tx.time * 1000));
|
||||||
var message = tx.message ? tx.message : '';
|
var message = tx.message ? tx.message : '';
|
||||||
|
var comment = tx.note ? tx.note.body : '';
|
||||||
var addressTo = tx.addressTo ? tx.addressTo : '';
|
var addressTo = tx.addressTo ? tx.addressTo : '';
|
||||||
return ((tx.amountStr + message + addressTo + addrbook + searchableDate).toString()).toLowerCase();
|
return ((tx.amountStr + message + addressTo + addrbook + searchableDate + comment).toString()).toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
function computeSearchableDate(date) {
|
function computeSearchableDate(date) {
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
||||||
$scope.btx.note.body = $scope.data.comment;
|
$scope.btx.note.body = $scope.data.comment;
|
||||||
$scope.btx.note.editedByName = fc.credentials.copayerName;
|
$scope.btx.note.editedByName = fc.credentials.copayerName;
|
||||||
$scope.btx.note.editedOn = Math.floor(Date.now() / 1000);
|
$scope.btx.note.editedOn = Math.floor(Date.now() / 1000);
|
||||||
|
$scope.btx.searcheableString = null;
|
||||||
commentPopup.close();
|
commentPopup.close();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue