summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/init_issuable_sidebar.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-07-25 16:46:15 +0100
committerPhil Hughes <me@iamphill.com>2017-07-25 16:46:15 +0100
commit887227e0371858d5d048f61bfe0700e4b7ebab58 (patch)
tree94619d6b051f013c87b7265274468961b3b00036 /app/assets/javascripts/init_issuable_sidebar.js
parentfe27de8bf124d65013da1d82618a1ab45584ff68 (diff)
downloadgitlab-ce-887227e0371858d5d048f61bfe0700e4b7ebab58.tar.gz
moved some more inline code
removed some global variable comments
Diffstat (limited to 'app/assets/javascripts/init_issuable_sidebar.js')
-rw-r--r--app/assets/javascripts/init_issuable_sidebar.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/init_issuable_sidebar.js b/app/assets/javascripts/init_issuable_sidebar.js
index 82071348d99..29e3d2ea94e 100644
--- a/app/assets/javascripts/init_issuable_sidebar.js
+++ b/app/assets/javascripts/init_issuable_sidebar.js
@@ -5,11 +5,13 @@
/* global Sidebar */
export default () => {
+ const sidebarOptions = JSON.parse(document.querySelector('.js-sidebar-options').innerHTML);
+
new MilestoneSelect({
- full_path: gl.sidebarOptions.fullPath,
+ full_path: sidebarOptions.fullPath,
});
new LabelsSelect();
- new IssuableContext(gl.sidebarOptions.currentUser);
+ new IssuableContext(sidebarOptions.currentUser);
gl.Subscription.bindAll('.subscription');
new gl.DueDateSelectors();
window.sidebar = new Sidebar();