diff options
author | Phil Hughes <me@iamphill.com> | 2017-12-15 10:21:49 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-12-15 16:33:36 +0000 |
commit | eaf2f48dc7db706fa1dea050543667f8cdebd4c4 (patch) | |
tree | 0333f4371bd9158bba99bb68c2c4a6aa960daa5e /app/assets/javascripts/notes.js | |
parent | d2f313dcbccc1e3642fb0ccdf0849e0ef4ec8e21 (diff) | |
download | gitlab-ce-eaf2f48dc7db706fa1dea050543667f8cdebd4c4.tar.gz |
Export and use Notes ES module
Diffstat (limited to 'app/assets/javascripts/notes.js')
-rw-r--r-- | app/assets/javascripts/notes.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 042fe44e1c6..a2b8e6f6495 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -37,6 +37,12 @@ const MAX_VISIBLE_COMMIT_LIST_COUNT = 3; const REGEX_QUICK_ACTIONS = /^\/\w+.*$/gm; export default class Notes { + static initialize(notes_url, note_ids, last_fetched_at, view, enableGFM = true) { + if (!this.instance) { + this.instance = new Notes(notes_url, note_ids, last_fetched_at, view, enableGFM); + } + } + constructor(notes_url, note_ids, last_fetched_at, view, enableGFM = true) { this.updateTargetButtons = this.updateTargetButtons.bind(this); this.updateComment = this.updateComment.bind(this); |