diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-26 16:37:54 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-04-26 16:37:54 +0000 |
commit | 1ac15de9f03509f7fd860faccbf49f57c760f546 (patch) | |
tree | fe37b48ba9ecd582e0c7d29fb196859ded2298cd /app/assets/javascripts/mini_pipeline_graph_dropdown.js | |
parent | d71d09e89650470aaefc54cd40cae3ff68496454 (diff) | |
download | gitlab-ce-1ac15de9f03509f7fd860faccbf49f57c760f546.tar.gz |
Resolve "Jobs dropdown in mini graph should close when we receive an error"
Diffstat (limited to 'app/assets/javascripts/mini_pipeline_graph_dropdown.js')
-rw-r--r-- | app/assets/javascripts/mini_pipeline_graph_dropdown.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/mini_pipeline_graph_dropdown.js b/app/assets/javascripts/mini_pipeline_graph_dropdown.js index 9c58c465001..64c1447f427 100644 --- a/app/assets/javascripts/mini_pipeline_graph_dropdown.js +++ b/app/assets/javascripts/mini_pipeline_graph_dropdown.js @@ -28,7 +28,9 @@ export default class MiniPipelineGraph { * All dropdown events are fired at the .dropdown-menu's parent element. */ bindEvents() { - $(document).off('shown.bs.dropdown', this.container).on('shown.bs.dropdown', this.container, this.getBuildsList); + $(document) + .off('shown.bs.dropdown', this.container) + .on('shown.bs.dropdown', this.container, this.getBuildsList); } /** @@ -91,6 +93,9 @@ export default class MiniPipelineGraph { }, error: () => { this.toggleLoading(button); + if ($(button).parent().hasClass('open')) { + $(button).dropdown('toggle'); + } new Flash('An error occurred while fetching the builds.', 'alert'); }, }); |