diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-28 00:09:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-28 00:09:26 +0300 |
commit | 8a90efc9560dd36ea3569aa82cc833c42bea6c57 (patch) | |
tree | 3760cec5cfc18e650e7328cd2734388a3c645f05 /app/assets/javascripts/projects | |
parent | 331d1c0a2a9a6f2e012626bd50805510d7307e52 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/projects')
-rw-r--r-- | app/assets/javascripts/projects/project_import_gitlab_project.js | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/app/assets/javascripts/projects/project_import_gitlab_project.js b/app/assets/javascripts/projects/project_import_gitlab_project.js index 9d42f97d057..0cbd4dbf2cf 100644 --- a/app/assets/javascripts/projects/project_import_gitlab_project.js +++ b/app/assets/javascripts/projects/project_import_gitlab_project.js @@ -1,4 +1,3 @@ -import $ from 'jquery'; import { convertToTitleCase, humanize, slugify } from '../lib/utils/text_utility'; import { getParameterValues } from '../lib/utils/url_utility'; import projectNew from './project_new'; @@ -22,24 +21,24 @@ const prepareParameters = () => { export default () => { let hasUserDefinedProjectName = false; - const $projectName = $('.js-project-name'); - const $projectPath = $('.js-path-name'); + const $projectName = document.querySelector('.js-project-name'); + const $projectPath = document.querySelector('.js-path-name'); const { name, path } = prepareParameters(); // get the project name from the URL and set it as input value - $projectName.val(name); + $projectName.value = name; // get the path url and append it in the input - $projectPath.val(path); + $projectPath.value = path; // generate slug when project name changes - $projectName.on('keyup', () => { - projectNew.onProjectNameChangeJq($projectName, $projectPath); - hasUserDefinedProjectName = $projectName.val().trim().length > 0; + $projectName.addEventListener('keyup', () => { + projectNew.onProjectNameChange($projectName, $projectPath); + hasUserDefinedProjectName = $projectName.value.trim().length > 0; }); // generate project name from the slug if one isn't set - $projectPath.on('keyup', () => - projectNew.onProjectPathChangeJq($projectName, $projectPath, hasUserDefinedProjectName), + $projectPath.addEventListener('keyup', () => + projectNew.onProjectPathChange($projectName, $projectPath, hasUserDefinedProjectName), ); }; |