Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coderberry/lightwindow
Lightwindow for Rails Plugin
https://github.com/coderberry/lightwindow
Last synced: 12 days ago
JSON representation
Lightwindow for Rails Plugin
- Host: GitHub
- URL: https://github.com/coderberry/lightwindow
- Owner: coderberry
- License: mit
- Created: 2008-08-01T20:44:27.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2011-02-04T01:15:22.000Z (almost 14 years ago)
- Last Synced: 2025-01-09T14:41:13.968Z (13 days ago)
- Language: JavaScript
- Homepage: http://www.solidcoresolutions.com
- Size: 160 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: MIT-LICENSE
Awesome Lists containing this project
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 formAlso, 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