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>
|
||||||
|
|
||||||
<div class="list card" ng-hide="!txps[0]">
|
<div class="list card" ng-hide="!txps[0]">
|
||||||
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals" translate>
|
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals">
|
||||||
Payment Proposals
|
{{'Payment Proposals'|translate}}
|
||||||
<i class="icon nav-item-arrow-right"></i>
|
<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>
|
||||||
|
|
||||||
<a ng-repeat="tx in txps" class="item" ng-click="openTxpModal(tx)">
|
<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;
|
satToBtc = 1 / 100000000;
|
||||||
unitDecimals = config.unitDecimals;
|
unitDecimals = config.unitDecimals;
|
||||||
|
|
||||||
|
$scope.resetAmount();
|
||||||
|
|
||||||
// in SAT ALWAYS
|
// in SAT ALWAYS
|
||||||
if ($stateParams.toAmount) {
|
if ($stateParams.toAmount) {
|
||||||
$scope.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals);
|
$scope.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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 cachedTxp = {};
|
||||||
var isChromeApp = platformInfo.isChromeApp;
|
var isChromeApp = platformInfo.isChromeApp;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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;
|
$scope.walletId = $stateParams.walletId;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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.walletId = $stateParams.walletId;
|
||||||
$scope.openPopup = function() {
|
$scope.openPopup = function() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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) {
|
$scope.goImport = function(code) {
|
||||||
$state.go('onboarding.import', {
|
$state.go('onboarding.import', {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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 originalList;
|
||||||
var CONTACTS_SHOW_LIMIT = 10;
|
var CONTACTS_SHOW_LIMIT = 10;
|
||||||
|
@ -99,9 +99,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
|
|
||||||
$scope.onQrCodeScanned = function(data) {
|
$scope.onQrCodeScanned = function(data) {
|
||||||
if (!incomingData.redir(data)) {
|
if (!incomingData.redir(data)) {
|
||||||
$ionicPopup.alert({
|
popupService.showAlert(null, gettextCatalog.getString('Invalid data'));
|
||||||
title: 'Invalid data',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
'use strict';
|
'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) {
|
$scope.onScan = function(data) {
|
||||||
if (!incomingData.redir(data)) {
|
if (!incomingData.redir(data)) {
|
||||||
$ionicPopup.alert({
|
popupService.showAlert(null, gettextCatalog.getString('Invalid data'));
|
||||||
title: 'Invalid data',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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 isCordova = platformInfo.isCordova;
|
||||||
var isWP = platformInfo.isWP;
|
var isWP = platformInfo.isWP;
|
||||||
var isAndroid = platformInfo.isAndroid;
|
var isAndroid = platformInfo.isAndroid;
|
||||||
|
@ -219,9 +219,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
||||||
if (tx) {
|
if (tx) {
|
||||||
$scope.openTxModal(tx);
|
$scope.openTxModal(tx);
|
||||||
} else {
|
} else {
|
||||||
$ionicPopup.alert({
|
popupService.showAlert(null, gettextCatalog.getString('TX not available'));
|
||||||
title: gettext('TX not available'),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} else if ($stateParams.txpId) {
|
} else if ($stateParams.txpId) {
|
||||||
var txp = lodash.find($scope.txps, {
|
var txp = lodash.find($scope.txps, {
|
||||||
|
@ -230,9 +228,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
||||||
if (txp) {
|
if (txp) {
|
||||||
$scope.openTxpModal(txp);
|
$scope.openTxpModal(txp);
|
||||||
} else {
|
} else {
|
||||||
$ionicPopup.alert({
|
popupService.showAlert(null, gettextCatalog.getString('Proposal not longer available'));
|
||||||
title: gettext('Proposal not longer available'),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -820,32 +820,12 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
|
|
||||||
// An alert dialog
|
// An alert dialog
|
||||||
var askPassword = function(name, title, cb) {
|
var askPassword = function(name, title, cb) {
|
||||||
var scope = $rootScope.$new(true);
|
var opts = {
|
||||||
scope.data = [];
|
inputType: 'password'
|
||||||
var pass = $ionicPopup.show({
|
};
|
||||||
template: '<input type="password" ng-model="data.pass">',
|
popupService.showPrompt(title, name, opts, function(res) {
|
||||||
title: title,
|
if (!res) return cb();
|
||||||
subTitle: name,
|
if (res) return cb(res)
|
||||||
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);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue