summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-03-22 08:45:24 +0000
committerPhil Hughes <me@iamphill.com>2016-03-22 08:45:24 +0000
commit57749022b6e07e8c6af37b6ad39dd68922828315 (patch)
tree97b6a3f473bb23855f84c5bad73b7aa58a1886c1
parent4366af51558f667b4d5882e4f01701ec993e12cc (diff)
downloadgitlab-ce-dropdown-right-align.tar.gz
Removed dropdown JS to align instead favours HTML classdropdown-right-align
-rw-r--r--app/assets/javascripts/dropdowns.js.coffee10
-rw-r--r--app/views/projects/branches/index.html.haml2
-rw-r--r--app/views/projects/tags/_download.html.haml2
3 files changed, 2 insertions, 12 deletions
diff --git a/app/assets/javascripts/dropdowns.js.coffee b/app/assets/javascripts/dropdowns.js.coffee
deleted file mode 100644
index 715ac644bdb..00000000000
--- a/app/assets/javascripts/dropdowns.js.coffee
+++ /dev/null
@@ -1,10 +0,0 @@
-$ ->
- $('[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'
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml
index 7afea5a5049..88266e21230 100644
--- a/app/views/projects/branches/index.html.haml
+++ b/app/views/projects/branches/index.html.haml
@@ -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
diff --git a/app/views/projects/tags/_download.html.haml b/app/views/projects/tags/_download.html.haml
index 667057ef2d8..093d1d1bb0f 100644
--- a/app/views/projects/tags/_download.html.haml
+++ b/app/views/projects/tags/_download.html.haml
@@ -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