diff options
author | Phil Hughes <me@iamphill.com> | 2016-03-29 11:28:23 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-04-06 11:08:40 +0100 |
commit | 850fa65ef2ff1fb16623c591a2147d75df333c58 (patch) | |
tree | adee7a12d597b9b374c55708e05a19f59d718548 /app | |
parent | b31005899858bb19f5de06b49621fa1d73dbe037 (diff) | |
download | gitlab-ce-850fa65ef2ff1fb16623c591a2147d75df333c58.tar.gz |
Checkmarks in dropdowns for already selected values
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/pages/commits.scss | 1 | ||||
-rw-r--r-- | app/views/projects/merge_requests/_new_compare.html.haml | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/app/assets/stylesheets/pages/commits.scss b/app/assets/stylesheets/pages/commits.scss index 8272615768d..ad8e97de3b3 100644 --- a/app/assets/stylesheets/pages/commits.scss +++ b/app/assets/stylesheets/pages/commits.scss @@ -47,6 +47,7 @@ li.commit { .commit_short_id { min-width: 65px; + color: $gl-dark-link-color; font-family: $monospace_font; } diff --git a/app/views/projects/merge_requests/_new_compare.html.haml b/app/views/projects/merge_requests/_new_compare.html.haml index f110c5f42c8..84c2faff920 100644 --- a/app/views/projects/merge_requests/_new_compare.html.haml +++ b/app/views/projects/merge_requests/_new_compare.html.haml @@ -12,25 +12,25 @@ .merge-request-select.dropdown = f.hidden_field :source_project_id = dropdown_toggle @merge_request.source_project_path, { toggle: "dropdown", field_name: "#{f.object_name}[source_project_id]", disabled: @merge_request.persisted? }, { toggle_class: "js-compare-dropdown js-source-project" } - .dropdown-menu + .dropdown-menu.dropdown-menu-selectable = dropdown_title("Select source project") = dropdown_filter("Search projects") = dropdown_content do %ul %li - %a{ href: "#", data: { id: @merge_request.source_project.id } } + %a{ href: "#", class: "#{("is-active" if f.object.source_project_id == @merge_request.source_project.id)}", data: { id: @merge_request.source_project.id } } = @merge_request.source_project_path .merge-request-select.dropdown = f.hidden_field :source_branch = dropdown_toggle "Select source branch", { toggle: "dropdown", field_name: "#{f.object_name}[source_branch]" }, { toggle_class: "js-compare-dropdown js-source-branch" } - .dropdown-menu + .dropdown-menu.dropdown-menu-selectable = dropdown_title("Select source branch") = dropdown_filter("Search branches") = dropdown_content do %ul - @merge_request.source_branches.each do |branch| %li - %a{ href: "#", data: { id: branch } } + %a{ href: "#", class: "#{("is-active" if f.object.source_branch == branch)}", data: { id: branch } } = branch .panel-footer = icon('spinner spin', class: "js-source-loading") @@ -45,14 +45,14 @@ .merge-request-select.dropdown = f.hidden_field :target_project_id = dropdown_toggle projects.first.path_with_namespace, { toggle: "dropdown", field_name: "#{f.object_name}[target_project_id]", disabled: @merge_request.persisted? }, { toggle_class: "js-compare-dropdown js-target-project" } - .dropdown-menu + .dropdown-menu.dropdown-menu-selectable = dropdown_title("Select target project") = dropdown_filter("Search projects") = dropdown_content do %ul - projects.each do |project| %li - %a{ href: "#" } + %a{ href: "#", class: "#{("is-active" if f.object.target_project_id == project.id)}", data: { id: project.id } } = project.path_with_namespace .merge-request-select.dropdown = f.hidden_field :target_branch @@ -64,7 +64,7 @@ %ul - @merge_request.target_branches.each do |branch| %li - %a{ href: "#", class: "#{("is-active" if :target_branch == branch)}", data: { id: branch } } + %a{ href: "#", class: "#{("is-active" if f.object.target_branch == branch)}", data: { id: branch } } = branch .panel-footer = icon('spinner spin', class: "js-target-loading") |