Skip to content

FaceboxRender is a Rails plugin let you use lightbox seamlessly using Facebox library (http://famspam.com/facebox/)

Notifications You must be signed in to change notification settings

xedin/facebox_render

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

FaceboxRender improved plugin let you use lightbox seamlessly using Facebox library.

Install

script/plugin install git://github.com/xedin/facebox_render.git

USAGE

Helper

We have facebox_link_to helper (it's will launch loading facebox first, send ajax request second)
or you can use link_to_remote, form_remote_tag...etc Ajax helper.
Don't use <a href="somelink" ref="facebox">

Controller

Add "include FaceboxRender" to your controller, 
or simply put it at /app/controllers/application.rb

Then in your action:

respond_to do |format|
  format.html
  format.js { render_to_facebox }
end

By Default render the html without layout,
otherwise you can pass options[:template], options[:action], options[:partial] or options[:html] string.
Passing options[:msg] will pulsate a message.

If block given, it will yield after facebox script, eg:

render_to_facebox do |page|
  page << "alert('test')"
end

Besides render_facebox, we have close_facebox, redirect_from_facebox.

respond_to do |format|
  format.html
  format.js { close_facebox }
end
Initial idea and basic functionality

Wen-Tien Chang([email protected])

Copyright © 2008 Handlino Inc. Licensed under the MIT: www.opensource.org/licenses/mit-license.php

About

FaceboxRender is a Rails plugin let you use lightbox seamlessly using Facebox library (http://famspam.com/facebox/)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 83.5%
  • Ruby 16.5%