diff --git a/dist/desktop b/dist/desktop index be5b9ddbbb88a5a129ec47c0968b9061de3bfe29..2667bc6efab8ae2393ab57f330c33f7dedf99fe2 160000 --- a/dist/desktop +++ b/dist/desktop @@ -1 +1 @@ -Subproject commit be5b9ddbbb88a5a129ec47c0968b9061de3bfe29 +Subproject commit 2667bc6efab8ae2393ab57f330c33f7dedf99fe2 diff --git a/platforms/android b/platforms/android index 34160271cd5a12ae2ff5765794ca9a84decb1767..8995b1918fb5cb60b86e6ba53073d5fddb4d36c2 160000 --- a/platforms/android +++ b/platforms/android @@ -1 +1 @@ -Subproject commit 34160271cd5a12ae2ff5765794ca9a84decb1767 +Subproject commit 8995b1918fb5cb60b86e6ba53073d5fddb4d36c2 diff --git a/www/js/controllers/network-controllers.js b/www/js/controllers/network-controllers.js index 0fdbb64ea890aebab28ba3d786e140a83113a3c5..d194b156c5c7bc06a5ec9649dc435929f9b533af 100644 --- a/www/js/controllers/network-controllers.js +++ b/www/js/controllers/network-controllers.js @@ -257,7 +257,7 @@ function NetworkLookupController($scope, $state, $location, $ionicPopover, $win return; } - // Skipp offline or not a BMA peer + // Skip offline or not a BMA peer if (!peer.online || !peer.hasBma()) return; var stateParams = {server: peer.getServer()}; @@ -484,7 +484,7 @@ function PeerInfoPopoverController($scope, $q, csSettings, csCurrency, csHttp, B // continue }), - // Get duniter latest version + // Get latest version BMA.version.latest() .then(function(latestRelease){ $scope.formData.latestRelease = latestRelease; @@ -567,7 +567,7 @@ function PeerViewController($scope, $q, $window, $state, UIUtils, csWot, BMA) { useTor: useTor }; var serverParts = server.split(':'); - if (serverParts.length == 2) { + if (serverParts.length === 2) { node.host = serverParts[0]; node.port = serverParts[1]; } diff --git a/www/plugins/es/i18n/locale-en-GB.json b/www/plugins/es/i18n/locale-en-GB.json index e45f63b40b76e89b8817b7bc69e1cdd2c0136cb3..4895256972e5a41e5360c82311e414976f207b63 100644 --- a/www/plugins/es/i18n/locale-en-GB.json +++ b/www/plugins/es/i18n/locale-en-GB.json @@ -423,7 +423,7 @@ "READ": "Read", "BTN_REMOVE": "Delete this document", "BTN_COMPACT": "Compact", - "HAS_REGISTERED": "create or edit his profile", + "HAS_CREATE_OR_UPDATE_PROFILE": "create or edit his profile", "POPOVER_ACTIONS": { "TITLE": "Actions", "REMOVE_ALL": "Delete these documents..." diff --git a/www/plugins/es/i18n/locale-en.json b/www/plugins/es/i18n/locale-en.json index e45f63b40b76e89b8817b7bc69e1cdd2c0136cb3..4895256972e5a41e5360c82311e414976f207b63 100644 --- a/www/plugins/es/i18n/locale-en.json +++ b/www/plugins/es/i18n/locale-en.json @@ -423,7 +423,7 @@ "READ": "Read", "BTN_REMOVE": "Delete this document", "BTN_COMPACT": "Compact", - "HAS_REGISTERED": "create or edit his profile", + "HAS_CREATE_OR_UPDATE_PROFILE": "create or edit his profile", "POPOVER_ACTIONS": { "TITLE": "Actions", "REMOVE_ALL": "Delete these documents..." diff --git a/www/plugins/es/i18n/locale-fr-FR.json b/www/plugins/es/i18n/locale-fr-FR.json index cdf39e9c0555e8005a99f1394d9b8e7e587a1a67..2b3175d285698edd6fa18b99cdf13ed5d0f744e1 100644 --- a/www/plugins/es/i18n/locale-fr-FR.json +++ b/www/plugins/es/i18n/locale-fr-FR.json @@ -474,7 +474,7 @@ "READ": "Lu", "BTN_REMOVE": "Supprimer ce document", "BTN_COMPACT": "Compacter", - "HAS_REGISTERED": "a créé ou modifié son profil", + "HAS_CREATE_OR_UPDATE_PROFILE": "a créé ou modifié son profil", "POPOVER_ACTIONS": { "TITLE": "Actions", "REMOVE_ALL": "Supprimer ces documents..." diff --git a/www/plugins/es/js/controllers/document-controllers.js b/www/plugins/es/js/controllers/document-controllers.js index 7d5d335c691849bfdd0e13ee38bf6c8650107499..7605c974af53a7d3b36f8f32401564b6493e061c 100644 --- a/www/plugins/es/js/controllers/document-controllers.js +++ b/www/plugins/es/js/controllers/document-controllers.js @@ -331,9 +331,12 @@ function ESDocumentLookupController($scope, $ionicPopover, $location, $timeout, } -function ESLastDocumentsController($scope, $controller, $timeout, $state) { +function ESLastDocumentsController($scope, $controller, $timeout, $state, $filter) { 'ngInject'; + // Initialize the super class and extend it. + angular.extend(this, $controller('ESDocumentLookupCtrl', {$scope: $scope})); + $scope.search = { loading: true, hasMore: true, @@ -345,11 +348,9 @@ function ESLastDocumentsController($scope, $controller, $timeout, $state) { }; $scope.expertMode = false; $scope.defaultSizeLimit = 20; - $scope._source = ["issuer", "hash", "time", "creationTime", "title", "avatar._content_type", "city", "message", "record"]; + $scope._source = ["issuer", "hash", "time", "creationTime", "title", "avatar._content_type", "city", "message", "record", "type"]; $scope.showHeaders = false; - // Initialize the super class and extend it. - angular.extend(this, $controller('ESDocumentLookupCtrl', {$scope: $scope})); $scope.$on('$ionicParentView.enter', $scope.enter); $scope.selectDocument = function(event, doc) { @@ -361,13 +362,21 @@ function ESLastDocumentsController($scope, $controller, $timeout, $state) { } else if (doc.index === "page" && doc.type === "record") { $state.go('app.view_page', {title: doc.title, id: doc.id}); - return + } + else if (doc.index === "page" && doc.type === "comment") { + var anchor = $filter('formatHash')(doc.id); + $state.go('app.view_page_anchor', {title: doc.title, id: doc.record, anchor: anchor}); } else if (doc.index === "group" && doc.type === "record") { $state.go('app.view_group', {title: doc.title, id: doc.id}); - return } - console.warn("Click on this kind of document not implement yet!", doc) + else if (doc.index === "group" && doc.type === "comment") { + var anchor = $filter('formatHash')(doc.id); + $state.go('app.view_group_anchor', {title: doc.title, id: doc.record, anchor: anchor}); + } + else { + console.warn("Click on this kind of document not implement yet!", doc) + } }; // Override parent function computeOptions diff --git a/www/plugins/es/js/controllers/network-controllers.js b/www/plugins/es/js/controllers/network-controllers.js index c94988afbb93b9a836c4f5795d769e6b3aee5ab1..57370f54195179e4c99e6e80881e3d1aed5781d3 100644 --- a/www/plugins/es/js/controllers/network-controllers.js +++ b/www/plugins/es/js/controllers/network-controllers.js @@ -42,11 +42,11 @@ angular.module('cesium.es.network.controllers', ['cesium.es.services']) }) .state('app.view_es_peer', { - url: "/data/network/peer/:server?ssl&tor", + url: "/network/data/peer/:server?ssl&tor", cache: false, views: { 'menuContent': { - templateUrl: "plugins/es/templates/network/view_peer.html", + templateUrl: "plugins/es/templates/network/view_es_peer.html", controller: 'ESPeerViewCtrl' } }, @@ -166,6 +166,7 @@ function ESNetworkLookupController($scope, $state, $location, $ionicPopover, $w $scope.load = function() { if ($scope.search.loading){ + // Start network scan esNetwork.start($scope.node, $scope.computeOptions()); // Catch event on new peers @@ -197,12 +198,12 @@ function ESNetworkLookupController($scope, $state, $location, $ionicPopover, $w $scope.search.memberPeersCount = data.memberPeersCount; // Always tru if network not started (e.g. after leave+renter the view) $scope.search.loading = !$scope.networkStarted || esNetwork.isBusy(); + if (!$scope.loading) { + $scope.$broadcast('$$rebind::rebind'); // force data binding + } if ($scope.motion && $scope.search.results && $scope.search.results.length > 0) { $scope.motion.show({selector: '.item-peer'}); } - if (!$scope.loading) { - $scope.$broadcast('$$rebind::' + 'rebind'); // force data binding - } }; $scope.refresh = function() { @@ -227,7 +228,7 @@ function ESNetworkLookupController($scope, $state, $location, $ionicPopover, $w // Update location href if ($scope.enableLocationHref) { - $location.search({online: $scope.search.online}).replace(); + $location.search($scope.search.online ? {} : {online: false}).replace(); } }; @@ -281,30 +282,27 @@ function ESNetworkLookupController($scope, $state, $location, $ionicPopover, $w /* -- popover -- */ $scope.showActionsPopover = function(event) { - if (!$scope.actionsPopover) { - $ionicPopover.fromTemplateUrl('templates/network/lookup_popover_actions.html', { - scope: $scope - }).then(function(popover) { + UIUtils.popover.show(event, { + templateUrl: 'plugins/es/templates/network/lookup_popover_actions.html', + scope: $scope, + autoremove: true, + afterShow: function(popover) { $scope.actionsPopover = popover; - //Cleanup the popover when we're done with it! - $scope.$on('$destroy', function() { - $scope.actionsPopover.remove(); - }); - $scope.actionsPopover.show(event); - }); - } - else { - $scope.actionsPopover.show(event); - } + } + }); }; $scope.hideActionsPopover = function() { if ($scope.actionsPopover) { $scope.actionsPopover.hide(); + $scope.actionsPopover = null; } }; $scope.showEndpointsPopover = function($event, peer, endpointFilter) { + $event.preventDefault(); + $event.stopPropagation(); + var endpoints = peer.getEndpoints(endpointFilter); endpoints = (endpoints||[]).reduce(function(res, ep) { var bma = esHttp.node.parseEndPoint(ep); @@ -322,7 +320,6 @@ function ESNetworkLookupController($scope, $state, $location, $ionicPopover, $w items: endpoints } }); - $event.stopPropagation(); }; $scope.showWs2pPopover = function($event, peer) { @@ -348,8 +345,8 @@ function ESNetworkLookupController($scope, $state, $location, $ionicPopover, $w label: 'NETWORK.VIEW.POW_PREFIX', value: peer.powPrefix }] - } - }); + } + }); }); }; @@ -482,7 +479,7 @@ function ESPeerInfoPopoverController($scope, $q, csSettings, csCurrency, csHttp, // continue }), - // Get duniter latest version + // Get latest version esHttp.version.latest() .then(function(latestRelease){ $scope.formData.latestRelease = latestRelease; @@ -494,7 +491,7 @@ function ESPeerInfoPopoverController($scope, $q, csSettings, csCurrency, csHttp, ]) .then(function() { // Compare, to check if newer - if ($scope.formData.latestRelease && $scope.formData.software == 'duniter') { + if ($scope.formData.latestRelease && $scope.formData.software === 'cesium-plus-pod') { var compare = csHttp.version.compare($scope.formData.version, $scope.formData.latestRelease.version); $scope.formData.isPreRelease = compare > 0; $scope.formData.hasNewRelease = compare < 0; @@ -504,7 +501,7 @@ function ESPeerInfoPopoverController($scope, $q, csSettings, csCurrency, csHttp, $scope.formData.hasNewRelease = false; } $scope.loading = false; - $scope.$broadcast('$$rebind::' + 'rebind'); // force data binding + $scope.$broadcast('$$rebind::rebind'); // force data binding }); }; @@ -557,6 +554,9 @@ function ESPeerViewController($scope, $q, $window, $state, UIUtils, csWot, esHtt }) .then(function(){ $scope.loading = false; + }) + .catch(function() { + $scope.loading = false; }); }); @@ -568,7 +568,7 @@ function ESPeerViewController($scope, $q, $window, $state, UIUtils, csWot, esHtt useTor: useTor }; var serverParts = server.split(':'); - if (serverParts.length == 2) { + if (serverParts.length === 2) { node.host = serverParts[0]; node.port = serverParts[1]; } @@ -589,8 +589,8 @@ function ESPeerViewController($scope, $q, $window, $state, UIUtils, csWot, esHtt // find the current peer var peers = (res && res.peers || []).reduce(function(res, json) { var peer = new EsPeer(json); - if (!peer.hasEndpoint('GCHANGE_API')) return res; - var ep = esHttp.node.parseEndPoint(peer.getEndpoints('GCHANGE_API')[0]); + if (!peer.hasEsEndpoint()) return res; + var ep = esHttp.node.parseEndPoint(peer.getEsEndpoints()[0]); if((ep.dns == node.host || ep.ipv4 == node.host || ep.ipv6 == node.host) && ( ep.port == node.port)) { peer.ep = ep; @@ -632,10 +632,10 @@ function ESPeerViewController($scope, $q, $window, $state, UIUtils, csWot, esHtt .then(function(json) { var peers = json.peers.reduce(function (res, p) { var peer = new EsPeer(p); - if (!peer.hasEndpoint('GCHANGE_API')) return res; + if (!peer.hasEsEndpoint()) return res; peer.online = p.status === 'UP'; peer.blockNumber = peer.block.replace(/-.+$/, ''); - peer.ep = esHttp.node.parseEndPoint(peer.getEndpoints('GCHANGE_API')[0]); + peer.ep = esHttp.node.parseEndPoint(peer.getEsEndpoints()[0]); peer.dns = peer.getDns(); peer.id = peer.keyID(); peer.server = peer.getServer(); diff --git a/www/plugins/es/js/services/document-services.js b/www/plugins/es/js/services/document-services.js index 7e987962021037ff34a1766f2484f5fd2513bd2a..cba149d99550cbfcb73573f07b4ad454f8ebfd3b 100644 --- a/www/plugins/es/js/services/document-services.js +++ b/www/plugins/es/js/services/document-services.js @@ -32,7 +32,7 @@ angular.module('cesium.es.document.services', ['ngResource', 'cesium.platform', if (!options || !options.index || !options.type) throw new Error('Missing mandatory options [index, type]'); var side = 'desc'; - if (options.type == 'peer') { + if (options.type === 'peer') { if (!options.sort || options.sort.time) { side = options.sort && options.sort.time || side; options.sort = { @@ -48,7 +48,7 @@ angular.module('cesium.es.document.services', ['ngResource', 'cesium.platform', return doc.time; }; } - else if (options.type == 'movement') { + else if (options.type === 'movement') { if (!options.sort || options.sort.time) { side = options.sort && options.sort.time || side; options.sort = {'medianTime': side}; @@ -68,12 +68,13 @@ angular.module('cesium.es.document.services', ['ngResource', 'cesium.platform', var hits = (res && res.hits && res.hits.hits || []).reduce(function(res, hit) { var doc = hit._source || {}; + doc.docType = doc.type; // Save source.type, before replacement doc.index = hit._index; doc.type = hit._type; doc.id = hit._id; doc.pubkey = doc.issuer || options.issuerField && doc[options.issuerField] || doc.pubkey; // need to call csWot.extendAll() doc.time = options.getTimeFunction && options.getTimeFunction(doc) || doc.time; - doc.thumbnail = esHttp.image.fromHit(hit, 'thumbnail'); + doc.thumbnail = esHttp.image.fromHit(hit, 'avatar') || esHttp.image.fromHit(hit, 'thumbnail'); return res.concat(doc); }, []); @@ -143,7 +144,7 @@ angular.module('cesium.es.document.services', ['ngResource', 'cesium.platform', var request = { text: queryString, index: options.index || 'user', - type: options.type || 'event', + type: options.type || 'profiles', from: options.from || 0, size: options.size || constants.DEFAULT_LOAD_SIZE, sort: options.sort || 'time:desc', diff --git a/www/plugins/es/js/services/http-services.js b/www/plugins/es/js/services/http-services.js index 1aa5d2dfe172d4b8367ba3a347f729696ce622d1..b4a7e6e01b5cc70d103405a8558f3bd75eefda8d 100644 --- a/www/plugins/es/js/services/http-services.js +++ b/www/plugins/es/js/services/http-services.js @@ -224,17 +224,19 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic that.wsChanges = function(source) { var wsChanges = that.ws('/ws/_changes')(); if (!source) return wsChanges; - // var oldOpen = wsChanges.open; - // wsChanges.open = function() { - // return oldOpen.call(wsChanges).then(function(sock) { - // if(sock) { - // sock.send(source); - // } - // else { - // console.warn('Trying to access ws changes, but no sock anymore... already open ?'); - // } - // }); - // }; + + // If a source is given, send it just after connection open + var _inheritedOpen = wsChanges.open; + wsChanges.open = function() { + return _inheritedOpen.call(wsChanges).then(function(sock) { + if(sock) { + sock.send(source); + } + else { + console.warn('Trying to access ws changes, but no sock anymore... already open ?'); + } + }); + }; return wsChanges; }; diff --git a/www/plugins/es/js/services/settings-services.js b/www/plugins/es/js/services/settings-services.js index aa2e539f59ec60eae9e762899252bc59424648c5..a9904d553326db9d7cc7cad5e8c7018a1d958023 100644 --- a/www/plugins/es/js/services/settings-services.js +++ b/www/plugins/es/js/services/settings-services.js @@ -20,7 +20,7 @@ angular.module('cesium.es.settings.services', ['cesium.services', 'cesium.es.htt excludes: ['timeout', 'cacheTimeMs', 'version', 'build', 'minVersion', 'fallbackLanguage'], plugins: { es: { - excludes: ['enable', 'host', 'port', 'fallbackNodes', 'enableGoogleApi', 'googleApiKey'], + excludes: ['enable', 'host', 'port', 'fallbackNodes', 'enableGoogleApi', 'googleApiKey', 'document'], notifications: { } } @@ -57,6 +57,10 @@ angular.module('cesium.es.settings.services', ['cesium.services', 'cesium.es.htt wot: { enableMixedSearch: true }, + document: { + index: 'user,page,group', + type: 'profile,record,comment' + }, registry: { defaultSearch: { location: null, diff --git a/www/plugins/es/templates/document/item_document_page.html b/www/plugins/es/templates/document/item_document_page.html new file mode 100644 index 0000000000000000000000000000000000000000..c1840d0c61a4467becb5377440673bc5c35485d3 --- /dev/null +++ b/www/plugins/es/templates/document/item_document_page.html @@ -0,0 +1,40 @@ +<ion-item id="doc-{{::doc.id}}" + class="item item-document item-icon-left ink {{::ionItemClass}} no-padding-top no-padding-bottom" + ng-class="{'positive-100-bg': doc.updated}" + ng-click="selectDocument($event, doc)"> + + <i ng-if=":rebind:doc.thumbnail" class="avatar" style="background-image: url({{:rebind:doc.thumbnail.src}})"></i> + <i ng-if=":rebind:!doc.thumbnail" class="avatar icon dark cion-registry-{{doc.docType}}" ></i> + + <div class="row no-padding"> + <div class="col"> + <h3 ng-if="doc.title"> + {{:rebind:doc.title}} + </h3> + <h4> + <span class="dark" ng-if=":rebind:doc.picturesCount > 1"> + <i class="ion-camera"></i> {{:rebind:doc.picturesCount}} + </span> + <span class="dark" ng-if=":rebind:doc.city"> + <i class="ion-location"></i> {{:rebind:doc.city}} + </span> + <span class="gray" ng-if=":rebind:doc.name"> + <i class="ion-person"></i> {{:rebind:doc.name}} + </span> + </h4> + </div> + + <div class="col col-33"> + <small class="gray pull-right"><i class="ion-clock"></i> {{:rebind:doc.time|formatDate}} + </small> + <a + ng-if=":rebind:login && doc.pubkey==walletData.pubkey" + ng-click="remove($event, $index)" + class="gray pull-right hidden-xs hidden-sm" + title="{{'DOCUMENT.LOOKUP.BTN_REMOVE'|translate}}"> + <i class="ion-trash-a"></i> + </a> + </div> + + </div> +</ion-item> diff --git a/www/plugins/es/templates/document/item_document_profile.html b/www/plugins/es/templates/document/item_document_profile.html index 9416881469bf6f655e142762a62f29a5f683a1e3..2e06d778572a2df3392cb9b36aca668f16831276 100644 --- a/www/plugins/es/templates/document/item_document_profile.html +++ b/www/plugins/es/templates/document/item_document_profile.html @@ -14,7 +14,7 @@ {{:rebind:doc.title}} </span> <span class="gray" > - {{:rebind:'DOCUMENT.LOOKUP.HAS_REGISTERED'|translate}} + {{:rebind:'DOCUMENT.LOOKUP.HAS_CREATE_OR_UPDATE_PROFILE' |translate}} </span> </h4> <h4> diff --git a/www/plugins/es/templates/document/items_documents.html b/www/plugins/es/templates/document/items_documents.html index b72f39ca728e0c755cdf6457ec46d91160792d58..30a8ebcef366ee62d38bbecd8776cc046bdfd5f0 100644 --- a/www/plugins/es/templates/document/items_documents.html +++ b/www/plugins/es/templates/document/items_documents.html @@ -29,11 +29,15 @@ <ng-repeat ng-repeat="doc in :rebind:search.results track by doc.id" ng-switch on="doc.type"> <div ng-switch-when="comment"> - <ng-include src="::'plugins/es/templates/document/item_document_comment.html'"></ng-include> + <ng-include src="::'plugins/es/templates/document/item_document_comment.html'"></ng-include> </div> <div ng-switch-when="profile"> <ng-include src="::'plugins/es/templates/document/item_document_profile.html'"></ng-include> </div> + <div ng-switch-when="record"> + <ng-include ng-if="doc.index === 'page'" src="::'plugins/es/templates/document/item_document_page.html'"></ng-include> + <ng-include ng-if="doc.index !== 'page'" src="::'plugins/es/templates/document/item_document.html'"></ng-include> + </div> <div ng-switch-default> <ng-include src="::'plugins/es/templates/document/item_document.html'"></ng-include> </div> diff --git a/www/plugins/es/templates/network/view_peer.html b/www/plugins/es/templates/network/view_es_peer.html similarity index 88% rename from www/plugins/es/templates/network/view_peer.html rename to www/plugins/es/templates/network/view_es_peer.html index 8d102bf95d0c2b60ce0367313c6a3348bf9f192f..64bc49fa0e647d6f24ad1002f3935aea88f38073 100644 --- a/www/plugins/es/templates/network/view_peer.html +++ b/www/plugins/es/templates/network/view_es_peer.html @@ -1,6 +1,7 @@ <ion-view> <ion-nav-title> - <span translate>PEER.VIEW.TITLE</span> + <span translate>PEER.VIEW.TITLE</span> + <span translate>ES_SETTINGS.PLUGIN_NAME</span> </ion-nav-title> <ion-content class="has-header" scroll="true"> @@ -74,23 +75,6 @@ <h4 class="dark text-left">{{node.pubkey}}</h4> </ion-item> - <ion-item class="item item-icon-left item-text-wrap" - ng-if="isReachable"> - <i class="icon ion-document"></i> - <span translate>ES_PEER.DOCUMENT_COUNT</span> - <div class="badge badge-stable" ng-if="!loading"> - {{node.docCount|formatInteger}} - </div> - </ion-item> - - <!--<a class="item item-icon-left item-icon-right item-text-wrap ink"--> - <!--ng-if="isReachable"--> - <!--ui-sref="app.document_search(options.document)">--> - <!--<i class="icon ion-document" style="font-size: 25px;"></i>--> - <!--<i class="icon-secondary ion-clock" style="font-size: 18px; left: 33px; top: -12px;"></i>--> - <!--<span translate>DOCUMENT.LOOKUP.LAST_DOCUMENTS</span>--> - <!--<i class="gray icon ion-ios-arrow-right"></i>--> - <!--</a>--> <ion-item class="item item-icon-left item-text-wrap ink" ng-if="isReachable"> @@ -101,6 +85,24 @@ </div> </ion-item> + <ion-item class="item item-icon-left item-text-wrap" + ng-if="isReachable"> + <i class="icon ion-document"></i> + <span translate>ES_PEER.DOCUMENT_COUNT</span> + <div class="badge badge-stable" ng-if="!loading"> + {{node.docCount|formatInteger}} + </div> + </ion-item> + + <a class="item item-icon-left item-icon-right item-text-wrap ink" + ng-if="isReachable" + ui-sref="app.document_search(options.document)"> + <i class="icon ion-document" style="font-size: 25px;"></i> + <i class="icon-secondary ion-clock" style="font-size: 18px; left: 33px; top: -12px;"></i> + <span translate>DOCUMENT.LOOKUP.LAST_DOCUMENTS</span> + <i class="gray icon ion-ios-arrow-right"></i> + </a> + <!-- Allow extension here --> <cs-extension-point name="general"></cs-extension-point> diff --git a/www/plugins/graph/i18n/locale-fr-FR.json b/www/plugins/graph/i18n/locale-fr-FR.json index 83edacad00d19a1a4053b56d329e4b28d54aeb44..b79de1bc79dd358fc8327b1b489a1434964095e0 100644 --- a/www/plugins/graph/i18n/locale-fr-FR.json +++ b/www/plugins/graph/i18n/locale-fr-FR.json @@ -68,7 +68,7 @@ } }, "DOC_STATS": { - "TITLE": "Statistiques de stockage (Cesium+)", + "TITLE": "Statistiques de stockage", "USER": { "TITLE": "Nombre de documents liés à un compte", "USER_PROFILE": "Profils utilisateur", diff --git a/www/plugins/graph/js/controllers/network-controllers.js b/www/plugins/graph/js/controllers/network-controllers.js index 946e7fdce5ee2f66d688fe582e9f1fb4f58d0297..93cef43c1bf80d13b6d0731d9be60f6088736303 100644 --- a/www/plugins/graph/js/controllers/network-controllers.js +++ b/www/plugins/graph/js/controllers/network-controllers.js @@ -34,6 +34,15 @@ angular.module('cesium.graph.network.controllers', ['chart.js', 'cesium.graph.se } } }) + + .extendState('app.view_es_peer', { + points: { + 'general': { + templateUrl: "plugins/graph/templates/network/view_es_peer_extend.html", + controller: 'ESExtensionCtrl' + } + } + }) ; $stateProvider diff --git a/www/plugins/graph/js/controllers/synchro-controllers.js b/www/plugins/graph/js/controllers/synchro-controllers.js index c421649224fca535fbdfbaa83f4cfef0d047f285..3a5f24b7e13dbf3ae5478bd3bf21560c6cd59079 100644 --- a/www/plugins/graph/js/controllers/synchro-controllers.js +++ b/www/plugins/graph/js/controllers/synchro-controllers.js @@ -31,6 +31,8 @@ function GpSynchroController($scope, $controller, $q, $translate, gpColor, gpDat // Initialize the super class and extend it. angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope})); + $scope.formData.rangeDuration = 'month'; + $scope.hiddenDatasets = []; $scope.charts = [ diff --git a/www/plugins/graph/templates/network/view_es_peer_extend.html b/www/plugins/graph/templates/network/view_es_peer_extend.html new file mode 100644 index 0000000000000000000000000000000000000000..bcb3a9e2b710ddf4b9e63b2e90356e4201b0acdb --- /dev/null +++ b/www/plugins/graph/templates/network/view_es_peer_extend.html @@ -0,0 +1,20 @@ +<!-- Buttons section --> +<ng-if ng-if="enable && extensionPoint === 'general'"> + + <a class="item item-icon-left item-icon-right item-text-wrap ink" + ng-if="isReachable" + ui-sref="app.doc_stats_lg"> + <i class="icon ion-stats-bars"></i> + <span translate>GRAPH.DOC_STATS.TITLE</span> + <i class="gray icon ion-ios-arrow-right"></i> + </a> + + <a class="item item-icon-left item-icon-right item-text-wrap ink" + ng-if="isReachable" + ui-sref="app.doc_synchro_lg"> + <i class="icon ion-stats-bars"></i> + <span translate>GRAPH.SYNCHRO.TITLE</span> + <i class="gray icon ion-ios-arrow-right"></i> + </a> +</ng-if> +