Merge pull request #217 from gabrielbazan7/fix/routesSettings

fixing routes on settings
This commit is contained in:
Matias Alejo Garcia 2016-08-23 16:32:45 -03:00 committed by GitHub
commit 3cf7e578c4
8 changed files with 15 additions and 17 deletions

View File

@ -2,7 +2,7 @@
<ion-nav-bar class="bar-stable">
<ion-nav-title>Session log</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="about">
<button class="button no-border" ui-sref="settings.about">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>

View File

@ -10,7 +10,7 @@
<i class="icon ion-ios-book-outline"></i>
<span translate>Address Book</span>
</div>
<div class="item item-icon-left" href ui-sref="feedback">
<div class="item item-icon-left" href ui-sref="settings.feedback">
<i class="icon ion-ios-heart-outline"></i>
<span translate>Feedback</span>
</div>

View File

@ -2,7 +2,7 @@
<ion-nav-bar class="bar-stable">
<ion-nav-title>Terms of Use</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="about">
<button class="button no-border" ui-sref="settings.about">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>

View File

@ -2,7 +2,7 @@
<ion-nav-bar class="bar-stable">
<ion-nav-title>Translators</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="about">
<button class="button no-border" ui-sref="settings.about">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesAltCurrencyController',
function($scope, $log, $timeout, configService, rateService, lodash, profileService, walletService, $state) {
function($scope, $log, $state, $timeout, configService, rateService, lodash, profileService, walletService) {
var next = 10;
var completeAlternativeList;
@ -42,9 +42,9 @@ angular.module('copayApp.controllers').controller('preferencesAltCurrencyControl
configService.set(opts, function(err) {
if (err) $log.warn(err);
$state.go('preferencesGlobal');
$scope.$emit('Local/UnitSettingUpdated');
walletService.updateRemotePreferences(profileService.getClients(), {}, function() {
$state.go('tabs.settings');
walletService.updateRemotePreferences(profileService.getWallets(), {}, function() {
$log.debug('Remote preferences saved');
});
});

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesLanguageController',
function($scope, $log, $state, configService, profileService, uxLanguage, walletService, go) {
function($scope, $log, $state, configService, profileService, uxLanguage, walletService) {
$scope.init = function() {
$scope.availableLanguages = uxLanguage.getLanguages();
@ -19,10 +19,10 @@ angular.module('copayApp.controllers').controller('preferencesLanguageController
configService.set(opts, function(err) {
if (err) $log.warn(err);
go.preferencesGlobal();
$state.go('tabs.settings')
uxLanguage.update(function() {
walletService.updateRemotePreferences(profileService.getClients(), {}, function() {
walletService.updateRemotePreferences(profileService.getWallets(), {}, function() {
$log.debug('Remote preferences saved');
});
});

View File

@ -36,10 +36,8 @@ angular.module('copayApp.controllers').controller('preferencesUnitController', f
configService.set(opts, function(err) {
if (err) $log.warn(err);
$state.go('preferencesGlobal');
$scope.$emit('Local/UnitSettingUpdated');
walletService.updateRemotePreferences(profileService.getClients(), {}, function() {
$state.go('tabs.settings');
walletService.updateRemotePreferences(profileService.getWallets(), {}, function() {
$log.debug('Remote preferences saved');
});
});

View File

@ -3,8 +3,8 @@ angular.module('copayApp.services')
.factory('applicationService', function($rootScope, $timeout, platformInfo, $state) {
var root = {};
var isChromeApp = platformInfo.isChromeApp;
var isNW = platformInfo.isNW;
var isChromeApp = platformInfo.isChromeApp;
var isNW = platformInfo.isNW;
root.restart = function() {
var hashIndex = window.location.href.indexOf('#/');