Commit acefbad2 authored by Clement Ho's avatar Clement Ho

Refactor dispatcher project branches create path

parent 82007530
...@@ -266,8 +266,14 @@ import Activities from './activities'; ...@@ -266,8 +266,14 @@ import Activities from './activities';
initChangesDropdown(document.querySelector('.navbar-gitlab').offsetHeight - paddingTop); initChangesDropdown(document.querySelector('.navbar-gitlab').offsetHeight - paddingTop);
break; break;
case 'projects:branches:new': case 'projects:branches:new':
import('./pages/projects/branches/new')
.then(callDefault)
.catch(fail);
break;
case 'projects:branches:create': case 'projects:branches:create':
new NewBranchForm($('.js-create-branch-form'), JSON.parse(document.getElementById('availableRefs').innerHTML)); import('./pages/projects/branches/new')
.then(callDefault)
.catch(fail);
break; break;
case 'projects:branches:index': case 'projects:branches:index':
AjaxLoadingSpinner.init(); AjaxLoadingSpinner.init();
......
import NewBranchForm from '~/new_branch_form';
export default () => new NewBranchForm($('.js-create-branch-form'), JSON.parse(document.getElementById('availableRefs').innerHTML));
import NewBranchForm from '~/new_branch_form';
export default () => new NewBranchForm($('.js-create-branch-form'), JSON.parse(document.getElementById('availableRefs').innerHTML));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment