From a793590d43c98f9b9763c4742e773b51624b79c1 Mon Sep 17 00:00:00 2001 From: Andriy Dyadyura Date: Tue, 22 Dec 2015 21:22:37 +0100 Subject: new buttons --- app/assets/stylesheets/framework/buttons.scss | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index fe56266284b..008c44a227f 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -1,10 +1,9 @@ @mixin btn-default { - @include border-radius(2px); + @include border-radius(3px); border-width: 1px; border-style: solid; - text-transform: uppercase; - font-size: 13px; - font-weight: 600; + font-size: 15px; + font-weight: 500; line-height: 18px; padding: 11px $gl-padding; letter-spacing: .4px; @@ -18,7 +17,7 @@ @mixin btn-middle { @include btn-default; - @include border-radius(2px); + @include border-radius(3px); padding: 11px 24px; } @@ -60,7 +59,7 @@ } @mixin btn-gray { - @include btn-color($gray-light, $border-gray-light, $gray-normal, $border-gray-normal, $gray-dark, $border-gray-dark, #313236); + @include btn-color($gray-light, $border-gray-light, $gray-normal, $border-gray-light, $gray-dark, $border-gray-dark, #313236); } @mixin btn-white { @@ -74,6 +73,10 @@ &.btn-sm { padding: 5px 10px; } + + &.btn-nr { + padding: 7px 10px; + } &.btn-xs { padding: 1px 5px; -- cgit v1.2.1 From a72b71abccfbd354b709871f252d8e02f1cf233d Mon Sep 17 00:00:00 2001 From: Andriy Dyadyura Date: Tue, 22 Dec 2015 21:29:31 +0100 Subject: new buttons issue --- app/views/projects/issues/show.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 2fe6f88b2a9..b0e0fd6b838 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -23,16 +23,16 @@ .pull-right - if can?(current_user, :create_issue, @project) - = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-grouped new-issue-link', title: 'New Issue', id: 'new_issue_link' do + = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-nr btn-grouped btn-success', title: 'New Issue', id: 'new_issue_link' do = icon('plus') New Issue - if can?(current_user, :update_issue, @issue) - if @issue.closed? - = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen' + = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-success' - else - = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close', title: 'Close Issue' + = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-warning', title: 'Close Issue' - = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-grouped issuable-edit' do + = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-nr btn-grouped btn-default' do = icon('pencil-square-o') Edit -- cgit v1.2.1 From f4dabf97958fc6787bec28a28726e10a5c179cb9 Mon Sep 17 00:00:00 2001 From: Andriy Dyadyura Date: Tue, 22 Dec 2015 21:37:11 +0100 Subject: new buttons issue --- app/assets/stylesheets/pages/note_form.scss | 4 ++-- app/views/projects/issues/_discussion.html.haml | 4 ++-- app/views/projects/notes/_form.html.haml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss index 4cf1a28c459..18cfcc05e7b 100644 --- a/app/assets/stylesheets/pages/note_form.scss +++ b/app/assets/stylesheets/pages/note_form.scss @@ -75,7 +75,7 @@ .common-note-form { margin: 0; - background: #F7F8FA; + background: #fff; padding: $gl-padding; margin-left: -$gl-padding; margin-right: -$gl-padding; @@ -84,7 +84,7 @@ } .note-form-actions { - background: #F9F9F9; + background: #fff; .note-form-option { margin-top: 8px; diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 86d3dc546ba..82322ba1549 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -1,9 +1,9 @@ - content_for :note_actions do - if can?(current_user, :update_issue, @issue) - if @issue.closed? - = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen js-note-target-reopen', title: 'Reopen Issue' + = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-nr btn-success js-note-target-reopen', title: 'Reopen Issue' - else - = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close js-note-target-close', title: 'Close Issue' + = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-nr btn-warning js-note-target-close', title: 'Close Issue' #notes = render 'projects/notes/notes_with_form' diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index 88e711ab534..df4f5ebb0f8 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -13,6 +13,6 @@ .error-alert .note-form-actions.clearfix - = f.submit 'Add Comment', class: "btn btn-create comment-btn btn-grouped js-comment-button" + = f.submit 'Add Comment', class: "btn btn-nr btn-success comment-btn btn-grouped js-comment-button" = yield(:note_actions) %a.btn.btn-cancel.js-close-discussion-note-form Cancel -- cgit v1.2.1 From f30f518f975a04e6fa0baac5a6e366031d6d378d Mon Sep 17 00:00:00 2001 From: Andriy Dyadyura Date: Tue, 22 Dec 2015 22:33:46 +0100 Subject: buttons colors update --- app/assets/stylesheets/framework/buttons.scss | 9 ++++++++- app/assets/stylesheets/framework/variables.scss | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index 008c44a227f..9b7463c9476 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -50,6 +50,10 @@ @include btn-color($blue-light, $border-blue-light, $blue-normal, $border-blue-normal, $blue-dark, $border-blue-dark, #FFFFFF); } +@mixin btn-blue-medium { + @include btn-color($blue-medium-light, $border-blue-light, $blue-medium, $border-blue-normal, $blue-medium-dark, $border-blue-dark, #FFFFFF); +} + @mixin btn-orange { @include btn-color($orange-light, $border-orange-light, $orange-normal, $border-orange-normal, $orange-dark, $border-orange-dark, #FFFFFF); } @@ -94,7 +98,10 @@ @include btn-gray; } - &.btn-primary, + &.btn-primary { + @include btn-blue-medium; + } + &.btn-info { @include btn-blue; } diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index a24a4ea3b62..af75123b0af 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -45,6 +45,10 @@ $blue-light: #2EA8E5; $blue-normal: #2D9FD8; $blue-dark: #2897CE; +$blue-medium-light: #3498CB; +$blue-medium: #2F8EBF; +$blue-medium-dark: #2D86B4; + $orange-light: #FC6443; $orange-normal: #E75E40; $orange-dark: #CE5237; -- cgit v1.2.1 From a84ecf0e2eac113bfb30290f6869b12f65e0b0d3 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 23 Dec 2015 12:29:50 +0100 Subject: Fix close/reopen buttons Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/framework/buttons.scss | 19 ++++--------------- app/views/projects/issues/_discussion.html.haml | 4 ++-- app/views/projects/issues/show.html.haml | 8 ++++---- app/views/projects/notes/_form.html.haml | 2 +- 4 files changed, 11 insertions(+), 22 deletions(-) diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index 9b7463c9476..97a94638847 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -77,7 +77,7 @@ &.btn-sm { padding: 5px 10px; } - + &.btn-nr { padding: 7px 10px; } @@ -101,11 +101,12 @@ &.btn-primary { @include btn-blue-medium; } - + &.btn-info { @include btn-blue; } + &.btn-close, &.btn-warning { @include btn-orange; } @@ -120,20 +121,8 @@ float: right; } - &.btn-close { - color: $gl-danger; - border-color: $gl-danger; - &:hover { - color: #B94A48; - } - } - &.btn-reopen { - color: $gl-success; - border-color: $gl-success; - &:hover { - color: #468847; - } + /* should be same as parent class for now */ } &.btn-grouped { diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 82322ba1549..86d3dc546ba 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -1,9 +1,9 @@ - content_for :note_actions do - if can?(current_user, :update_issue, @issue) - if @issue.closed? - = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-nr btn-success js-note-target-reopen', title: 'Reopen Issue' + = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen js-note-target-reopen', title: 'Reopen Issue' - else - = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-nr btn-warning js-note-target-close', title: 'Close Issue' + = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close js-note-target-close', title: 'Close Issue' #notes = render 'projects/notes/notes_with_form' diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index b0e0fd6b838..e0fba46c732 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -23,16 +23,16 @@ .pull-right - if can?(current_user, :create_issue, @project) - = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-nr btn-grouped btn-success', title: 'New Issue', id: 'new_issue_link' do + = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-grouped new-issue-link btn-success', title: 'New Issue', id: 'new_issue_link' do = icon('plus') New Issue - if can?(current_user, :update_issue, @issue) - if @issue.closed? - = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-success' + = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen' - else - = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-warning', title: 'Close Issue' + = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close', title: 'Close Issue' - = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-nr btn-grouped btn-default' do + = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-grouped issuable-edit' do = icon('pencil-square-o') Edit diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index df4f5ebb0f8..88e711ab534 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -13,6 +13,6 @@ .error-alert .note-form-actions.clearfix - = f.submit 'Add Comment', class: "btn btn-nr btn-success comment-btn btn-grouped js-comment-button" + = f.submit 'Add Comment', class: "btn btn-create comment-btn btn-grouped js-comment-button" = yield(:note_actions) %a.btn.btn-cancel.js-close-discussion-note-form Cancel -- cgit v1.2.1