ibox-rails-plugin
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:This is an Ibox (a framework agnostic lightbox) plugin for Rails
== Ibox Plugin

This plugin allows you to create a lightbox type of pop-up. That allows you to embed images, content or ajax content without the requirements of a js framework. This is based on the work of Farooq Ahmed with slight modifications.

== INSTALLATION

1. Run rake install_ibox to install all the necessary files for ibox
2. Put <%= iboxify_page %> in your layout file
3. Call an ibox like <%= link_to_ibox "Your Ibox", :for => "your/content" %>

== USAGE

Link an ibox to a picture:
   link_to_ibox "View Image", :for => "my/special/image.jpg"
Link an ibox to a page to load via ajax
   link_to_ibox "View Page", :for => "my/special/page"
Link to an ibox and specify the size (WxH), this defaults to :auto 
   link_to_ibox "View Page", :for => "my/special/image.jpg", :size => "300x300"
Link to an inline element:
   link_to_ibox "My Div", :for => "#my-div"
OPTIONS :
    * content => the content of the link
    * :for => the content that you want to put in the ibox, it can be an image, page or inline content
    - :size => the width and height of the ibox, it will default to :auto
    - :title => This is the title attribute of the link tag
    - :type => This is the type of ibox you want, link_to_ibox will try to detect it based on the :for argument 
    you can add in extra options for the tag as needed

== FROM THE JS README

== USAGE:
	
iBox works by looking at what is contained in the  tag, and then modifying it as needed. The import variables inside it are:
	- Inside each link (image, HTML page, inner div) you want to appear as an overlay, you have to add rel="ibox" to the  tag
	- To set width/height of the inline overlay, use the following: rel="ibox&height=H&width=W" where H and W are the desired height and width respectively
	- To set a caption, use title="X" where X is the desired caption.
	- To differentiate between a JS and non JS user, set the normal href target to the non-JS page, and target="X" (where X is the desired overlay page)
	- To force a type of iBox add the type=X (X=1,2,3) to the rel. (eg if the url is www.example.com/someimage.php and you want it load it as an image, you would have rel="ibox&type=1")
	
The only required element is rel="ibox" The rest are just extra features.
	
== EXAMPLES:
		
	- To load an image as an overlay, set the target to be an image. Eg An Image
	- To load an external page as an overlay, set the target to any page. Eg A Link
	- To load an existing div on the page, set the target to its div name. Eg 
text inside a div and then A div - A login form - load a page using AJAX as an overlay, or point them to a different page for non-JS users. Eg Login A total of 3 primary files complete the package. They are: ibox.css - the CSS that controls the appearance of the overlay ibox.js - the Javascript that drives the overlay images/indicator.gif - the image used to show a user the image is loading DEMO: == - http://www.ibegin.com/labs/ibox/

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。