Merge pull request #2094 from matiu/ref/txproposalevents

refactor tx proposal events
This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-10 19:01:54 -03:00
commit 20e19af2c7
12 changed files with 219 additions and 259 deletions

View file

@ -20,14 +20,14 @@
<span class="size-21">
<strong>
<span ng-if="!$root.updatingBalance">{{$root.wallet.balanceInfo.totalBalance || 0}}</span>
<span ng-if="$root.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
{{$root.wallet.settings.unitName}}
</strong>
<span ng-if="$root.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
{{$root.wallet.settings.unitName}}
</strong>
</span>
<span class="size-14 db m5t text-gray">
<span ng-if="!$root.wallet.balanceInfo.updatingBalance && $root.wallet.balanceInfo.alternativeBalanceAvailable">{{$root.wallet.balanceInfo.totalBalanceAlternative}} {{$root.wallet.balanceInfo.alternativeIsoCode}}</span>
<span ng-if="!$root.wallet.balanceInfo.updatingBalance && !$root.wallet.balanceInfo.alternativeBalanceAvailable">N/A</span>
<span ng-if="$root.wallet.balanceInfo.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
<span ng-if="!$root.wallet.balanceInfo.updatingBalance && !$root.wallet.balanceInfo.alternativeBalanceAvailable">N/A</span>
<span ng-if="$root.wallet.balanceInfo.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
</span>
</div>
</div>
@ -47,13 +47,18 @@
</div>
</div>
<div ng-show="$root.wallet.isShared() && txps.length != 0">
<div ng-show="$root.wallet.isShared()">
<div class="row">
<div class="large-12 columns">
<h2 translate>Pending Transactions Proposals</h2>
<div class="panel last-transactions pr"
ng-repeat="tx in txps | paged"
ng-include="'views/includes/transaction.html'"></div>
<div class="panel oh">
<h2 class="line-b" translate>Spend proposals</h2>
<div class="last-transactions pr" ng-repeat="tx in $root.wallet.pendingTxProposals | paged" ng-include="'views/includes/transaction.html'" ng-if="$root.wallet.pendingTxProposals[0]">
</div>
<div class="pr" ng-if="!$root.wallet.pendingTxProposals[0]">
<p> No pending spend proposals at the moment.
</div>
</div>
</div>
</div>
</div>

View file

@ -4,7 +4,7 @@
<i class="size-36 {{item.icon}} db"></i>
<div class="size-10 tu">
{{item.title}}
<span class="label alert round" ng-if="item.link=='homeWallet' && $root.pendingTxCount > 0">{{$root.pendingTxCount}}</span>
<span class="label alert round" ng-if="item.link=='homeWallet' && $root.wallet.pendingTxProposalsCountForUs > 0">{{$root.wallet.pendingTxProposalsCountForUs}}</span>
</div>
</a>
</div>

View file

@ -86,8 +86,8 @@
<a href="#!/{{item.link}}" ng-click="toggleCollapse()" class="db p20h">
<i class="size-21 m20r {{item.icon}}"></i> {{item.title|translate}}
<span class="right">
<span class="label alert" ng-if="item.link=='homeWallet' && $root.pendingTxCount > 0">
{{$root.pendingTxCount}}
<span class="label alert" ng-if="item.link=='homeWallet' && $root.wallet.pendingTxProposalsCountForUs > 0">
{{$root.wallet.pendingTxProposalsCountForUs}}
</span>
</span>
</a>

View file

@ -33,7 +33,7 @@
</div>
<div class="last-transactions-footer">
<div class="last-transactions-footer" ng-init="myId = $root.wallet.getMyCopayerId()">
<div class="row collapse">
<div class="small-12 columns" ng-show="!tx.sentTs">
<div ng-show="tx.signedBy[myId]">
@ -60,8 +60,9 @@
</div>
</div>
</div>
<div ng-show="!tx.missingSignatures && !tx.sentTs">
<button class="primary tiny m0" ng-click="send(tx.ntxid)" ng-disabled="loading"> <i class="fi-upload-cloud"></i>
<button class="primary tiny m0" ng-click="broadcast(tx.ntxid)" ng-disabled="loading"> <i class="fi-upload-cloud"></i>
<span translate>Broadcast Transaction</span>
</button>
</div>