add transaction comment - custom popup (Gabriel)

This commit is contained in:
Javier 2016-05-31 14:51:17 -03:00
commit 8759b633fb
8 changed files with 205 additions and 133 deletions

View file

@ -0,0 +1,7 @@
<input type="text" ng-model="data.comment" autofocus>
<div class="small-6 columns">
<button class="round outline dark-gray expand" ng-click="commentPopupClose()" translate>CANCEL</button>
</div>
<div class="small-6 columns">
<button ng-style="{'background-color': index.backgroundColor}" class="round outline expand" ng-click="commentPopupSave()" translate>SAVE</button>
</div>

View file

@ -11,54 +11,56 @@
</section>
</nav>
<ion-content>
<div class="header-modal text-center p50t">
<div class="size-42">
{{unitTotal}} {{unitName}}
<ion-content ng-style="{'background-color': '#F6F7F9'}">
<div class="modal-content">
<div class="header-modal text-center p50t">
<div class="size-42">
{{unitTotal}} {{unitName}}
</div>
<div class="size-18 m5t text-gray" ng-show="alternative">
{{ alternative }} {{ alternativeIsoCode }}
</div>
</div>
<div class="size-18 m5t text-gray" ng-show="alternative">
{{ alternative }} {{ alternativeIsoCode }}
</div>
</div>
<h4 class="title m10l" translate>Details</h4>
<ul class="no-bullet size-14 m10t">
<li class="line-b p10 oh">
<span class="text-gray" translate>Pay To</span>
<span class="right enable_text_select">{{paypro.domain}}</span>
</li>
<li class="line-b p10 oh" ng-if="paypro.toAddress">
<span class="text-gray" translate>Address</span>
<span class="right enable_text_select">{{paypro.toAddress}}</span>
</li>
<li class="line-b p10 oh">
<span class="text-gray" translate>Certified by</span>
<span class="right text-right">
<span ng-show="paypro.caTrusted">
<i class="fi-lock color-greeni"></i>
{{paypro.caName}}<br>
<span translate>(Trusted)</span>
</span>
<span ng-show="!paypro.caTrusted">
<span ng-show="paypro.selfSigned">
<i class="fi-unlock color-yellowi"></i> <span translate>Self-signed Certificate</span>
<h4 class="title m10l" translate>Details</h4>
<ul class="no-bullet size-14 m10t">
<li class="line-b p10 oh">
<span class="text-gray" translate>Pay To</span>
<span class="right enable_text_select">{{paypro.domain}}</span>
</li>
<li class="line-b p10 oh" ng-if="paypro.toAddress">
<span class="text-gray" translate>Address</span>
<span class="right enable_text_select">{{paypro.toAddress}}</span>
</li>
<li class="line-b p10 oh">
<span class="text-gray" translate>Certified by</span>
<span class="right text-right">
<span ng-show="paypro.caTrusted">
<i class="fi-lock color-greeni"></i>
{{paypro.caName}}<br>
<span translate>(Trusted)</span>
</span>
<span ng-show="!paypro.selfSigned">
<i class="fi-unlock color-yellowi"></i>{{paypro.caName}}<br>
<span translate>WARNING: UNTRUSTED CERTIFICATE</span>
<span ng-show="!paypro.caTrusted">
<span ng-show="paypro.selfSigned">
<i class="fi-unlock color-yellowi"></i> <span translate>Self-signed Certificate</span>
</span>
<span ng-show="!paypro.selfSigned">
<i class="fi-unlock color-yellowi"></i>{{paypro.caName}}<br>
<span translate>WARNING: UNTRUSTED CERTIFICATE</span>
</span>
</span>
</span>
</span>
</li>
<li class="line-b p10 oh" ng-if="paypro.memo">
<span class="text-gray" translate>Memo</span>
<span class="right">{{paypro.memo}}</span>
</li>
<li class="line-b p10 oh" ng-if="paypro.expires">
<span class="text-gray" translate>Expires</span>
<span class="right">{{paypro.expires * 1000 | amTimeAgo }}</span>
</li>
</ul>
</li>
<li class="line-b p10 oh" ng-if="paypro.memo">
<span class="text-gray" translate>Memo</span>
<span class="right">{{paypro.memo}}</span>
</li>
<li class="line-b p10 oh" ng-if="paypro.expires">
<span class="text-gray" translate>Expires</span>
<span class="right">{{paypro.expires * 1000 | amTimeAgo }}</span>
</li>
</ul>
</div>
<div class="extra-margin-bottom"></div>
</ion-content>
</ion-modal-view>
</ion-modal-view>

View file

@ -6,13 +6,11 @@
</a>
</section>
<section class="middle tab-bar-section">
<h1 class="title ellipsis" translate>
Transaction
</h1>
<h1 class="title ellipsis" translate>Transaction</h1>
</section>
</nav>
<ion-content>
<ion-content ng-style="{'background-color': '#F6F7F9'}">
<div class="modal-content">
<div class="header-modal text-center" ng-init="getAlternativeAmount(btx)">
<div ng-show="btx.action != 'invalid'">
@ -51,20 +49,19 @@
<h4 class="title m0" translate>Details</h4>
<ul class="no-bullet size-14 m0">
<li ng-if="!btx.hasMultiplesOutputs && btx.addressTo && btx.addressTo != 'N/A'" class="line-b p10 oh"
ng-click="copyToClipboard(btx.addressTo)">
<span class="text-gray" translate>To</span>
<span class="right">
<span ng-if="btx.merchant">
<span ng-show="btx.merchant.pr.ca"><i class="fi-lock color-greeni"></i> {{btx.merchant.domain}}</span>
<span ng-show="!btx.merchant.pr.ca"><i class="fi-unlock color-yellowi"></i> {{btx.merchant.domain}}</span>
<span class="text-gray" translate>To</span>
<span class="right">
<span ng-if="btx.merchant">
<span ng-show="btx.merchant.pr.ca"><i class="fi-lock color-greeni"></i> {{btx.merchant.domain}}</span>
<span ng-show="!btx.merchant.pr.ca"><i class="fi-unlock color-yellowi"></i> {{btx.merchant.domain}}</span>
</span>
<span ng-if="!btx.merchant">
<span ng-show="btx.labelTo">{{btx.labelTo}}</span>
<contact ng-show="!btx.labelTo" class="enable_text_select" address="{{btx.addressTo}}"></contact>
</span>
</span>
<span ng-if="!btx.merchant">
<span ng-show="btx.labelTo">{{btx.labelTo}}</span>
<contact ng-show="!btx.labelTo" class="enable_text_select" address="{{btx.addressTo}}"></contact>
</span>
</span>
</li>
<li ng-show="btx.hasMultiplesOutputs" class="line-b p10 oh"
@ -82,47 +79,61 @@
</div>
<li ng-if="btx.action == 'invalid'" class="line-b p10 oh">
<span class="right" translate>
This transaction has become invalid; possibly due to a double spend attempt.
</span>
<li ng-if="btx.time" class="line-b p10 oh">
<span class="text-gray" translate>Date</span>
<span class="right enable_text_select">
<time>{{ btx.time * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
<time>({{ btx.time * 1000 | amTimeAgo}})</time>
</span>
<span class="right" translate>
This transaction has become invalid; possibly due to a double spend attempt.
</span>
</li>
<li ng-if="btx.time" class="line-b p10 oh">
<span class="text-gray" translate>Date</span>
<span class="right enable_text_select">
<time>{{ btx.time * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
<time>({{ btx.time * 1000 | amTimeAgo}})</time>
</span>
</li>
<li class="line-b p10" ng-show="btx.action != 'received'"
ng-click="copyToClipboard(btx.feeStr)">
<span class="text-gray" translate>Fee</span>
<span class="right enable_text_select">{{btx.feeStr}}</span>
</li>
<li class="line-b p10 oh" ng-if="btx.message && btx.action != 'received'"
ng-click="copyToClipboard(btx.message)">
<span class="text-gray" translate>Note</span>
<span class="right enable_text_select">{{btx.message}}</span>
</li>
<li ng-if="btx.merchant" class="line-b p10 oh"
ng-click="copyToClipboard(btx.merchant.pr.pd.memo)">
<span class="text-gray" translate>Merchant message</span>
<span class="right enable_text_select">
{{btx.merchant.pr.pd.memo}}
</span>
<span class="text-gray" translate>Merchant message</span>
<span class="right enable_text_select">
{{btx.merchant.pr.pd.memo}}
</span>
</li>
<li ng-if="btx.time" class="line-b p10 oh">
<span class="text-gray" translate>Confirmations</span>
<span class="right" >
<span class="text-warning" ng-show="!btx.confirmations || btx.confirmations == 0" translate>
Unconfirmed
</span>
<span class="label gray radius" ng-show="btx.confirmations>0 && !btx.safeConfirmed">
{{btx.confirmations}}
</span>
<span class="label gray radius" ng-show="btx.safeConfirmed">
{{btx.safeConfirmed}}
</span>
</span>
<li ng-if="btx.time" class="line-b p10 oh">
<span class="text-gray" translate>Confirmations</span>
<span class="right" >
<span class="text-warning" ng-show="!btx.confirmations || btx.confirmations == 0" translate>
Unconfirmed
</span>
<span class="label gray radius" ng-show="btx.confirmations>0 && !btx.safeConfirmed">
{{btx.confirmations}}
</span>
<span class="label gray radius" ng-show="btx.safeConfirmed">
{{btx.safeConfirmed}}
</span>
</span>
</li>
<li class="p10 oh" ng-show="comment">
<span class="text-gray" translate>Comment</span>
<span class="right enable_text_select">{{comment}}</span><br>
<span class="right text-italic text-gray size-12 m10t">
<span>{{editedBy}}</span>
<time>{{createdOn * 1000 | amTimeAgo}}</time></span>
</span>
</li>
</ul>
@ -146,10 +157,12 @@
(getShortNetworkName() == 'test' ? 'test-' : '') + 'insight.bitpay.com/tx/' + btx.txid)">
<span class="text-gray" translate>See it on the blockchain</span>
</button>
<button class="button outline round dark-gray tiny" ng-click="showCommentPopup()">
<span class="text-gray" translate ng-show="!comment">Add a comment <i class="ion-ios-plus-outline"></i></span>
<span class="text-gray" translate ng-show="comment">Edit comment <i class="ion-ios-compose-outline"></i></span>
</button>
</div>
</div>
<div class="extra-margin-bottom"></div>
</div>
</ion-content>
</ion-modal-view>

View file

@ -18,7 +18,7 @@
</div>
</div>
<ion-content>
<ion-content ng-style="{'background-color': '#F6F7F9'}">
<div class="modal-content fix-modals-touch" ng-init="updateCopayerList()">
<div class="payment-proposal-head" ng-style="{'background-color':color}">
<div class="size-36">{{tx.amountStr}}</div>

View file

@ -204,12 +204,11 @@
<div class="m10t">
<span ng-show="btx.action == 'received'" translate>Received</span>
<span ng-show="btx.action == 'sent'">
{{index.addressbook[btx.addressTo]}}
<span ng-show="!index.addressbook[btx.addressTo] && btx.message">
<span class="ellipsis">{{btx.message}}</span>
</span>
<span ng-show="!index.addressbook[btx.addressTo] && !btx.message">
<span translate> Sent</span>
<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 ng-show="btx.action == 'moved'" translate>Moved</span>