Merge pull request #413 from cmgustavo/ref/copayers-01

Ref copayers view
This commit is contained in:
Matias Alejo Garcia 2016-10-12 16:13:04 -03:00 committed by GitHub
commit 0257724912
4 changed files with 44 additions and 41 deletions

View file

@ -3,15 +3,11 @@
angular.module('copayApp.controllers').controller('copayersController',
function($scope, $log, $timeout, $stateParams, $state, $rootScope, $ionicHistory, lodash, profileService, walletService, popupService, platformInfo, gettextCatalog, ongoingProcess) {
$scope.isCordova = platformInfo.isCordova;
$scope.$on("$ionicView.beforeEnter", function(event, data) {
init();
});
var init = function() {
$scope.isCordova = platformInfo.isCordova;
$scope.wallet = profileService.getWallet($stateParams.walletId);
$scope.wallet = profileService.getWallet(data.stateParams.walletId);
updateWallet();
};
});
$rootScope.$on('bwsEvent', function() {
updateWallet();
@ -40,7 +36,9 @@ angular.module('copayApp.controllers').controller('copayersController',
};
$scope.showDeletePopup = function() {
popupService.showConfirm(gettextCatalog.getString('Confirm'), gettextCatalog.getString('Are you sure you want to delete this wallet?'), null, null, function(res) {
var title = gettextCatalog.getString('Confirm');
var msg = gettextCatalog.getString('Are you sure you want to cancel and delete this wallet?');
popupService.showConfirm(title, msg, null, null, function(res) {
if (res) deleteWallet();
});
};