Commit d89c6adfe675620cb1730fa3036ddff18ff20105
1 parent
bd2ca33d
Exists in
master
and in
4 other branches
Improve select UI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
6 changed files
with
38 additions
and
17 deletions
Show diff stats
app/assets/stylesheets/common.scss
app/assets/stylesheets/sections/merge_requests.scss
@@ -110,9 +110,29 @@ | @@ -110,9 +110,29 @@ | ||
110 | 110 | ||
111 | .merge-request-angle { | 111 | .merge-request-angle { |
112 | text-align: center; | 112 | text-align: center; |
113 | - margin: 0; | 113 | + margin: 0 auto; |
114 | + background: #eee; | ||
115 | + border-radius: 100px; | ||
116 | + width: 60px; | ||
117 | + line-height: 60px; | ||
118 | + color: #777; | ||
119 | + text-shadow: 0 1px 2px #FFF; | ||
114 | } | 120 | } |
115 | 121 | ||
116 | .merge-request-form-info { | 122 | .merge-request-form-info { |
117 | - padding: 15px 0; | 123 | + padding-top: 15px; |
124 | +} | ||
125 | + | ||
126 | +.merge-request-branches { | ||
127 | + .commit-row-message { | ||
128 | + font-weight: normal !important; | ||
129 | + } | ||
130 | + | ||
131 | + .chosen-container .chosen-single { | ||
132 | + padding: 2px 0 2px 10px; | ||
133 | + span { | ||
134 | + font-weight: bold; | ||
135 | + color: #555; | ||
136 | + } | ||
137 | + } | ||
118 | } | 138 | } |
app/assets/stylesheets/selects.scss
@@ -71,8 +71,9 @@ | @@ -71,8 +71,9 @@ | ||
71 | .chosen-drop { | 71 | .chosen-drop { |
72 | margin: 7px 0; | 72 | margin: 7px 0; |
73 | min-width: 200px; | 73 | min-width: 200px; |
74 | - border: 1px solid #bbb; | 74 | + border: 1px solid #CCC; |
75 | @include border-radius(0); | 75 | @include border-radius(0); |
76 | + box-shadow: inset 0 1px 0 #fff, 0 1px 5px #f1f1f1; | ||
76 | 77 | ||
77 | .chosen-results { | 78 | .chosen-results { |
78 | margin-top: 5px; | 79 | margin-top: 5px; |
@@ -80,9 +81,10 @@ | @@ -80,9 +81,10 @@ | ||
80 | 81 | ||
81 | .group-result { | 82 | .group-result { |
82 | color: $style_color; | 83 | color: $style_color; |
83 | - border-bottom: 1px solid #EEE; | ||
84 | - padding: 8px; | 84 | + font-size: 14px; |
85 | + line-height: 1.5; | ||
85 | } | 86 | } |
87 | + | ||
86 | .active-result { | 88 | .active-result { |
87 | @include border-radius(0); | 89 | @include border-radius(0); |
88 | 90 | ||
@@ -91,8 +93,8 @@ | @@ -91,8 +93,8 @@ | ||
91 | color: $style_color; | 93 | color: $style_color; |
92 | } | 94 | } |
93 | &.result-selected { | 95 | &.result-selected { |
96 | + font-weight: bolder; | ||
94 | background: #EEE; | 97 | background: #EEE; |
95 | - border-left: 4px solid #CCC; | ||
96 | } | 98 | } |
97 | } | 99 | } |
98 | } | 100 | } |
@@ -118,17 +120,13 @@ | @@ -118,17 +120,13 @@ | ||
118 | 120 | ||
119 | span { | 121 | span { |
120 | font-weight: normal; | 122 | font-weight: normal; |
123 | + text-shadow: 0 1px 2px #FFF; | ||
121 | } | 124 | } |
122 | } | 125 | } |
123 | 126 | ||
124 | /** Select2 styling **/ | 127 | /** Select2 styling **/ |
125 | .select2-container .select2-choice { | 128 | .select2-container .select2-choice { |
126 | - background: #f1f1f1; | ||
127 | - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, whitesmoke), to(#e1e1e1)); | ||
128 | - background-image: -webkit-linear-gradient(whitesmoke 6.6%, #e1e1e1); | ||
129 | - background-image: -moz-linear-gradient(whitesmoke 6.6%, #e1e1e1); | ||
130 | - background-image: -ms-linear-gradient(whitesmoke 6.6%, #e1e1e1); | ||
131 | - background-image: -o-linear-gradient(whitesmoke 6.6%, #e1e1e1); | 129 | + @include bg-light-gray-gradient; |
132 | } | 130 | } |
133 | 131 | ||
134 | .select2-container .select2-choice div { | 132 | .select2-container .select2-choice div { |
app/helpers/application_helper.rb
@@ -84,8 +84,8 @@ module ApplicationHelper | @@ -84,8 +84,8 @@ module ApplicationHelper | ||
84 | repository = @project.repository | 84 | repository = @project.repository |
85 | 85 | ||
86 | options = [ | 86 | options = [ |
87 | - ["Branch", repository.branch_names ], | ||
88 | - [ "Tag", repository.tag_names ] | 87 | + ["Branches", repository.branch_names], |
88 | + ["Tags", repository.tag_names] | ||
89 | ] | 89 | ] |
90 | 90 | ||
91 | # If reference is commit id - | 91 | # If reference is commit id - |
app/views/projects/edit.html.haml
@@ -124,7 +124,7 @@ | @@ -124,7 +124,7 @@ | ||
124 | %span Namespace | 124 | %span Namespace |
125 | .controls | 125 | .controls |
126 | .control-group | 126 | .control-group |
127 | - = f.select :namespace_id, namespaces_options(@project.namespace_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'} | 127 | + = f.select :namespace_id, namespaces_options(@project.namespace_id), { prompt: 'Choose a project namespace' }, { class: 'chosen' } |
128 | %ul | 128 | %ul |
129 | %li Be careful. Changing the project's namespace can have unintended side effects. | 129 | %li Be careful. Changing the project's namespace can have unintended side effects. |
130 | %li You can only transfer the project to namespaces you manage. | 130 | %li You can only transfer the project to namespaces you manage. |
app/views/projects/merge_requests/_form.html.haml
@@ -13,7 +13,6 @@ | @@ -13,7 +13,6 @@ | ||
13 | = f.select(:source_project_id,[[@merge_request.source_project.path_with_namespace,@merge_request.source_project.id]] , {}, {class: 'source_project chosen span3'}) | 13 | = f.select(:source_project_id,[[@merge_request.source_project.path_with_namespace,@merge_request.source_project.id]] , {}, {class: 'source_project chosen span3'}) |
14 | .pull-left | 14 | .pull-left |
15 | | 15 | |
16 | - %i.icon-code-fork | ||
17 | = f.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span2'}) | 16 | = f.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span2'}) |
18 | .mr_source_commit.prepend-top-10 | 17 | .mr_source_commit.prepend-top-10 |
19 | .span2 | 18 | .span2 |
@@ -26,7 +25,6 @@ | @@ -26,7 +25,6 @@ | ||
26 | = f.select(:target_project_id, projects.map { |proj| [proj.path_with_namespace,proj.id] }, {include_blank: "Select Target Project" }, {class: 'target_project chosen span3'}) | 25 | = f.select(:target_project_id, projects.map { |proj| [proj.path_with_namespace,proj.id] }, {include_blank: "Select Target Project" }, {class: 'target_project chosen span3'}) |
27 | .pull-left | 26 | .pull-left |
28 | | 27 | |
29 | - %i.icon-code-fork | ||
30 | = f.select(:target_branch, @target_branches, { include_blank: "Select branch" }, {class: 'target_branch chosen span2'}) | 28 | = f.select(:target_branch, @target_branches, { include_blank: "Select branch" }, {class: 'target_branch chosen span2'}) |
31 | .mr_target_commit.prepend-top-10 | 29 | .mr_target_commit.prepend-top-10 |
32 | 30 |