Giter Site home page Giter Site logo

existentialmutt / ajax_modal_rails Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 613 KB

ajax-driven modals for rails apps using bootstrap 4

License: MIT License

Ruby 29.94% CoffeeScript 1.19% HTML 6.19% JavaScript 61.26% CSS 0.57% Haml 0.03% SCSS 0.83%
modals rails

ajax_modal_rails's People

Contributors

dependabot[bot] avatar existentialmutt avatar rrosen avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ajax_modal_rails's Issues

some sugar for the layout munging

You should provide a note about the layout magic and maybe some sugar to customize it, so if you have a controller that uses layout for non-ajax stuff it falls back to this rather than nil. I just put this at the top of one controller:

module Foo
  class Bar < Baz
    include OneThing
    include AjaxModalRails::Controller

    layout ->(_) { ajax_modal_request? ? ajax_modal_layout : 'what_is_otherwise_expected' }

It took a little poking about in the source code for me to see that this is what I needed to do. Maybe you could provide non_ajax_layout or something, so this would have been

module Foo
  class Bar < Baz
    include OneThing
    include AjaxModalRails::Controller

    non_ajax_layout  'what_is_otherwise_expected'

Render close modal

This will allow the modal window to close w/our redirecting the underlying page

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.