remove angular foundation and use only ionic modals
This commit is contained in:
parent
61f6909d9a
commit
0cca8f6367
24 changed files with 249 additions and 230 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $modal, $log, $ionicModal, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit, ongoingProcess) {
|
||||
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit, ongoingProcess) {
|
||||
|
||||
var isCordova = platformInfo.isCordova;
|
||||
var isWP = platformInfo.isWP;
|
||||
|
|
@ -464,7 +464,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
if (!client.canSign() && !client.isPrivKeyExternal()) {
|
||||
$log.info('No signing proposal: No private key');
|
||||
self.resetForm();
|
||||
txStatus.notify(createdTxp, function() {
|
||||
var type = txStatus.notify(createdTxp);
|
||||
$scope.openStatusModal(type, createdTxp, function() {
|
||||
return $scope.$emit('Local/TxProposalAction');
|
||||
});
|
||||
} else {
|
||||
|
|
@ -520,14 +521,16 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
}
|
||||
self.resetForm();
|
||||
go.walletHome();
|
||||
txStatus.notify(broadcastedTxp, function() {
|
||||
var type = txStatus.notify(broadcastedTxp);
|
||||
$scope.openStatusModal(type, broadcastedTxp, function() {
|
||||
$scope.$emit('Local/TxProposalAction', broadcastedTxp.status == 'broadcasted');
|
||||
});
|
||||
});
|
||||
} else {
|
||||
self.resetForm();
|
||||
go.walletHome();
|
||||
txStatus.notify(signedTxp, function() {
|
||||
var type = txStatus.notify(signedTxp);
|
||||
$scope.openStatusModal(type, signedTxp, function() {
|
||||
$scope.$emit('Local/TxProposalAction');
|
||||
});
|
||||
}
|
||||
|
|
@ -537,6 +540,22 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
});
|
||||
};
|
||||
|
||||
$scope.openStatusModal = function(type, txp, cb) {
|
||||
var fc = profileService.focusedClient;
|
||||
$scope.type = type;
|
||||
$scope.tx = txFormatService.processTx(txp);
|
||||
$scope.color = fc.backgroundColor;
|
||||
$scope.cb = cb;
|
||||
|
||||
$ionicModal.fromTemplateUrl('views/modals/tx-status.html', {
|
||||
scope: $scope,
|
||||
animation: 'slide-in-up'
|
||||
}).then(function(modal) {
|
||||
$scope.txStatusModal = modal;
|
||||
$scope.txStatusModal.show();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.openSearchModal = function() {
|
||||
var fc = profileService.focusedClient;
|
||||
$scope.color = fc.backgroundColor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue