Merge pull request #157 from gabrielbazan7/fix/addEntrySend

fix okay button on status modal and others
This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-22 11:57:12 -03:00 committed by GitHub
commit c88df6c599
4 changed files with 14 additions and 7 deletions

View file

@ -52,6 +52,6 @@
</div> </div>
</div> </div>
</ion-content> </ion-content>
<button class="button button-block button-positive accept-button" ng-click="approve()" ng-if="!isCordova" translate>Click to pay</button> <button class="button button-block button-positive accept-button" ng-click="approve()" ng-if="!isCordova" ng-disabled="!fee" translate>Click to pay</button>
<accept class="accept-slide" ng-if="isCordova"></accept> <accept class="accept-slide" ng-if="isCordova && fee"></accept>
</ion-view> </ion-view>

View file

@ -7,10 +7,10 @@
<div class="size-16 text-gray m10v"> <div class="size-16 text-gray m10v">
<span translate>Sent</span> <span translate>Sent</span>
</div> </div>
<div class="text-center m20t" ng-if="entryExist"> <div class="text-center m20t" ng-if="entryExist || !fromSendTab">
<a class="button button-positive" ng-click="cancel()" translate>OKAY</a> <a class="button button-positive" ng-click="cancel()" translate>OKAY</a>
</div> </div>
<div class="collect-address" ng-if="!entryExist"> <div class="collect-address" ng-if="!entryExist && fromSendTab">
<div class="row"> <div class="row">
<p translate class="col">Would you like to add this address to your address book?</p> <p translate class="col">Would you like to add this address to your address book?</p>
</div> </div>

View file

@ -162,5 +162,5 @@
</div> </div>
</ion-content> </ion-content>
<button class="button button-block button-positive accept-button" ng-click="approve()" ng-if="!isCordova" translate>Click to pay</button> <button class="button button-block button-positive accept-button" ng-click="approve()" ng-if="!isCordova" translate>Click to pay</button>
<accept class="accept-slide" ng-if="tx.pendingForUs && canSign && !loading && !paymentExpired"></accept> <accept class="accept-slide" ng-if="tx.pendingForUs && canSign && !loading && !paymentExpired && isCordova"></accept>
</ion-modal-view> </ion-modal-view>

View file

@ -1,21 +1,28 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $log, addressbookService) { angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $ionicHistory, $log, addressbookService) {
if ($scope.cb) $timeout($scope.cb, 100); if ($scope.cb) $timeout($scope.cb, 100);
$scope.cancel = function() { $scope.cancel = function() {
$ionicHistory.clearHistory();
$state.go('tabs.home');
$scope.txStatusModal.hide(); $scope.txStatusModal.hide();
}; };
$scope.save = function(addressbookEntry) { $scope.save = function(addressbookEntry) {
$scope.txStatusModal.hide(); $scope.txStatusModal.hide();
$ionicHistory.nextViewOptions({
disableAnimate: true,
disableBack: true
});
$state.go('tabs.send.addressbook', { $state.go('tabs.send.addressbook', {
fromSendTab: true, fromSendTab: true,
addressbookEntry: addressbookEntry addressbookEntry: addressbookEntry
}) });
} }
$scope.fromSendTab = $ionicHistory.viewHistory().backView.stateName === "tabs.send.amount";
addressbookService.list(function(err, ab) { addressbookService.list(function(err, ab) {
if (err) $log.error(err); if (err) $log.error(err);
if (ab[$scope.tx.toAddress]) { if (ab[$scope.tx.toAddress]) {