Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-03-07 20:17:11 +0300
committerPhil Hughes <me@iamphill.com>2016-03-10 16:54:54 +0300
commit11b52e287be32ccd2eed166e4622f1a6b05c9ba7 (patch)
tree29e64d28d0755d1139ff755ef98cc182ba8d39ff /app/helpers/dropdowns_helper.rb
parentcae03f8b2bc13c4bba3a7905776a04580efe300d (diff)
Applied new dropdowns to issue filters
Diffstat (limited to 'app/helpers/dropdowns_helper.rb')
-rw-r--r--app/helpers/dropdowns_helper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/dropdowns_helper.rb b/app/helpers/dropdowns_helper.rb
index a5728968ae1..49c40e31176 100644
--- a/app/helpers/dropdowns_helper.rb
+++ b/app/helpers/dropdowns_helper.rb
@@ -1,14 +1,16 @@
module DropdownsHelper
- def dropdown_tag(toggle_text, id: nil, toggle_class: nil, title: false, filter: false, placeholder: "", &block)
+ def dropdown_tag(toggle_text, id: nil, toggle_class: nil, dropdown_class: nil, title: false, filter: false, placeholder: "", data: {}, &block)
content_tag :div, class: "dropdown" do
+ toggle_hash = data.merge({toggle: "dropdown"})
+
dropdown_output = ""
- dropdown_output += content_tag :button, class: "dropdown-menu-toggle #{toggle_class}", id: id, type: "button", data: {toggle: "dropdown"} do
+ dropdown_output += content_tag :button, class: "dropdown-menu-toggle #{toggle_class}", id: id, type: "button", data: toggle_hash do
output = toggle_text
output << icon('chevron-down')
output.html_safe
end
- dropdown_output += content_tag :div, class: "dropdown-menu dropdown-select dropdown-menu-selectable" do
+ dropdown_output += content_tag :div, class: "dropdown-menu dropdown-select #{dropdown_class}" do
output = ""
if title