diff options
author | Bryce Johnson <bryce@gitlab.com> | 2016-10-05 13:48:18 +0300 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2016-10-05 13:48:18 +0300 |
commit | 2d41c3f5a04ae9879749bb8f0d903c28212f4298 (patch) | |
tree | 1cfc7b237cd7d1ca085a525c1e0fb9b435945641 /app/assets/javascripts/templates/issuable_template_selectors.js.es6 | |
parent | b6d52a6f10d5f3d65459a953b53ba1c380fd39af (diff) |
Restore inexplicably removed code from requestFileSuccess.
(also clean up a few global refs)
Diffstat (limited to 'app/assets/javascripts/templates/issuable_template_selectors.js.es6')
-rw-r--r-- | app/assets/javascripts/templates/issuable_template_selectors.js.es6 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/assets/javascripts/templates/issuable_template_selectors.js.es6 b/app/assets/javascripts/templates/issuable_template_selectors.js.es6 index bd8cdde033e..4e8247b89e1 100644 --- a/app/assets/javascripts/templates/issuable_template_selectors.js.es6 +++ b/app/assets/javascripts/templates/issuable_template_selectors.js.es6 @@ -1,12 +1,12 @@ ((global) => { class IssuableTemplateSelectors { - constructor(opts = {}) { - this.$dropdowns = opts.$dropdowns || $('.js-issuable-selector'); - this.editor = opts.editor || this.initEditor(); + constructor({ $dropdowns, editor } = {}) { + this.$dropdowns = $dropdowns || $('.js-issuable-selector'); + this.editor = editor || this.initEditor(); this.$dropdowns.each((i, dropdown) => { - let $dropdown = $(dropdown); - new IssuableTemplateSelector({ + const $dropdown = $(dropdown); + new gl.IssuableTemplateSelector({ pattern: /(\.md)/, data: $dropdown.data('data'), wrapper: $dropdown.closest('.js-issuable-selector-wrap'), @@ -26,4 +26,4 @@ } global.IssuableTemplateSelectors = IssuableTemplateSelectors; -})(window); +})(window.gl || (window.gl = {})); |