summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArinde Eniola <eniolaarinde1@gmail.com>2016-04-12 01:12:16 +0100
committerArinde Eniola <eniolaarinde1@gmail.com>2016-04-12 01:12:16 +0100
commitf7695d47a6f26c60cff6ed5547eac39f142a8ea6 (patch)
treeb99ec8b089590d08c0d9eaf36dc9a580ed7051c7
parent23c155f0d4e3fb26c177f030fc9595b74f4c609e (diff)
downloadgitlab-ce-fix_bug_with_links_in_right_sidebar_labels_dropdown.tar.gz
fix bug causing links in right sidebar labels dropdown to not route to another pagefix_bug_with_links_in_right_sidebar_labels_dropdown
-rw-r--r--app/assets/javascripts/gl_dropdown.js.coffee3
-rw-r--r--app/views/shared/issuable/_sidebar.html.haml3
2 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee
index ee1d0fad289..eaf20d5426a 100644
--- a/app/assets/javascripts/gl_dropdown.js.coffee
+++ b/app/assets/javascripts/gl_dropdown.js.coffee
@@ -241,6 +241,9 @@ class GitLabDropdown
shouldPropagate: (e) =>
if @options.multiSelect
$target = $(e.target)
+
+ return if $target.is('a') and $target.attr('href') isnt '#'
+
if not $target.hasClass('dropdown-menu-close') and not $target.hasClass('dropdown-menu-close-icon')
e.stopPropagation()
return false
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index 94affa4b59a..052c93424c5 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -110,8 +110,7 @@
%ul.dropdown-footer-list
- if can? current_user, :admin_label, @project
%li
- %a.dropdown-toggle-page{href: "#"}
- Create new
+ = link_to 'Create new', new_namespace_project_label_path(@project.namespace, @project)
%li
= link_to namespace_project_labels_path(@project.namespace, @project) do
- if can? current_user, :admin_label, @project