diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-06 17:10:37 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-06 17:10:37 +0300 |
| commit | 8e7f80eed180e092ce5052175e6a7b5d7af9e58a (patch) | |
| tree | 7eec4f46fa0c7661de6dadd7c3ad91d47042e05f /app/assets | |
| parent | bc40efa19d499f603c80c77b1d1e291bd4373be6 (diff) | |
| download | gitlab-ce-8e7f80eed180e092ce5052175e6a7b5d7af9e58a.tar.gz | |
Restyle merge request accept and ci widget
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/assets')
| -rw-r--r-- | app/assets/javascripts/merge_request.js.coffee | 16 | ||||
| -rw-r--r-- | app/assets/stylesheets/gl_bootstrap.scss | 1 | ||||
| -rw-r--r-- | app/assets/stylesheets/sections/merge_requests.scss | 23 |
3 files changed, 36 insertions, 4 deletions
diff --git a/app/assets/javascripts/merge_request.js.coffee b/app/assets/javascripts/merge_request.js.coffee index 235b5c7580c..7589fc70cd8 100644 --- a/app/assets/javascripts/merge_request.js.coffee +++ b/app/assets/javascripts/merge_request.js.coffee @@ -88,7 +88,21 @@ class MergeRequest showCiState: (state) -> $('.ci_widget').hide() - $('.ci_widget.ci-' + state).show() + allowed_states = ["failed", "running", "pending", "success"] + if state in allowed_states + $('.ci_widget.ci-' + state).show() + else + $('.ci_widget.ci-error').show() + + switch state + when "success" + $('.mr-state-widget').addClass("panel-success") + when "failed" + $('.mr-state-widget').addClass("panel-danger") + when "running", "pending" + $('.mr-state-widget').addClass("panel-warning") + + loadDiff: (event) -> $.ajax diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss index 169f1268cd7..8676f07b1a2 100644 --- a/app/assets/stylesheets/gl_bootstrap.scss +++ b/app/assets/stylesheets/gl_bootstrap.scss @@ -45,6 +45,7 @@ $pagination-active-bg: $bg_style_color; @import "bootstrap/list-group"; @import "bootstrap/wells"; @import "bootstrap/close"; +@import "bootstrap/panels"; // Components w/ JavaScript @import "bootstrap/modals"; diff --git a/app/assets/stylesheets/sections/merge_requests.scss b/app/assets/stylesheets/sections/merge_requests.scss index 5341f411e54..790496a1a5a 100644 --- a/app/assets/stylesheets/sections/merge_requests.scss +++ b/app/assets/stylesheets/sections/merge_requests.scss @@ -44,10 +44,9 @@ .label-branch { @include border-radius(4px); - padding: 3px 4px; + padding: 2px 4px; border: none; - font-size: 14px; - background: #474D57; + background: #555; color: #fff; font-family: $monospace_font; font-weight: normal; @@ -95,3 +94,21 @@ .diff-file .reopen-mr-link { display: none; } + +.mr-state-widget { + @include border-radius(0px); + + .panel-heading { + @include border-radius(0px); + } + + .panel-body { + h4 { + margin-top: 0px; + } + + p:last-child { + margin-bottom: 0; + } + } +} |
