Refactor legacy line-number and scroll code (#33094)
1. remove jquery 2. rewrite the "line number selection", fix various edge cases 3. fix the scroll
This commit is contained in:
parent
188e0ee8e4
commit
2b064b8637
5 changed files with 71 additions and 139 deletions
|
@ -19,6 +19,7 @@ import {
|
|||
import {POST, GET} from '../modules/fetch.ts';
|
||||
import {fomanticQuery} from '../modules/fomantic/base.ts';
|
||||
import {createTippy} from '../modules/tippy.ts';
|
||||
import {invertFileFolding} from './file-fold.ts';
|
||||
|
||||
const {pageData, i18n} = window.config;
|
||||
|
||||
|
@ -244,4 +245,8 @@ export function initRepoDiffView() {
|
|||
initRepoDiffFileViewToggle();
|
||||
initViewedCheckboxListenerFor();
|
||||
initExpandAndCollapseFilesButton();
|
||||
|
||||
addDelegatedEventListener(document, 'click', '.fold-file', (el) => {
|
||||
invertFileFolding(el.closest('.file-content'), el);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue