diff --git a/scripts/release-sign-extension.sh b/scripts/release-sign-extension.sh index 9987add3aba2a481764e1235f43f3ccdad5de571..8013cd28df7d09c50b5c797755e63c7443bbc552 100755 --- a/scripts/release-sign-extension.sh +++ b/scripts/release-sign-extension.sh @@ -38,18 +38,18 @@ fi ### Sign extension case "$1" in pre) - web-ext sign "--api-key=${AMO_JWT_ISSUER}" "--api-secret=${AMO_JWT_SECRET}" "--source-dir=${PROJECT_DIR}/dist/web/ext" "--artifacts-dir=${PROJECT_DIR}/dist/web/build" --id=${WEB_EXT_ID} --channel=unlisted - if [[ $? -ne 0 ]]; then - exit 1 - fi + web-ext sign "--api-key=${AMO_JWT_ISSUER}" "--api-secret=${AMO_JWT_SECRET}" "--source-dir=${PROJECT_DIR}/dist/web/ext" "--artifacts-dir=${PROJECT_DIR}/dist/web/build" --id=${WEB_EXT_ID} --channel=unlisted + if [[ $? -ne 0 ]]; then + exit 1 + fi ;; rel) - web-ext sign "--api-key=${AMO_JWT_ISSUER}" "--api-secret=${AMO_JWT_SECRET}" "--source-dir=${PROJECT_DIR}/dist/web/ext" "--artifacts-dir=${PROJECT_DIR}/dist/web/build" --id=${WEB_EXT_ID} --channel=listed - if [[ $? -ne 0 ]]; then + web-ext sign "--api-key=${AMO_JWT_ISSUER}" "--api-secret=${AMO_JWT_SECRET}" "--source-dir=${PROJECT_DIR}/dist/web/ext" "--artifacts-dir=${PROJECT_DIR}/dist/web/build" --id=${WEB_EXT_ID} --channel=listed # Comment out, because always failed with message: # "Your add-on has been submitted for review. It passed validation but could not be automatically signed because this is a listed add-on." - #exit 1 - fi + #if [[ $? -ne 0 ]]; then + # exit 1 + #fi ;; *) echo "No task given" diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js index 5bd2decd1513c85025a5ab60445c7e2b78cc2ad3..230ed12aefcba56cb2357b616be936fb33b7fa3a 100644 --- a/www/js/services/bma-services.js +++ b/www/js/services/bma-services.js @@ -2,13 +2,13 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium.settings.services']) -.factory('BMA', function($q, $window, $rootScope, $timeout, csCrypto, Api, Device, UIUtils, csConfig, csSettings, csHttp) { +.factory('BMA', function($q, $window, $rootScope, $timeout, csCrypto, Api, Device, UIUtils, csConfig, csSettings, csCache, csHttp) { 'ngInject'; function BMA(host, port, useSsl, useCache) { - var pubkey = "[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}"; - var + var cachePrefix = "BMA-", + pubkey = "[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}", // TX output conditions SIG = "SIG\\((" + pubkey + ")\\)", XHX = 'XHX\\(([A-F0-9]{1,64})\\)', @@ -71,6 +71,11 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. listeners, that = this; + that.raw = { + getByPath: {}, + postByPath: {}, + wsByPath: {} + }; that.api = new Api(this, 'BMA-' + that.server); that.started = false; that.init = init; @@ -82,15 +87,12 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. console.debug('[BMA] Enable SSL (forced by config or detected in URL)'); } - if (host) { - init(host, port, useSsl, useCache); - } - that.useCache = useCache; // need here because used in get() function + if (host) init(host, port, useSsl); + that.useCache = angular.isDefined(useCache) ? useCache : true; // need here because used in get() function - function init(host, port, useSsl, useCache) { + function init(host, port, useSsl) { if (that.started) that.stop(); that.alive = false; - that.cache = _emptyCache(); // Use settings as default, if exists if (csSettings.data && csSettings.data.node) { @@ -98,7 +100,6 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. port = port || csSettings.data.node.port; useSsl = angular.isDefined(useSsl) ? useSsl : (port == 443 || csSettings.data.node.useSsl || that.forceUseSsl); - useCache = angular.isDefined(useCache) ? useCache : true; } if (!host) { @@ -107,7 +108,6 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. that.host = host; that.port = port || 80; that.useSsl = angular.isDefined(useSsl) ? useSsl : (that.port == 443 || that.forceUseSsl); - that.useCache = angular.isDefined(useCache) ? useCache : false; that.server = csHttp.getServer(host, port); that.url = csHttp.getUrl(host, port, ''/*path*/, useSsl); } @@ -120,35 +120,33 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. return new RegExp(regexpContent); } - function _emptyCache() { - return { - getByPath: {}, - postByPath: {}, - wsByPath: {} - }; - } - function closeWs() { if (!that.cache) return; console.warn('[BMA] Closing all websockets...'); - _.keys(that.cache.wsByPath||{}).forEach(function(key) { - var sock = that.cache.wsByPath[key]; + _.keys(that.raw.wsByPath||{}).forEach(function(key) { + var sock = that.raw.wsByPath[key]; sock.close(); }); - that.cache.wsByPath = {}; + that.raw.wsByPath = {}; } - that.cleanCache = function() { - console.debug('[BMA] Cleaning requests cache...'); - closeWs(); - that.cache = _emptyCache(); - }; + function cleanCache() { + console.debug("[BMA] Cleaning cache {prefix: '{0}'}...".format(cachePrefix)); + csCache.clear(cachePrefix); - get = function (path, cacheTime) { + // Clean raw requests cache + angular.merge(that.raw, { + getByPath: {}, + postByPath: {}, + wsByPath: {} + }); + } + + function get(path, cacheTime) { cacheTime = that.useCache && cacheTime ||Â 0 /* no cache*/ ; - var cacheKey = path + (cacheTime ? ('#'+cacheTime) : ''); + var requestKey = path + (cacheTime ? ('#'+cacheTime) : ''); var getRequestFn = function(params) { @@ -161,15 +159,15 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. }); } - var request = that.cache.getByPath[cacheKey]; + var request = that.raw.getByPath[requestKey]; if (!request) { if (cacheTime) { - request = csHttp.getWithCache(that.host, that.port, path, that.useSsl, cacheTime); + request = csHttp.getWithCache(that.host, that.port, path, that.useSsl, cacheTime, null, null, cachePrefix); } else { request = csHttp.get(that.host, that.port, path, that.useSsl); } - that.cache.getByPath[cacheKey] = request; + that.raw.getByPath[requestKey] = request; } var execCount = 1; return request(params) @@ -195,9 +193,9 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. }; return getRequestFn; - }; + } - post = function(path) { + function post(path) { var postRequest = function(obj, params) { if (!that.started) { if (!that._startPromise) { @@ -208,42 +206,43 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. }); } - var request = that.cache.postByPath[path]; + var request = that.raw.postByPath[path]; if (!request) { request = csHttp.post(that.host, that.port, path, that.useSsl); - that.cache.postByPath[path] = request; + that.raw.postByPath[path] = request; } return request(obj, params); }; return postRequest; - }; + } - ws = function(path) { + function ws(path) { return function() { - var sock = that.cache.wsByPath[path]; + var sock = that.raw.wsByPath[path]; if (!sock || sock.isClosed()) { sock = csHttp.ws(that.host, that.port, path, that.useSsl); // When close, remove from cache sock.onclose = function() { - delete that.cache.wsByPath[path]; + delete that.raw.wsByPath[path]; }; - that.cache.wsByPath[path] = sock; + that.raw.wsByPath[path] = sock; } return sock; }; - }; + } that.isAlive = function() { + // Warn: cannot use previous get() function, because node may not be started yet return csHttp.get(that.host, that.port, '/node/summary', that.useSsl)() .then(function(json) { var software = json && json.duniter && json.duniter.software; var isCompatible = true; // Check duniter min version - if (software === 'duniter' && json.duniter.version && true) { + if (software === 'duniter' && json.duniter.version) { isCompatible = csHttp.version.isCompatible(csSettings.data.minVersion, json.duniter.version); } // TODO: check version of other software (DURS, Juniter, etc.) @@ -348,8 +347,8 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. that.stop = function() { console.debug('[BMA] Stopping...'); removeListeners(); - csHttp.cache.clear(); - that.cleanCache(); + closeWs(); + cleanCache(); that.alive = false; that.started = false; delete that._startPromise; @@ -397,7 +396,7 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. TX_OUTPUT_FUNCTIONS: test(OUTPUT_FUNCTIONS) }, node: { - summary: get('/node/summary', csHttp.cache.LONG), + summary: get('/node/summary', csCache.constants.LONG), same: function(host2, port2) { return host2 === that.host && ((!that.port && !port2) || (that.port == port2||80)) && (that.useSsl == (port2 && port2 === 443)); }, @@ -416,11 +415,11 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. }, wot: { lookup: get('/wot/lookup/:search'), - certifiedBy: get('/wot/certified-by/:pubkey', csHttp.cache.SHORT), - certifiersOf: get('/wot/certifiers-of/:pubkey', csHttp.cache.SHORT), + certifiedBy: get('/wot/certified-by/:pubkey', csCache.constants.SHORT), + certifiersOf: get('/wot/certifiers-of/:pubkey', csCache.constants.SHORT), member: { - all: get('/wot/members', csHttp.cache.LONG), - pending: get('/wot/pending', csHttp.cache.SHORT) + all: get('/wot/members', csCache.constants.LONG), + pending: get('/wot/pending', csCache.constants.SHORT) }, requirements: function(params, cache) { // No cache by default @@ -432,8 +431,8 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. revoke: post('/wot/revoke') }, blockchain: { - parameters: get('/blockchain/parameters', csHttp.cache.VERY_LONG), - block: get('/blockchain/block/:block', csHttp.cache.SHORT), + parameters: get('/blockchain/parameters', csCache.constants.VERY_LONG), + block: get('/blockchain/block/:block', csCache.constants.SHORT), blocksSlice: get('/blockchain/blocks/:count/:from'), current: function(cache) { // No cache by default @@ -441,15 +440,15 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. }, membership: post('/blockchain/membership'), stats: { - ud: get('/blockchain/with/ud', csHttp.cache.MEDIUM), + ud: get('/blockchain/with/ud', csCache.constants.MEDIUM), tx: get('/blockchain/with/tx'), - newcomers: get('/blockchain/with/newcomers', csHttp.cache.MEDIUM), + newcomers: get('/blockchain/with/newcomers', csCache.constants.MEDIUM), hardship: get('/blockchain/hardship/:pubkey'), difficulties: get('/blockchain/difficulties') } }, tx: { - sources: get('/tx/sources/:pubkey', csHttp.cache.SHORT), + sources: get('/tx/sources/:pubkey', csCache.constants.SHORT), process: post('/tx/process'), history: { all: function(params) { @@ -473,7 +472,7 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. return res; }); }, - blocks: get('/tx/history/:pubkey/blocks/:from/:to', csHttp.cache.LONG), + blocks: get('/tx/history/:pubkey/blocks/:from/:to', csCache.constants.LONG), pending: get('/tx/history/:pubkey/pending') } }, @@ -484,16 +483,16 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. version: {}, raw: { blockchain: { - currentWithCache: get('/blockchain/current', csHttp.cache.SHORT), + currentWithCache: get('/blockchain/current', csCache.constants.SHORT), current: get('/blockchain/current') }, wot: { - requirementsWithCache: get('/wot/requirements/:pubkey', csHttp.cache.LONG), + requirementsWithCache: get('/wot/requirements/:pubkey', csCache.constants.LONG), requirements: get('/wot/requirements/:pubkey') }, tx: { history: { - timesWithCache: get('/tx/history/:pubkey/times/:from/:to', csHttp.cache.LONG), + timesWithCache: get('/tx/history/:pubkey/times/:from/:to', csCache.constants.LONG), times: get('/tx/history/:pubkey/times/:from/:to'), all: get('/tx/history/:pubkey') } @@ -951,7 +950,7 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. duniterLatestReleaseUrl.port, "/" + duniterLatestReleaseUrl.pathname, /*useSsl*/ (+(duniterLatestReleaseUrl.port) === 443 || duniterLatestReleaseUrl.protocol === 'https:' || that.forceUseSsl), - csHttp.cache.LONG + csCache.constants.LONG ) : // No URL define: use a fake function function() { @@ -990,9 +989,10 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. angular.merge(that, exports); } - var service = new BMA(undefined, undefined, undefined, true); + var service = new BMA(); service.instance = function(host, port, useSsl, useCache) { + useCache = angular.isDefined(useCache) ? useCache : false; // No cache by default return new BMA(host, port, useSsl, useCache); }; @@ -1003,9 +1003,9 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. host: host, port: port, useSsl: useSsl, - url: csHttp.getUrl(host, port, ''/*path*/, useSsl), + url: csHttp.getUrl(host, port, ''/*no path*/, useSsl), node: { - summary: csHttp.getWithCache(host, port, '/node/summary', useSsl, csHttp.cache.LONG, false, timeout) + summary: csHttp.getWithCache(host, port, '/node/summary', useSsl, csCache.constants.MEDIUM, false/*autoRefresh*/, timeout) }, network: { peering: { diff --git a/www/js/services/http-services.js b/www/js/services/http-services.js index d18a1c745cd043dbb1cd135562ecdb178a12d40f..327d2ad1b16c5379aa184fb850538d29e2a29c2e 100644 --- a/www/js/services/http-services.js +++ b/www/js/services/http-services.js @@ -7,7 +7,8 @@ angular.module('cesium.http.services', ['cesium.cache.services']) var sockets = [], - cachePrefix = 'csHttp-' + defaultCachePrefix = 'csHttp-', + allCachePrefixes = {}; ; if (!timeout) { @@ -94,7 +95,10 @@ angular.module('cesium.http.services', ['cesium.cache.services']) function getResourceWithCache(host, port, path, useSsl, maxAge, autoRefresh, forcedTimeout, cachePrefix) { var url = getUrl(host, port, path, useSsl); + cachePrefix = cachePrefix ||Â defaultCachePrefix; maxAge = maxAge || csCache.constants.LONG; + allCachePrefixes[cachePrefix] = true; + //console.debug('[http] will cache ['+url+'] ' + maxAge + 'ms' + (autoRefresh ? ' with auto-refresh' : '')); return function(params) { @@ -233,7 +237,7 @@ angular.module('cesium.http.services', ['cesium.cache.services']) _open(self, null, params); } else if (closeEvent) { - console.debug('[http] TODO -- Unexpected close of websocket [{0}]: error code: '.format(path), closeEvent); + console.debug('[http] Unexpected close of websocket [{0}]: error code: '.format(path), closeEvent && closeEvent.code ||Â closeEvent); // Force new connection self.delegate = null; @@ -494,11 +498,18 @@ angular.module('cesium.http.services', ['cesium.cache.services']) return compareVersionNumbers(minVersion, actualVersion) <= 0; } - var cache = angular.copy(csCache.constants); - cache.clear = function() { - console.debug('[http] Cleaning cache...'); + function clearCache(cachePrefix) { + cachePrefix = cachePrefix ||Â defaultCachePrefix; + console.debug("[http] Cleaning cache {prefix: '{0}'}...".format(cachePrefix)); csCache.clear(cachePrefix); - }; + } + + function clearAllCache() { + console.debug('[http] Cleaning all caches...'); + _.keys(allCachePrefixes).forEach(function(cachePrefix) { + csCache.clear(cachePrefix); + }); + } return { get: getResource, @@ -519,7 +530,10 @@ angular.module('cesium.http.services', ['cesium.cache.services']) compare: compareVersionNumbers, isCompatible: isVersionCompatible }, - cache: cache + cache: angular.merge({ + clear: clearCache, + clearAll: clearAllCache + }, csCache.constants) }; }) ; diff --git a/www/plugins/es/js/controllers/wot-controllers.js b/www/plugins/es/js/controllers/wot-controllers.js index fe42edd9013f0a451fffe0dc6ee76d4cae5abed6..24a88f625fa389801f3736129422bf1562d2acd4 100644 --- a/www/plugins/es/js/controllers/wot-controllers.js +++ b/www/plugins/es/js/controllers/wot-controllers.js @@ -311,6 +311,11 @@ function ESWotIdentityViewController($scope, $ionicPopover, $q, $controller, $ti }); }; + /** + * Delete the user profile (need moderator access, on Cs+ pod) + * @param confirm + * @returns {*} + */ $scope.delete = function(confirm) { if (!confirm) { @@ -323,6 +328,12 @@ function ESWotIdentityViewController($scope, $ionicPopover, $q, $controller, $ti }); } + // TODO: ask for deletion of all data ? (e.g. message, comment, likes, etc.) + // if (angular.isUndefined(allData)) { + // return UIUtils.alert.confirm(...) + // ... + // } + return UIUtils.loading.show() .then(function() { return esProfile.remove($scope.formData.pubkey); @@ -347,7 +358,7 @@ function ESWotIdentityViewController($scope, $ionicPopover, $q, $controller, $ti // Load likes, $scope.loadLikes(pubkey); - // Update moderator right + // Enable deletion, if moderator $scope.canDelete = $scope.formData.profile && csWallet.isLogin() && csWallet.data.moderator === true; } diff --git a/www/plugins/es/js/services/blockchain-services.js b/www/plugins/es/js/services/blockchain-services.js index 9116acf0c87525009aa79a4368e583fbc2a8defd..72fbe80e3595362373e4121d75d7952b9efc6bbc 100644 --- a/www/plugins/es/js/services/blockchain-services.js +++ b/www/plugins/es/js/services/blockchain-services.js @@ -1,6 +1,6 @@ angular.module('cesium.es.blockchain.services', ['cesium.services', 'cesium.es.http.services']) -.factory('esBlockchain', function($rootScope, $q, $timeout, BMA, esHttp) { +.factory('esBlockchain', function($rootScope, $q, $timeout, BMA, csCache, esHttp) { 'ngInject'; function EsBlockchain() { @@ -31,9 +31,9 @@ angular.module('cesium.es.blockchain.services', ['cesium.services', 'cesium.es.h block: {}, raw: { block: { - search: esHttp.post('/:currency/block/_search', esHttp.cache.SHORT), + search: esHttp.post('/:currency/block/_search', csCache.constants.SHORT), searchText: esHttp.get('/:currency/block/_search?q=:text'), - get: esHttp.get('/:currency/block/:number/_source', esHttp.cache.SHORT) + get: esHttp.get('/:currency/block/:number/_source', csCache.constants.SHORT) } }, regexp: { diff --git a/www/plugins/es/js/services/http-services.js b/www/plugins/es/js/services/http-services.js index 8e652c6edaf0e5ee3951a04ad2d272f412ed0797..36e4cfcb25396e369267785fea3aa7fb5ed5afbe 100644 --- a/www/plugins/es/js/services/http-services.js +++ b/www/plugins/es/js/services/http-services.js @@ -14,7 +14,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic console.debug('[ES] [https] Enable SSL (forced by config or detected in URL)'); } - function EsHttp(host, port, useSsl, useCache) { + function EsHttp(host, port, useSsl, enableCache) { var that = this, @@ -42,15 +42,21 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic that.data = { isFallback: false }; - that.cache = _emptyCache(); + that.cache = { + enable: angular.isDefined(enableCache) ? enableCache : false, // need here because used in get() function + }; + that.raw = { + getByPath: {}, + postByPath: {}, + wsByPath: {} + }; that.api = new Api(this, "esHttp"); that.started = false; that.init = init; - init(host, port, useSsl, useCache); - that.useCache = angular.isDefined(useCache) ? useCache : false; // need here because used in get() function + init(host, port, useSsl); - function init(host, port, useSsl, useCache) { + function init(host, port, useSsl) { // Use settings as default if (!host && csSettings.data) { host = host || (csSettings.data.plugins && csSettings.data.plugins.es ? csSettings.data.plugins.es.host : null); @@ -100,14 +106,6 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic return new RegExp(regexpContent); } - function _emptyCache() { - return { - getByPath: {}, - postByPath: {}, - wsByPath: {} - }; - } - function onSettingsReset(data, deferred) { deferred = deferred || $q.defer(); @@ -126,14 +124,18 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic return deferred.promise; } - that.cleanCache = function() { - console.debug('[ES] [http] Cleaning requests cache...'); - _.keys(that.cache.wsByPath).forEach(function(key) { - var sock = that.cache.wsByPath[key]; + that.clearAllCache = function() { + console.debug("[ES] [http] Cleaning cache {prefix: '{0}'}...".format(cachePrefix)); + _.keys(that.raw.wsByPath).forEach(function(key) { + var sock = that.raw.wsByPath[key]; sock.close(); }); - that.cache = _emptyCache(); + angular.merge(that.raw, { + getByPath: {}, + postByPath: {}, + wsByPath: {} + }); csCache.clear(cachePrefix); }; @@ -158,8 +160,8 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic that.get = function (path, cacheTime) { - cacheTime = that.useCache && cacheTime; - var cacheKey = path + (cacheTime ? ('#'+cacheTime) : ''); + cacheTime = that.cache.enable && cacheTime; + var requestKey = path + (cacheTime ? ('#'+cacheTime) : ''); var getRequestFn = function(params) { if (!that.started) { @@ -172,7 +174,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic }); } - var request = that.cache.getByPath[cacheKey]; + var request = that.raw.getByPath[requestKey]; if (!request) { if (cacheTime) { request = csHttp.getWithCache(that.host, that.port, path, that.useSsl, cacheTime, null, null, cachePrefix); @@ -180,7 +182,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic else { request = csHttp.get(that.host, that.port, path, that.useSsl); } - that.cache.getByPath[cacheKey] = request; + that.raw.getByPath[requestKey] = request; } return request(params); }; @@ -200,10 +202,10 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic }); } - var request = that.cache.postByPath[path]; + var request = that.raw.postByPath[path]; if (!request) { request = csHttp.post(that.host, that.port, path, that.useSsl); - that.cache.postByPath[path] = request; + that.raw.postByPath[path] = request; } return request(obj, params); }; @@ -212,16 +214,16 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic that.ws = function(path) { return function() { - var sock = that.cache.wsByPath[path]; + var sock = that.raw.wsByPath[path]; if (!sock || sock.isClosed()) { sock = csHttp.ws(that.host, that.port, path, that.useSsl); // When close, remove from cache sock.onclose = function() { - delete that.cache.wsByPath[path]; + delete that.raw.wsByPath[path]; }; - that.cache.wsByPath[path] = sock; + that.raw.wsByPath[path] = sock; } return sock; }; @@ -290,7 +292,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic .then(function (confirm) { if (!confirm) return false; // stop the loop - that.cleanCache(); + that.clearAllCache(); that.init(fallbackNode.host, fallbackNode.port, fallbackNode.useSsl || fallbackNode.port == 443); @@ -364,7 +366,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic setIsFallbackNode(false); // will be re-computed during start phase delete that._startPromise; if (that.alive) { - that.cleanCache(); + that.clearAllCache(); that.alive = false; that.started = false; that.api.node.raise.stop(); @@ -745,6 +747,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic that.api.registerEvent('node', 'start'); that.api.registerEvent('node', 'stop'); + var exports = { getServer: csHttp.getServer, node: { @@ -788,7 +791,9 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic parseAsHtml: parseAsHtml, findObjectInTree: findObjectInTree }, - cache: csHttp.cache, + cache: { + clearAll: that.clearAllCache + }, constants: constants }; exports.constants.regexp = regexp; @@ -798,8 +803,8 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic var service = new EsHttp(undefined, undefined, undefined, true); - service.instance = function(host, port, useSsl, useCache) { - return new EsHttp(host, port, useSsl, useCache); + service.instance = function(host, port, useSsl, enableCache) { + return new EsHttp(host, port, useSsl, enableCache); }; service.lightInstance = function(host, port, useSsl, timeout) { diff --git a/www/plugins/es/js/services/profile-services.js b/www/plugins/es/js/services/profile-services.js index c4e05f72d60ce5817e583bf80227d58e094bd120..b2e0112eee3ec01520a07134242c8e081d111b64 100644 --- a/www/plugins/es/js/services/profile-services.js +++ b/www/plugins/es/js/services/profile-services.js @@ -10,7 +10,7 @@ angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http }) - .factory('esProfile', function($rootScope, $q, esHttp, SocialUtils, csWot, csWallet, csPlatform, esSettings, esLike) { + .factory('esProfile', function($rootScope, $q, esHttp, SocialUtils, csWot, csWallet, csCache, csPlatform, esSettings, esLike) { 'ngInject'; var @@ -19,10 +19,11 @@ angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http that.raw = { getFields: esHttp.get('/user/profile/:id?&_source_exclude=avatar._content&_source=:fields'), - get: esHttp.get('/user/profile/:id?&_source_exclude=avatar._content', esHttp.cache.MEDIUM), - getAll: esHttp.get('/user/profile/:id', esHttp.cache.MEDIUM), - search: esHttp.post('/user/profile/_search', esHttp.cache.MEDIUM), - mixedSearch: esHttp.post('/user,page,group/profile,record/_search', esHttp.cache.MEDIUM) + get: esHttp.get('/user/profile/:id?&_source_exclude=avatar._content', csCache.constants.MEDIUM), + getAll: esHttp.get('/user/profile/:id', csCache.constants.MEDIUM), + search: esHttp.post('/user/profile/_search', csCache.constants.MEDIUM), + mixedSearch: esHttp.post('/user,page,group/profile,record/_search', csCache.constants.MEDIUM), + remove: esHttp.record.remove("user","profile") }; function getAvatarAndName(pubkey) { @@ -353,6 +354,15 @@ angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http return deferred.promise; } + function removeProfile(pubkey, options) { + return that.raw.remove(pubkey, options) + .then(function(res) { + csCache.clear('csWot-'); + csCache.clear('csWot-'); + return res; + }); + } + function removeListeners() { _.forEach(listeners, function(remove){ remove(); @@ -392,7 +402,7 @@ angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http get: getProfile, add: esHttp.record.post('/user/profile', {tagFields: ['title', 'description'], ignoreFields: ['enableGeoPoint', 'descriptionHtml', 'moderator']}), update: esHttp.record.post('/user/profile/:id/_update', {tagFields: ['title', 'description'], ignoreFields: ['enableGeoPoint', 'descriptionHtml', 'moderator']}), - remove: esHttp.record.remove("user","profile"), + remove: removeProfile, avatar: esHttp.get('/user/profile/:id?_source=avatar'), fillAvatars: fillAvatars, like: esLike.instance('user', 'profile') diff --git a/www/plugins/es/js/services/wot-services.js b/www/plugins/es/js/services/wot-services.js index 9c40566c10712719b42d31ff240603c494df934d..c007c666564717b4a5014b0f70da08322d5b19c3 100644 --- a/www/plugins/es/js/services/wot-services.js +++ b/www/plugins/es/js/services/wot-services.js @@ -10,81 +10,84 @@ angular.module('cesium.es.wot.services', ['ngResource', 'cesium.es.http.services user: { event: esHttp.post('/user/event/_search') } - }, - - - loadMemberships = function(pubkey, options) { - options = options || {}; + }; - var result = (options.cache !== false) ? membershipsCache.get(pubkey) : null; - if (result) return $q.when(result); + function loadMemberships(pubkey, options) { + options = options || {}; - // Get user events on membership state - var request = { - "size": 1000, - "query": { - "bool": { - "filter": [ - {"term": {"recipient" : pubkey }}, - {"terms": {"code" : ["MEMBER_JOIN","MEMBER_ACTIVE","MEMBER_LEAVE","MEMBER_EXCLUDE","MEMBER_REVOKE"] }} - ] - } - }, - "sort" : [ - { "time" : {"order" : "asc"}} - ], - _source: ["code", "time"] - }; + var result = (options.cache !== false) ? membershipsCache.get(pubkey) : null; + if (result) return $q.when(result); - return raw.user.event(request) + // Get user events on membership state + var request = { + "size": 1000, + "query": { + "bool": { + "filter": [ + {"term": {"recipient" : pubkey }}, + {"terms": {"code" : ["MEMBER_JOIN","MEMBER_ACTIVE","MEMBER_LEAVE","MEMBER_EXCLUDE","MEMBER_REVOKE"] }} + ] + } + }, + "sort" : [ + { "time" : {"order" : "asc"}} + ], + _source: ["code", "time"] + }; - .then(function(res) { - if (!res.hits || !res.hits.total) return; + return raw.user.event(request) - // Compute member periods - var lastJoinTime; - var result = res.hits.hits.reduce(function(res, hit){ - var isMember = hit._source.code == 'MEMBER_JOIN' || hit._source.code == 'MEMBER_ACTIVE'; - // If join - if (isMember && !lastJoinTime) { - lastJoinTime = hit._source.time; - } - // If leave - else if (!isMember && lastJoinTime) { - // Add an entry - res = res.concat({ - joinTime: lastJoinTime, - leaveTime: hit._source.time - }); - lastJoinTime = 0; // reset - } - return res; - }, []); + .then(function(res) { + if (!res.hits || !res.hits.total) return; - if (lastJoinTime) { - // Add last entry if need - result.push({ + // Compute member periods + var lastJoinTime; + var result = res.hits.hits.reduce(function(res, hit){ + var isMember = hit._source.code === 'MEMBER_JOIN' || hit._source.code === 'MEMBER_ACTIVE'; + // If join + if (isMember && !lastJoinTime) { + lastJoinTime = hit._source.time; + } + // If leave + else if (!isMember && lastJoinTime) { + // Add an entry + res = res.concat({ joinTime: lastJoinTime, - leaveTime: moment().utc().unix() + leaveTime: hit._source.time }); + lastJoinTime = 0; // reset } + return res; + }, []); - // Put in the cache - membershipsCache.put(pubkey, result); + if (lastJoinTime) { + // Add last entry if need + result.push({ + joinTime: lastJoinTime, + leaveTime: moment().utc().unix() + }); + } - return result; - }); - }, + // Put in the cache + membershipsCache.put(pubkey, result); - cleanCache = function() { - console.debug('[ES] [wot] Clean cache...'); - csCache.clear(cachePrefix); - }; + return result; + }); + }; + + + function cleanAllCache() { + console.debug("[ES] [wot] Cleaning cache {prefix: '{0}'}...".format(cachePrefix)); + csCache.clear(cachePrefix); + } // Listen if node changed - esHttp.api.node.on.stop($rootScope, cleanCache, this); + esHttp.api.node.on.stop($rootScope, cleanAllCache, this); return { - memberships: loadMemberships + memberships: loadMemberships, + cache: { + clearAll: cleanAllCache + } }; }); diff --git a/www/plugins/es/templates/blockchain/items_blocks.html b/www/plugins/es/templates/blockchain/items_blocks.html index 8479ab0fd576f280ad4f1f80deaa6f934b3ee5eb..3bb036216007c034678ce5174120742454d7f508 100644 --- a/www/plugins/es/templates/blockchain/items_blocks.html +++ b/www/plugins/es/templates/blockchain/items_blocks.html @@ -46,6 +46,6 @@ <!-- blocks (small screens) --> <ng-if ng-if=":rebind:smallscreen"> <ng-repeat ng-repeat="block in :rebind:search.results track by block.number" - ng-include="'templates/blockchain/item_block.html'"> + ng-include="::'templates/blockchain/item_block.html'"> </ng-repeat> </ng-if> diff --git a/www/plugins/es/templates/blockchain/lookup.html b/www/plugins/es/templates/blockchain/lookup.html index 8cef4ff22d2c9484a9d608aa3ea5441f69ade233..45d627f71fc53ff72eb42522dfaffb8e61943e97 100644 --- a/www/plugins/es/templates/blockchain/lookup.html +++ b/www/plugins/es/templates/blockchain/lookup.html @@ -21,6 +21,6 @@ </ion-nav-buttons> <ion-content class="padding no-padding-xs no-padding-sm" scroll="true"> - <ng-include src="'plugins/es/templates/blockchain/lookup_form.html'"></ng-include> + <ng-include src="::'plugins/es/templates/blockchain/lookup_form.html'"></ng-include> </ion-content> </ion-view> diff --git a/www/plugins/es/templates/blockchain/lookup_form.html b/www/plugins/es/templates/blockchain/lookup_form.html index 4e6ddac2c34878363d8c9a1bf37513a5917d4d7d..5699857a0d0a8d39d3d9102626b66582b9a7c593 100644 --- a/www/plugins/es/templates/blockchain/lookup_form.html +++ b/www/plugins/es/templates/blockchain/lookup_form.html @@ -92,7 +92,7 @@ <ion-list class="list list-blocks" ng-class="::motion.ionListClass"> - <ng-include src="'plugins/es/templates/blockchain/items_blocks.html'"></ng-include> + <ng-include src="::'plugins/es/templates/blockchain/items_blocks.html'"></ng-include> </ion-list> diff --git a/www/plugins/es/templates/common/item_comment.html b/www/plugins/es/templates/common/item_comment.html index be81709f1be813a3a3b1207966615c9bd31aa089..d04b72b3f071be7dc78a577846107966d724f103 100644 --- a/www/plugins/es/templates/common/item_comment.html +++ b/www/plugins/es/templates/common/item_comment.html @@ -35,7 +35,7 @@ </div> </div> - <ng-include src="'plugins/es/templates/common/item_comment_content.html'"></ng-include> + <ng-include src="::'plugins/es/templates/common/item_comment_content.html'"></ng-include> <div class="card-footer gray"> <small class="underline"> diff --git a/www/plugins/es/templates/common/view_comments.html b/www/plugins/es/templates/common/view_comments.html index 150dc46fc198e3bd384c4fe824a05e22638f2fc4..57cc919853a43c964ba8550f19a70c68d6bbcf76 100644 --- a/www/plugins/es/templates/common/view_comments.html +++ b/www/plugins/es/templates/common/view_comments.html @@ -14,7 +14,7 @@ <div class="padding-right"> <ng-repeat ng-repeat="comment in comments.result track by comment.id" - ng-include="'plugins/es/templates/common/item_comment.html'"> + ng-include="::'plugins/es/templates/common/item_comment.html'"> </ng-repeat> </div> diff --git a/www/plugins/es/templates/document/list_documents.html b/www/plugins/es/templates/document/list_documents.html index a161798401396a50ee1e05116f83399196040255..43bcc647fc2f4bf2664335be219eadf0b3927457 100644 --- a/www/plugins/es/templates/document/list_documents.html +++ b/www/plugins/es/templates/document/list_documents.html @@ -1,7 +1,7 @@ <ion-list class="list" ng-class="::motion.ionListClass"> - <ng-include src="'plugins/es/templates/document/items_documents.html'"></ng-include> + <ng-include src="::'plugins/es/templates/document/items_documents.html'"></ng-include> </ion-list> diff --git a/www/plugins/es/templates/document/lookup.html b/www/plugins/es/templates/document/lookup.html index df29fb91332dbc9aa3fe45d0d836a039aebe4d19..1f2a41549915c79ff99e33982e0a5c967151daea 100644 --- a/www/plugins/es/templates/document/lookup.html +++ b/www/plugins/es/templates/document/lookup.html @@ -12,6 +12,6 @@ <ion-content class="padding no-padding-xs no-padding-sm" scroll="true"> - <ng-include src="'plugins/es/templates/document/lookup_form.html'"></ng-include> + <ng-include src="::'plugins/es/templates/document/lookup_form.html'"></ng-include> </ion-content> </ion-view> diff --git a/www/plugins/es/templates/document/lookup_form.html b/www/plugins/es/templates/document/lookup_form.html index c940bdd646ded8d9a13935fa0946441a275adcfc..dbb5279aaf117daddca11440cc916c4a26f26ef2 100644 --- a/www/plugins/es/templates/document/lookup_form.html +++ b/www/plugins/es/templates/document/lookup_form.html @@ -88,7 +88,7 @@ <ion-list class="list" ng-class="::motion.ionListClass"> - <ng-include src="'plugins/es/templates/document/items_documents.html'"></ng-include> + <ng-include src="::'plugins/es/templates/document/items_documents.html'"></ng-include> </ion-list> diff --git a/www/plugins/es/templates/group/edit_group.html b/www/plugins/es/templates/group/edit_group.html index 0f3563489db3ff6f2d2a53c26e27ca44543904b3..50f218a8ab59a82fd08ad4fe3aca4fd3386d5f8d 100644 --- a/www/plugins/es/templates/group/edit_group.html +++ b/www/plugins/es/templates/group/edit_group.html @@ -49,7 +49,7 @@ </div> <!-- pictures --> - <ng-include src="'plugins/es/templates/common/edit_pictures.html'"></ng-include> + <ng-include src="::'plugins/es/templates/common/edit_pictures.html'"></ng-include> <div class="item item-divider" translate>GROUP.GENERAL_DIVIDER</div> @@ -85,7 +85,7 @@ </div> <!-- social networks --> - <ng-include src="'plugins/es/templates/common/edit_socials.html'" ng-controller="ESSocialsEditCtrl"></ng-include> + <ng-include src="::'plugins/es/templates/common/edit_socials.html'" ng-controller="ESSocialsEditCtrl"></ng-include> </div> diff --git a/www/plugins/es/templates/group/items_groups.html b/www/plugins/es/templates/group/items_groups.html index b3df8b122220a96d25b98bc294dfa3476dfd5379..96ecedb17e19c7ac3f0a637f596fff5153212160 100644 --- a/www/plugins/es/templates/group/items_groups.html +++ b/www/plugins/es/templates/group/items_groups.html @@ -25,5 +25,5 @@ </div> <ng-repeat ng-repeat="group in :rebind:search.results" - ng-include="'plugins/es/templates/group/item_group.html'"> + ng-include="::'plugins/es/templates/group/item_group.html'"> </ng-repeat> diff --git a/www/plugins/es/templates/group/lookup.html b/www/plugins/es/templates/group/lookup.html index b676500b2b27baa9be55aad82d62acd55d10b901..e40e5762f6ffe77b9d687371fcaff0505a21fdd9 100644 --- a/www/plugins/es/templates/group/lookup.html +++ b/www/plugins/es/templates/group/lookup.html @@ -11,6 +11,6 @@ </ion-nav-buttons> <ion-content class="padding no-padding-xs no-padding-sm" scroll="true"> - <ng-include src="'plugins/es/templates/group/lookup_form.html'"></ng-include> + <ng-include src="::'plugins/es/templates/group/lookup_form.html'"></ng-include> </ion-content> </ion-view> diff --git a/www/plugins/es/templates/group/lookup_form.html b/www/plugins/es/templates/group/lookup_form.html index a6e1900c8cc8284de2b8ab17c83be2a1872f2ac1..889b7216f35e8dccd874d54d86a18e896e938d7f 100644 --- a/www/plugins/es/templates/group/lookup_form.html +++ b/www/plugins/es/templates/group/lookup_form.html @@ -73,7 +73,7 @@ <div class="list {{::motion.ionListClass}}" ng-if="!$scope.search.loading"> - <ng-include src="'plugins/es/templates/group/items_groups.html'"></ng-include> + <ng-include src="::'plugins/es/templates/group/items_groups.html'"></ng-include> </div> diff --git a/www/plugins/es/templates/group/view_record.html b/www/plugins/es/templates/group/view_record.html index ad628c906a535a9dd08f2996a59ef91c808d2268..af14838bea12773c6570db687531d6d8a3e72008 100644 --- a/www/plugins/es/templates/group/view_record.html +++ b/www/plugins/es/templates/group/view_record.html @@ -126,7 +126,7 @@ <div class="lazy-load"> <!-- pictures --> - <ng-include src="'plugins/es/templates/common/view_pictures.html'"></ng-include> + <ng-include src="::'plugins/es/templates/common/view_pictures.html'"></ng-include> <span class="item item-divider" ng-if="formData.pubkey"> @@ -143,7 +143,7 @@ </div> <!-- comments --> - <ng-include src="'plugins/es/templates/common/view_comments.html'"></ng-include> + <ng-include src="::'plugins/es/templates/common/view_comments.html'"></ng-include> </div> </div> diff --git a/www/plugins/es/templates/invitation/modal_new_invitation.html b/www/plugins/es/templates/invitation/modal_new_invitation.html index 1254a0dae59a30925f2ac4c4156993e66eb474fc..40b13c75ba8f38af474575eb23711c44f6c8bff6 100644 --- a/www/plugins/es/templates/invitation/modal_new_invitation.html +++ b/www/plugins/es/templates/invitation/modal_new_invitation.html @@ -8,6 +8,6 @@ </ion-header-bar> <ion-content scroll="true"> - <ng-include src="'plugins/es/templates/invitation/new_invitation_form.html'"></ng-include> + <ng-include src="::'plugins/es/templates/invitation/new_invitation_form.html'"></ng-include> </ion-content> </ion-modal-view> diff --git a/www/plugins/es/templates/invitation/popover_invitation.html b/www/plugins/es/templates/invitation/popover_invitation.html index d13accfafcef43d6fb2cb5ad5e44eccafa50f571..475a4bb014030231e390a41c5677e12e4c32012b 100644 --- a/www/plugins/es/templates/invitation/popover_invitation.html +++ b/www/plugins/es/templates/invitation/popover_invitation.html @@ -17,7 +17,7 @@ INVITATION.NO_RESULT </div> - <ng-include src="'plugins/es/templates/invitation/list_invitation.html'"></ng-include> + <ng-include src="::'plugins/es/templates/invitation/list_invitation.html'"></ng-include> </ion-content> diff --git a/www/plugins/es/templates/invitation/view_invitations.html b/www/plugins/es/templates/invitation/view_invitations.html index d2753e360558e4b8e5d909e1a3cf56b09262f89c..9934b8ce0b6cd2f328d2de86ce577b951c52bc7c 100644 --- a/www/plugins/es/templates/invitation/view_invitations.html +++ b/www/plugins/es/templates/invitation/view_invitations.html @@ -38,7 +38,7 @@ INVITATION.NO_RESULT </div> - <ng-include src="'plugins/es/templates/invitation/list_invitation.html'"></ng-include> + <ng-include src="::'plugins/es/templates/invitation/list_invitation.html'"></ng-include> </div> diff --git a/www/plugins/es/templates/message/compose.html b/www/plugins/es/templates/message/compose.html index ad6e0d0cfb4af5effe178b64645d634f145a527c..255f8cb63813a83247abbfc8995ec8cf99ccadf8 100644 --- a/www/plugins/es/templates/message/compose.html +++ b/www/plugins/es/templates/message/compose.html @@ -18,7 +18,7 @@ {{'MESSAGE.COMPOSE.SUB_TITLE'|translate}} </h2> <h4 class="hidden-xs hidden-sm"> </h4> - <ng-include src="'plugins/es/templates/message/compose_form.html'"></ng-include> + <ng-include src="::'plugins/es/templates/message/compose_form.html'"></ng-include> </div> <div class="col col-20 hidden-xs hidden-sm"> </div> </div> diff --git a/www/plugins/es/templates/message/lookup_lg.html b/www/plugins/es/templates/message/lookup_lg.html index 66349decfb9decc205ff21cfa2bd026209a6a399..ad7bc8ad7d1a431f7bc2998edd41b53b570dbebb 100644 --- a/www/plugins/es/templates/message/lookup_lg.html +++ b/www/plugins/es/templates/message/lookup_lg.html @@ -142,7 +142,7 @@ </div> <!-- list --> - <ng-include src="'plugins/es/templates/message/list.html'"></ng-include> + <ng-include src="::'plugins/es/templates/message/list.html'"></ng-include> </ion-content> diff --git a/www/plugins/es/templates/message/modal_compose.html b/www/plugins/es/templates/message/modal_compose.html index 5ed1803c054245920a5f38cf1b77c70ed0210724..ae6aa7d022ab32139ef3591e154c00e63efa2dc5 100644 --- a/www/plugins/es/templates/message/modal_compose.html +++ b/www/plugins/es/templates/message/modal_compose.html @@ -10,6 +10,6 @@ </ion-header-bar> <ion-content scroll="true"> - <ng-include src="'plugins/es/templates/message/compose_form.html'"></ng-include> + <ng-include src="::'plugins/es/templates/message/compose_form.html'"></ng-include> </ion-content> </ion-modal-view> diff --git a/www/plugins/es/templates/message/tabs/tab_list.html b/www/plugins/es/templates/message/tabs/tab_list.html index 073af86260350e036e013e69017f8a609efae988..04c426b1fe3c89b1c3f3feb973edeb1811923a35 100644 --- a/www/plugins/es/templates/message/tabs/tab_list.html +++ b/www/plugins/es/templates/message/tabs/tab_list.html @@ -18,7 +18,7 @@ <cs-extension-point name="buttons"></cs-extension-point> <!-- list --> - <ng-include src="'plugins/es/templates/message/list.html'"></ng-include> + <ng-include src="::'plugins/es/templates/message/list.html'"></ng-include> </ion-content> diff --git a/www/plugins/es/templates/network/items_peers.html b/www/plugins/es/templates/network/items_peers.html index d2c6b6225dde9c29affb2a1fb9bed9626b7b4633..c253f18f005502b845db69f0d38c0b1338951db6 100644 --- a/www/plugins/es/templates/network/items_peers.html +++ b/www/plugins/es/templates/network/items_peers.html @@ -30,7 +30,7 @@ ng-class="::ionItemClass" id="{{helptipPrefix}}-peer-{{$index}}" ng-click="selectPeer(peer)" - ng-include="'plugins/es/templates/network/item_content_peer.html'"> + ng-include="::'plugins/es/templates/network/item_content_peer.html'"> </div> </div> diff --git a/www/plugins/es/templates/network/modal_network.html b/www/plugins/es/templates/network/modal_network.html index efe1c1dd3a806631782b8b2767af09a44eff7c03..2e2503a27c0411e45775167a4c6efea7bdcf8c98 100644 --- a/www/plugins/es/templates/network/modal_network.html +++ b/www/plugins/es/templates/network/modal_network.html @@ -29,7 +29,7 @@ </div> </div> - <ng-include src="'plugins/es/templates/network/items_peers.html'"></ng-include> + <ng-include src="::'plugins/es/templates/network/items_peers.html'"></ng-include> </div> </ion-content> diff --git a/www/plugins/es/templates/network/popover_network.html b/www/plugins/es/templates/network/popover_network.html index ce40b91754b9baec9110db07cac15eebfeccdc5b..5172994696641af159087531c00b8b24709bcde4 100644 --- a/www/plugins/es/templates/network/popover_network.html +++ b/www/plugins/es/templates/network/popover_network.html @@ -14,7 +14,7 @@ </ion-header-bar> <ion-content scroll="true"> <div class="list no-padding"> - <ng-include src="'plugins/es/templates/network/items_peers.html'"></ng-include> + <ng-include src="::'plugins/es/templates/network/items_peers.html'"></ng-include> </div> </ion-content> diff --git a/www/plugins/es/templates/network/view_es_network.html b/www/plugins/es/templates/network/view_es_network.html index 907960773c5ccb834496977f7f40e9e81f2c5a3e..744c2d3f9cb52938f2cba49d85e92cb757279180 100644 --- a/www/plugins/es/templates/network/view_es_network.html +++ b/www/plugins/es/templates/network/view_es_network.html @@ -43,7 +43,7 @@ <div id="helptip-network-peers" style="display: block"></div> - <ng-include src="'plugins/es/templates/network/items_peers.html'"></ng-include> + <ng-include src="::'plugins/es/templates/network/items_peers.html'"></ng-include> </div> <div class="col col-33 " ng-controller="ESLastDocumentsCtrl"> @@ -72,7 +72,7 @@ </div> </div> - <ng-include src="'plugins/es/templates/document/list_documents.html'"></ng-include> + <ng-include src="::'plugins/es/templates/document/list_documents.html'"></ng-include> </div> </div> diff --git a/www/plugins/es/templates/network/view_es_peer.html b/www/plugins/es/templates/network/view_es_peer.html index 882ff8550024a634ed5142215fe17c701bf01e8f..063954fb7a07f7fbf09e1ad803bd8f6330c9dbfd 100644 --- a/www/plugins/es/templates/network/view_es_peer.html +++ b/www/plugins/es/templates/network/view_es_peer.html @@ -125,7 +125,7 @@ class="item item-peer item-icon-left ink" ng-class="::ionItemClass" ng-click="selectPeer(peer)" - ng-include="'plugins/es/templates/network/item_content_peer.html'"> + ng-include="::'plugins/es/templates/network/item_content_peer.html'"> </div> </div> diff --git a/www/plugins/es/templates/notification/popover_notification.html b/www/plugins/es/templates/notification/popover_notification.html index e33241d6e8d54dedfbdd60507f87fb47d229d582..468a045f60c2c74f3786c0ac94e7634886bbf5bb 100644 --- a/www/plugins/es/templates/notification/popover_notification.html +++ b/www/plugins/es/templates/notification/popover_notification.html @@ -17,7 +17,7 @@ COMMON.NOTIFICATIONS.NO_RESULT </div> - <ng-include src="'plugins/es/templates/notification/list_notification.html'"></ng-include> + <ng-include src="::'plugins/es/templates/notification/list_notification.html'"></ng-include> </ion-content> diff --git a/www/plugins/es/templates/notification/view_notifications.html b/www/plugins/es/templates/notification/view_notifications.html index 98226cfecd5be975dde4028bf026cc0d07413653..8d350873c52216d5362fef861d2118bd1a00888b 100644 --- a/www/plugins/es/templates/notification/view_notifications.html +++ b/www/plugins/es/templates/notification/view_notifications.html @@ -41,7 +41,7 @@ COMMON.NOTIFICATIONS.NO_RESULT </div> - <ng-include src="'plugins/es/templates/notification/list_notification.html'"></ng-include> + <ng-include src="::'plugins/es/templates/notification/list_notification.html'"></ng-include> </div> diff --git a/www/plugins/es/templates/registry/edit_record.html b/www/plugins/es/templates/registry/edit_record.html index e001f7caa24d401967276ee33a621f22b6a02e95..565a813c9fb01b4fbef77655daf1d89e035679b9 100644 --- a/www/plugins/es/templates/registry/edit_record.html +++ b/www/plugins/es/templates/registry/edit_record.html @@ -61,7 +61,7 @@ </div> <!-- pictures --> - <ng-include src="'plugins/es/templates/common/edit_pictures.html'"></ng-include> + <ng-include src="::'plugins/es/templates/common/edit_pictures.html'"></ng-include> <div class="item item-divider" translate>REGISTRY.GENERAL_DIVIDER</div> @@ -115,10 +115,10 @@ </div> <!-- position --> - <ng-include src="'plugins/es/templates/common/edit_position.html'" ng-controller="ESPositionEditCtrl as ctrl"></ng-include> + <ng-include src="::'plugins/es/templates/common/edit_position.html'" ng-controller="ESPositionEditCtrl as ctrl"></ng-include> <!-- social networks --> - <ng-include src="'plugins/es/templates/common/edit_socials.html'" ng-controller="ESSocialsEditCtrl"></ng-include> + <ng-include src="::'plugins/es/templates/common/edit_socials.html'" ng-controller="ESSocialsEditCtrl"></ng-include> <div class="item item-divider" translate>REGISTRY.TECHNICAL_DIVIDER</div> diff --git a/www/plugins/es/templates/registry/view_record.html b/www/plugins/es/templates/registry/view_record.html index 03730c7cb6311890db7001837e7037d6974cb1db..1c2e95c596eef00be53ecb5f49b8ee45697d72bc 100644 --- a/www/plugins/es/templates/registry/view_record.html +++ b/www/plugins/es/templates/registry/view_record.html @@ -28,7 +28,7 @@ <i class="icon ion-location"></i> <span ng-bind-html="formData.city"></span> </span> <!-- likes --> - <small ng-include="'plugins/es/templates/common/view_likes.html'"></small> + <small ng-include="::'plugins/es/templates/common/view_likes.html'"></small> </h4> </div> @@ -174,10 +174,10 @@ <div class="lazy-load"> <!-- pictures --> - <ng-include src="'plugins/es/templates/common/view_pictures.html'"></ng-include> + <ng-include src="::'plugins/es/templates/common/view_pictures.html'"></ng-include> <!-- comments --> - <ng-include src="'plugins/es/templates/common/view_comments.html'"></ng-include> + <ng-include src="::'plugins/es/templates/common/view_comments.html'"></ng-include> </div> </div> diff --git a/www/plugins/es/templates/registry/view_wallet_pages.html b/www/plugins/es/templates/registry/view_wallet_pages.html index 8ed4a938c63f8367020e77d2a778a10901588616..5d9650d47b9f5e6fff3b2700625f3289b0cee5c6 100644 --- a/www/plugins/es/templates/registry/view_wallet_pages.html +++ b/www/plugins/es/templates/registry/view_wallet_pages.html @@ -32,7 +32,7 @@ REGISTRY.NO_PAGE </div> - <ng-include src="'plugins/es/templates/registry/lookup_list.html'"></ng-include> + <ng-include src="::'plugins/es/templates/registry/lookup_list.html'"></ng-include> </ion-content> diff --git a/www/plugins/es/templates/user/edit_profile.html b/www/plugins/es/templates/user/edit_profile.html index 3bc148378277044650880bee57607e6bdc058987..dcf19f97c49e9dd9fbbb3d7f8d547bcb87aebcdc 100644 --- a/www/plugins/es/templates/user/edit_profile.html +++ b/www/plugins/es/templates/user/edit_profile.html @@ -107,12 +107,12 @@ </ion-item> <!-- position --> - <ng-include src="'plugins/es/templates/common/edit_position.html'" ng-controller="ESPositionEditCtrl as ctrl"></ng-include> + <ng-include src="::'plugins/es/templates/common/edit_position.html'" ng-controller="ESPositionEditCtrl as ctrl"></ng-include> </div> <!-- social networks --> - <ng-include src="'plugins/es/templates/common/edit_socials.html'" ng-controller="ESSocialsEditCtrl"></ng-include> + <ng-include src="::'plugins/es/templates/common/edit_socials.html'" ng-controller="ESSocialsEditCtrl"></ng-include> <div class="list item-text-wrap {{::motion.ionListClass}}"> diff --git a/www/plugins/es/templates/wallet/view_wallet_extend.html b/www/plugins/es/templates/wallet/view_wallet_extend.html index 213a71a24744b364c0fe8fd4defcabfe859f4cc3..64aae561f76ed8317add8430c33440928e1b0b85 100644 --- a/www/plugins/es/templates/wallet/view_wallet_extend.html +++ b/www/plugins/es/templates/wallet/view_wallet_extend.html @@ -1,7 +1,7 @@ <ng-if ng-if=":state:enable && extensionPoint === 'hero'" > <!-- likes --> <small class="light" style="display: inline-block;" - ng-include="'plugins/es/templates/common/view_likes.html'" + ng-include="::'plugins/es/templates/common/view_likes.html'" ng-init="canEdit=true"></small> </ng-if> @@ -37,7 +37,7 @@ <small trust-as-html="'PROFILE.PROFILE_DIVIDER_HELP'|translate"></small> </div> - <ng-include src="'plugins/es/templates/user/items_profile.html'" ng-init="showName=true"></ng-include> + <ng-include src="::'plugins/es/templates/user/items_profile.html'" ng-init="showName=true"></ng-include> <!-- subscriptions --> <div class="item item-divider item-divider-top-border"> diff --git a/www/plugins/es/templates/wot/view_identity_extend.html b/www/plugins/es/templates/wot/view_identity_extend.html index 0efe648213c688b13a9b487c72b93b05a3c642e9..722691a3443a09a97cbdce0177560fa7593be374 100644 --- a/www/plugins/es/templates/wot/view_identity_extend.html +++ b/www/plugins/es/templates/wot/view_identity_extend.html @@ -2,7 +2,7 @@ <ng-if ng-if=":state:enable && extensionPoint === 'hero'"> <!-- likes --> <small class="light" style="display: inline-block;" - ng-include="'plugins/es/templates/common/view_likes.html'"></small> + ng-include="::'plugins/es/templates/common/view_likes.html'"></small> </ng-if> <!-- Top fab buttons --> @@ -49,6 +49,6 @@ <small translate>PROFILE.PROFILE_DIVIDER_HELP</small> </div> - <ng-include src="'plugins/es/templates/user/items_profile.html'" ng-init="showName=false;"></ng-include> + <ng-include src="::'plugins/es/templates/user/items_profile.html'" ng-init="showName=false;"></ng-include> </ng-if> diff --git a/www/plugins/graph/js/services/data-services.js b/www/plugins/graph/js/services/data-services.js index 68b2638ecbf65d5cb86fb2647b89a18679e0f087..8c9ba109c32ab893aa1369939654c8709f4729b5 100644 --- a/www/plugins/graph/js/services/data-services.js +++ b/www/plugins/graph/js/services/data-services.js @@ -4,7 +4,8 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. 'ngInject'; var - currencyCache = csCache.get('gpData-currency-', csCache.constants.SHORT), + cachePrefix = 'gpData-', + currencyCache = csCache.get(cachePrefix + 'currency-', csCache.constants.SHORT), exports = { node: {}, wot: {}, @@ -126,9 +127,9 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. options = options || {}; var withCache = angular.isDefined(options.withCache) ? options.withCache : true; // enable by default - var cachekKey = [currency, JSON.stringify(options)].join('-'); + var cacheKey = [currency, JSON.stringify(options)].join('-'); if (withCache) { - var result = currencyCache.get(cachekKey); + var result = currencyCache.get(cacheKey); if (result) { // should be already a promise (previous call still running) if (!result.blocks) { @@ -213,10 +214,10 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. }, []); // replace promise in cache, with data - currencyCache.put(cachekKey, result); + currencyCache.put(cacheKey, result); return result; }); - currencyCache.put(cachekKey, promise); + currencyCache.put(cacheKey, promise); return promise; }; @@ -277,7 +278,7 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. // prepare next loop ranges = []; - if (jobs.length == 10) { + if (jobs.length === 10) { console.error('Too many parallel jobs!'); from = moment.unix(options.endTime).utc(); // stop while } @@ -962,9 +963,15 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. }); }; - return exports; - }) + function cleanAllCache() { + console.debug("[graph] Cleaning cache {prefix: '{0}'}...".format(cachePrefix)); + csCache.clear(cachePrefix); + } + // Listen if node changed + esHttp.api.node.on.stop($rootScope, cleanAllCache, this); + return exports; + }) ; diff --git a/www/plugins/graph/templates/account/graph_balance.html b/www/plugins/graph/templates/account/graph_balance.html index 7939969f663c4fb884147d4536794ceac7cef274..31e4709e198fd741ff75c463612a8ee01ce0da67 100644 --- a/www/plugins/graph/templates/account/graph_balance.html +++ b/www/plugins/graph/templates/account/graph_balance.html @@ -21,4 +21,4 @@ </canvas> </div> - <ng-include src="'plugins/graph/templates/common/graph_range_bar.html'"></ng-include> + <ng-include src="::'plugins/graph/templates/common/graph_range_bar.html'"></ng-include> diff --git a/www/plugins/graph/templates/account/view_stats.html b/www/plugins/graph/templates/account/view_stats.html index cac7dec8b067bab9c9a83eab42abd6bd9820d77d..87ff0c0d4b7504091ff8e8691d165df26d1371b7 100644 --- a/www/plugins/graph/templates/account/view_stats.html +++ b/www/plugins/graph/templates/account/view_stats.html @@ -23,7 +23,7 @@ <div class="item no-padding-xs" ng-if="!loading" - ng-include="'plugins/graph/templates/account/graph_balance.html'" + ng-include="::'plugins/graph/templates/account/graph_balance.html'" ng-init="setSize(350, 1000)"> </div> </ng-controller> @@ -31,7 +31,7 @@ </div> <div class="item no-padding-xs" - ng-include="'plugins/graph/templates/account/graph_sum_tx.html'" + ng-include="::'plugins/graph/templates/account/graph_sum_tx.html'" ng-controller="GpAccountSumTxCtrl"> </div> @@ -41,7 +41,7 @@ </div> <div class="item no-padding-xs" - ng-include="'plugins/graph/templates/account/graph_certifications.html'" + ng-include="::'plugins/graph/templates/account/graph_certifications.html'" ng-controller="GpAccountCertificationCtrl" ng-init="setSize(350, 1000)"> </div>--> diff --git a/www/plugins/graph/templates/blockchain/graph_tx_count.html b/www/plugins/graph/templates/blockchain/graph_tx_count.html index def80ecccdd8a248237444117435d4476ed015f0..bef1a313cc6688bb40586f52bb2b4322d6fa922d 100644 --- a/www/plugins/graph/templates/blockchain/graph_tx_count.html +++ b/www/plugins/graph/templates/blockchain/graph_tx_count.html @@ -21,4 +21,4 @@ </canvas> </div> - <ng-include src="'plugins/graph/templates/common/graph_range_bar.html'"></ng-include> + <ng-include src="::'plugins/graph/templates/common/graph_range_bar.html'"></ng-include> diff --git a/www/plugins/graph/templates/blockchain/view_stats.html b/www/plugins/graph/templates/blockchain/view_stats.html index 4ec97c1e62ba4ce698557b0b6c14c19d8707431e..a3393e1be780428d30d246e3e26bf7382bc0e873 100644 --- a/www/plugins/graph/templates/blockchain/view_stats.html +++ b/www/plugins/graph/templates/blockchain/view_stats.html @@ -26,7 +26,7 @@ <div class="item no-padding-xs no-padding-sm" ng-if="!loading" - ng-include="'plugins/graph/templates/blockchain/graph_tx_count.html'" + ng-include="::'plugins/graph/templates/blockchain/graph_tx_count.html'" ng-init="setSize(350, 1000)"> </div> </ng-controller> @@ -39,7 +39,7 @@ <div class="item no-padding-xs no-padding-sm" ng-if="!loading" - ng-include="'plugins/graph/templates/blockchain/graph_block_issuers.html'" + ng-include="::'plugins/graph/templates/blockchain/graph_block_issuers.html'" ng-init="setSize(300, 750)"> </div> diff --git a/www/plugins/graph/templates/currency/tabs/tab_blocks_stats.html b/www/plugins/graph/templates/currency/tabs/tab_blocks_stats.html index dfe962a0be6c83205d13e4c35fd9c4e8af4bb016..0183d13f2d051a61676a1eb801cadb583e8a32ad 100644 --- a/www/plugins/graph/templates/currency/tabs/tab_blocks_stats.html +++ b/www/plugins/graph/templates/currency/tabs/tab_blocks_stats.html @@ -1,7 +1,7 @@ <ion-view> <ion-content> <div - ng-include="'plugins/graph/templates/blockchain/graph_tx_count.html'" + ng-include="::'plugins/graph/templates/blockchain/graph_tx_count.html'" ng-controller="GpBlockchainTxCountCtrl" ng-init="setSize(500,700,false)"> </div> diff --git a/www/plugins/graph/templates/currency/tabs/tab_network_stats.html b/www/plugins/graph/templates/currency/tabs/tab_network_stats.html index ffa8acb631345ea85bd35e604ea736c240e15bba..ec8f5c0d6f3b465e2fbf0bd14c0bf32ead818287 100644 --- a/www/plugins/graph/templates/currency/tabs/tab_network_stats.html +++ b/www/plugins/graph/templates/currency/tabs/tab_network_stats.html @@ -3,7 +3,7 @@ <div class="list"> <div class="item" - ng-include="'plugins/graph/templates/blockchain/graph_block_issuers.html'" + ng-include="::'plugins/graph/templates/blockchain/graph_block_issuers.html'" ng-controller="GpBlockchainIssuersCtrl" ng-init="setSize(500,700,true)"> </div> diff --git a/www/plugins/graph/templates/currency/tabs/tab_parameters_stats.html b/www/plugins/graph/templates/currency/tabs/tab_parameters_stats.html index 80465c1d432b136bd2f0ef2571e185a5ab42121a..364bdb58752799f34746d66bfc42cc960435cef1 100644 --- a/www/plugins/graph/templates/currency/tabs/tab_parameters_stats.html +++ b/www/plugins/graph/templates/currency/tabs/tab_parameters_stats.html @@ -10,7 +10,7 @@ <!-- Monetary mass --> <div class="item" - ng-include="'plugins/graph/templates/currency/graph_monetary_mass.html'" + ng-include="::'plugins/graph/templates/currency/graph_monetary_mass.html'" ng-init="setSize(500,700,true)"> </div> </ng-container> @@ -18,7 +18,7 @@ <!-- DU --> <ng-container ng-controller="GpCurrencyDUCtrl"> <div class="item" - ng-include="'plugins/graph/templates/currency/graph_du.html'" + ng-include="::'plugins/graph/templates/currency/graph_du.html'" ng-init="setSize(500,700,true)"> </div> </ng-container> diff --git a/www/plugins/graph/templates/currency/tabs/tab_wot_stats.html b/www/plugins/graph/templates/currency/tabs/tab_wot_stats.html index c058e990402f35fb43fcb3ca5bdad8ee61060bb5..336648d439f068b50e7f1c945fe53bd218147c89 100644 --- a/www/plugins/graph/templates/currency/tabs/tab_wot_stats.html +++ b/www/plugins/graph/templates/currency/tabs/tab_wot_stats.html @@ -6,7 +6,7 @@ <div class="list no-padding"> <div class="item no-padding-top" - ng-include="'plugins/graph/templates/currency/graph_members_count.html'" + ng-include="::'plugins/graph/templates/currency/graph_members_count.html'" ng-init="setSize(600,700,false)"> </div> </div> diff --git a/www/plugins/graph/templates/currency/view_currency_extend.html b/www/plugins/graph/templates/currency/view_currency_extend.html index 5b6317b3710b08d334c83a8f1992f7d1a70e7359..556ed85c2a02b2d7c1894c38c66277b4b1901747 100644 --- a/www/plugins/graph/templates/currency/view_currency_extend.html +++ b/www/plugins/graph/templates/currency/view_currency_extend.html @@ -4,7 +4,7 @@ <ng-if ng-if="!smallscreen"> <div class="item padding-left padding-right no-padding-xs no-padding-sm" - ng-include="'plugins/graph/templates/currency/graph_monetary_mass.html'" + ng-include="::'plugins/graph/templates/currency/graph_monetary_mass.html'" ng-controller="GpCurrencyMonetaryMassCtrl" ng-init="displayShareAxis=false;"> </div> @@ -30,7 +30,7 @@ <ng-if ng-if="!smallscreen"> <div class="item padding-left padding-right no-padding-xs no-padding-sm" - ng-include="'plugins/graph/templates/currency/graph_members_count.html'" + ng-include="::'plugins/graph/templates/currency/graph_members_count.html'" ng-controller="GpCurrencyMembersCountCtrl"> </div> <div class="item buttons no-padding-top "> @@ -55,7 +55,7 @@ <div class="item padding-left padding-right no-padding-xs no-padding-sm" ng-if="!smallscreen" - ng-include="'plugins/graph/templates/blockchain/graph_block_issuers.html'" + ng-include="::'plugins/graph/templates/blockchain/graph_block_issuers.html'" ng-controller="GpBlockchainIssuersCtrl"> </div> diff --git a/www/plugins/graph/templates/currency/view_stats_lg.html b/www/plugins/graph/templates/currency/view_stats_lg.html index 03abfb8bcdfe7874bef13dc477ff4753e26edfac..bf1c64ca43743e54fd8cf82f92e65c73d4927e34 100644 --- a/www/plugins/graph/templates/currency/view_stats_lg.html +++ b/www/plugins/graph/templates/currency/view_stats_lg.html @@ -18,7 +18,7 @@ </div> <div class="item no-padding-xs" ng-if="!loading" - ng-include="'plugins/graph/templates/currency/graph_monetary_mass.html'" + ng-include="::'plugins/graph/templates/currency/graph_monetary_mass.html'" ng-init="setSize(250, 1000)"> </div> @@ -38,7 +38,7 @@ <ng-controller ng-controller="GpCurrencyDUCtrl" > <div class="item no-padding-xs" ng-if="!loading" - ng-include="'plugins/graph/templates/currency/graph_du.html'" + ng-include="::'plugins/graph/templates/currency/graph_du.html'" ng-init="setSize(250, 1000)"> </div> </ng-controller> @@ -47,7 +47,7 @@ <ng-controller ng-controller="GpCurrencyMembersCountCtrl" > <div class="item no-padding-xs" ng-if="!loading" - ng-include="'plugins/graph/templates/currency/graph_members_count.html'" + ng-include="::'plugins/graph/templates/currency/graph_members_count.html'" ng-init="setSize(250, 1000)"> </div> diff --git a/www/plugins/graph/templates/docstats/graph.html b/www/plugins/graph/templates/docstats/graph.html index 7a9b7939f742949aae250f2096fa1bfc880812f8..1cf0bc404e5686826a34e6b946ded5f7403c5e25 100644 --- a/www/plugins/graph/templates/docstats/graph.html +++ b/www/plugins/graph/templates/docstats/graph.html @@ -20,4 +20,4 @@ chart-click="onChartClick"> </canvas> - <ng-include src="'plugins/graph/templates/common/graph_range_bar.html'"></ng-include> + <ng-include src="::'plugins/graph/templates/common/graph_range_bar.html'"></ng-include> diff --git a/www/plugins/graph/templates/docstats/view_stats.html b/www/plugins/graph/templates/docstats/view_stats.html index 88fc2cffd84b48596257842d7ae80ae415349ff5..4ea84231d65bdc98e1f527300e4813fa221e02ae 100644 --- a/www/plugins/graph/templates/docstats/view_stats.html +++ b/www/plugins/graph/templates/docstats/view_stats.html @@ -15,7 +15,7 @@ <div class="item no-padding-xs no-padding-sm" ng-if="!loading" ng-repeat="chart in charts" - ng-include="'plugins/graph/templates/docstats/graph.html'" + ng-include="::'plugins/graph/templates/docstats/graph.html'" ng-init="setSize(250, 1000)"> </div> diff --git a/www/plugins/graph/templates/network/view_peer_stats.html b/www/plugins/graph/templates/network/view_peer_stats.html index bc552a2e860218b828db6d97b1bcfc73b70e2a64..92845974ddb9056bf62dfb981e58bff8cb0d0453 100644 --- a/www/plugins/graph/templates/network/view_peer_stats.html +++ b/www/plugins/graph/templates/network/view_peer_stats.html @@ -18,7 +18,7 @@ </div> <div class="item no-padding-xs" - ng-include="'plugins/graph/templates/blockchain/graph_tx_count.html'" + ng-include="::'plugins/graph/templates/blockchain/graph_tx_count.html'" ng-init="setSize(350, 1000)"> </div> diff --git a/www/plugins/graph/templates/synchro/graph.html b/www/plugins/graph/templates/synchro/graph.html index 19ac3b723b553020daf60208a1d88f7541e063f9..cfd3ba8f5caa8446e19f6f004e329da5de53a4ff 100644 --- a/www/plugins/graph/templates/synchro/graph.html +++ b/www/plugins/graph/templates/synchro/graph.html @@ -19,4 +19,4 @@ chart-options="chart.options"> </canvas> - <ng-include src="'plugins/graph/templates/common/graph_range_bar.html'"></ng-include> + <ng-include src="::'plugins/graph/templates/common/graph_range_bar.html'"></ng-include> diff --git a/www/plugins/graph/templates/synchro/view_stats.html b/www/plugins/graph/templates/synchro/view_stats.html index e7275137a062e666d4461b4979a84232befc29dd..ac9d18b1d4074f6adf041267803a91b3faf4b2c7 100644 --- a/www/plugins/graph/templates/synchro/view_stats.html +++ b/www/plugins/graph/templates/synchro/view_stats.html @@ -14,7 +14,7 @@ <div class="item no-padding-xs" ng-if="!loading" ng-repeat="chart in charts" - ng-include="'plugins/graph/templates/synchro/graph.html'" + ng-include="::'plugins/graph/templates/synchro/graph.html'" ng-init="setSize(250, 1000)"> </div> diff --git a/www/templates/api/home.html b/www/templates/api/home.html index 852bbf79597429ae39491f639c61101f697b9b7a..f838f5028aba086a5c82b683ac3ef536bd1067ac 100644 --- a/www/templates/api/home.html +++ b/www/templates/api/home.html @@ -31,7 +31,7 @@ <div class="light-bg no-padding"> <!-- include documentation --> - <ng-include src="'templates/api/doc.html'"></ng-include> + <ng-include src="::'templates/api/doc.html'"></ng-include> </div> </div> diff --git a/www/templates/api/transfer.html b/www/templates/api/transfer.html index f0520fcff6102b399b9135b1b14d08af7f823743..dbd18ae7f8085e1451bc3ad767c631933b224b66 100644 --- a/www/templates/api/transfer.html +++ b/www/templates/api/transfer.html @@ -45,7 +45,7 @@ </div> </div> - <ng-include src="'templates/login/form_login.html'"></ng-include> + <ng-include src="::'templates/login/form_login.html'"></ng-include> </div> <br class="hidden-xs"/> diff --git a/www/templates/blockchain/item_block.html b/www/templates/blockchain/item_block.html index 49714cdc65c47d360100b6e6e377060038b22243..e9eec8709e7101a894aea65a7e9b3720f4ab87cc 100644 --- a/www/templates/blockchain/item_block.html +++ b/www/templates/blockchain/item_block.html @@ -1,19 +1,19 @@ -<a name="block-{{:rebind:block.number}}"></a> -<ion-item id="block-{{:rebind:block.number}}" +<a name="block-{{::block.number}}"></a> +<ion-item id="block-{{::block.number}}" class="item item-icon-left item-block {{::ionItemClass}}" - ng-class="{'ink': !block.empty||!block.compacted, 'item-block-empty': block.empty, 'compacted': block.compacted && compactMode}" + ng-class=":rebind:{'ink': !block.empty||!block.compacted, 'item-block-empty': block.empty, 'compacted': block.compacted && compactMode}" ng-click="selectBlock(block)"> - <i class="icon ion-cube stable" ng-if=":rebind:(!block.empty && !block.avatar)"></i> - <i class="avatar" ng-if=":rebind:!block.empty && block.avatar" style="background-image: url('{{:rebind:block.avatar.src}}')"></i> + <i class="icon ion-cube stable" ng-if="(!block.empty && !block.avatar)"></i> + <i class="avatar" ng-if="!block.empty && block.avatar" style="background-image: url('{{block.avatar.src}}')"></i> <div class="row no-padding" ng-if=":rebind:!block.compacted || !compactMode"> <div class="col" style="min-width: 110px; max-width: 130px;"> - <h4 ng-class="{'gray': block.compacted, 'dark': !block.compacted}"> + <h4 ng-class=":rebind:{'gray': block.compacted, 'dark': !block.compacted}"> <i class="ion-clock"></i> {{:rebind:block.medianTime|medianDate}} </h4> - <h4 ng-if="!block.empty"> + <h4 ng-if=":rebind:!block.empty"> <!-- joiners/leavers --> <ng-if ng-if=":rebind:block.joinersCount||(block.excludedCount-block.revokedCount)"> <i class="dark ion-person"></i> @@ -33,7 +33,7 @@ </div> <div class="col col-20"> - <span class="badge " ng-class="{'badge-balanced': !$index , 'badge-calm': $index && !block.compacted && !block.empty}">{{:rebind:block.number|formatInteger}}</span> + <span class="badge " ng-class=":rebind:{'badge-balanced': !$index , 'badge-calm': $index && !block.compacted && !block.empty}">{{::block.number|formatInteger}}</span> </div> </div> diff --git a/www/templates/blockchain/item_block_empty_lg.html b/www/templates/blockchain/item_block_empty_lg.html index aa217c2a0927197a2b4375f3497cf1f9354558fe..512e7e13fcd6aaed1ff7e2cc622a683fc06d32c1 100644 --- a/www/templates/blockchain/item_block_empty_lg.html +++ b/www/templates/blockchain/item_block_empty_lg.html @@ -1,7 +1,7 @@ <a name="block-{{::block.number}}"></a> <div id="block-{{::block.number}}" class="item item-block item-icon-left item-block-empty" - ng-class="{'compacted': block.compacted && compactMode}" + ng-class=":rebind:{'compacted': block.compacted && compactMode}" ng-click="selectBlock(block)" > <div class="row no-padding" ng-if=":rebind:!block.compacted || !compactMode"> diff --git a/www/templates/blockchain/items_blocks.html b/www/templates/blockchain/items_blocks.html index 939336dcccce373c4eb0ff03b5b229c6634a285b..2c73f5a70b6a7bd0253225a182eb0169224ccf27 100644 --- a/www/templates/blockchain/items_blocks.html +++ b/www/templates/blockchain/items_blocks.html @@ -7,8 +7,8 @@ BLOCKCHAIN.LOOKUP.NO_BLOCK </div> <!-- blocks --> - <ng-repeat ng-repeat="block in :rebind:search.results track by block.number" - ng-include="'templates/blockchain/item_block.html'"> + <ng-repeat ng-repeat="block in search.results track by block.number" + ng-include="::'templates/blockchain/item_block.html'"> </ng-repeat> </ion-list> diff --git a/www/templates/blockchain/list_blocks.html b/www/templates/blockchain/list_blocks.html index 5721ec6695adbd646e8b009a4a7491abf6a520f4..aa466453358d2b0d98ac8f811557d0525830a7c4 100644 --- a/www/templates/blockchain/list_blocks.html +++ b/www/templates/blockchain/list_blocks.html @@ -8,8 +8,8 @@ BLOCKCHAIN.LOOKUP.NO_BLOCK </div> <!-- blocks --> - <ng-repeat ng-repeat="block in :rebind:search.results track by block.number" - ng-include="'templates/blockchain/item_block.html'"> + <ng-repeat ng-repeat="block in search.results track by block.number" + ng-include="::'templates/blockchain/item_block.html'"> </ng-repeat> </ion-list> diff --git a/www/templates/blockchain/list_blocks_lg.html b/www/templates/blockchain/list_blocks_lg.html index 8d8d1ca97d0161951466502c6c09bc564d836190..3502ff3df2de6568a7be9f3cfa4b56c6c7d57833 100644 --- a/www/templates/blockchain/list_blocks_lg.html +++ b/www/templates/blockchain/list_blocks_lg.html @@ -8,7 +8,7 @@ <i class="icon ion-navicon"></i> <b class="ion-arrow-down-b" style="position: absolute; top: -2px; left: 4px; font-size: 8px;"></b> <b class="ion-arrow-up-b" style="position: absolute; top: 10px; left: 4px; font-size: 8px;"></b> - <span>{{'BLOCKCHAIN.LOOKUP.BTN_COMPACT'|translate}}</span> + <span>{{:locale:'BLOCKCHAIN.LOOKUP.BTN_COMPACT'|translate}}</span> </a> </div> </div> @@ -18,8 +18,8 @@ </div> <ion-list class="padding padding-xs list-blocks {{::motion.ionListClass}}"> - <div class="padding gray" ng-if="!search.loading && !search.results.length" translate> - BLOCKCHAIN.LOOKUP.NO_BLOCK + <div class="padding gray" ng-if="!search.loading && !search.results.length"> + {{:locale:'BLOCKCHAIN.LOOKUP.NO_BLOCK'|translate}} </div> <!-- blocks --> <ng-repeat ng-repeat="block in search.results track by block.id" diff --git a/www/templates/blockchain/lookup.html b/www/templates/blockchain/lookup.html index 92f845adf53f150b7863e6e8a65028f2bd2c1ab0..6a244ff9bcaf22ed628e7319bb6c8307bd87a3a0 100644 --- a/www/templates/blockchain/lookup.html +++ b/www/templates/blockchain/lookup.html @@ -5,6 +5,6 @@ <ion-content class="padding no-padding-xs" scroll="true"> - <ng-include src="'templates/blockchain/list_blocks.html'"></ng-include> + <ng-include src="::'templates/blockchain/list_blocks.html'"></ng-include> </ion-content> </ion-view> diff --git a/www/templates/blockchain/lookup_lg.html b/www/templates/blockchain/lookup_lg.html index 50d70256962ccceb27b4177a26395a99488a0340..6b386d8e39a7b985a767df68766112c5c9fea1c7 100644 --- a/www/templates/blockchain/lookup_lg.html +++ b/www/templates/blockchain/lookup_lg.html @@ -4,6 +4,6 @@ </ion-nav-title> <ion-content class="padding no-padding-xs no-padding-sm" scroll="true"> - <ng-include src="'templates/blockchain/list_blocks_lg.html'"></ng-include> + <ng-include src="::'templates/blockchain/list_blocks_lg.html'"></ng-include> </ion-content> </ion-view> diff --git a/www/templates/blockchain/view_block.html b/www/templates/blockchain/view_block.html index 9493a1e2b5bb176956e1fbbb8edb725b7b189b3e..a55030332ca34c04c1da0717bd749b55d9a8c665 100644 --- a/www/templates/blockchain/view_block.html +++ b/www/templates/blockchain/view_block.html @@ -150,7 +150,7 @@ <div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.identitiesCount"> <ion-item ng-repeat="identity in ::formData.identities" class="item-border-large item-small-height" - ng-include="'templates/blockchain/link_identity.html'"> + ng-include="::'templates/blockchain/link_identity.html'"> </ion-item> </div> </ng-if> @@ -167,7 +167,7 @@ <div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.joinersCount"> <ion-item ng-repeat="identity in ::formData.joiners" class="item-border-large item-small-height" - ng-include="'templates/blockchain/link_identity.html'"> + ng-include="::'templates/blockchain/link_identity.html'"> </ion-item> </div> </ng-if> @@ -186,7 +186,7 @@ <div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.activesCount"> <ion-item ng-repeat="identity in ::formData.actives" class="item-border-large item-small-height" - ng-include="'templates/blockchain/link_identity.html'"> + ng-include="::'templates/blockchain/link_identity.html'"> </ion-item> </div> </ng-if> @@ -205,7 +205,7 @@ <div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.excludedCount"> <ion-item ng-repeat="identity in ::formData.excluded" class="item-border-large item-small-height" - ng-include="'templates/blockchain/link_identity.html'"> + ng-include="::'templates/blockchain/link_identity.html'"> </ion-item> </div> </ng-if> @@ -224,7 +224,7 @@ <div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.leaversCount"> <ion-item ng-repeat="identity in ::formData.leavers" class="item-border-large item-small-height" - ng-include="'templates/blockchain/link_identity.html'"> + ng-include="::'templates/blockchain/link_identity.html'"> </ion-item> </div> </ng-if> @@ -243,7 +243,7 @@ <div class="padding-bottom item-icon-left-padding item-icon-right-padding" ng-if="formData.revokedCount"> <ion-item ng-repeat="identity in ::formData.revoked" class="item-border-large item-small-height" - ng-include="'templates/blockchain/link_identity.html'"> + ng-include="::'templates/blockchain/link_identity.html'"> </ion-item> </div> </ng-if> @@ -262,7 +262,7 @@ <div class="row no-padding"> <div class="col col-center no-padding"> <ng-repeat ng-repeat="cert in certs"> - <ng-include src="'templates/blockchain/link_identity.html'" onload="identity=cert.from"></ng-include> + <ng-include src="::'templates/blockchain/link_identity.html'" onload="identity=cert.from"></ng-include> <br/> </ng-repeat> </div> @@ -270,7 +270,7 @@ <h2><i class="icon ion-arrow-right-a" ></i></h2> </div> <div class="col col-40 col-center no-padding" - ng-include="'templates/blockchain/link_identity.html'" + ng-include="::'templates/blockchain/link_identity.html'" onload="identity=certs[0].to"> </div> </div> diff --git a/www/templates/currency/items_network.html b/www/templates/currency/items_network.html index 42924b37d5d45aa909ab5d8160a756882b516ddb..8f1e36b723ba2af1a69ddabd87c77532b237c5cd 100644 --- a/www/templates/currency/items_network.html +++ b/www/templates/currency/items_network.html @@ -53,4 +53,4 @@ </div> </div> - <ng-include src="'templates/network/items_peers.html'" ></ng-include> + <ng-include src="::'templates/network/items_peers.html'" ></ng-include> diff --git a/www/templates/currency/lookup.html b/www/templates/currency/lookup.html index 8ba924024b919b5f6107ad5f2d55df0011d599b1..67d776b15d4cd800f7d2121efe9786f6a0e20979 100644 --- a/www/templates/currency/lookup.html +++ b/www/templates/currency/lookup.html @@ -2,6 +2,6 @@ <ion-content class="padding no-padding-xs no-padding-sm"> <h4 class="content double-padding-x" translate>CURRENCY.SELECT.CURRENCIES</h4> - <ng-include src="'templates/currency/lookup_form.html'"/> + <ng-include src="::'templates/currency/lookup_form.html'"/> </ion-content> </ion-view> diff --git a/www/templates/currency/tabs/tab_blocks.html b/www/templates/currency/tabs/tab_blocks.html index dc7e4c0fada74dbde7efc9ec68213750a17302f7..f97b25fe2cdc9b96337d57e8a57fa260269eff31 100644 --- a/www/templates/currency/tabs/tab_blocks.html +++ b/www/templates/currency/tabs/tab_blocks.html @@ -22,6 +22,6 @@ <cs-extension-point name="buttons"></cs-extension-point> - <ng-include src="'templates/blockchain/list_blocks.html'"></ng-include> + <ng-include src="::'templates/blockchain/list_blocks.html'"></ng-include> </ion-content> </ion-view> diff --git a/www/templates/currency/tabs/tab_network.html b/www/templates/currency/tabs/tab_network.html index 95632439ec38a9ec2636b542171ec45d42f86932..e205ea5454d9e3ff5a4fab5ffb6ded928cf51e30 100644 --- a/www/templates/currency/tabs/tab_network.html +++ b/www/templates/currency/tabs/tab_network.html @@ -14,7 +14,7 @@ </ion-refresher> <div class="list"> - <ng-include src="'templates/currency/items_network.html'"></ng-include> + <ng-include src="::'templates/currency/items_network.html'"></ng-include> </div> </ion-content> </ion-view> diff --git a/www/templates/currency/tabs/tab_parameters.html b/www/templates/currency/tabs/tab_parameters.html index 5c0cbee6512cb2f6d9273210c1d48faf2e3f754f..16ba634fe696197d9a89b9247f74d7e0bbd146b9 100644 --- a/www/templates/currency/tabs/tab_parameters.html +++ b/www/templates/currency/tabs/tab_parameters.html @@ -11,7 +11,7 @@ </ion-refresher> <div class="list"> - <ng-include src="'templates/currency/items_parameters.html'"></ng-include> + <ng-include src="::'templates/currency/items_parameters.html'"></ng-include> </div> </ion-content> </ion-view> diff --git a/www/templates/currency/tabs/tab_wot.html b/www/templates/currency/tabs/tab_wot.html index aa5f02bbb6107b7a20f5e7270e11dd0c96c898d6..b00e9b601f820b1ca839ad1ebd796e2f11e0b82d 100644 --- a/www/templates/currency/tabs/tab_wot.html +++ b/www/templates/currency/tabs/tab_wot.html @@ -4,7 +4,7 @@ on-refresh="refresh()"> </ion-refresher> <div class="list"> - <ng-include src="'templates/currency/items_wot.html'"></ng-include> + <ng-include src="::'templates/currency/items_wot.html'"></ng-include> </div> </ion-content> </ion-view> diff --git a/www/templates/currency/view_currency_lg.html b/www/templates/currency/view_currency_lg.html index a22a266202b65781fde6d91efb7d214ffecc61ed..79940a809dade8194236943f83fd710dc579d43d 100644 --- a/www/templates/currency/view_currency_lg.html +++ b/www/templates/currency/view_currency_lg.html @@ -56,7 +56,7 @@ <div class="item item-divider"> <span translate>CURRENCY.VIEW.MONEY_DIVIDER</span> </div> - <ng-include src="'templates/currency/items_parameters.html'"></ng-include> + <ng-include src="::'templates/currency/items_parameters.html'"></ng-include> </div> @@ -65,7 +65,7 @@ <div class="item item-divider"> <span translate>CURRENCY.VIEW.WOT_DIVIDER</span> </div> - <ng-include src="'templates/currency/items_wot.html'"></ng-include> + <ng-include src="::'templates/currency/items_wot.html'"></ng-include> </div> </div> diff --git a/www/templates/help/modal_help.html b/www/templates/help/modal_help.html index c381d1a7c0c52844722ed8bb3708555ea0146529..e885806552f52718d311652354f776d8017f34f5 100644 --- a/www/templates/help/modal_help.html +++ b/www/templates/help/modal_help.html @@ -10,7 +10,7 @@ <ion-content scroll="true" class="padding no-padding-xs"> <div ng-class="listClass"> - <ng-include src="'templates/help/help.html'"></ng-include> + <ng-include src="::'templates/help/help.html'"></ng-include> </div> <div class="padding hidden-xs text-center"> diff --git a/www/templates/help/view_help.html b/www/templates/help/view_help.html index 4f050ce8eb924a55baa83ccc8211783a8ff3a46f..7adbf3d4b4986eb50cf32a5b629a3e3af6064d93 100644 --- a/www/templates/help/view_help.html +++ b/www/templates/help/view_help.html @@ -7,7 +7,7 @@ <h1 class="hidden-xs hidden-sm" translate>HELP.TITLE</h1> - <ng-include src="'templates/help/help.html'"></ng-include> + <ng-include src="::'templates/help/help.html'"></ng-include> </ion-content> </ion-view> diff --git a/www/templates/login/form_login.html b/www/templates/login/form_login.html index 8fe264bc7bc8892e13a89c2512700702b792bbca..084e0746b42c6384cd7b3ca94c1c8827a9fcfd40 100644 --- a/www/templates/login/form_login.html +++ b/www/templates/login/form_login.html @@ -26,22 +26,22 @@ <!-- Form content, depending of the login method --> <div ng-switch-when="SCRYPT_DEFAULT"> - <ng-include src="'templates/login/form_scrypt.html'"></ng-include> + <ng-include src="::'templates/login/form_scrypt.html'"></ng-include> </div> <div ng-switch-when="SCRYPT_ADVANCED"> - <ng-include src="'templates/login/form_scrypt_advanced.html'"></ng-include> + <ng-include src="::'templates/login/form_scrypt_advanced.html'"></ng-include> </div> <div ng-switch-when="PUBKEY"> - <ng-include src="'templates/login/form_pubkey.html'"></ng-include> + <ng-include src="::'templates/login/form_pubkey.html'"></ng-include> </div> <div ng-switch-when="FILE"> - <ng-include src="'templates/login/form_file_import.html'"></ng-include> + <ng-include src="::'templates/login/form_file_import.html'"></ng-include> </div> <div ng-switch-when="SCAN"> - <ng-include src="'templates/login/form_scan.html'"></ng-include> + <ng-include src="::'templates/login/form_scan.html'"></ng-include> </div> <div ng-switch-default> - <ng-include src="'templates/login/form_scrypt.html'"></ng-include> + <ng-include src="::'templates/login/form_scrypt.html'"></ng-include> </div> </div> diff --git a/www/templates/login/form_scrypt_advanced.html b/www/templates/login/form_scrypt_advanced.html index 304993129ed0f93cf38eba08835ccf76e7b1db76..e7f21f3b1b4b6cee87595dd42dcd05c4fbbbfd8a 100644 --- a/www/templates/login/form_scrypt_advanced.html +++ b/www/templates/login/form_scrypt_advanced.html @@ -51,5 +51,5 @@ <span translate>INFO.FEATURES_NOT_IMPLEMENTED</span> </p> -<ng-include src="'templates/login/form_scrypt.html'"></ng-include> +<ng-include src="::'templates/login/form_scrypt.html'"></ng-include> diff --git a/www/templates/login/modal_login.html b/www/templates/login/modal_login.html index dd3796a354bc174bac0754956025bcb129563831..3fd53fb7b2c79be8a4f8b3138af7ab480aca6e1b 100644 --- a/www/templates/login/modal_login.html +++ b/www/templates/login/modal_login.html @@ -17,6 +17,6 @@ </ion-header-bar> <ion-content scroll="true"> - <ng-include src="'templates/login/form_login.html'"></ng-include> + <ng-include src="::'templates/login/form_login.html'"></ng-include> </ion-content> </ion-modal-view> diff --git a/www/templates/network/item_content_peer.html b/www/templates/network/item_content_peer.html index 54a79865e2bddd1a92c7bbbf82efeea84b719b0d..5ccee2c5ffbf80e9af9a8ccc3c40e2961aba3f49 100644 --- a/www/templates/network/item_content_peer.html +++ b/www/templates/network/item_content_peer.html @@ -5,13 +5,13 @@ <b class="icon-secondary ion-person" ng-if=":rebind:!peer.avatar" ng-class=":rebind:{'balanced': peer.online && peer.hasMainConsensusBlock, 'energized': peer.online && peer.hasConsensusBlock, 'gray': peer.online && !peer.hasConsensusBlock && !peer.hasMainConsensusBlock, 'stable': !peer.online}" style="left: 26px; top: -3px;"></b> - <i class="avatar" ng-if=":rebind:peer.avatar" style="background-image: url('{{:rebind:peer.avatar.src}}')"></i> + <i class="avatar" ng-if="::peer.avatar" style="background-image: url('{{::peer.avatar.src}}')"></i> <b class="icon-secondary assertive ion-close-circled" ng-if=":rebind:!peer.online" style="left: 37px; top: -10px;"></b> <div class="row no-padding"> <div class="col no-padding"> <h3 class="dark" ng-if=":rebind:!peer.bma.private">{{:rebind:peer.dns || peer.server}}</h3> - <h4 class="gray" ng-if=":rebind:peer.bma.private"><i class="ion-flash"></i> {{'NETWORK.VIEW.PRIVATE_ACCESS'|translate}}</h4> + <h4 class="gray" ng-if=":rebind:peer.bma.private"><i class="ion-flash"></i> {{:locale:'NETWORK.VIEW.PRIVATE_ACCESS'|translate}}</h4> <h4> <span class="gray" ng-if=":rebind:!peer.uid"> <i class="ion-key"></i> {{:rebind:peer.pubkey|formatPubkey}} @@ -61,7 +61,7 @@ <div class="col col-20 no-padding text-center"> <span id="{{$index === 0 ? helptipPrefix + '-peer-0-block' : ''}}" class="badge" ng-class=":rebind:{'badge-balanced': peer.hasMainConsensusBlock, 'badge-energized': peer.hasConsensusBlock, 'ng-hide': !peer.currentNumber && !peer.blockNumber }"> - {{::!expertMode ? ('COMMON.BLOCK'|translate) : '' }} + {{:locale:!expertMode ? ('COMMON.BLOCK'|translate) : '' }} {{:rebind:(peer.currentNumber || peer.blockNumber) | formatInteger}}</span> <span class="badge badge-secondary" ng-if=":rebind:peer.consensusBlockDelta && expertMode"> <i class="ion-clock"></i> diff --git a/www/templates/network/items_peers.html b/www/templates/network/items_peers.html index 48e4be65d0e852a685277e042d87cbb5d17ea4dd..91d8f10491f32af3eca9aca23e43b8196392011c 100644 --- a/www/templates/network/items_peers.html +++ b/www/templates/network/items_peers.html @@ -1,34 +1,34 @@ <div class="no-padding {{::motion.ionListClass}}"> <div class="item item-text-wrap no-border done in gray no-padding-top no-padding-bottom inline text-italic" ng-if="::isHttps && expertMode"> - <small><i class="icon ion-alert-circled"></i> {{'NETWORK.INFO.ONLY_SSL_PEERS'|translate}}</small> + <small><i class="icon ion-alert-circled"></i> {{:locale:'NETWORK.INFO.ONLY_SSL_PEERS'|translate}}</small> </div> <div class="item row row-header hidden-xs hidden-sm done in" ng-if="::expertMode"> <a class="col col-header no-padding dark" ng-click="toggleSort('uid')"> <cs-sort-icon asc="search.asc" sort="search.sort" toggle="'uid'"></cs-sort-icon> - {{'COMMON.UID' | translate}} / {{'COMMON.PUBKEY' | translate}} + {{:locale:'COMMON.UID' | translate}} / {{:locale:'COMMON.PUBKEY' | translate}} </a> <!-- API header --> <a class="no-padding dark hidden-md col col-15 col-header" ng-click="toggleSort('api')" ng-if=":rebind:!compactMode"> <cs-sort-icon asc="search.asc" sort="search.sort" toggle="'api'"></cs-sort-icon> - {{'PEER.API' | translate}} + {{:locale:'PEER.API' | translate}} </a> <div class="no-padding dark hidden-md col col-15 col-header" ng-if=":rebind:compactMode"></div> <a class="no-padding dark col col-20 col-header" ng-click="toggleSort('difficulty')"> <cs-sort-icon asc="search.asc" sort="search.sort" toggle="'difficulty'"></cs-sort-icon> - {{'PEER.DIFFICULTY' | translate}} + {{:locale:'PEER.DIFFICULTY' | translate}} </a> <a class="col col-20 col-header no-padding dark" ng-click="toggleSort('current_block')"> <cs-sort-icon asc="search.asc" sort="search.sort" toggle="'current_block'"></cs-sort-icon> - {{'PEER.CURRENT_BLOCK' | translate}} + {{:locale:'PEER.CURRENT_BLOCK' | translate}} </a> </div> - <div ng-repeat="peer in :rebind:search.results track by peer.id" + <div ng-repeat="peer in search.results track by peer.id" class="item item-peer item-icon-left ink {{::ionItemClass}}" ng-class=":rebind:{'compacted': peer.compacted && compactMode}" id="{{::helptipPrefix}}-peer-{{::$index}}" diff --git a/www/templates/network/modal_network.html b/www/templates/network/modal_network.html index c627cd7029478fc41467868d23cfdd8bd27e9ae4..e64b4d15c3dadcd1e563abf3c9605a1a4974c2f3 100644 --- a/www/templates/network/modal_network.html +++ b/www/templates/network/modal_network.html @@ -50,7 +50,7 @@ </div> </div> - <ng-include src="'templates/network/items_peers.html'"></ng-include> + <ng-include src="::'templates/network/items_peers.html'"></ng-include> </div> </ion-content> diff --git a/www/templates/network/popover_network.html b/www/templates/network/popover_network.html index c62df9e33a043ee1c5b91f0baa4e8d449d15c5ee..04a2e9d7b3db6b9a685be313a6c4ab0aa78bcfba 100644 --- a/www/templates/network/popover_network.html +++ b/www/templates/network/popover_network.html @@ -14,7 +14,7 @@ </ion-header-bar> <ion-content scroll="true"> <div class="list no-padding"> - <ng-include src="'templates/network/items_peers.html'"></ng-include> + <ng-include src="::'templates/network/items_peers.html'"></ng-include> </div> </ion-content> diff --git a/www/templates/network/view_network.html b/www/templates/network/view_network.html index 15c7f6d25a46782e9f673a913f17c7e72a4ec375..98ae3d18188eca2b4dd86ceddd304a8d9f830240 100644 --- a/www/templates/network/view_network.html +++ b/www/templates/network/view_network.html @@ -34,12 +34,12 @@ <i class="icon ion-navicon"></i> <b class="ion-arrow-down-b" style="position: absolute; top: -2px; left: 4px; font-size: 8px;"></b> <b class="ion-arrow-up-b" style="position: absolute; top: 10px; left: 4px; font-size: 8px;"></b> - <span>{{'BLOCKCHAIN.LOOKUP.BTN_COMPACT'|translate}}</span> + <span>{{:locale:'BLOCKCHAIN.LOOKUP.BTN_COMPACT'|translate}}</span> </a> <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}}" + title="{{:locale:'PEER.MEMBER_PEERS'|translate}}" ng-click="toggleSearchType('member')"> <i class="icon ion-person-stalker"></i> {{'PEER.MEMBERS'|translate}} @@ -50,7 +50,7 @@ title="{{'PEER.MIRROR_PEERS'|translate}}" ng-click="toggleSearchType('mirror')" > <i class="icon ion-radio-waves"></i> - {{'PEER.MIRRORS'|translate}} + {{:locale:'PEER.MIRRORS'|translate}} </a> <a class="button button-text button-small hidden-xs hidden-sm ink" @@ -58,7 +58,7 @@ title="{{'PEER.OFFLINE_PEERS'|translate}}" ng-click="toggleSearchType('offline')" > <i class="icon ion-close-circled light-gray"></i> - <span>{{'PEER.OFFLINE'|translate}}</span> + <span>{{:locale:'PEER.OFFLINE'|translate}}</span> </a> <!-- Allow extension here --> @@ -71,7 +71,7 @@ <div id="helptip-network-blockchain" style="display: block"></div> <div id="helptip-network-peers" style="display: block"></div> - <ng-include src="'templates/network/items_peers.html'"></ng-include> + <ng-include src="::'templates/network/items_peers.html'"></ng-include> </div> <div class="col col-33" ng-controller="BlockLookupCtrl"> @@ -86,7 +86,7 @@ <i class="icon ion-navicon"></i> <b class="icon-secondary ion-arrow-down-b" style="top: -8px; left: 5px; font-size: 8px;"></b> <b class="icon-secondary ion-arrow-up-b" style="top: 4px; left: 5px; font-size: 8px;"></b> - <span>{{'BLOCKCHAIN.LOOKUP.BTN_COMPACT'|translate}}</span> + <span>{{:locale:'BLOCKCHAIN.LOOKUP.BTN_COMPACT'|translate}}</span> </a> <!-- Allow extension here --> @@ -95,7 +95,7 @@ </div> </div> - <ng-include src="'templates/blockchain/list_blocks.html'"></ng-include> + <ng-include src="::'templates/blockchain/list_blocks.html'"></ng-include> </div> </div> </ion-content> diff --git a/www/templates/network/view_peer.html b/www/templates/network/view_peer.html index b081f75939d63df63d3250f134743a2f5048d832..aa096e35fbb9e94bedbe3bfa496793af315d05e8 100644 --- a/www/templates/network/view_peer.html +++ b/www/templates/network/view_peer.html @@ -123,7 +123,7 @@ <div ng-repeat="peer in :rebind:peers track by peer.id" class="item item-peer item-icon-left ink {{::ionItemClass}}" ng-click="selectPeer(peer)" - ng-include="'templates/network/item_content_peer.html'"> + ng-include="::'templates/network/item_content_peer.html'"> </div> </div> diff --git a/www/templates/wallet/list/modal_wallets.html b/www/templates/wallet/list/modal_wallets.html index cd2d769a8b6942d91ce6d2d2e525735f5fdb6527..7c5d22160ff5d69100bfa999d69caa0358942c28 100644 --- a/www/templates/wallet/list/modal_wallets.html +++ b/www/templates/wallet/list/modal_wallets.html @@ -19,7 +19,7 @@ </ng-include> <ng-repeat ng-repeat="wallet in wallets track by wallet.id" - ng-include="'templates/wallet/list/item_wallet_light.html'"> + ng-include="::'templates/wallet/list/item_wallet_light.html'"> </ng-repeat> </ion-list> diff --git a/www/templates/wallet/list/popover_wallets.html b/www/templates/wallet/list/popover_wallets.html index 458d603b401be0f7407a96c8008ea7ecba547b18..d19a89e37404dfb14fdcdd905088ff3e1122a84b 100644 --- a/www/templates/wallet/list/popover_wallets.html +++ b/www/templates/wallet/list/popover_wallets.html @@ -24,7 +24,7 @@ </ng-include> <ng-repeat ng-repeat="wallet in :rebind:wallets | filter:filterFn(formData) track by wallet.id" - ng-include="'templates/wallet/list/item_wallet_light.html'"> + ng-include="::'templates/wallet/list/item_wallet_light.html'"> </ng-repeat> </ion-list> diff --git a/www/templates/wallet/modal_security.html b/www/templates/wallet/modal_security.html index fc3d7d67ca9e599ea3c6a66a791ca334a2445bbf..8632da1bad6504e72033cb9c3b8140a37d518482 100644 --- a/www/templates/wallet/modal_security.html +++ b/www/templates/wallet/modal_security.html @@ -132,28 +132,28 @@ </ion-slide-page> <ion-slide-page ng-if="option == 'revocation'"> - <ng-include src="'templates/wallet/slides/slides_revocation_file.html'"></ng-include> + <ng-include src="::'templates/wallet/slides/slides_revocation_file.html'"></ng-include> </ion-slide-page> <ion-slide-page ng-if="login && option == 'saveID'"> - <ng-include src="'templates/wallet/slides/slides_saveID_1.html'"></ng-include> + <ng-include src="::'templates/wallet/slides/slides_saveID_1.html'"></ng-include> </ion-slide-page> <ion-slide-page ng-if="login && option == 'saveID'"> - <ng-include src="'templates/wallet/slides/slides_saveID_2.html'"></ng-include> + <ng-include src="::'templates/wallet/slides/slides_saveID_2.html'"></ng-include> </ion-slide-page> <ion-slide-page ng-if="option == 'recoverID'"> - <ng-include src="'templates/wallet/slides/slides_recoverID_1.html'"></ng-include> + <ng-include src="::'templates/wallet/slides/slides_recoverID_1.html'"></ng-include> </ion-slide-page> <ion-slide-page ng-if="option == 'recoverID'"> - <ng-include src="'templates/wallet/slides/slides_recoverID_2.html'"></ng-include> + <ng-include src="::'templates/wallet/slides/slides_recoverID_2.html'"></ng-include> </ion-slide-page> <ion-slide-page ng-if="option == 'recoverID'"> - <ng-include src="'templates/wallet/slides/slides_recoverID_3.html'"></ng-include> + <ng-include src="::'templates/wallet/slides/slides_recoverID_3.html'"></ng-include> </ion-slide-page> <ion-slide-page ng-if="login && option == 'generateKeyfile'"> - <ng-include src="'templates/wallet/slides/slides_generate_keyfile.html'"></ng-include> + <ng-include src="::'templates/wallet/slides/slides_generate_keyfile.html'"></ng-include> </ion-slide-page> </ion-slides> diff --git a/www/templates/wallet/modal_transfer.html b/www/templates/wallet/modal_transfer.html index b79a969cf3c6efce396931a440240bb43c9ef4c6..3fe3a3c4609dcabe0362810a7a02613df59112bc 100644 --- a/www/templates/wallet/modal_transfer.html +++ b/www/templates/wallet/modal_transfer.html @@ -8,7 +8,7 @@ </ion-header-bar> <ion-content> - <ng-include src="'templates/wallet/transfer_form.html'"></ng-include> + <ng-include src="::'templates/wallet/transfer_form.html'"></ng-include> </ion-content> <!-- Digit keyboard - fix #30 --> <ion-digit-keyboard settings="digitKeyboardSettings" ng-if="digitKeyboardVisible"></ion-digit-keyboard> diff --git a/www/templates/wallet/new_transfer.html b/www/templates/wallet/new_transfer.html index d1a6fc1d45f5cfaeb9a9ba7192f1dc911ebf3b98..7e81b08b40c7e6ccd29c5a24fe5966aae9fe55d2 100644 --- a/www/templates/wallet/new_transfer.html +++ b/www/templates/wallet/new_transfer.html @@ -17,7 +17,7 @@ {{(formData.all ? 'TRANSFER.SUB_TITLE_ALL' : 'TRANSFER.SUB_TITLE')|translate}} </h2> <h4 class="hidden-xs hidden-sm"> </h4> - <ng-include src="'templates/wallet/transfer_form.html'"></ng-include> + <ng-include src="::'templates/wallet/transfer_form.html'"></ng-include> </div> <div class="col col-20 hidden-xs hidden-sm"> </div> </div> diff --git a/www/templates/wallet/view_wallet_tx.html b/www/templates/wallet/view_wallet_tx.html index 2090f10d3f8c00e5ca03fe8da227b2c700a55827..6471ef145a69f6c8efe4a9967c978df937f12adb 100644 --- a/www/templates/wallet/view_wallet_tx.html +++ b/www/templates/wallet/view_wallet_tx.html @@ -119,7 +119,7 @@ <div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.pendings" ng-init="pending=true;" - ng-include="'templates/wallet/item_tx.html'"> + ng-include="::'templates/wallet/item_tx.html'"> </div> </ng-if> diff --git a/www/templates/wallet/view_wallet_tx_error.html b/www/templates/wallet/view_wallet_tx_error.html index 9fd9439338c16be727adefe65ea78d55ef0cd118..f5502ed5078dce5b3de1ceeacf5b43e89e8e0349 100644 --- a/www/templates/wallet/view_wallet_tx_error.html +++ b/www/templates/wallet/view_wallet_tx_error.html @@ -51,7 +51,7 @@ <div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.errors | filter: filterReceivedTx" ng-init="pending=true;" - ng-include="'templates/wallet/item_tx.html'"> + ng-include="::'templates/wallet/item_tx.html'"> </div> <!-- Error sent TX --> @@ -73,7 +73,7 @@ <div class="item item-pending item-tx item-icon-left" ng-repeat="tx in formData.tx.errors | filter: filterSentTx" ng-init="error=true;" - ng-include="'templates/wallet/item_tx.html'"> + ng-include="::'templates/wallet/item_tx.html'"> </div> </div> diff --git a/www/templates/wot/items_given_certifications.html b/www/templates/wot/items_given_certifications.html index 68d37d34a399af15bd2b39ec5418f603905420c1..0cbd0b24c148f4aa05749ea3e49989be414b1ccf 100644 --- a/www/templates/wot/items_given_certifications.html +++ b/www/templates/wot/items_given_certifications.html @@ -34,7 +34,7 @@ <a class="item item-avatar ink" ng-repeat="cert in formData.given_cert_pending" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" - ng-include="'templates/wot/item_certification.html'"> + ng-include="::'templates/wot/item_certification.html'"> </a> <!-- validated given certifications --> @@ -50,6 +50,6 @@ <a class="item item-avatar ink" ng-repeat="cert in formData.given_cert" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" - ng-include="'templates/wot/item_certification.html'"> + ng-include="::'templates/wot/item_certification.html'"> </a> </div> diff --git a/www/templates/wot/items_received_certifications.html b/www/templates/wot/items_received_certifications.html index b09d4864e3efd6f75614a508afc7b28af441fc4b..d4ec0b91c2b56e44cf7239aa388388835f8c262d 100644 --- a/www/templates/wot/items_received_certifications.html +++ b/www/templates/wot/items_received_certifications.html @@ -38,7 +38,7 @@ <a class="item item-avatar ink" ng-repeat="cert in formData.received_cert_pending" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" - ng-include="'templates/wot/item_certification.html'"> + ng-include="::'templates/wot/item_certification.html'"> </a> <!-- valid certifications --> @@ -53,6 +53,6 @@ <a class="item item-avatar ink" ng-repeat="cert in formData.received_cert" ui-sref="app.wot_identity({pubkey:cert.pubkey, uid:cert.uid})" - ng-include="'templates/wot/item_certification.html'"> + ng-include="::'templates/wot/item_certification.html'"> </a> </div> diff --git a/www/templates/wot/lookup_form.html b/www/templates/wot/lookup_form.html index e2686ac67d4358a8aeb9ee39650f8af17a27a339..849b55fadb3235f69a72bcbdcea74d220a45652d 100644 --- a/www/templates/wot/lookup_form.html +++ b/www/templates/wot/lookup_form.html @@ -171,7 +171,7 @@ ng-model="item.checked" class="item item-border-large item-avatar ink" ng-click="toggleCheck($index, $event)"> - <ng-include src="'templates/wot/item_content_identity.html'"></ng-include> + <ng-include src="::'templates/wot/item_content_identity.html'"></ng-include> </ion-checkbox> </div> diff --git a/www/templates/wot/lookup_lg.html b/www/templates/wot/lookup_lg.html index bce9b2b851078936ad4dbbb3bb299bce13fea5f4..b033a6a9d6f36573f53ae54c2c20a2fcd5eabf95 100644 --- a/www/templates/wot/lookup_lg.html +++ b/www/templates/wot/lookup_lg.html @@ -19,6 +19,6 @@ <!-- Allow extension here --> <cs-extension-point name="top"></cs-extension-point> - <ng-include src="'templates/wot/lookup_form.html'"></ng-include> + <ng-include src="::'templates/wot/lookup_form.html'"></ng-include> </ion-content> </ion-view> diff --git a/www/templates/wot/modal_lookup.html b/www/templates/wot/modal_lookup.html index 2331bdf5ac1e0b1aa2aa8c5b28ca0972b903db03..617112e369ad7e3f07b4b92b5b95b48ffdf396f3 100644 --- a/www/templates/wot/modal_lookup.html +++ b/www/templates/wot/modal_lookup.html @@ -30,6 +30,6 @@ </button> </div> - <ng-include src="'templates/wot/lookup_form.html'"></ng-include> + <ng-include src="::'templates/wot/lookup_form.html'"></ng-include> </ion-content> </ion-modal-view> diff --git a/www/templates/wot/tabs/tab_given_certifications.html b/www/templates/wot/tabs/tab_given_certifications.html index 5a5c543195aeee4e6cb41d1591eb8d05c477229e..e3b57d0b998fcc502ebf39199747c0b88143b3d5 100644 --- a/www/templates/wot/tabs/tab_given_certifications.html +++ b/www/templates/wot/tabs/tab_given_certifications.html @@ -9,7 +9,7 @@ <ion-spinner icon="android"></ion-spinner> </div> - <ng-include src="'templates/wot/items_given_certifications.html'"></ng-include> + <ng-include src="::'templates/wot/items_given_certifications.html'"></ng-include> </ion-content> <!-- fab button --> diff --git a/www/templates/wot/tabs/tab_lookup.html b/www/templates/wot/tabs/tab_lookup.html index 4a8f304215a4a8d745eba7019e07e91b6d2c7a52..c377577f1d637d788b7abb9b4cbc63fca0110a72 100644 --- a/www/templates/wot/tabs/tab_lookup.html +++ b/www/templates/wot/tabs/tab_lookup.html @@ -18,6 +18,6 @@ <cs-extension-point name="buttons"></cs-extension-point> - <ng-include src="'templates/wot/lookup_form.html'"></ng-include> + <ng-include src="::'templates/wot/lookup_form.html'"></ng-include> </ion-content> </ion-view> diff --git a/www/templates/wot/tabs/tab_received_certifications.html b/www/templates/wot/tabs/tab_received_certifications.html index 98ee69959499aec77b8a88555948630bab189e38..5ffeb616bfe4afee3e27dd3d1ab7463e9981f04a 100644 --- a/www/templates/wot/tabs/tab_received_certifications.html +++ b/www/templates/wot/tabs/tab_received_certifications.html @@ -9,7 +9,7 @@ <ion-spinner icon="android"></ion-spinner> </div> - <ng-include src="'templates/wot/items_received_certifications.html'"></ng-include> + <ng-include src="::'templates/wot/items_received_certifications.html'"></ng-include> </ion-content> <!-- fab button --> diff --git a/www/templates/wot/view_certifications.html b/www/templates/wot/view_certifications.html index 609d29d16e63c4d6340ba620a81b21027f568832..91de2a53c0d191990c1f4dc47552b3870afa26ad 100644 --- a/www/templates/wot/view_certifications.html +++ b/www/templates/wot/view_certifications.html @@ -50,7 +50,7 @@ <div class="row responsive-sm responsive-md responsive-lg"> <!-- Received certifications --> <div class="col no-padding" ng-if="motions.receivedCertifications.enable"> - <ng-include src="'templates/wot/items_received_certifications.html'"></ng-include> + <ng-include src="::'templates/wot/items_received_certifications.html'"></ng-include> </div> <!-- Avatar --> @@ -91,7 +91,7 @@ <!-- Given certifications --> <div class="col no-padding" ng-if="motions.givenCertifications.enable"> - <ng-include src="'templates/wot/items_given_certifications.html'"></ng-include> + <ng-include src="::'templates/wot/items_given_certifications.html'"></ng-include> </div> </div> </ion-content>