Merge pull request #130 from cmgustavo/ref/design-34

Glidera route issues
This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-16 14:59:41 -03:00 committed by GitHub
commit 5bd450270b
13 changed files with 101 additions and 117 deletions

View file

@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('glideraUriController',
} else if (data && data.access_token) {
storageService.setGlideraToken($scope.network, data.access_token, function() {
$timeout(function() {
$state.go('glidera.main');
$state.go('tabs.buyandsell.glidera');
$scope.$apply();
}, 500);
});

View file

@ -1,18 +0,0 @@
'use strict';
angular.module('copayApp.controllers').controller('glideraConfirmationController', function($scope, $timeout, $state, glideraService) {
$scope.ok = function() {
glideraService.removeToken(function() {
$timeout(function() {
$state.go('glidera.main');
}, 100);
});
$scope.cancel();
};
$scope.cancel = function() {
$scope.glideraConfirmationModal.hide();
};
});

View file

@ -68,7 +68,7 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
if (res) {
glideraService.removeToken(function() {
$timeout(function() {
$state.go('glidera.main');
$state.go('tabs.buyandsell.glidera');
}, 100);
});
}

View file

@ -109,11 +109,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
templateUrl: 'views/starting.html'
})
.state('buyandsell', {
url: '/buyandsell',
templateUrl: 'views/buyandsell.html'
})
/*
*
* URI
@ -636,46 +631,57 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
},
})
/*
*
* Glidera
*
*
*/
.state('glidera', {
url: '/glidera',
abstract: true,
template: '<ion-nav-view name="glidera"></ion-nav-view>'
})
.state('glidera.main', {
url: '/main',
/*
*
* Buy or Sell Bitcoin
*
*/
.state('tabs.buyandsell', {
url: '/buyandsell',
views: {
'glidera': {
'tab-home': {
templateUrl: 'views/buyandsell.html'
}
}
})
/*
*
* Glidera
*
*
*/
.state('tabs.buyandsell.glidera', {
url: '/glidera',
views: {
'tab-home@tabs': {
templateUrl: 'views/glidera.html'
}
}
})
.state('glidera.buy', {
.state('tabs.buyandsell.glidera.buy', {
url: '/buy',
views: {
'glidera': {
'tab-home@tabs': {
templateUrl: 'views/buyGlidera.html'
}
}
})
.state('glidera.sell', {
.state('tabs.buyandsell.glidera.sell', {
url: '/sell',
views: {
'glidera': {
'tab-home@tabs': {
templateUrl: 'views/sellGlidera.html'
}
}
})
.state('glidera.preferences', {
.state('tabs.buyandsell.glidera.preferences', {
url: '/preferences',
views: {
'glidera': {
'tab-home@tabs': {
templateUrl: 'views/preferencesGlidera.html'
}
}

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services').factory('glideraService', function($http, $log, $window, platformInfo, storageService, configService, $rootScope) {
angular.module('copayApp.services').factory('glideraService', function($http, $log, $window, platformInfo, storageService) {
var root = {};
var credentials = {};
var isCordova = platformInfo.isCordova;