Merge pull request #50 from ssotomayor/fixes1592

New addresses are now added at bottom of the list instead of at the top
This commit is contained in:
Matias Alejo Garcia 2014-10-29 14:56:59 -03:00
commit a93a48dc60
3 changed files with 4 additions and 3 deletions

View file

@ -84,6 +84,7 @@ angular.module('copayApp.controllers').controller('AddressesController',
for (var i = 0; i < addrInfos.length; i++) {
var addrinfo = addrInfos[i];
$scope.addresses.push({
'index': i,
'address': addrinfo.addressStr,
'balance': $rootScope.balanceByAddr ? $rootScope.balanceByAddr[addrinfo.addressStr] : 0,
'isChange': addrinfo.isChange,

View file

@ -493,7 +493,7 @@ PublicKeyRing.prototype.getAddressesInfoForIndex = function(index, opts, copayer
var isOwned = index.copayerIndex === HDPath.SHARED_INDEX || index.copayerIndex === copayerIndex;
var ret = [];
var appendAddressInfo = function(address, isChange) {
ret.unshift({
ret.push({
address: address,
addressStr: address.toString(),
isChange: isChange,

View file

@ -6,13 +6,13 @@
</div>
<div class="large-12 medium-12" ng-if="!!(addresses|removeEmpty).length">
<div class="large-12 medium-12">
<div class="oh" ng-repeat="addr in addresses|removeEmpty">
<div class="oh" ng-repeat="addr in addresses|removeEmpty|orderBy:'-index':true">
<div class="panel radius show-for-large-up">
<div class="row collapse">
<div class="large-7 medium-9 column">
<div class="list-addr">
<span>
<contact address="{{addr.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right">
<contact address="{{addr.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right" />
</span>
<span class="btn-copy" clip-copy="addr.address"> </span>
<small translate class="label" ng-if="addr.isChange">change</small>