mirror of https://github.com/BTCPrivate/copay.git
Ref ionicPopup. Clear amount view after send
This commit is contained in:
parent
7192622007
commit
01d5ba8d9f
|
@ -22,10 +22,10 @@
|
|||
</div>
|
||||
|
||||
<div class="list card" ng-hide="!txps[0]">
|
||||
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals" translate>
|
||||
Payment Proposals
|
||||
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals">
|
||||
{{'Payment Proposals'|translate}}
|
||||
<i class="icon nav-item-arrow-right"></i>
|
||||
<span class="badge badge-assertive m5t m10r" ng-if="txpsN>3" translate> {{txpsN}}</span>
|
||||
<span class="badge badge-assertive m5t m10r" ng-show="txpsN>3"> {{txpsN}}</span>
|
||||
</a>
|
||||
|
||||
<a ng-repeat="tx in txps" class="item" ng-click="openTxpModal(tx)">
|
||||
|
|
|
@ -60,6 +60,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
|||
satToBtc = 1 / 100000000;
|
||||
unitDecimals = config.unitDecimals;
|
||||
|
||||
$scope.resetAmount();
|
||||
|
||||
// in SAT ALWAYS
|
||||
if ($stateParams.toAmount) {
|
||||
$scope.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, gettext, txFormatService, ongoingProcess, $ionicModal, popupService) {
|
||||
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, gettext, txFormatService, ongoingProcess, $ionicModal, popupService) {
|
||||
var cachedTxp = {};
|
||||
var isChromeApp = platformInfo.isChromeApp;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $stateParams, $ionicPopup, popupService, gettextCatalog) {
|
||||
angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $stateParams, popupService, gettextCatalog) {
|
||||
|
||||
$scope.walletId = $stateParams.walletId;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $timeout, $stateParams, $ionicPopup, profileService, $ionicModal) {
|
||||
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $timeout, $stateParams, profileService, $ionicModal) {
|
||||
|
||||
$scope.walletId = $stateParams.walletId;
|
||||
$scope.openPopup = function() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, $ionicPopup, profileService) {
|
||||
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, profileService) {
|
||||
|
||||
$scope.goImport = function(code) {
|
||||
$state.go('onboarding.import', {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData) {
|
||||
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService) {
|
||||
|
||||
var originalList;
|
||||
var CONTACTS_SHOW_LIMIT = 10;
|
||||
|
@ -99,9 +99,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
|||
|
||||
$scope.onQrCodeScanned = function(data) {
|
||||
if (!incomingData.redir(data)) {
|
||||
$ionicPopup.alert({
|
||||
title: 'Invalid data',
|
||||
});
|
||||
popupService.showAlert(null, gettextCatalog.getString('Invalid data'));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('tabsController', function($rootScope, $log, $scope, $state, $stateParams, $timeout, incomingData, lodash) {
|
||||
angular.module('copayApp.controllers').controller('tabsController', function($rootScope, $log, $scope, $state, $stateParams, $timeout, incomingData, lodash, popupService) {
|
||||
|
||||
$scope.onScan = function(data) {
|
||||
if (!incomingData.redir(data)) {
|
||||
$ionicPopup.alert({
|
||||
title: 'Invalid data',
|
||||
});
|
||||
popupService.showAlert(null, gettextCatalog.getString('Invalid data'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService, $ionicPopup, txpModalService, externalLinkService) {
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, profileService, lodash, configService, gettextCatalog, platformInfo, walletService, txpModalService, externalLinkService, popupService) {
|
||||
var isCordova = platformInfo.isCordova;
|
||||
var isWP = platformInfo.isWP;
|
||||
var isAndroid = platformInfo.isAndroid;
|
||||
|
@ -219,9 +219,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
if (tx) {
|
||||
$scope.openTxModal(tx);
|
||||
} else {
|
||||
$ionicPopup.alert({
|
||||
title: gettext('TX not available'),
|
||||
});
|
||||
popupService.showAlert(null, gettextCatalog.getString('TX not available'));
|
||||
}
|
||||
} else if ($stateParams.txpId) {
|
||||
var txp = lodash.find($scope.txps, {
|
||||
|
@ -230,9 +228,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
if (txp) {
|
||||
$scope.openTxpModal(txp);
|
||||
} else {
|
||||
$ionicPopup.alert({
|
||||
title: gettext('Proposal not longer available'),
|
||||
});
|
||||
popupService.showAlert(null, gettextCatalog.getString('Proposal not longer available'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -820,32 +820,12 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
|
||||
// An alert dialog
|
||||
var askPassword = function(name, title, cb) {
|
||||
var scope = $rootScope.$new(true);
|
||||
scope.data = [];
|
||||
var pass = $ionicPopup.show({
|
||||
template: '<input type="password" ng-model="data.pass">',
|
||||
title: title,
|
||||
subTitle: name,
|
||||
scope: scope,
|
||||
buttons: [{
|
||||
text: 'Cancel'
|
||||
}, {
|
||||
text: '<b>OK</b>',
|
||||
type: 'button-positive',
|
||||
onTap: function(e) {
|
||||
if (!scope.data.pass) {
|
||||
//don't allow the user to close unless he enters wifi password
|
||||
e.preventDefault();
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
return scope.data.pass;
|
||||
}
|
||||
}]
|
||||
});
|
||||
pass.then(function(res) {
|
||||
return cb(res);
|
||||
var opts = {
|
||||
inputType: 'password'
|
||||
};
|
||||
popupService.showPrompt(title, name, opts, function(res) {
|
||||
if (!res) return cb();
|
||||
if (res) return cb(res)
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue