vicentereig / bootstrap-modal-rails Goto Github PK
View Code? Open in Web Editor NEWRails gemified bootstrap-modal extension
License: Apache License 2.0
Rails gemified bootstrap-modal extension
License: Apache License 2.0
Hi,
I get the error "Uncaught TypeError: Cannot read property 'target' of undefined". Modal gets loaded but when I try to close it it throws out this error and page gets locked. Its these lines on modelmanager js. I guess I have bootstrap namespace elements so I tried removing the function but it made other parts fail..finally removed "e" and the condition and it worked but this time modal dissapears onclick..
// make sure the event target is the modal itself in order to prevent
// other components such as tabsfrom triggering the modal manager.
// if Boostsrap namespaced events, this would not be needed.
function targetIsSelf(callback){
return function (e) {
if (this === e.target){
return callback.apply(this, arguments);
}
}
}
My modal
#app-score.modal.hide.fade{'aria-labelledby' => t('whatis_appscore'), 'aria-hidden' => true }
.modal-header
%button.close{ type: 'button', data: { dismiss: 'modal' }, 'aria-hidden' => true } ×
%h3= t('whatis_appscore')
.modal-body
How I call modal
%medium.inline-block.why-facebook= link_to t('why_facebook'), '#why-facebook', data: { toggle: 'modal' }
Hello everyone, i'm happily using this gem, but i had some trouble at first because of the outdated readme which says that in the gemfile i have to do this:
group :assets do
gem 'bootstrap-modal-rails'
end
But that doesn't work in Rails 4, so i had to remove some code and let it like this:
gem 'bootstrap-modal-rails'
And it worked perfectly, i'm saying this because someone who is new in rails could thought that the gem has some bugs.
The same thing happens for the application.css, where you must write it different at the beginning and also add another css file before the bootstrap-modal, like this:
*= require bootstrap-modal-bs3patch
*= require bootstrap-modal
Hope it helps!
the bootstrap3 patch breaks modal-lg and modal-sm because it sets a 500px width on .modal
This issue: jschr/bootstrap-modal#115
In your application stylesheet if you require bootstrap-modal before tree you will get margin-top and height issues. You should mention to require it after tree or by using one of the method described in the issue. This really needs to be in the readme.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.