diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-06 16:58:50 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-04-11 19:20:47 +0300 |
commit | 99fe9c7b7703b1594c9cda571f43f20198f96b0f (patch) | |
tree | fced33f0a15cd85ea789ae1187d214d92104c681 /app/assets/javascripts/merge_request_widget.js.coffee | |
parent | ce0678faa5a1e4688aa7491c49cebd4b172244af (diff) |
Corrects the button color on build status change
Diffstat (limited to 'app/assets/javascripts/merge_request_widget.js.coffee')
-rw-r--r-- | app/assets/javascripts/merge_request_widget.js.coffee | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_widget.js.coffee b/app/assets/javascripts/merge_request_widget.js.coffee index 1e3a5847521..63f75be2dad 100644 --- a/app/assets/javascripts/merge_request_widget.js.coffee +++ b/app/assets/javascripts/merge_request_widget.js.coffee @@ -111,6 +111,8 @@ class @MergeRequestWidget @setMergeButtonClass('btn-danger') when "running", "pending" @setMergeButtonClass('btn-warning') + when "success" + @setMergeButtonClass('btn-create') else $('.ci_widget.ci-error').show() @setMergeButtonClass('btn-danger') @@ -120,4 +122,6 @@ class @MergeRequestWidget $('.ci_widget:visible .ci-coverage').text(text) setMergeButtonClass: (css_class) -> - $('.accept_merge_request').removeClass("btn-create").addClass(css_class) + $('.accept_merge_request') + .removeClass('btn-danger btn-warning btn-create') + .addClass(css_class) |