diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-06-30 18:18:05 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-07-06 10:10:03 -0500 |
commit | 4ad4efb8fd343ec8949c02e3ce892132a7475519 (patch) | |
tree | 94dfd760f5647874787e4b9c91c001a4f170d27e | |
parent | 12efe4946f342216c411f070a3aa1420073a3e20 (diff) | |
download | gitlab-ce-4ad4efb8fd343ec8949c02e3ce892132a7475519.tar.gz |
refactor TreeView class to ES module syntax
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/main.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/tree.js | 4 |
3 files changed, 2 insertions, 5 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 8d805fc0c1a..7a6165c7714 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -9,7 +9,6 @@ /* global MilestoneSelect */ /* global Commit */ /* global NotificationsForm */ -/* global TreeView */ /* global NotificationsDropdown */ /* global GroupAvatar */ /* global LineHighlighter */ @@ -52,6 +51,7 @@ import UsersSelect from './users_select'; import RefSelectDropdown from './ref_select_dropdown'; import GfmAutoComplete from './gfm_auto_complete'; import ShortcutsBlob from './shortcuts_blob'; +import TreeView from './tree'; import UsagePing from './usage_ping'; import UsernameValidator from './username_validator'; import VersionCheckImage from './version_check_image'; diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index 8a90aaf9336..246ab65d54f 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -153,7 +153,6 @@ import './subscription_select'; import './syntax_highlight'; import './task_list'; import './todos'; -import './tree'; import './user'; // eslint-disable-next-line global-require, import/no-commonjs diff --git a/app/assets/javascripts/tree.js b/app/assets/javascripts/tree.js index 1f1fc155fcd..7777ed1c3dc 100644 --- a/app/assets/javascripts/tree.js +++ b/app/assets/javascripts/tree.js @@ -1,6 +1,6 @@ /* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, quotes, consistent-return, no-var, one-var, one-var-declaration-per-line, no-else-return, prefer-arrow-callback, class-methods-use-this */ -class TreeView { +export default class TreeView { constructor() { this.initKeyNav(); // Code browser tree slider @@ -62,5 +62,3 @@ class TreeView { }); } } - -window.TreeView = TreeView; |