Appartamento in Affitto Milano – Washington

Overview

A LightBox helper.

Author Carlo Bertini Tags LightBox (MIT)

Install the plugin:

ruby script/plugin install http://svn.lipsiasoft.com/lightwindow

It's only make an helper, copy the lastest javascripts, css, and images on your public/javascript directory and register the javascript in the AssetTagHelper of rails, so for include the javascript in your page you only can add this (if you havn't yet):

<%= javascript_include_tag :defaults %>

You must add also the stylesheet so add this on your page head:

<%= stylesheet_link_tag 'lightwindow' %>

The is very simple for add a LightWindow in your page add this:

<%= lightwindow_link_to(name, options = {}, html_options = {}, *parameters_for_method_reference) %>

Example

<%= lightwindow_link_to(
        "Click me !", {:action => :edit, :id => 12}, :title => "This is a test!",
        :author=>"Carlo Bertini",
        :caption=>"Ruby on rails is beautyfull :D" 
      ) %>

ChangeLog

23 March 2008 - Update the code for a better integration with lipsiadmin

Other

Done with Rails 2.0.
Please register" and submit bug or fatures request!

Also available in: HTML TXT