Commit a1beb409 authored by Clement Ho's avatar Clement Ho

Fix dropdowns

parent 1dfaa6a8
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</span> </span>
</button> </button>
<ul class="dropdown-menu dropdown-menu-align-right"> <ul class="dropdown-menu dropdown-menu-right">
<li <li
v-for="(action, i) in actions" v-for="(action, i) in actions"
:key="i"> :key="i">
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<loading-icon v-if="isLoading" /> <loading-icon v-if="isLoading" />
</button> </button>
<ul class="dropdown-menu dropdown-menu-align-right"> <ul class="dropdown-menu dropdown-menu-right">
<li <li
v-for="(action, i) in actions" v-for="(action, i) in actions"
:key="i" :key="i"
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
> >
</i> </i>
</button> </button>
<ul class="dropdown-menu dropdown-menu-align-right"> <ul class="dropdown-menu dropdown-menu-right">
<li <li
v-for="(artifact, i) in artifacts" v-for="(artifact, i) in artifacts"
:key="i"> :key="i">
......
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
aria-hidden="true"> aria-hidden="true">
</i> </i>
</button> </button>
<ul class="dropdown-menu dropdown-menu-align-right"> <ul class="dropdown-menu dropdown-menu-right">
<li> <li>
<a <a
class="js-download-email-patches" class="js-download-email-patches"
......
...@@ -206,11 +206,10 @@ ...@@ -206,11 +206,10 @@
.dropdown-menu, .dropdown-menu,
.dropdown-menu-nav { .dropdown-menu-nav {
@include set-invisible; display: none;
position: absolute; position: absolute;
width: auto; width: auto;
top: 100%; top: 100%;
left: 0;
z-index: 300; z-index: 300;
min-width: 240px; min-width: 240px;
max-width: 500px; max-width: 500px;
...@@ -474,11 +473,6 @@ ...@@ -474,11 +473,6 @@
} }
} }
.dropdown-menu-align-right {
left: auto;
right: 0;
}
.dropdown-menu-selectable { .dropdown-menu-selectable {
li { li {
a, a,
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
flex: 1; flex: 1;
} }
.dropdown-menu-align-right { .dropdown-menu-right {
margin-top: 0; margin-top: 0;
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
display: flex; display: flex;
} }
.dropdown-menu.dropdown-menu-align-right { .dropdown-menu.dropdown-menu-right {
margin-top: -2px; margin-top: -2px;
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
line-height: 34px; line-height: 34px;
.dropdown-menu { .dropdown-menu {
@extend .dropdown-menu-align-right; @extend .dropdown-menu-right;
} }
} }
......
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
} }
.notification-dropdown .dropdown-menu { .notification-dropdown .dropdown-menu {
@extend .dropdown-menu-align-right; @extend .dropdown-menu-right;
} }
.download-button { .download-button {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
- namespace = Namespace.find(params[:namespace_id]) - namespace = Namespace.find(params[:namespace_id])
- toggle_text = "#{namespace.kind}: #{namespace.full_path}" - toggle_text = "#{namespace.kind}: #{namespace.full_path}"
= dropdown_toggle(toggle_text, { toggle: 'dropdown', is_filter: 'true' }, { toggle_class: 'js-namespace-select large' }) = dropdown_toggle(toggle_text, { toggle: 'dropdown', is_filter: 'true' }, { toggle_class: 'js-namespace-select large' })
.dropdown-menu.dropdown-select.dropdown-menu-align-right .dropdown-menu.dropdown-select.dropdown-menu-right
= dropdown_title('Namespaces') = dropdown_title('Namespaces')
= dropdown_filter("Search for Namespace") = dropdown_filter("Search for Namespace")
= dropdown_content = dropdown_content
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
%a.dropdown-new.btn.btn-secondary#project-settings-button{ href: '#', data: { toggle: 'dropdown' } } %a.dropdown-new.btn.btn-secondary#project-settings-button{ href: '#', data: { toggle: 'dropdown' } }
= icon('cog') = icon('cog')
= icon('caret-down') = icon('caret-down')
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-right
%li.dropdown-header %li.dropdown-header
Settings Settings
%li %li
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
.dropdown .dropdown
- toggle_text = if @sort.present? then sort_options_hash[@sort] else sort_title_name end - toggle_text = if @sort.present? then sort_options_hash[@sort] else sort_title_name end
= dropdown_toggle(toggle_text, { toggle: 'dropdown' }) = dropdown_toggle(toggle_text, { toggle: 'dropdown' })
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-right
%li.dropdown-header %li.dropdown-header
Sort by Sort by
%li %li
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
- if params[:project_id].present? - if params[:project_id].present?
= hidden_field_tag(:project_id, params[:project_id]) = hidden_field_tag(:project_id, params[:project_id])
= dropdown_tag(project_dropdown_label(params[:project_id], 'Project'), options: { toggle_class: 'js-project-search js-filter-submit', title: 'Filter by project', filter: true, filterInput: 'input#project-search', dropdown_class: 'dropdown-menu-selectable dropdown-menu-project js-filter-submit', = dropdown_tag(project_dropdown_label(params[:project_id], 'Project'), options: { toggle_class: 'js-project-search js-filter-submit', title: 'Filter by project', filter: true, filterInput: 'input#project-search', dropdown_class: 'dropdown-menu-selectable dropdown-menu-project js-filter-submit',
placeholder: 'Search projects', data: { data: todo_projects_options, default_label: 'Project' } }) placeholder: 'Search projects', data: { data: todo_projects_options, default_label: 'Project', display: 'static' } })
.filter-item.inline .filter-item.inline
- if params[:author_id].present? - if params[:author_id].present?
= hidden_field_tag(:author_id, params[:author_id]) = hidden_field_tag(:author_id, params[:author_id])
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
- else - else
= sort_title_recently_created = sort_title_recently_created
= icon('chevron-down') = icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-sort %ul.dropdown-menu.dropdown-menu-sort.dropdown-menu-right
%li %li
= link_to todos_filter_path(sort: sort_value_label_priority) do = link_to todos_filter_path(sort: sort_value_label_priority) do
= sort_title_label_priority = sort_title_label_priority
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- else - else
Any Any
= icon('chevron-down') = icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-right
%li %li
= link_to filter_projects_path(visibility_level: nil) do = link_to filter_projects_path(visibility_level: nil) do
Any Any
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
%input.btn.btn-success.dropdown-primary.js-new-group-child{ type: "button", value: new_project_label, data: { action: "new-project" } } %input.btn.btn-success.dropdown-primary.js-new-group-child{ type: "button", value: new_project_label, data: { action: "new-project" } }
%button.btn.btn-success.dropdown-toggle.js-dropdown-toggle{ type: "button", data: { "dropdown-trigger" => "#new-project-or-subgroup-dropdown" } } %button.btn.btn-success.dropdown-toggle.js-dropdown-toggle{ type: "button", data: { "dropdown-trigger" => "#new-project-or-subgroup-dropdown" } }
= icon("caret-down", class: "dropdown-btn-icon") = icon("caret-down", class: "dropdown-btn-icon")
%ul#new-project-or-subgroup-dropdown.dropdown-menu.dropdown-menu-align-right{ data: { dropdown: true } } %ul#new-project-or-subgroup-dropdown.dropdown-menu.dropdown-menu-right{ data: { dropdown: true } }
%li.droplab-item-selected{ role: "button", data: { value: "new-project", text: new_project_label } } %li.droplab-item-selected{ role: "button", data: { value: "new-project", text: new_project_label } }
.menu-item .menu-item
.icon-container .icon-container
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
%button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } } %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
Dropdown Dropdown
= icon('chevron-down') = icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-right
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown option Dropdown option
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
= link_to current_user, class: user_dropdown_class, data: { toggle: "dropdown" } do = link_to current_user, class: user_dropdown_class, data: { toggle: "dropdown" } do
= image_tag avatar_icon_for_user(current_user, 23), width: 23, height: 23, class: "header-user-avatar qa-user-avatar" = image_tag avatar_icon_for_user(current_user, 23), width: 23, height: 23, class: "header-user-avatar qa-user-avatar"
= sprite_icon('angle-down', css_class: 'caret-down') = sprite_icon('angle-down', css_class: 'caret-down')
.dropdown-menu-nav.dropdown-menu-align-right .dropdown-menu.dropdown-menu-nav.dropdown-menu-right
%ul %ul
%li.current-user %li.current-user
.user-name.bold .user-name.bold
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
= link_to new_project_path, class: "header-new-dropdown-toggle has-tooltip qa-new-menu-toggle", title: "New...", ref: 'tooltip', aria: { label: "New..." }, data: { toggle: 'dropdown', placement: 'bottom', container: 'body' } do = link_to new_project_path, class: "header-new-dropdown-toggle has-tooltip qa-new-menu-toggle", title: "New...", ref: 'tooltip', aria: { label: "New..." }, data: { toggle: 'dropdown', placement: 'bottom', container: 'body' } do
= sprite_icon('plus-square', size: 16) = sprite_icon('plus-square', size: 16)
= sprite_icon('angle-down', css_class: 'caret-down') = sprite_icon('angle-down', css_class: 'caret-down')
.dropdown-menu-nav.dropdown-menu-align-right .dropdown-menu.dropdown-menu-nav.dropdown-menu-right
%ul %ul
- if @group&.persisted? - if @group&.persisted?
- create_group_project = can?(current_user, :create_projects, @group) - create_group_project = can?(current_user, :create_projects, @group)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
%span.light %span.light
= branches_sort_options_hash[@sort] = branches_sort_options_hash[@sort]
= icon('chevron-down') = icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
%li.dropdown-header %li.dropdown-header
= s_('Branches|Sort by') = s_('Branches|Sort by')
- branches_sort_options_hash.each do |value, title| - branches_sort_options_hash.each do |value, title|
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
= sprite_icon('download') = sprite_icon('download')
= icon("caret-down") = icon("caret-down")
%span.sr-only= _('Select Archive Format') %span.sr-only= _('Select Archive Format')
%ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' } %ul.dropdown-menu.dropdown-menu-right{ role: 'menu' }
%li.dropdown-header %li.dropdown-header
#{ _('Source code') } #{ _('Source code') }
%li %li
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
%a.btn.dropdown-toggle.has-tooltip{ href: '#', title: _('Create new...'), 'data-toggle' => 'dropdown', 'data-container' => 'body', 'aria-label' => _('Create new...') } %a.btn.dropdown-toggle.has-tooltip{ href: '#', title: _('Create new...'), 'data-toggle' => 'dropdown', 'data-container' => 'body', 'aria-label' => _('Create new...') }
= icon('plus') = icon('plus')
= icon("caret-down") = icon("caret-down")
%ul.dropdown-menu.dropdown-menu-align-right.project-home-dropdown %ul.dropdown-menu.dropdown-menu-right.project-home-dropdown
- if can_create_issue || merge_project || can_create_project_snippet - if can_create_issue || merge_project || can_create_project_snippet
%li.dropdown-header= _('This project') %li.dropdown-header= _('This project')
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
%a.btn.btn-secondary.dropdown-toggle{ data: { toggle: "dropdown" } } %a.btn.btn-secondary.dropdown-toggle{ data: { toggle: "dropdown" } }
%span= _('Options') %span= _('Options')
= icon('caret-down') = icon('caret-down')
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-right
%li.d-block.d-sm-none.d-md-none %li.d-block.d-sm-none.d-md-none
= link_to project_tree_path(@project, @commit) do = link_to project_tree_path(@project, @commit) do
#{ _('Browse Files') } #{ _('Browse Files') }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
%button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" } %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" }
%span.dropdown-label {{ n__('Last %d day', 'Last %d days', 30) }} %span.dropdown-label {{ n__('Last %d day', 'Last %d days', 30) }}
%i.fa.fa-chevron-down %i.fa.fa-chevron-down
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-right
%li %li
%a{ "href" => "#", "data-value" => "7" } %a{ "href" => "#", "data-value" => "7" }
{{ n__('Last %d day', 'Last %d days', 7) }} {{ n__('Last %d day', 'Last %d days', 7) }}
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
%button.dropdown.dropdown-new.btn.btn-secondary{ type: 'button', 'data-toggle' => 'dropdown' } %button.dropdown.dropdown-new.btn.btn-secondary{ type: 'button', 'data-toggle' => 'dropdown' }
= custom_icon('icon_play') = custom_icon('icon_play')
= icon('caret-down') = icon('caret-down')
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-right
- actions.each do |action| - actions.each do |action|
- next unless can?(current_user, :update_build, action) - next unless can?(current_user, :update_build, action)
%li %li
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
- else - else
= sort_title_recently_created = sort_title_recently_created
= icon('chevron-down') = icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-right
%li %li
- excluded_filters = [:state, :scope, :label_name, :milestone_id, :assignee_id, :author_id] - excluded_filters = [:state, :scope, :label_name, :milestone_id, :assignee_id, :author_id]
= link_to page_filter_path(sort: sort_value_recently_created, without: excluded_filters) do = link_to page_filter_path(sort: sort_value_recently_created, without: excluded_filters) do
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
= icon('caret-down') = icon('caret-down')
.droplab-dropdown .droplab-dropdown
%ul#create-merge-request-dropdown.create-merge-request-dropdown-menu.dropdown-menu.dropdown-menu-align-right.gl-show-field-errors{ data: { dropdown: true } } %ul#create-merge-request-dropdown.create-merge-request-dropdown-menu.dropdown-menu.dropdown-menu-right.gl-show-field-errors{ data: { dropdown: true } }
- if can_create_merge_request - if can_create_merge_request
%li.droplab-item-selected{ role: 'button', data: { value: 'create-mr', text: _('Create merge request') } } %li.droplab-item-selected{ role: 'button', data: { value: 'create-mr', text: _('Create merge request') } }
.menu-item .menu-item
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
%button.btn.btn-secondary.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } } %button.btn.btn-secondary.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } }
Options Options
= icon('caret-down') = icon('caret-down')
.dropdown-menu.dropdown-menu-align-right.d-lg-none.d-xl-none .dropdown-menu.dropdown-menu-right.d-lg-none.d-xl-none
%ul %ul
- unless current_user == @issue.author - unless current_user == @issue.author
%li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue)) %li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue))
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
%button.btn.btn-secondary.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } } %button.btn.btn-secondary.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } }
Options Options
= icon('caret-down') = icon('caret-down')
.dropdown-menu.dropdown-menu-align-right.d-lg-none.d-xl-none .dropdown-menu.dropdown-menu-right.d-lg-none.d-xl-none
%ul %ul
- if can_update_merge_request - if can_update_merge_request
%li= link_to 'Edit', edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request) %li= link_to 'Edit', edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
%span.light %span.light
= tags_sort_options_hash[@sort] = tags_sort_options_hash[@sort]
= icon('chevron-down') = icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
%li.dropdown-header %li.dropdown-header
= s_('TagsPage|Sort by') = s_('TagsPage|Sort by')
- tags_sort_options_hash.each do |value, title| - tags_sort_options_hash.each do |value, title|
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- else - else
Any Any
= icon("chevron-down") = icon("chevron-down")
.dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-align-right .dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-right
= dropdown_title("Filter results by group") = dropdown_title("Filter results by group")
= dropdown_filter("Search groups") = dropdown_filter("Search groups")
= dropdown_content = dropdown_content
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
- else - else
Any Any
= icon("chevron-down") = icon("chevron-down")
.dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-align-right .dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-right
= dropdown_title("Filter results by project") = dropdown_title("Filter results by project")
= dropdown_filter("Search projects") = dropdown_filter("Search projects")
= dropdown_content = dropdown_content
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%button.btn.btn-secondary.label-options-toggle{ type: 'button', data: { toggle: "dropdown" } } %button.btn.btn-secondary.label-options-toggle{ type: 'button', data: { toggle: "dropdown" } }
Options Options
= icon('caret-down') = icon('caret-down')
.dropdown-menu.dropdown-menu-align-right .dropdown-menu.dropdown-menu-right
%ul %ul
- if show_label_merge_requests_link - if show_label_merge_requests_link
%li %li
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- else - else
= sort_title_due_date_soon = sort_title_due_date_soon
= icon('chevron-down') = icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-sort %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-sort
%li %li
= link_to page_filter_path(sort: sort_value_due_date_soon, label: true) do = link_to page_filter_path(sort: sort_value_due_date_soon, label: true) do
= sort_title_due_date_soon = sort_title_due_date_soon
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
= hidden_field_tag key, value, id: nil = hidden_field_tag key, value, id: nil
.dropdown .dropdown
= dropdown_toggle dropdown_toggle_text, { toggle: "dropdown", selected: dropdown_toggle_text, ref: @ref, refs_url: refs_project_path(@project, sort: 'updated_desc'), field_name: 'ref', submit_form_on_click: true, visit: true }, { toggle_class: "js-project-refs-dropdown" } = dropdown_toggle dropdown_toggle_text, { toggle: "dropdown", selected: dropdown_toggle_text, ref: @ref, refs_url: refs_project_path(@project, sort: 'updated_desc'), field_name: 'ref', submit_form_on_click: true, visit: true }, { toggle_class: "js-project-refs-dropdown" }
.dropdown-menu.dropdown-menu-selectable.git-revision-dropdown.dropdown-menu-paging{ class: ("dropdown-menu-align-right" if local_assigns[:align_right]) } .dropdown-menu.dropdown-menu-selectable.git-revision-dropdown.dropdown-menu-paging{ class: ("dropdown-menu-right" if local_assigns[:align_right]) }
.dropdown-page-one .dropdown-page-one
= dropdown_title _("Switch branch/tag") = dropdown_title _("Switch branch/tag")
= dropdown_filter _("Search branches and tags") = dropdown_filter _("Search branches and tags")
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
- viewing_issues = controller.controller_name == 'issues' || controller.action_name == 'issues' - viewing_issues = controller.controller_name == 'issues' || controller.action_name == 'issues'
.dropdown.inline.prepend-left-10 .dropdown.inline.prepend-left-10
%button.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown' } } %button.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' } }
= sorted_by = sorted_by
= icon('chevron-down') = icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable.dropdown-menu-sort %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort
%li %li
= sortable_item(sort_title_priority, page_filter_path(sort: sort_value_priority, label: true), sorted_by) = sortable_item(sort_title_priority, page_filter_path(sort: sort_value_priority, label: true), sorted_by)
= sortable_item(sort_title_created_date, page_filter_path(sort: sort_value_created_date, label: true), sorted_by) = sortable_item(sort_title_created_date, page_filter_path(sort: sort_value_created_date, label: true), sorted_by)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
%span.dropdown-label %span.dropdown-label
= options_hash[default_sort_by] = options_hash[default_sort_by]
= icon('chevron-down') = icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
%li.dropdown-header %li.dropdown-header
= _("Sort by") = _("Sort by")
- options_hash.each do |value, title| - options_hash.each do |value, title|
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
.dropdown.prepend-left-10#js-add-list .dropdown.prepend-left-10#js-add-list
%button.btn.btn-create.btn-inverted.js-new-board-list{ type: "button", data: board_list_data } %button.btn.btn-create.btn-inverted.js-new-board-list{ type: "button", data: board_list_data }
Add list Add list
.dropdown-menu.dropdown-menu-paging.dropdown-menu-align-right.dropdown-menu-issues-board-new.dropdown-menu-selectable .dropdown-menu.dropdown-menu-paging.dropdown-menu-right.dropdown-menu-issues-board-new.dropdown-menu-selectable
= render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" } = render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" }
- if can?(current_user, :admin_label, board.parent) - if can?(current_user, :admin_label, board.parent)
= render partial: "shared/issuable/label_page_create" = render partial: "shared/issuable/label_page_create"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
%span.dropdown-toggle-text %span.dropdown-toggle-text
= group_link.human_access = group_link.human_access
= icon("chevron-down") = icon("chevron-down")
.dropdown-menu.dropdown-select.dropdown-menu-align-right.dropdown-menu-selectable .dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable
= dropdown_title("Change permissions") = dropdown_title("Change permissions")
.dropdown-content .dropdown-content
%ul %ul
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
%span.dropdown-toggle-text %span.dropdown-toggle-text
= member.human_access = member.human_access
= icon("chevron-down") = icon("chevron-down")
.dropdown-menu.dropdown-select.dropdown-menu-align-right.dropdown-menu-selectable .dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable
= dropdown_title("Change permissions") = dropdown_title("Change permissions")
.dropdown-content .dropdown-content
%ul %ul
......
.dropdown.inline.member-sort-dropdown .dropdown.inline.member-sort-dropdown
= dropdown_toggle(member_sort_options_hash[@sort], { toggle: 'dropdown' }) = dropdown_toggle(member_sort_options_hash[@sort], { toggle: 'dropdown' })
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
%li.dropdown-header %li.dropdown-header
Sort by Sort by
- member_sort_options_hash.each do |value, title| - member_sort_options_hash.each do |value, title|
......
- @sort ||= sort_value_latest_activity - @sort ||= sort_value_latest_activity
.dropdown.js-project-filter-dropdown-wrap .dropdown.js-project-filter-dropdown-wrap
- toggle_text = projects_sort_options_hash[@sort] - toggle_text = projects_sort_options_hash[@sort]
= dropdown_toggle(toggle_text, { toggle: 'dropdown' }, { id: 'sort-projects-dropdown' }) = dropdown_toggle(toggle_text, { toggle: 'dropdown', display: 'static' }, { id: 'sort-projects-dropdown' })
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
%li.dropdown-header %li.dropdown-header
Sort by Sort by
- projects_sort_options_hash.each do |value, title| - projects_sort_options_hash.each do |value, title|
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
%button.btn{ 'data-toggle' => 'dropdown', class: button_class } %button.btn{ 'data-toggle' => 'dropdown', class: button_class }
Test Test
= icon('caret-down') = icon('caret-down')
%ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' } %ul.dropdown-menu.dropdown-menu-right{ role: 'menu' }
- triggers.each_value do |event| - triggers.each_value do |event|
%li %li
= link_to_test_hook(hook, event) = link_to_test_hook(hook, event)
...@@ -108,7 +108,7 @@ module SharedIssuable ...@@ -108,7 +108,7 @@ module SharedIssuable
step 'I sort the list by "Least popular"' do step 'I sort the list by "Least popular"' do
find('button.dropdown-toggle').click find('button.dropdown-toggle').click
page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do page.within('.content ul.dropdown-menu.dropdown-menu-right li') do
click_link 'Least popular' click_link 'Least popular'
end end
end end
......
...@@ -18,7 +18,7 @@ describe "User sorts issues" do ...@@ -18,7 +18,7 @@ describe "User sorts issues" do
it "sorts by popularity" do it "sorts by popularity" do
find("button.dropdown-toggle").click find("button.dropdown-toggle").click
page.within(".content ul.dropdown-menu.dropdown-menu-align-right li") do page.within(".content ul.dropdown-menu.dropdown-menu-right li") do
click_link("Popularity") click_link("Popularity")
end end
......
...@@ -18,7 +18,7 @@ describe 'User sorts merge requests' do ...@@ -18,7 +18,7 @@ describe 'User sorts merge requests' do
it 'keeps the sort option' do it 'keeps the sort option' do
find('button.dropdown-toggle').click find('button.dropdown-toggle').click
page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do page.within('.content ul.dropdown-menu.dropdown-menu-right li') do
click_link('Last updated') click_link('Last updated')
end end
...@@ -43,7 +43,7 @@ describe 'User sorts merge requests' do ...@@ -43,7 +43,7 @@ describe 'User sorts merge requests' do
it 'sorts by popularity' do it 'sorts by popularity' do
find('button.dropdown-toggle').click find('button.dropdown-toggle').click
page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do page.within('.content ul.dropdown-menu.dropdown-menu-right li') do
click_link('Popularity') click_link('Popularity')
end end
......
...@@ -15,7 +15,7 @@ module Spec ...@@ -15,7 +15,7 @@ module Spec
def sort_by(value) def sort_by(value)
find('button.dropdown-toggle').click find('button.dropdown-toggle').click
page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do page.within('.content ul.dropdown-menu.dropdown-menu-right li') do
click_link(value) click_link(value)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment