mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 19:11:58 +01:00
[FRONTEND] fix javascript linting errors
This commit is contained in:
parent
9560492a84
commit
c4a92ec9da
2 changed files with 3 additions and 3 deletions
|
@ -2,14 +2,14 @@ import {hideElem, showElem} from '../utils/dom.js';
|
||||||
import {initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js';
|
import {initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js';
|
||||||
|
|
||||||
export function initRepoRelease() {
|
export function initRepoRelease() {
|
||||||
[...document.querySelectorAll('.remove-rel-attach')].forEach((el) => {
|
for (const el of document.querySelectorAll('.remove-rel-attach')) {
|
||||||
el.addEventListener('click', (e) => {
|
el.addEventListener('click', (e) => {
|
||||||
const uuid = e.target.getAttribute('data-uuid');
|
const uuid = e.target.getAttribute('data-uuid');
|
||||||
const id = e.target.getAttribute('data-id');
|
const id = e.target.getAttribute('data-id');
|
||||||
document.querySelector(`input[name='attachment-del-${uuid}']`).value = 'true';
|
document.querySelector(`input[name='attachment-del-${uuid}']`).value = 'true';
|
||||||
hideElem(`#attachment-${id}`);
|
hideElem(`#attachment-${id}`);
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initRepoReleaseNew() {
|
export function initRepoReleaseNew() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ window.addEventListener('load', async () => {
|
||||||
const url = document.getElementById('swagger-ui').getAttribute('data-source');
|
const url = document.getElementById('swagger-ui').getAttribute('data-source');
|
||||||
|
|
||||||
const ui = SwaggerUI({
|
const ui = SwaggerUI({
|
||||||
url: url,
|
url,
|
||||||
dom_id: '#swagger-ui',
|
dom_id: '#swagger-ui',
|
||||||
deepLinking: true,
|
deepLinking: true,
|
||||||
docExpansion: 'none',
|
docExpansion: 'none',
|
||||||
|
|
Loading…
Reference in a new issue