Code Monkey home page Code Monkey logo

fancybox-rails's People

Contributors

chrismytton avatar dennisreimann avatar greinacker avatar leshill avatar zealot128 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fancybox-rails's Issues

Add section to README about customzation

Lots of people seem to be forking the repository to customize the look and feel of fancybox. Instead they can just put their custom fancybox assets version in lib/assets, which is higher on the asset PATH than vendor/assets, and they won't need to fork.

A section in the README with these details would be good. We could also add a rake task for copying the assets into lib/assets.

New fancybox

Hey hecticjeff,

Thanks for supplying this gem!

There's a new version of fancybox here:

http://fancyapps.com/fancybox/

I tried to fork the repository, include the new assets and submit a pull request, but there were a couple of failing tests and I didn't know how to fix them.

Problem with rake assets:precompile

  • rails 3.1.0
  • fancybox-rails 0.1.4

Running the rake precompile:assets task gives the following error.

% rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
rake aborted!
fancybox.png isn't precompiled
  (in /Users/chris/.rvm/gems/ruby-1.9.2-p290/gems/fancybox-rails-0.1.4/vendor/assets/stylesheets/jquery.fancybox.css.erb)

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

Unobtrusive ajax with fancybox

can you explain a little more about your gem like how to do unobtrusive ajax call to display a partial in a fancybox?

Pushing to heroku - Could not find fancybox-rails-0.2.1 in any of the sources

0.2.1 is solving my problems in dev, but I can't get it to bundle in production.

-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Some gems seem to be missing from your vendor/cache directory.
Could not find fancybox-rails-0.2.1 in any of the sources
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app

check compatibility with rc5

Running into a couple of issues with rc5, there seems to have been some changes to the way assets are handled.

404 for images

I'm getting a 404 error for the following when I use the plugin

http://myapp:3000/images/fancy_box/fancybox.png
http://myapp:3000/images/fancy_box/blank.png

Should I be copying these assets manually?

Width not computed correctly

Hi hecticjeff,

I've used fancybox before but it wasn't with rails and this would be my first time to use it with rails. Now I don't know if this is cause of this or cause of fancybox.

I'm loading a big image from a thumbnail to a fancybox. But on first click, the image loads but the computations are off. Like the width of fancybox is 0 and it's not displayed. But when I just click on the background and click the thumbnail again, it works perfectly.

Have this happened to you as well?

Cheers!

style.removeAttribute is undefined

Hello,

I was trying to integrate your gem into my toy rails app but I encountered this error.

TypeError: content.get(0).style.removeAttribute is not a function. (In 'content.get(0).style.removeAttribute('filter')', 'content.get(0).style.removeAttribute' is undefined)

and the specific code causing the error:

if (!$.support.opacity) {
	content.get(0).style.removeAttribute('filter');
	wrap.get(0).style.removeAttribute('filter');
}

Apparently, removeAttribute is defined for an element and not for CSSStyleDeclaration object outputted by style. When I change it to style.removeProperty or .removeAttribute called directly on the element, it works just as expected.

I hope it proves useful. Have a good one.

Loading outside rails

When the library is loaded outside rails a waning should be displayed, at the moment the following error message is displayed.

NameError: uninitialized constant Rails

Error while compiling assets

Get an error, while trying to complie assets

gem versions:

rails 3.1.3
sass-rails 3.1.5
fancybox-rails 0.1.4

backtrace:

bundle exec rake assets:precompile --trace                                                           
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/max/.rvm/rubies/ruby-1.9.3-p0/bin/ruby /Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Invalid CSS after " */": expected selector or at-rule, was "#fancybox-loadi..."
  (in /Users/max/Documents/Projects/fs/tch/repos/allabout-classifieds/app/assets/stylesheets/application.css)
(sass):26
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/scss/parser.rb:928:in `expected'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/scss/parser.rb:874:in `expected'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/scss/parser.rb:28:in `parse'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/engine.rb:326:in `_to_tree'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/engine.rb:299:in `_render'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/engine.rb:246:in `render'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-rails-3.1.1/lib/sass/rails/compressor.rb:7:in `compress'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/compressors.rb:18:in `compress'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/processing.rb:243:in `block in css_compressor='
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/processor.rb:29:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/processor.rb:29:in `evaluate'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/context.rb:175:in `block in evaluate'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `evaluate'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:242:in `block in build_source'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/caching.rb:30:in `cache_hash'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:235:in `build_source'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:71:in `digest'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/asset.rb:95:in `digest_path'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:58:in `path_for'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:35:in `write_asset'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:21:in `block in compile'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:151:in `block in each_logical_path'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:139:in `block (2 levels) in each_file'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each_entry'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:137:in `block in each_file'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each_file'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:149:in `each_logical_path'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:66:in `block (3 levels) in <top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/max/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/max/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `load'
/Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/max/.rvm/rubies/ruby-1.9.3-p0/bin/r...]
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/max/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `load'
/Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile

Sprockets::FileNotFound

Getting an error when I have add lines into application.js file

couldn't find file 'fancybox'
(in /var/www/tumara/app/assets/javascripts/application.js:15)

can anyone help me out please

Using new version of fancybox with rails 3.1 asset pipeline.

Hi,

I'm using @sverigemeny-s fork (https://github.com/sverigemeny/fancybox-rails) and I'm trying to update source js files. Current master branch has jquery.fancybox.js 2.0.4 with an error (http://stackoverflow.com/questions/8701467/passing-an-array-of-image-objects-to-fancybox-lightbox-doesnt-seem-to-work) I cannot solve without moving forawrd to the latest jquery.fancybox.js version (2.0.6) which can be found here: https://github.com/fancyapps/fancyBox/zipball/master

So my question is: how can I use @sverigemeny-s fork with the latest jquery.fancybox.js?

Thanks in advance,
adrian

Using fancybox-rails outside of application.js / application.css

This doesn't seem to work if you add 'fancybox.css' and 'fancybox.js' to config.assets.precompile if you wish to not have them included in the main application.css / js. When linking to the javascript file with "javascript_include_tag 'fancybox'" you get a reference tp /assets/jquery.fancybox.

Make jquery-rails a dependency

This gem depends on jQuery, so it would make sense to make it a dependency. However the user may wish to load jquery using another mechanism, so this might not be such a great idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.