From 084b6fda1d6ea5094298609eef0b5bf6b5c61ee2 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Mon, 1 Oct 2007 20:50:48 +0000 Subject: [PATCH] ActionItem74: implementing help system --- app/helpers/application_helper.rb | 5 +++-- app/views/layouts/application.rhtml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7874b7e..726db32 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -53,9 +53,10 @@ module ApplicationHelper # TODO: implement this button, and add style='display: none' to the help # message DIV - button = link_to_function(_('Help'), "alert('change me, Leandro!')") + button = link_to_function(_('Help'), "Element.show('help_message')", :class => 'help_button' ) + close_button = content_tag("div", link_to_function(_("Close"), "Element.hide('help_message')", :id => 'close_help_button')) - text = content_tag('div', button + content_tag('div', content, :class => 'help_message', :style => 'display: none;'), :class => 'help_box') + text = content_tag('div', button + content_tag('div', content_tag('div', content) + close_button, :id => 'help_message', :style => 'display: none;'), :class => 'help_box') unless block.nil? concat(text, block.binding) diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index 40e35d4..d759c19 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -41,6 +41,8 @@ <%= stylesheet_link_tag 'common' %> <%= stylesheet_link_tag 'menu' %> + <%= stylesheet_link_tag 'help' %> + <%= javascript_include_tag 'menu' %> -- libgit2 0.21.2