提交 45ae34f8 编写于 作者: B Bryce Johnson

Properly scope BlobCiYamlSelector and BlobCiYamlSelectors.

上级 cfb03b3d
/*= require blob/template_selector */
((global) => {
class BlobCiYamlSelector extends TemplateSelector {
constructor(...args) {
super(...args);
}
class BlobCiYamlSelector extends TemplateSelector {
constructor(...args) {
super(...args);
}
requestFile(query) {
return Api.gitlabCiYml(query.name, this.requestFileSuccess.bind(this));
requestFile(query) {
return Api.gitlabCiYml(query.name, this.requestFileSuccess.bind(this));
};
};
};
class BlobCiYamlSelectors {
constructor(opts) {
this.$dropdowns = opts.$dropdowns || $('.js-gitlab-ci-yml-selector');
this.editor = opts.editor;
this.initSelectors();
}
global.BlobCiYamlSelector = BlobCiYamlSelector;
class BlobCiYamlSelectors {
constructor(opts) {
this.$dropdowns = opts.$dropdowns || $('.js-gitlab-ci-yml-selector');
this.editor = opts.editor;
this.initSelectors();
}
initSelectors() {
this.$dropdowns.each((i, dropdown) => {
const $dropdown = $(dropdown);
return new BlobCiYamlSelector({
pattern: /(.gitlab-ci.yml)/,
data: $dropdown.data('data'),
wrapper: $dropdown.closest('.js-gitlab-ci-yml-selector-wrap'),
dropdown: $dropdown,
editor: this.editor
initSelectors() {
this.$dropdowns.each((i, dropdown) => {
const $dropdown = $(dropdown);
return new BlobCiYamlSelector({
pattern: /(.gitlab-ci.yml)/,
data: $dropdown.data('data'),
wrapper: $dropdown.closest('.js-gitlab-ci-yml-selector-wrap'),
dropdown: $dropdown,
editor: this.editor
});
});
});
}
}
}
global.BlobCiYamlSelectors = BlobCiYamlSelectors;
})(window.gl || (window.gl = {}));
......@@ -29,7 +29,7 @@
new BlobGitignoreSelectors({
editor: this.editor
});
new BlobCiYamlSelectors({
new gl.BlobCiYamlSelectors({
editor: this.editor
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册