diff --git a/Phraseanet-production-client/config/config.js b/Phraseanet-production-client/config/config.js index d19f8be8df..7c45c222c4 100644 --- a/Phraseanet-production-client/config/config.js +++ b/Phraseanet-production-client/config/config.js @@ -13,5 +13,5 @@ module.exports = { setupDir: _root + 'tests/setup/node.js', karmaConf: _root + 'config/karma.conf.js', // change this version when you change JS file for lazy loading - assetFileVersion: 87 + assetFileVersion: 88 }; diff --git a/Phraseanet-production-client/dist/authenticate.js b/Phraseanet-production-client/dist/authenticate.js index 37ad6f1893..c761818b11 100644 --- a/Phraseanet-production-client/dist/authenticate.js +++ b/Phraseanet-production-client/dist/authenticate.js @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=87"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=88"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/authenticate.min.js b/Phraseanet-production-client/dist/authenticate.min.js index 94a73c5e46..810502d244 100644 --- a/Phraseanet-production-client/dist/authenticate.min.js +++ b/Phraseanet-production-client/dist/authenticate.min.js @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=87"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=88"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/commons.js b/Phraseanet-production-client/dist/commons.js index f80b19bf7a..53ad4b829b 100644 --- a/Phraseanet-production-client/dist/commons.js +++ b/Phraseanet-production-client/dist/commons.js @@ -91,7 +91,7 @@ /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=87"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=88"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/commons.min.js b/Phraseanet-production-client/dist/commons.min.js index 6bf26f8695..3fc9ef229b 100644 --- a/Phraseanet-production-client/dist/commons.min.js +++ b/Phraseanet-production-client/dist/commons.min.js @@ -91,7 +91,7 @@ /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=87"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=88"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/production.js b/Phraseanet-production-client/dist/production.js index 67b10bd1fa..72e09dfc69 100644 --- a/Phraseanet-production-client/dist/production.js +++ b/Phraseanet-production-client/dist/production.js @@ -3882,7 +3882,6 @@ var workzoneFacets = function workzoneFacets(services) { if (match && match[2] != null) { // text looks like a color ! var colorCode = '#' + match[2]; - // add color circle and remove color code from text; var textWithoutColorCode = text.replace('[' + colorCode + ']', ''); if (textLimit > 0 && textWithoutColorCode.length > textLimit) { textWithoutColorCode = textWithoutColorCode.substring(0, textLimit) + '…'; @@ -3890,7 +3889,9 @@ var workzoneFacets = function workzoneFacets(services) { // patch type = "COLOR-AGGREGATE"; label = textWithoutColorCode; + textWithoutColorCode = (0, _jquery2.default)('
').text(textWithoutColorCode).html(); // escape html tooltip = _.escape(textWithoutColorCode); + title = ' ' + tooltip; } else { // keep text as it is, just cut if too long @@ -3898,7 +3899,7 @@ var workzoneFacets = function workzoneFacets(services) { text = text.substring(0, textLimit) + '…'; } label = text; - /*title = tooltip = _.escape(text);*/ + title = (0, _jquery2.default)('
').text(text).html(); // escape html } return { @@ -3952,8 +3953,6 @@ var workzoneFacets = function workzoneFacets(services) { treeSource = _shouldMaskNodes(treeSource, hiddenFacetsList); } - treeSource = _parseColors(treeSource); - treeSource = _colorUnsetText(treeSource); return _getFacetsTree().reload(treeSource).done(function () { @@ -3980,18 +3979,6 @@ var workzoneFacets = function workzoneFacets(services) { }); }; - function _parseColors(source) { - _.forEach(source, function (facet) { - if (!_.isUndefined(facet.children) && facet.children.length > 0) { - _.forEach(facet.children, function (child) { - var title = child.title; - child.title = _formatColorText(title.toString()); - }); - } - }); - return source; - } - function _formatColorText(string) { var textLimit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; diff --git a/Phraseanet-production-client/dist/production.min.js b/Phraseanet-production-client/dist/production.min.js index 67b10bd1fa..72e09dfc69 100644 --- a/Phraseanet-production-client/dist/production.min.js +++ b/Phraseanet-production-client/dist/production.min.js @@ -3882,7 +3882,6 @@ var workzoneFacets = function workzoneFacets(services) { if (match && match[2] != null) { // text looks like a color ! var colorCode = '#' + match[2]; - // add color circle and remove color code from text; var textWithoutColorCode = text.replace('[' + colorCode + ']', ''); if (textLimit > 0 && textWithoutColorCode.length > textLimit) { textWithoutColorCode = textWithoutColorCode.substring(0, textLimit) + '…'; @@ -3890,7 +3889,9 @@ var workzoneFacets = function workzoneFacets(services) { // patch type = "COLOR-AGGREGATE"; label = textWithoutColorCode; + textWithoutColorCode = (0, _jquery2.default)('
').text(textWithoutColorCode).html(); // escape html tooltip = _.escape(textWithoutColorCode); + title = ' ' + tooltip; } else { // keep text as it is, just cut if too long @@ -3898,7 +3899,7 @@ var workzoneFacets = function workzoneFacets(services) { text = text.substring(0, textLimit) + '…'; } label = text; - /*title = tooltip = _.escape(text);*/ + title = (0, _jquery2.default)('
').text(text).html(); // escape html } return { @@ -3952,8 +3953,6 @@ var workzoneFacets = function workzoneFacets(services) { treeSource = _shouldMaskNodes(treeSource, hiddenFacetsList); } - treeSource = _parseColors(treeSource); - treeSource = _colorUnsetText(treeSource); return _getFacetsTree().reload(treeSource).done(function () { @@ -3980,18 +3979,6 @@ var workzoneFacets = function workzoneFacets(services) { }); }; - function _parseColors(source) { - _.forEach(source, function (facet) { - if (!_.isUndefined(facet.children) && facet.children.length > 0) { - _.forEach(facet.children, function (child) { - var title = child.title; - child.title = _formatColorText(title.toString()); - }); - } - }); - return source; - } - function _formatColorText(string) { var textLimit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; diff --git a/Phraseanet-production-client/src/components/ui/workzone/facets/index.js b/Phraseanet-production-client/src/components/ui/workzone/facets/index.js index 2c7d177f30..b382bab083 100644 --- a/Phraseanet-production-client/src/components/ui/workzone/facets/index.js +++ b/Phraseanet-production-client/src/components/ui/workzone/facets/index.js @@ -78,7 +78,6 @@ const workzoneFacets = services => { if(match && match[2] != null) { // text looks like a color ! var colorCode = '#' + match[2]; - // add color circle and remove color code from text; var textWithoutColorCode = text.replace('[' + colorCode + ']', ''); if (textLimit > 0 && textWithoutColorCode.length > textLimit) { textWithoutColorCode = textWithoutColorCode.substring(0, textLimit) + '…'; @@ -86,7 +85,9 @@ const workzoneFacets = services => { // patch type = "COLOR-AGGREGATE"; label = textWithoutColorCode; + textWithoutColorCode = $('
').text(textWithoutColorCode).html(); // escape html tooltip = _.escape(textWithoutColorCode); + title = ' ' + tooltip; } else { @@ -95,7 +96,7 @@ const workzoneFacets = services => { text = text.substring(0, textLimit) + '…'; } label = text; - /*title = tooltip = _.escape(text);*/ + title = $('
').text(text).html(); // escape html } return { @@ -154,8 +155,6 @@ const workzoneFacets = services => { treeSource = _shouldMaskNodes(treeSource, hiddenFacetsList); } - treeSource = _parseColors(treeSource); - treeSource = _colorUnsetText(treeSource); return _getFacetsTree().reload(treeSource) @@ -183,18 +182,6 @@ const workzoneFacets = services => { }); }; - function _parseColors(source) { - _.forEach(source, function (facet) { - if (!_.isUndefined(facet.children) && (facet.children.length > 0)) { - _.forEach(facet.children, function (child) { - var title = child.title; - child.title = _formatColorText(title.toString()); - }); - } - }); - return source; - } - function _formatColorText(string) { var textLimit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; diff --git a/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php b/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php index 601d0fe00c..7dd9da004e 100644 --- a/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php +++ b/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php @@ -62,7 +62,7 @@ public function getGlobals() { return [ // change this version when you change JS file to force the navigation to reload js file - 'assetFileVersion' => 87 + 'assetFileVersion' => 88 ]; }