Redbox - implementation

Step 1:
1.1: download all the files from the link
http://www.craigambrose.com/projects/redbox” and save it in the folder
“redbox”

 1.2: create a folder named "redbox" in "vendor/plugins" and save

the file “init.rb” in “vendor/plugins/redbox”
1.3: save the “redbox.js” file inside the folder
“public/javascripts”
1.4: save the “redbox.css” file inside the folder
“public/stylesheets”
1.5: save the “redbox_spinner.gif” file inside the folder
“public/images”

Step 2:
2.1: include the javscript file in your rhtml using the command
<%= javascript_include_tag :defaults %>
<%= javascript_include_tag ‘redbox’ %>
2.2: include the stylesheet using the command
<%= stylesheet_link_tag ‘redbox’ %>

Now you are ready to use the RedBox in your application.

You can include a Redbox using three ways

  1. Inline Redbox :- This box is already somewhere in this page, but is
    hidden, and is specified using it’s id attribute.

<%=link_to_redbox(‘Inline Red Box’, ‘inline_box’, {:complete =>
‘inline_box’, :loading => visual_effect(:highlight, ‘inline_box’)}) %>

This is an Inline Redbox.

  1. Inline redbox generated by a component :- This box is generated by
    another action, just like a remote redbox, however it is rendered into
    this page so that it behaves like an inline redbox. This removes the
    load time when the box is opened, however it slows down the initial page
    load.

<%= link_to_component_redbox(“Red Box Component Contact Page”, :action
=> “contact”) %>

  1. AJAX redbox

<%= link_to_remote_redbox(“Red Box Ajax Contact Page”, :url => {:action
=> “contact”}) %>

Command to close the Redbox

<%= link_to_close_redbox(‘Close’)%>

I’m new to Redbox but have it working in my application. However, on
pages that have less than a full page length of content the overlay
only goes down as far as the content. I’ve used other lightboxes
before outside of Rails and have never had this problem. Has anyone
else experienced this? …overcome this?

On Jul 8, 10:38 pm, Jacob N. [email protected]