From 1ef18757dea13fc3b2ba1ba0e300010947414e15 Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Mon, 7 Nov 2022 13:45:00 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3,=20=D1=81=D1=81=D1=8B=D0=BB?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B2=D0=B5=D1=80=D0=B8=D1=82=D0=B5=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D1=81=D0=B2=D0=BE=D0=B9=D1=81=D1=82=D0=B2?= =?UTF-8?q?=20=D1=84=D0=BE=D1=80=D0=BC=D0=B8=D1=80=D1=83=D0=B5=D1=82=D1=81?= =?UTF-8?q?=D1=8F=20=D0=B4=D0=B8=D0=BD=D0=B0=D0=BC=D0=B8=D1=87=D0=B5=D1=81?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE=20#150?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/repo/competences/list.tmpl | 2 +- templates/repo/resources/list.tmpl | 2 +- web_src/js/markup/trust_props.js | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/templates/repo/competences/list.tmpl b/templates/repo/competences/list.tmpl index 88f7100933..40366e7209 100644 --- a/templates/repo/competences/list.tmpl +++ b/templates/repo/competences/list.tmpl @@ -3,7 +3,7 @@ {{template "repo/header" .}}

{{.i18n.Tr "repo.competences"}}

-
+
{{$.RenderedCompetences | Str2html}}
{{$.TransformedTrustProps}}
diff --git a/templates/repo/resources/list.tmpl b/templates/repo/resources/list.tmpl index 6ab050f0af..6e827ece27 100644 --- a/templates/repo/resources/list.tmpl +++ b/templates/repo/resources/list.tmpl @@ -3,7 +3,7 @@ {{template "repo/header" .}}

{{.i18n.Tr "repo.resources"}}

-
+
{{$.RenderedResources | Str2html}}
{{$.TransformedTrustProps}}
diff --git a/web_src/js/markup/trust_props.js b/web_src/js/markup/trust_props.js index eb5169e205..7be7c22bfa 100644 --- a/web_src/js/markup/trust_props.js +++ b/web_src/js/markup/trust_props.js @@ -1,7 +1,7 @@ export function initMarkupTrustProps() { - const renderSearchLink = (trustPropName) => { + const renderSearchLink = (trustPropName, trustPropType) => { const safeName = trustPropName.replace(' ', '+'); - return` найти`; + return` найти`; } $('.trust-props input[type="checkbox"]').click((e) => { @@ -9,7 +9,9 @@ export function initMarkupTrustProps() { $(e.target).parent().find('a').remove(); } else { const $parent = $(e.target).parent(); - const renderedSearchLink = renderSearchLink($parent.text()); + const $listContainer = $parent.parents("div.render-content"); + const trustPropType = $listContainer.attr("data-trust-prop-type"); + const renderedSearchLink = renderSearchLink($parent.text(), trustPropType); $parent.append(renderedSearchLink); } });