From d0a8d43de657c831b4058b87137fa19d48832af7 Mon Sep 17 00:00:00 2001 From: Markus Kahl Date: Tue, 19 Apr 2011 18:00:36 +0200 Subject: [PATCH] Enabled help for filter and group-by legends. --- assets/stylesheets/help.css | 16 ++++++++++++++++ lib/widget/settings/fieldset.rb | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/assets/stylesheets/help.css b/assets/stylesheets/help.css index d8b800e38c..4330734532 100644 --- a/assets/stylesheets/help.css +++ b/assets/stylesheets/help.css @@ -36,4 +36,20 @@ .group-by-tip { margin-top: -300px; margin-left: -475px; +} + +.filter-legend-icon { + +} + +.filter-legend-tip { + margin-left: 10px; +} + +.group_by-legend-icon { + +} + +.group_by-legend-tip { + margin-left: 10px; } \ No newline at end of file diff --git a/lib/widget/settings/fieldset.rb b/lib/widget/settings/fieldset.rb index c4f71d2d22..82ea1f4ef6 100644 --- a/lib/widget/settings/fieldset.rb +++ b/lib/widget/settings/fieldset.rb @@ -7,8 +7,14 @@ class Widget::Settings::Fieldset < Widget::Base end def render + hash = self.hash content_tag :fieldset, :id => @id, :class => "collapsible collapsed" do - html = content_tag :legend, l(@label), :onclick => "toggleFieldset(this);" #FIXME: onclick + content = maybe_with_help l(@label), + :show_at_id => hash.to_s, + :icon => { :class => "#{@type}-legend-icon" }, + :tooltip => { :class => "#{@type}-legend-tip" } + html = content_tag :legend, content, + {:onclick => "toggleFieldset(this);", :id => hash.to_s}, false #FIXME: onclick html + yield end end