Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-06 15:04:57 +0300
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-06 15:04:57 +0300
commit2a18425e97023b05aa52c29dbce6c5a7aa7400b7 (patch)
tree42360416a8337267dd75493fbde5021a333e6431 /app/assets/javascripts/comment_type_toggle.js
parent75ac269987a30dc3eedb9ce47c83299abf9b7cd9 (diff)
phil review changes
Diffstat (limited to 'app/assets/javascripts/comment_type_toggle.js')
-rw-r--r--app/assets/javascripts/comment_type_toggle.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/app/assets/javascripts/comment_type_toggle.js b/app/assets/javascripts/comment_type_toggle.js
index 2110d19a9ea..4578c3a4ec0 100644
--- a/app/assets/javascripts/comment_type_toggle.js
+++ b/app/assets/javascripts/comment_type_toggle.js
@@ -2,37 +2,37 @@ import DropLab from '@gitlab-org/droplab';
import InputSetter from '@gitlab-org/droplab/dist/plugins/InputSetter';
class CommentTypeToggle {
- constructor(trigger, list, input, button, secondaryButton) {
- this.trigger = trigger;
- this.list = list;
- this.input = input;
- this.button = button;
- this.secondaryButton = secondaryButton;
+ constructor(dropdownTrigger, dropdownList, noteTypeInput, submitButton, closeButton) {
+ this.dropdownTrigger = dropdownTrigger;
+ this.dropdownList = dropdownList;
+ this.noteTypeInput = noteTypeInput;
+ this.submitButton = submitButton;
+ this.closeButton = closeButton;
}
initDroplab() {
this.droplab = new DropLab();
const inputSetterConfig = [{
- input: this.input,
+ input: this.noteTypeInput,
valueAttribute: 'data-value',
},
{
- input: this.button,
+ input: this.submitButton,
valueAttribute: 'data-button-text',
}];
- if (this.secondaryButton) {
+ if (this.closeButton) {
inputSetterConfig.push({
- input: this.secondaryButton,
+ input: this.closeButton,
valueAttribute: 'data-secondary-button-text',
}, {
- input: this.secondaryButton,
+ input: this.closeButton,
valueAttribute: 'data-secondary-button-text',
inputAttribute: 'data-alternative-text',
});
}
- this.droplab.init(this.trigger, this.list, [InputSetter], {
+ this.droplab.init(this.dropdownTrigger, this.dropdownList, [InputSetter], {
InputSetter: inputSetterConfig
});
}