diff --git a/www/js/controllers/currency-controllers.js b/www/js/controllers/currency-controllers.js index 5ead26dc3ca52fbb1ff73ec6ade1fefb4cbf8497..e5b21348aee2a73b4f1da59ecf49d623261c04f4 100644 --- a/www/js/controllers/currency-controllers.js +++ b/www/js/controllers/currency-controllers.js @@ -16,8 +16,21 @@ angular.module('cesium.currency.controllers', ['cesium.services']) } }) + .state('app.currency_name', { + url: "/currency/:name", + views: { + 'menuContent': { + templateUrl: "templates/currency/view_currency.html", + controller: 'CurrencyViewCtrl' + } + }, + data: { + large: 'app.currency_view_lg' + } + }) + .state('app.currency', { - url: "/currency/view/:name", + url: "/currency", views: { 'menuContent': { templateUrl: "templates/currency/view_currency.html", @@ -67,8 +80,18 @@ angular.module('cesium.currency.controllers', ['cesium.services']) } }) + .state('app.currency_view_name_lg', { + url: "/currency/lg/:name", + views: { + 'menuContent': { + templateUrl: "templates/currency/view_currency_lg.html", + controller: 'CurrencyViewCtrl' + } + } + }) + .state('app.currency_view_lg', { - url: "/currency/view/lg/:name", + url: "/currency/lg", views: { 'menuContent': { templateUrl: "templates/currency/view_currency_lg.html", diff --git a/www/js/controllers/network-controllers.js b/www/js/controllers/network-controllers.js index 1fdab52476e3ea8fe793ee63a5aa657cc54d7e08..fd9a2bf8d3802a8ec06d58adf644cf28677944ee 100644 --- a/www/js/controllers/network-controllers.js +++ b/www/js/controllers/network-controllers.js @@ -6,8 +6,8 @@ angular.module('cesium.network.controllers', ['cesium.services']) $stateProvider - .state('app.network', { - url: "/network", + .state('app.network', { + url: "/network?type", views: { 'menuContent': { templateUrl: "templates/network/view_network.html", @@ -54,7 +54,7 @@ function NetworkLookupController($scope, $timeout, $state, $ionicPopover, BMA, U /** * Enter in view */ - $scope.enter = function() { + $scope.enter = function(e, state) { if ($scope.networkStarted) return; $scope.networkStarted = true; csCurrency.default() @@ -62,6 +62,9 @@ function NetworkLookupController($scope, $timeout, $state, $ionicPopover, BMA, U if (currency) { $scope.node = !BMA.node.same(currency.peer.host, currency.peer.port) ? BMA.instance(currency.peer.host, currency.peer.port) : BMA; + if (state && state.stateParams && state.stateParams.type) { + $scope.search.type = state.stateParams.type; + } $scope.load(); } }) diff --git a/www/templates/menu.html b/www/templates/menu.html index aa1e0d77e06e3628d088cdd7c6f189f0bb1d964a..f9c5108b8c7116037304ee46d0e34332b7a16326 100644 --- a/www/templates/menu.html +++ b/www/templates/menu.html @@ -83,7 +83,7 @@ class="item item-icon-left" active-link="active" active-link-path-prefix="#/app/currency" - href="#/app/currency/view/" + href="#/app/currency" ng-if="!options.registry || !options.registry.enable"> <i class="icon ion-ios-world-outline"></i> <span translate>MENU.CURRENCY</span>