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-07-16 11:03:19 +0300
committerPhil Hughes <me@iamphill.com>2016-07-20 12:48:02 +0300
commit0a9860817926cf9f32ce1ee6b4dc28ba01366b76 (patch)
tree14b5640a6ca86226ccc2a22de627ea73e48555df /app/helpers/dropdowns_helper.rb
parent82ef4f1ef7f20720cf685b0adf738b516fa9fdab (diff)
GL dropdown default toggle color
Diffstat (limited to 'app/helpers/dropdowns_helper.rb')
-rw-r--r--app/helpers/dropdowns_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/dropdowns_helper.rb b/app/helpers/dropdowns_helper.rb
index 4566f3782cc..cc2a5a7b134 100644
--- a/app/helpers/dropdowns_helper.rb
+++ b/app/helpers/dropdowns_helper.rb
@@ -40,8 +40,9 @@ module DropdownsHelper
end
def dropdown_toggle(toggle_text, data_attr, options = {})
+ default_label = options[:data][:default_label]
content_tag(:button, class: "dropdown-menu-toggle #{options[:toggle_class] if options.has_key?(:toggle_class)}", id: (options[:id] if options.has_key?(:id)), type: "button", data: data_attr) do
- output = content_tag(:span, toggle_text, class: "dropdown-toggle-text")
+ output = content_tag(:span, toggle_text, class: "dropdown-toggle-text #{'is-default' if toggle_text == default_label}")
output << icon('chevron-down')
output.html_safe
end