BigW Consortium Gitlab

Commit 57749022 by 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 @@ ...@@ -16,7 +16,7 @@
- else - else
Name Name
%b.caret %b.caret
%ul.dropdown-menu %ul.dropdown-menu.dropdown-menu-align-right
%li %li
= link_to namespace_project_branches_path(sort: nil) do = link_to namespace_project_branches_path(sort: nil) do
Name Name
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
%span.caret %span.caret
%span.sr-only %span.sr-only
Select Archive Format Select Archive Format
%ul.col-xs-10.dropdown-menu{ role: 'menu' } %ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' }
%li %li
= link_to archive_namespace_project_repository_path(project.namespace, project, ref: ref, format: 'zip'), rel: 'nofollow' do = link_to archive_namespace_project_repository_path(project.namespace, project, ref: ref, format: 'zip'), rel: 'nofollow' do
%i.fa.fa-download %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