Giter VIP home page Giter VIP logo

magnific-popup-rails's People

Contributors

alx-khramov avatar danielpuglisi avatar imgarylai avatar joshuajansen 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

Watchers

 avatar  avatar

magnific-popup-rails's Issues

License missing from gemspec

Some companies will only use gems with a certain license.
The canonical and easy way to check is via the gemspec,

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Even for projects that already specify a license, including a license in your gemspec is a good practice, since it is easily
discoverable there without having to check the readme or for a license file.

For example, there is a License Finder gem to help companies ensure all gems they use
meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough
issue that even Bundler now generates gems with a default 'MIT' license.

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file),
github has created a license picker tool.

In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally
looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :).

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue and let me know. In either case, I'll follow up. Thanks!

p.s. I've written a blog post about this project

Incompatible with Rails 4.1

Just upgraded to Rails 4.1, and this gem doesn't work.

Sass::SyntaxError - File to import not found or unreadable: magnific-popup.
Load paths:
  /Users/raphael/Documents/projects/special_sauce/app/assets/images
  /Users/raphael/Documents/projects/special_sauce/app/assets/javascripts
  /Users/raphael/Documents/projects/special_sauce/app/assets/stylesheets
  /Users/raphael/Documents/projects/special_sauce/vendor/assets/javascripts
  /Users/raphael/Documents/projects/special_sauce/vendor/assets/stylesheets
  /Users/raphael/.rvm/gems/ruby-2.1.1/gems/bootstrap-sass-2.3.2.2/vendor/assets/images
  /Users/raphael/.rvm/gems/ruby-2.1.1/gems/bootstrap-sass-2.3.2.2/vendor/assets/javascripts
  /Users/raphael/.rvm/gems/ruby-2.1.1/gems/bootstrap-sass-2.3.2.2/vendor/assets/stylesheets
  /Users/raphael/.rvm/gems/ruby-2.1.1/gems/coffee-rails-4.1.0/lib/assets/javascripts
  /Users/raphael/.rvm/gems/ruby-2.1.1/bundler/gems/rails_emoji-ab58de3a497a/vendor/assets/images
  /Users/raphael/.rvm/gems/ruby-2.1.1/gems/magnific-popup-rails-0.9.9/vendor/assets/javascripts
  /Users/raphael/.rvm/gems/ruby-2.1.1/gems/magnific-popup-rails-0.9.9/vendor/assets/stylesheets
  /Users/raphael/.rvm/gems/ruby-2.1.1/gems/jquery-form-rails-1.0.1/vendor/assets/javascripts
  /Users/raphael/.rvm/gems/ruby-2.1.1/gems/jquery-rails-3.1.2/vendor/assets/javascripts
  /Users/raphael/.rvm/gems/ruby-2.1.1/gems/d3-rails-3.4.13/app/assets/javascripts
  /Users/raphael/Documents/projects/vendor/assets/stylesheets
  (in /Users/raphael/Documents/projects/special_sauce/app/assets/stylesheets/application.css.scss:40):
  sass (3.2.19) lib/sass/tree/import_node.rb:67:in `rescue in import'
  sass (3.2.19) lib/sass/tree/import_node.rb:45:in `import'
  sass (3.2.19) lib/sass/tree/import_node.rb:28:in `imported_file'
  sass (3.2.19) lib/sass/tree/import_node.rb:37:in `css_import?'
  sass (3.2.19) lib/sass/tree/visitors/perform.rb:217:in `visit_import'
  sass (3.2.19) lib/sass/tree/visitors/base.rb:37:in `visit'
  sass (3.2.19) lib/sass/tree/visitors/perform.rb:100:in `visit'
  sass (3.2.19) lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
  sass (3.2.19) lib/sass/tree/visitors/base.rb:53:in `visit_children'
  sass (3.2.19) lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
  sass (3.2.19) lib/sass/tree/visitors/perform.rb:121:in `with_environment'
  sass (3.2.19) lib/sass/tree/visitors/perform.rb:108:in `visit_children'
  sass (3.2.19) lib/sass/tree/visitors/base.rb:37:in `block in visit'
  sass (3.2.19) lib/sass/tree/visitors/perform.rb:128:in `visit_root'
  sass (3.2.19) lib/sass/tree/visitors/base.rb:37:in `visit'
  sass (3.2.19) lib/sass/tree/visitors/perform.rb:100:in `visit'
  sass (3.2.19) lib/sass/tree/visitors/perform.rb:7:in `visit'
  sass (3.2.19) lib/sass/tree/root_node.rb:20:in `render'
  sass (3.2.19) lib/sass/engine.rb:315:in `_render'
  sass (3.2.19) lib/sass/engine.rb:262:in `render'
  sass-rails (4.0.4) lib/sass/rails/template.rb:22:in `evaluate'

Any ideas?

assets not found

Hi Joshua,

Thanks for your work here.

Neither the css or js file can be found by rails.

$'bundle show magnific-popup-rails outputs': .rvm/gems/ruby-1.9.3-p374/gems/magnific-popup-rails-0.8.1

Rails 3.2.8

I'll keep poking around but I thought I'd let you know.

Push actual version to RubyGems

RubyGem's last version of this gem is 0.9.9.1 as you can check here, but it doesn't match with this repo's version.rb file.

In fact, the code I got installed through gem install still has the .css.scss extension that was removed in 0c40f29.

Thanks in advance ๐Ÿ˜ƒ

Integration with turbolinks

Hey, as far I've tried it does not well with turbolinks. I have such peace of code:

setupProducts = -> 
        $('.photo-gallery').magnificPopup
                type: 'image',
                delegate: 'a',
                gallery: {enabled: true}
$ ->
  document.addEventListener "page:load", setupProducts
  setupProducts()

When I start in a page with element $('.photo-gallery') I click on it and magnific show the gallery. Then I go to some other page using turbolinks. When I go back to the first page after clicking on the element nothing happens.

It seems like it was already initialized for this element (that at this time is in the turbolinks cache (?)). And magnific stops working if initialized for the second time on the same element. Is there a way to check if magnific was already initialized for a giving element?

Missing scroll bar after submitting form within pop-up window

To reproduce the issue create a form with in a pop-up window that has a form with a submit button like this: <%= f.submit "Send" %>. When clicked the form is submitted correctly, and the pop-up window appears to be gone, but the underlying page now has no scroll bars, so user can't navigate the page. Requires a manual page reload to recover from this state.

Fix:

  1. Add code to close the window to submit button: <%= f.submit "Send" %, onClick: "closePopup();">
  2. Add corresponding small javascript:
  function closePopup() {
    $.magnificPopup.close();
  }

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.