summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/projects/find_file/show/index.js
blob: 23d857d69ec57f08de3b432ab0084e6fb218ce7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import ProjectFindFile from '~/project_find_file';
import ShortcutsFindFile from '~/shortcuts_find_file';

document.addEventListener('DOMContentLoaded', () => {
  const findElement = document.querySelector('.js-file-finder');
  const projectFindFile = new ProjectFindFile($('.file-finder-holder'), {
    url: findElement.dataset.fileFindUrl,
    treeUrl: findElement.dataset.findTreeUrl,
    blobUrlTemplate: findElement.dataset.blobUrlTemplate,
  });
  new ShortcutsFindFile(projectFindFile); // eslint-disable-line no-new
});