summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-02-02 16:48:17 -0600
committerMike Greiling <mike@pixelcog.com>2018-02-16 12:47:22 -0600
commit8c92330c5074ad2cc723a9bbd56d80d44b52afd9 (patch)
treef5b7dccec2706aedbfa7731f311a4f5daea40a72
parentbba4126311257628bb136de6b7a1d83a262bbd8e (diff)
downloadgitlab-ce-8c92330c5074ad2cc723a9bbd56d80d44b52afd9.tar.gz
migrate projects:branches:new to static bundle
-rw-r--r--app/assets/javascripts/dispatcher.js10
-rw-r--r--app/assets/javascripts/pages/projects/branches/new/index.js4
2 files changed, 3 insertions, 11 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index 6cc71e03855..1566084f2d8 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -48,16 +48,6 @@ var Dispatcher;
case 'projects:issues:show':
shortcut_handler = true;
break;
- case 'projects:branches:new':
- import('./pages/projects/branches/new')
- .then(callDefault)
- .catch(fail);
- break;
- case 'projects:branches:create':
- import('./pages/projects/branches/new')
- .then(callDefault)
- .catch(fail);
- break;
case 'projects:branches:index':
import('./pages/projects/branches/index')
.then(callDefault)
diff --git a/app/assets/javascripts/pages/projects/branches/new/index.js b/app/assets/javascripts/pages/projects/branches/new/index.js
index ae5e033e97e..d32d5c6cb29 100644
--- a/app/assets/javascripts/pages/projects/branches/new/index.js
+++ b/app/assets/javascripts/pages/projects/branches/new/index.js
@@ -1,3 +1,5 @@
import NewBranchForm from '~/new_branch_form';
-export default () => new NewBranchForm($('.js-create-branch-form'), JSON.parse(document.getElementById('availableRefs').innerHTML));
+document.addEventListener('DOMContentLoaded', () => (
+ new NewBranchForm($('.js-create-branch-form'), JSON.parse(document.getElementById('availableRefs').innerHTML))
+));