fix nav bar buttons/titles/translations

This commit is contained in:
Javier 2016-08-30 12:52:28 -03:00
commit d5cc0dd63f
8 changed files with 83 additions and 108 deletions

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('amountController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService) {
angular.module('copayApp.controllers').controller('amountController', function($rootScope, $scope, $filter, $timeout, $ionicHistory, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Enter Amount'));
var unitToSatoshi;
var satToUnit;
@ -63,7 +63,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
// in SAT ALWAYS
if ($stateParams.toAmount) {
$scope.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals) ;
$scope.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals);
}
@ -188,13 +188,9 @@ angular.module('copayApp.controllers').controller('amountController', function($
var amount = $scope.showAlternativeAmount ? fromFiat(_amount).toFixed(unitDecimals) : _amount.toFixed(unitDecimals);
$state.transitionTo('send.confirm', {
toAmount:amount * unitToSatoshi,
toAmount: amount * unitToSatoshi,
toAddress: $scope.toAddress,
toName: $scope.toName,
});
};
$scope.cancel = function() {
$state.transitionTo('tabs.send');
};
});

View file

@ -1,7 +1,7 @@
'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, txStatus, gettext, txFormatService, ongoingProcess, $ionicModal) {
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, txStatus, gettext, txFormatService, ongoingProcess, $ionicModal) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Confirm'));
var cachedTxp = {};
var isChromeApp = platformInfo.isChromeApp;
@ -198,7 +198,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.$apply();
};
var createTx = function(wallet, cb) {
var createTx = function(wallet, cb) {
var config = configService.getSync().wallet;
var currentSpendUnconfirmed = config.spendUnconfirmed;
var outputs = [];

View file

@ -357,12 +357,11 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*/
.state('send', {
url: '/send',
abstract: true,
template: '<ion-nav-view name="send"></ion-nav-view>'
})
.state('send.amount', {
url: '/send',
abstract: true,
template: '<ion-nav-view name="send"></ion-nav-view>'
})
.state('send.amount', {
url: '/amount/:toAddress/:toName',
views: {
'send': {