Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Lightwindow for Rails Plugin

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 images
Octocat-spinner-32 javascripts
Octocat-spinner-32 lib
Octocat-spinner-32 stylesheets
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
Octocat-spinner-32 install.rb
Octocat-spinner-32 uninstall.rb
README
Lightwindow
===========

Examine the public methods of lightwindow_helper.rb. They will all look familiar, much like the existing link helpers, except that they work with lightwindow. You should not need to interact with the javascript directly.

Lightwindow provides three helpers which are used instead of a regular “link_to” helper when linking to a redbox.

  link_to_lightwindow(name, link, html_options = {})

Available HTML Options:

  :href             - The hyperlink for the window
  :title            - Title of window
  :author           - Author of window
  :caption          - The Caption for the window
  :rel              - Set the rel tag
  :top              - Top position of the window
  :left             - Left position of the window
  :type             - The type of the window you want to change it too
  :showImages       - How many images to show
  :height           - The height of the window
  :width            - The width of the window
  :loadingAnimation - Make the Loading Cover skip the animation
  :iframeEmbed 		  - Embed the Media into an iframe instead of a div
  :form             - The name of the form

Also, make sure you are including the correct javascript and css files in your layouts.

  <%= javascript_include_tag 'lightwindow' %>
  <%= stylesheet_link_tag 'default', 'lightwindow' %> # 'default' is optional
  
To link to an existing element (typically hidden), you can use the # sign before the element id.

  <%= link_to_lightwindow("Open Hidden Window", "#element_id", :caption => "This is my hidden window") %>


More Info
=========

For documentation on the Lightwindow library, go to:

	http://stickmanlabs.com/lightwindow
Something went wrong with that request. Please try again.