Commit 57749022 authored by Phil Hughes's avatar Phil Hughes

Removed dropdown JS to align instead favours HTML class

parent 4366af51
$ ->
$('[data-toggle="dropdown"]').each ->
$dropdown = $(@).parent()
$menu = $dropdown.find('.dropdown-menu')
$dropdown.on 'shown.bs.dropdown', ->
dropdownRight = $menu.offset().left + $menu.outerWidth()
if dropdownRight >= $(window).width()
$menu.addClass 'dropdown-menu-align-right'
......@@ -16,7 +16,7 @@
- else
Name
%b.caret
%ul.dropdown-menu
%ul.dropdown-menu.dropdown-menu-align-right
%li
= link_to namespace_project_branches_path(sort: nil) do
Name
......
......@@ -6,7 +6,7 @@
%span.caret
%span.sr-only
Select Archive Format
%ul.col-xs-10.dropdown-menu{ role: 'menu' }
%ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' }
%li
= link_to archive_namespace_project_repository_path(project.namespace, project, ref: ref, format: 'zip'), rel: 'nofollow' do
%i.fa.fa-download
......
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