2018-05-09 12:01:36 +05:30
|
|
|
import $ from 'jquery';
|
2018-03-17 18:26:18 +05:30
|
|
|
import { getParameterValues } from '../lib/utils/url_utility';
|
2018-11-20 20:47:30 +05:30
|
|
|
import projectNew from './project_new';
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
export default () => {
|
2018-11-20 20:47:30 +05:30
|
|
|
const pathParam = getParameterValues('path')[0];
|
|
|
|
const nameParam = getParameterValues('name')[0];
|
|
|
|
const $projectPath = $('.js-path-name');
|
|
|
|
const $projectName = $('.js-project-name');
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2018-11-20 20:47:30 +05:30
|
|
|
// get the path url and append it in the input
|
|
|
|
$projectPath.val(pathParam);
|
|
|
|
|
|
|
|
// get the project name from the URL and set it as input value
|
|
|
|
$projectName.val(nameParam);
|
|
|
|
|
|
|
|
// generate slug when project name changes
|
|
|
|
$projectName.keyup(() => projectNew.onProjectNameChange($projectName, $projectPath));
|
2017-09-10 17:25:29 +05:30
|
|
|
};
|