diff --git a/www/plugins/es/js/controllers/network-controllers.js b/www/plugins/es/js/controllers/network-controllers.js index 8d259a27afd3b8272b60c1de830e4c9bcec9d466..c94988afbb93b9a836c4f5795d769e6b3aee5ab1 100644 --- a/www/plugins/es/js/controllers/network-controllers.js +++ b/www/plugins/es/js/controllers/network-controllers.js @@ -32,7 +32,7 @@ angular.module('cesium.es.network.controllers', ['cesium.es.services']) cache: false, // fix #766 views: { 'menuContent': { - templateUrl: "plugins/es/templates/network/view_network.html", + templateUrl: "plugins/es/templates/network/view_es_network.html", controller: 'ESNetworkLookupCtrl' } }, diff --git a/www/plugins/es/templates/network/view_network.html b/www/plugins/es/templates/network/view_es_network.html similarity index 97% rename from www/plugins/es/templates/network/view_network.html rename to www/plugins/es/templates/network/view_es_network.html index 21070d503c7c35a30bccf24c9aef646b6be98783..907960773c5ccb834496977f7f40e9e81f2c5a3e 100644 --- a/www/plugins/es/templates/network/view_network.html +++ b/www/plugins/es/templates/network/view_es_network.html @@ -61,7 +61,7 @@ </a> <!-- Allow extension here --> - <cs-extension-point name="buttons"></cs-extension-point> + <cs-extension-point name="documents-buttons"></cs-extension-point> <a class="button button-text button-small ink" ui-sref="app.document_search({index: search.index, type: search.type})" > diff --git a/www/plugins/es/templates/network/view_network_extend.html b/www/plugins/es/templates/network/view_network_extend.html index 71ac0460c53cb61b24528e672c3d48bbae64a168..2be4e29ddf5b05e0c4efc48a1c86868badebbf4f 100644 --- a/www/plugins/es/templates/network/view_network_extend.html +++ b/www/plugins/es/templates/network/view_network_extend.html @@ -1,6 +1,6 @@ <!-- Network: buttons section --> <ng-if ng-if=":state:enable && extensionPoint === 'network-buttons'"> - <a class="button button-text button-small hidden-xs hidden-sm ink" + <a class="button button-text button-small hidden-xs hidden-sm ink" ng-if="::expertMode" title="{{'NETWORK.VIEW.ENDPOINTS.ES_USER_API'|translate}}" ui-sref="app.es_network" > <i class="icon ion-image"></i> diff --git a/www/plugins/graph/js/controllers/network-controllers.js b/www/plugins/graph/js/controllers/network-controllers.js index 5ba4e0086839c5a626edb2e03d4669ed69184a1d..946e7fdce5ee2f66d688fe582e9f1fb4f58d0297 100644 --- a/www/plugins/graph/js/controllers/network-controllers.js +++ b/www/plugins/graph/js/controllers/network-controllers.js @@ -10,9 +10,9 @@ angular.module('cesium.graph.network.controllers', ['chart.js', 'cesium.graph.se PluginServiceProvider .extendState('app.network', { points: { - 'buttons': { + 'blockchain-buttons': { templateUrl: "plugins/graph/templates/network/view_network_extend.html", - controller: 'GpNetworkViewExtendCtrl' + controller: 'ESExtensionCtrl' } } }) @@ -28,9 +28,9 @@ angular.module('cesium.graph.network.controllers', ['chart.js', 'cesium.graph.se .extendState('app.es_network', { points: { - 'buttons': { + 'documents-buttons': { templateUrl: "plugins/graph/templates/network/view_es_network_extend.html", - controller: 'GpNetworkViewExtendCtrl' + controller: 'ESExtensionCtrl' } } }) @@ -49,24 +49,10 @@ angular.module('cesium.graph.network.controllers', ['chart.js', 'cesium.graph.se } }) - .controller('GpNetworkViewExtendCtrl', GpNetworkViewExtendController) - .controller('GpPeerViewExtendCtrl', GpPeerViewExtendController) ; - -function GpNetworkViewExtendController($scope, PluginService, esSettings) { - 'ngInject'; - - $scope.extensionPoint = PluginService.extensions.points.current.get(); - $scope.enable = esSettings.isEnable(); - - esSettings.api.state.on.changed($scope, function(enable) { - $scope.enable = enable; - }); -} - function GpPeerViewExtendController($scope, $timeout, PluginService, esSettings, csCurrency, gpData) { 'ngInject'; diff --git a/www/plugins/graph/templates/network/view_es_network_extend.html b/www/plugins/graph/templates/network/view_es_network_extend.html index e2e0544a736d242a35e6c042af2ba12256ee9855..727817ca4eddf4ceb38e35e80803674a2ba6567c 100644 --- a/www/plugins/graph/templates/network/view_es_network_extend.html +++ b/www/plugins/graph/templates/network/view_es_network_extend.html @@ -1,5 +1,5 @@ <!-- Buttons section --> -<ng-if ng-if=":state:enable && extensionPoint === 'buttons'"> +<ng-if ng-if=":state:enable && extensionPoint === 'documents-buttons'"> <a class="button button-text button-small ink" ui-sref="app.doc_stats_lg" > <i class="icon ion-stats-bars"></i> diff --git a/www/plugins/graph/templates/network/view_network_extend.html b/www/plugins/graph/templates/network/view_network_extend.html index 8b387b41d5c2998a05c96de70722e9c4a7651f06..1f63746f0250c5725ce896fb356610792f1cc72b 100644 --- a/www/plugins/graph/templates/network/view_network_extend.html +++ b/www/plugins/graph/templates/network/view_network_extend.html @@ -1,5 +1,5 @@ <!-- Buttons section --> -<ng-if ng-if=":state:enable && extensionPoint === 'buttons'"> +<ng-if ng-if=":state:enable && extensionPoint === 'blockchain-buttons'"> <a class="button button-text button-small ink" ui-sref="app.blockchain_stats" > <i class="icon ion-stats-bars"></i> diff --git a/www/templates/network/view_network.html b/www/templates/network/view_network.html index dea8005242c96767686fffff6b65f799dd2043bf..15c7f6d25a46782e9f673a913f17c7e72a4ec375 100644 --- a/www/templates/network/view_network.html +++ b/www/templates/network/view_network.html @@ -39,6 +39,7 @@ <a class="button button-text button-small hidden-xs hidden-sm ink" ng-class="{'button-text-positive': search.type=='member'}" + title="{{'PEER.MEMBER_PEERS'|translate}}" ng-click="toggleSearchType('member')"> <i class="icon ion-person-stalker"></i> {{'PEER.MEMBERS'|translate}} @@ -46,6 +47,7 @@ <a class="button button-text button-small hidden-xs hidden-sm ink" ng-class="{'button-text-positive': search.type=='mirror'}" + title="{{'PEER.MIRROR_PEERS'|translate}}" ng-click="toggleSearchType('mirror')" > <i class="icon ion-radio-waves"></i> {{'PEER.MIRRORS'|translate}} @@ -53,6 +55,7 @@ <a class="button button-text button-small hidden-xs hidden-sm ink" ng-class="{'button-text-positive': search.type=='offline', 'button-text-stable': search.type!='offline'}" + title="{{'PEER.OFFLINE_PEERS'|translate}}" ng-click="toggleSearchType('offline')" > <i class="icon ion-close-circled light-gray"></i> <span>{{'PEER.OFFLINE'|translate}}</span>