Browse Source

Ссылка исчезает при установке галочки на checkbox #128

pull/150/head
Artur Galyamov 2 years ago
parent
commit
86fde45a52
  1. 2
      templates/repo/competences/list.tmpl
  2. 3
      web_src/js/index.js
  3. 5
      web_src/js/markup/content.js
  4. 5
      web_src/js/markup/trust_props.js

2
templates/repo/competences/list.tmpl

@ -3,7 +3,7 @@
{{template "repo/header" .}}
<div class="ui container">
<h1>{{.i18n.Tr "repo.competences"}}</h1>
<div class="render-content markup" data-can-edit="true">
<div class="render-content markup trust-props" data-can-edit="true">
{{$.RenderedCompetences | Str2html}}
</div>
<div class="raw-content hide">{{$.TransformedTrustProps}}</div>

3
web_src/js/index.js

@ -19,7 +19,7 @@ import {initMarkupAnchors} from './markup/anchors.js';
import {initNotificationCount, initNotificationsTable} from './features/notification.js';
import {initRepoIssueContentHistory} from './features/repo-issue-content.js';
import {initStopwatch} from './features/stopwatch.js';
import {initCommentContent, initMarkupContent} from './markup/content.js';
import {initCommentContent, initMarkupContent, initTrustPropsContent} from './markup/content.js';
import {initUserAuthLinkAccountView, initUserAuthOauth2} from './features/user-auth.js';
import {
@ -105,6 +105,7 @@ $(document).ready(() => {
initFootLanguageMenu();
initCommentContent();
initTrustPropsContent()
initContextPopups();
initHeatmap();
initImageDiff();

5
web_src/js/markup/content.js

@ -1,6 +1,7 @@
import {renderMermaid} from './mermaid.js';
import {renderCodeCopy} from './codecopy.js';
import {initMarkupTasklist} from './tasklist.js';
import {initMarkupTrustProps} from './trust_props.js'
// code that runs for all markup content
export function initMarkupContent() {
@ -12,3 +13,7 @@ export function initMarkupContent() {
export function initCommentContent() {
initMarkupTasklist();
}
export function initTrustPropsContent() {
initMarkupTrustProps();
}

5
web_src/js/markup/trust_props.js

@ -0,0 +1,5 @@
export function initMarkupTrustProps() {
$('.trust-props input[type="checkbox"]').click((e) => {
$(e.target).parent().find('a').remove()
})
}
Loading…
Cancel
Save