diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-12 22:13:50 +0300 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-12 22:13:50 +0300 |
commit | 705d7f703b10f5e1a066d0623bf32d07868d6668 (patch) | |
tree | d8e836e57ce9d5b7a7254a378fa4fa78dcd6bce0 /app/assets/javascripts/ci_variable_list | |
parent | b8401cd0b201ab9caecb60dcc477637e70da4df9 (diff) |
[skip ci] Use toggleClass instead of toggle
Diffstat (limited to 'app/assets/javascripts/ci_variable_list')
-rw-r--r-- | app/assets/javascripts/ci_variable_list/ajax_variable_list.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/ci_variable_list/ajax_variable_list.js b/app/assets/javascripts/ci_variable_list/ajax_variable_list.js index b33adff609f..44f9e02a3c6 100644 --- a/app/assets/javascripts/ci_variable_list/ajax_variable_list.js +++ b/app/assets/javascripts/ci_variable_list/ajax_variable_list.js @@ -52,8 +52,8 @@ export default class AjaxVariableList { onSaveClicked() { const loadingIcon = this.saveButton.querySelector('.js-secret-variables-save-loading-icon'); - loadingIcon.classList.toggle('hide', false); - this.errorBox.classList.toggle('hide', true); + loadingIcon.classList.toggle('hidden', false); + this.errorBox.classList.toggle('hidden', true); // We use this to prevent a user from changing a key before we have a chance // to match it up in `updateRowsWithPersistedVariables` this.variableList.toggleEnableRow(false); @@ -70,7 +70,7 @@ export default class AjaxVariableList { status === statusCodes.BAD_REQUEST, }) .then((res) => { - loadingIcon.classList.toggle('hide', true); + loadingIcon.classList.toggle('hidden', true); this.variableList.toggleEnableRow(true); if (res.status === statusCodes.OK && res.data) { @@ -79,11 +79,11 @@ export default class AjaxVariableList { } else if (res.status === statusCodes.BAD_REQUEST) { // Validation failed this.errorBox.innerHTML = generateErrorBoxContent(res.data); - this.errorBox.classList.toggle('hide', false); + this.errorBox.classList.toggle('hidden', false); } }) .catch(() => { - loadingIcon.classList.toggle('hide', true); + loadingIcon.classList.toggle('hidden', true); this.variableList.toggleEnableRow(true); Flash(s__('CiVariable|Error occured while saving variables')); }); |