Commit e834742407a74c26a443cce888c8ab0c210bf1cd

Authored by Dmitriy Zaporozhets
1 parent b8f6d67b

Dont load bootstrap buttons. Modified css with new buttons

Showing 34 changed files with 143 additions and 97 deletions   Show diff stats
app/assets/stylesheets/common.scss
... ... @@ -81,33 +81,6 @@ span.update-author {
81 81 font-weight: normal;
82 82 }
83 83  
84   -form {
85   - @extend .form-horizontal;
86   -
87   - .actions {
88   - @extend .form-actions;
89   - }
90   -
91   - .clearfix {
92   - @extend .control-group;
93   - }
94   -
95   - .input {
96   - @extend .controls;
97   - }
98   -
99   - label {
100   - @extend .control-label;
101   - }
102   - .xlarge {
103   - @extend .input-xlarge;
104   - }
105   - .xxlarge {
106   - @extend .input-xxlarge;
107   - }
108   -}
109   -
110   -
111 84 .field_with_errors {
112 85 display: inline;
113 86 }
... ... @@ -127,13 +100,6 @@ ul.breadcrumb {
127 100 }
128 101 }
129 102  
130   -input[type=text] {
131   - &.large_text {
132   - padding: 6px;
133   - font-size: 16px;
134   - }
135   -}
136   -
137 103 .line_holder {
138 104 &:hover {
139 105 td {
... ...
app/assets/stylesheets/gitlab_bootstrap.scss
... ... @@ -2,11 +2,49 @@
2 2 $baseFontSize: 13px !default;
3 3 $baseLineHeight: 18px !default;
4 4  
5   -// BOOTSTRAP
6   -@import "bootstrap";
  5 +/**
  6 + * BOOTSTRAP
  7 + */
  8 +@import "bootstrap/variables";
  9 +@import "bootstrap/mixins";
  10 +@import "bootstrap/reset";
  11 +@import "bootstrap/scaffolding";
  12 +@import "bootstrap/grid";
  13 +@import "bootstrap/layouts";
  14 +@import "bootstrap/type";
  15 +@import "bootstrap/code";
  16 +@import "bootstrap/forms";
  17 +@import "bootstrap/tables";
  18 +@import "bootstrap/sprites";
  19 +@import "bootstrap/dropdowns";
  20 +@import "bootstrap/wells";
  21 +@import "bootstrap/component-animations";
  22 +@import "bootstrap/close";
  23 +@import "bootstrap/button-groups";
  24 +@import "bootstrap/alerts";
  25 +@import "bootstrap/navs";
  26 +@import "bootstrap/navbar";
  27 +@import "bootstrap/breadcrumbs";
  28 +@import "bootstrap/pagination";
  29 +@import "bootstrap/pager";
  30 +@import "bootstrap/modals";
  31 +@import "bootstrap/tooltip";
  32 +@import "bootstrap/popovers";
  33 +@import "bootstrap/thumbnails";
  34 +@import "bootstrap/media";
  35 +@import "bootstrap/labels-badges";
  36 +@import "bootstrap/progress-bars";
  37 +@import "bootstrap/accordion";
  38 +@import "bootstrap/carousel";
  39 +@import "bootstrap/hero-unit";
  40 +@import "bootstrap/utilities";
7 41 @import "bootstrap/responsive-utilities";
8 42 @import "bootstrap/responsive-1200px-min";
9 43  
  44 +/**
  45 + * Font icons
  46 + *
  47 + */
10 48 @import "font-awesome";
11 49  
12 50 /**
... ... @@ -26,3 +64,4 @@ $baseLineHeight: 18px !default;
26 64 @import "gitlab_bootstrap/files.scss";
27 65 @import "gitlab_bootstrap/tables.scss";
28 66 @import "gitlab_bootstrap/lists.scss";
  67 +@import "gitlab_bootstrap/forms.scss";
... ...
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
... ... @@ -97,6 +97,8 @@
97 97  
98 98 .btn {
99 99 vertical-align: middle;
  100 + padding: 4px 12px;
  101 + @include box-shadow(0 0px 1px 1px #f2f2f2);
100 102 }
101 103  
102 104 .nav-pills {
... ...
app/assets/stylesheets/gitlab_bootstrap/common.scss
... ... @@ -90,3 +90,11 @@ pre.well-pre {
90 90 border-radius: 0;
91 91 color: #555;
92 92 }
  93 +
  94 +.input-append .btn.active, .input-prepend .btn.active {
  95 + background: #CCC;
  96 + border-color: #BBB;
  97 + text-shadow: 0 1px 1px #fff;
  98 + font-weight: bold;
  99 + @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15));
  100 +}
... ...
app/assets/stylesheets/gitlab_bootstrap/forms.scss 0 → 100644
... ... @@ -0,0 +1,32 @@
  1 +form {
  2 + @extend .form-horizontal;
  3 +
  4 + .actions {
  5 + @extend .form-actions;
  6 + }
  7 +
  8 + .clearfix {
  9 + @extend .control-group;
  10 + }
  11 +
  12 + .input {
  13 + @extend .controls;
  14 + }
  15 +
  16 + label {
  17 + @extend .control-label;
  18 + }
  19 + .xlarge {
  20 + @extend .input-xlarge;
  21 + }
  22 + .xxlarge {
  23 + @extend .input-xxlarge;
  24 + }
  25 +}
  26 +
  27 +input {
  28 + &.input-xpadding {
  29 + padding: 6px 10px;
  30 + }
  31 +}
  32 +
... ...
app/assets/stylesheets/gitlab_bootstrap/typography.scss
... ... @@ -52,13 +52,6 @@ a {
52 52 text-decoration: underline;
53 53 }
54 54  
55   - &.btn {
56   - color: $style_color;
57   - &:hover {
58   - color: $style_color;
59   - }
60   - }
61   -
62 55 &.dark {
63 56 color: $style_color;
64 57 }
... ...
app/assets/stylesheets/sections/commits.scss
... ... @@ -421,8 +421,8 @@
421 421  
422 422 .commits-compare-switch{
423 423 background: url("switch_icon.png") no-repeat center center;
424   - width: 16px;
425   - height: 18px;
  424 + width: 22px;
  425 + height: 22px;
426 426 text-indent: -9999px;
427 427 float: left;
428 428 margin-right: 9px;
... ...
app/assets/stylesheets/sections/projects.scss
... ... @@ -7,11 +7,6 @@
7 7 line-height: 20px;
8 8 padding: 8px;
9 9 }
10   - .btn {
11   - padding: 6px 10px;
12   - margin-left: 10px;
13   - margin-bottom: 8px;
14   - }
15 10 }
16 11 .adv_settings {
17 12 h6 { margin-left: 40px; }
... ... @@ -30,6 +25,10 @@
30 25 padding: 4px 7px;
31 26 border: 1px solid #CCC;
32 27 margin-bottom: 20px;
  28 +
  29 + .btn {
  30 + padding: 4px 12px;
  31 + }
33 32 }
34 33  
35 34 .project_clone_holder {
... ... @@ -114,7 +113,7 @@ ul.nav.nav-projects-tabs {
114 113 .public-clone {
115 114 background: #333;
116 115 color: #f5f5f5;
117   - padding: 5px 10px;
  116 + padding: 6px 10px;
118 117 margin: 1px;
119 118 font-weight: normal;
120 119 }
... ...
app/assets/stylesheets/sections/tree.scss
... ... @@ -104,6 +104,8 @@
104 104 }
105 105  
106 106 .tree-btn-group {
  107 + top: 2px;
  108 +
107 109 .btn {
108 110 margin-right: 0px;
109 111 padding: 2px 10px;
... ...
app/views/admin/groups/index.html.haml
... ... @@ -4,7 +4,7 @@
4 4 allows you to keep projects organized.
5 5 Use groups for uniting related projects.
6 6  
7   - = link_to 'New Group', new_admin_group_path, class: "btn btn-small pull-right"
  7 + = link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right"
8 8 %br
9 9 = form_tag admin_groups_path, method: :get, class: 'form-inline' do
10 10 = text_field_tag :name, params[:name], class: "span6"
... ...
app/views/admin/hooks/index.html.haml
... ... @@ -13,7 +13,7 @@
13 13 .clearfix
14 14 = f.label :url, "URL:"
15 15 .input
16   - = f.text_field :url, class: "text_field xxlarge"
  16 + = f.text_field :url, class: "text_field xxlarge input-xpadding"
17 17  
18 18 = f.submit "Add System Hook", class: "btn btn-create"
19 19 %hr
... ...
app/views/admin/projects/index.html.haml
... ... @@ -38,7 +38,7 @@
38 38 .title
39 39 Projects (#{@projects.total_count})
40 40 .pull-right
41   - = link_to 'New Project', new_project_path, class: "btn btn-small btn-primary wide"
  41 + = link_to 'New Project', new_project_path, class: "btn btn-new"
42 42 %ul.well-list
43 43 - @projects.each do |project|
44 44 %li
... ...
app/views/admin/users/index.html.haml
... ... @@ -30,7 +30,7 @@
30 30 .title
31 31 Users (#{@users.total_count})
32 32 .pull-right
33   - = link_to 'New User', new_admin_user_path, class: "btn btn-small wide btn-primary"
  33 + = link_to 'New User', new_admin_user_path, class: "btn btn-new"
34 34 %ul.well-list
35 35 - @users.each do |user|
36 36 %li
... ...
app/views/profiles/groups/index.html.haml
1 1 %h3.page-title
2 2 Group membership
  3 + - if current_user.can_create_group?
  4 + %span.pull-right
  5 + = link_to new_group_path, class: "btn btn-new" do
  6 + %i.icon-plus
  7 + New Group
3 8 %p.light
4 9 Members of group have access to all group projects.
5 10 %hr
... ... @@ -7,11 +12,6 @@
7 12 .title
8 13 %strong Groups
9 14 (#{@groups.count})
10   - - if current_user.can_create_group?
11   - %span.pull-right
12   - = link_to new_group_path, class: "btn btn-small btn-primary" do
13   - %i.icon-plus
14   - New Group
15 15 %ul.well-list
16 16 - @groups.each do |group|
17 17 %li
... ...
app/views/profiles/keys/index.html.haml
1 1 %h3.page-title
2 2 My SSH keys
  3 + .pull-right
  4 + = link_to "Add SSH Key", new_profile_key_path, class: "btn btn-new"
3 5 %p.light
4 6 SSH key allows you to establish a secure connection between your computer and GitLab
5 7 %br
... ... @@ -11,8 +13,6 @@
11 13 .ui-box
12 14 .title
13 15 SSH Keys (#{@keys.count})
14   - .pull-right
15   - = link_to "Add SSH Key", new_profile_key_path, class: "btn btn-small btn-primary"
16 16 %ul.well-list#keys-table
17 17 = render @keys
18 18 - if @keys.blank?
... ...
app/views/profiles/show.html.haml
... ... @@ -87,4 +87,4 @@
87 87 = link_to "Add Public Key", new_profile_key_path, class: "btn btn-small"
88 88  
89 89 .form-actions
90   - = f.submit 'Save', class: "btn btn-save"
  90 + = f.submit 'Save changes', class: "btn btn-save"
... ...
app/views/projects/blob/_actions.html.haml
1 1 .btn-group.tree-btn-group
2 2 -# only show edit link for text files
3 3 - if @blob.text?
4   - = link_to "edit", project_edit_tree_path(@project, @id), class: "btn btn-tiny", disabled: !allowed_tree_edit?
5   - = link_to "raw", project_raw_path(@project, @id), class: "btn btn-tiny", target: "_blank"
  4 + = link_to "edit", project_edit_tree_path(@project, @id), class: "btn btn-small", disabled: !allowed_tree_edit?
  5 + = link_to "raw", project_raw_path(@project, @id), class: "btn btn-small", target: "_blank"
6 6 -# only show normal/blame view links for text files
7 7 - if @blob.text?
8 8 - if current_page? project_blame_path(@project, @id)
9   - = link_to "normal view", project_blob_path(@project, @id), class: "btn btn-tiny"
  9 + = link_to "normal view", project_blob_path(@project, @id), class: "btn btn-small"
10 10 - else
11   - = link_to "blame", project_blame_path(@project, @id), class: "btn btn-tiny" unless @blob.empty?
12   - = link_to "history", project_commits_path(@project, @id), class: "btn btn-tiny"
  11 + = link_to "blame", project_blame_path(@project, @id), class: "btn btn-small" unless @blob.empty?
  12 + = link_to "history", project_commits_path(@project, @id), class: "btn btn-small"
... ...
app/views/projects/compare/_form.html.haml
... ... @@ -14,9 +14,9 @@
14 14 .pull-left
15 15 - if params[:to] && params[:from]
16 16 = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
17   - = text_field_tag :from, params[:from], placeholder: "master", class: "xlarge"
  17 + = text_field_tag :from, params[:from], placeholder: "master", class: "xlarge input-xpadding"
18 18 = "..."
19   - = text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
  19 + = text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge input-xpadding"
20 20 .pull-left
21 21  
22 22 = submit_tag "Compare", class: "btn btn-create commits-compare-btn"
... ...
app/views/projects/deploy_keys/index.html.haml
1 1 %p.slead
2   - Deploy keys allow read-only access to repository. They can be used for CI, staging or production servers
  2 + Deploy keys allow read-only access to repository
3 3  
4   -%p
5   - You can create a deploy key or add existing one
6   - = link_to new_project_deploy_key_path(@project), class: "btn btn-primary pull-right", title: "New Deploy Key" do
  4 + = link_to new_project_deploy_key_path(@project), class: "btn btn-new pull-right", title: "New Deploy Key" do
7 5 %i.icon-plus
8 6 New Deploy Key
9 7  
  8 +%p.light
  9 + They can be used for CI, staging or production servers.
  10 + You can create a deploy key or add existing one
  11 +
10 12 %hr.clearfix
11 13  
12 14 .row
... ...
app/views/projects/edit.html.haml
... ... @@ -4,7 +4,7 @@
4 4 .ui-box.white
5 5 .title
6 6 %strong= @project.name
7   - Project Settings:
  7 + project settings:
8 8 .form-holder
9 9 = form_for(@project, remote: true) do |f|
10 10 %fieldset
... ... @@ -98,7 +98,7 @@
98 98  
99 99  
100 100 .form-actions
101   - = f.submit 'Save', class: "btn btn-save"
  101 + = f.submit 'Save changes', class: "btn btn-save"
102 102  
103 103 - if can?(current_user, :change_namespace, @project)
104 104 .ui-box.ui-box-danger
... ...
app/views/projects/hooks/index.html.haml
... ... @@ -14,7 +14,7 @@
14 14 .clearfix
15 15 = f.label :url, "URL:"
16 16 .input
17   - = f.text_field :url, class: "text_field xxlarge"
  17 + = f.text_field :url, class: "text_field xxlarge input-xpadding", placeholder: 'http://example.com/trigger-ci.json'
18 18  
19 19 = f.submit "Add Web Hook", class: "btn btn-create"
20 20 %hr
... ...
app/views/projects/issues/index.html.haml
... ... @@ -6,7 +6,7 @@
6 6 .pull-right
7 7 .span6
8 8 - if can? current_user, :write_issue, @project
9   - = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-primary pull-right", title: "New Issue", id: "new_issue_link" do
  9 + = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-right", title: "New Issue", id: "new_issue_link" do
10 10 %i.icon-plus
11 11 New Issue
12 12 = form_tag project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right' do
... ... @@ -14,7 +14,7 @@
14 14 = hidden_field_tag :assignee_id, params[:assignee_id], id: 'search_assignee_id'
15 15 = hidden_field_tag :milestone_id, params[:milestone_id], id: 'search_milestone_id'
16 16 = hidden_field_tag :label_name, params[:label_name], id: 'search_label_name'
17   - = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search input-xlarge append-right-10 search-text-input' }
  17 + = search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'input-xpadding issue_search input-xlarge append-right-10 search-text-input' }
18 18  
19 19 .row
20 20 .span3
... ...
app/views/projects/merge_requests/index.html.haml
1 1 - if can? current_user, :write_merge_request, @project
2   - = link_to new_project_merge_request_path(@project), class: "pull-right btn btn-primary", title: "New Merge Request" do
  2 + = link_to new_project_merge_request_path(@project), class: "pull-right btn btn-new", title: "New Merge Request" do
3 3 %i.icon-plus
4 4 New Merge Request
5 5 %h3.page-title
... ...
app/views/projects/milestones/_form.html.haml
... ... @@ -32,7 +32,7 @@
32 32  
33 33 .form-actions
34 34 - if @milestone.new_record?
35   - = f.submit 'Create milestone', class: "btn-save btn"
  35 + = f.submit 'Create milestone', class: "btn-create btn"
36 36 = link_to "Cancel", project_milestones_path(@project), class: "btn btn-cancel"
37 37 -else
38 38 = f.submit 'Save changes', class: "btn-save btn"
... ...
app/views/projects/milestones/index.html.haml
... ... @@ -3,7 +3,7 @@
3 3 %h3.page-title
4 4 Milestones
5 5 - if can? current_user, :admin_milestone, @project
6   - = link_to new_project_milestone_path(@project), class: "pull-right btn btn-primary", title: "New Milestone" do
  6 + = link_to new_project_milestone_path(@project), class: "pull-right btn btn-new", title: "New Milestone" do
7 7 %i.icon-plus
8 8 New Milestone
9 9  
... ...
app/views/projects/team_members/index.html.haml
... ... @@ -3,9 +3,9 @@
3 3  
4 4 - if can? current_user, :admin_team_member, @project
5 5 %span.pull-right
6   - = link_to import_project_team_members_path(@project), class: "btn btn-small grouped", title: "Import team from another project" do
  6 + = link_to import_project_team_members_path(@project), class: "btn grouped", title: "Import team from another project" do
7 7 Import team from another project
8   - = link_to new_project_team_member_path(@project), class: "btn btn-primary small grouped", title: "New Team Member" do
  8 + = link_to new_project_team_member_path(@project), class: "btn btn-new grouped", title: "New Team Member" do
9 9 New Team Member
10 10  
11 11 %p.light
... ...
app/views/projects/wikis/_form.html.haml
... ... @@ -29,8 +29,9 @@
29 29 = f.label :commit_message
30 30 .input= f.text_field :message, class: 'span8'
31 31 .actions
32   - = f.submit 'Save', class: "btn-save btn"
33 32 - if @wiki && @wiki.persisted?
  33 + = f.submit 'Save changes', class: "btn-save btn"
34 34 = link_to "Cancel", project_wiki_path(@project, @wiki), class: "btn btn-cancel"
35 35 - else
  36 + = f.submit 'Create page', class: "btn-create btn"
36 37 = link_to "Cancel", project_wiki_path(@project, :home), class: "btn btn-cancel"
... ...
app/views/projects/wikis/_nav.html.haml
... ... @@ -12,7 +12,7 @@
12 12  
13 13 - if can?(current_user, :write_wiki, @project)
14 14 .pull-right
15   - = link_to '#', class: "add-new-wiki btn btn-small btn-primary" do
  15 + = link_to '#', class: "add-new-wiki btn btn-new" do
16 16 %i.icon-plus
17 17 New Page
18 18  
... ...
app/views/projects/wikis/git_access.html.haml
1 1 = render 'nav'
2 2 %h3.page-title
3   - Git Access
  3 + Git access for
4 4 %strong= @gollum_wiki.path_with_namespace
5 5 = render 'main_links'
6 6  
7   -%br
8 7 .content
9 8 .project_clone_panel
10 9 .row
... ...
app/views/snippets/current_user_index.html.haml
1 1 %h3.page-title
2 2 My Snippets
3   - %small share code pastes with others out of git repository
4 3 .pull-right
5   - = link_to new_snippet_path, class: "btn btn-small add_new grouped btn-primary", title: "New Snippet" do
  4 + = link_to new_snippet_path, class: "btn btn-new grouped", title: "New Snippet" do
6 5 Add new snippet
7   - = link_to snippets_path, class: "btn btn-small grouped" do
  6 + = link_to snippets_path, class: "btn grouped" do
8 7 Discover snippets
9 8  
  9 +%p.light
  10 + Share code pastes with others out of git repository
10 11 %hr
11 12  
12 13 .row
... ...
app/views/snippets/index.html.haml
1 1 %h3.page-title
2 2 Public snippets
3   - %small share code pastes with others out of git repository
4 3  
5 4 .pull-right
6   - = link_to new_snippet_path, class: "btn btn-small add_new grouped btn-primary", title: "New Snippet" do
  5 + = link_to new_snippet_path, class: "btn btn-new grouped", title: "New Snippet" do
7 6 Add new snippet
8   - = link_to user_snippets_path(current_user), class: "btn btn-small grouped" do
  7 + = link_to user_snippets_path(current_user), class: "btn grouped" do
9 8 My snippets
10 9  
  10 +%p.light
  11 + Public snippets created by you and other users are listed here
  12 +
11 13 %hr
12 14 = render 'snippets'
13 15  
... ...
app/views/snippets/show.html.haml
... ... @@ -7,7 +7,7 @@
7 7 private
8 8  
9 9 .pull-right
10   - = link_to new_snippet_path, class: "btn btn-small add_new grouped btn-primary", title: "New Snippet" do
  10 + = link_to new_snippet_path, class: "btn btn-new btn-small", title: "New Snippet" do
11 11 Add new snippet
12 12  
13 13  
... ...
features/steps/profile/profile.rb
... ... @@ -12,7 +12,7 @@ class Profile < Spinach::FeatureSteps
12 12 fill_in "user_skype", with: "testskype"
13 13 fill_in "user_linkedin", with: "testlinkedin"
14 14 fill_in "user_twitter", with: "testtwitter"
15   - click_button "Save"
  15 + click_button "Save changes"
16 16 @user.reload
17 17 end
18 18  
... ...
features/steps/project/project.rb
... ... @@ -9,7 +9,7 @@ class ProjectFeature < Spinach::FeatureSteps
9 9 end
10 10  
11 11 And 'I save project' do
12   - click_button 'Save'
  12 + click_button 'Save changes'
13 13 end
14 14  
15 15 Then 'I should see project with new settings' do
... ...