-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #11464 - JS noConflict() mode not working in 3.0.x #11966
Conversation
@colllin Part of the test suite is failing; see https://travis-ci.org/twbs/bootstrap/jobs/16172124 |
Bad merge. Thanks for the heads up. I'll look at it tomorrow. On Tue, Dec 31, 2013 at 12:49 AM, Chris Rebert [email protected]:
|
Hey, just to be clear, this is what I did: 1 - I fixed a few js bugs affecting noConflict mode.
becomes something like this:
... with setup and teardown happening in the test module around each plugin. Testing the plugins in noConflict mode is the only way to ensure that the plugins work in noConflict mode, but once we test it in noConflict mode, it seems redundant to test again in normal mode (as long as we check once at the beginning to make sure that the jQuery plugin got attached correctly). So, my questions are:
or
or even
|
Regarding messaging, we should add a statement about it to CONTRIBUTING.md. |
/cc @fat |
var old = $.fn.alert | ||
|
||
$.fn.alert = Plugin | ||
|
||
$.fn.alert.Constructor = Alert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing looks a bit weird and the =
aren't lined up… so it doesn't really match the style of these plugins
I think this is a good idea… there are some little things that should be cleaned up (lots of style stuff), but in general its good work. thanks a lot @colllin |
var old = $.fn.affix | ||
|
||
$.fn.affix = Plugin | ||
|
||
$.fn.affix.Constructor = Affix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you change these to:
var old = $.fn.affix
$.fn.affix = Plugin
$.fn.affix.Constructor = Affix
@fat There was a huge style refactor since I originally submitted this pull request. I will update to match the new style. |
awesome, thanks man |
@colllin Friendly ping on this. |
…internal reference to the jQuery plugin, because in noConflict mode you can never expect to be defined on the jQuery object
Thanks @cvrebert . I needed the push, and I happened to have time tonight. Started over with a fresh branch because of all the changes since I originally submitted. |
@colllin Awesome! <3 |
Passes Sauce cross-browser unit tests: https://travis-ci.org/twbs/bootstrap/jobs/23485897 |
@fat Could you re-review this new revision? (And sorry about the number of pings lately. Just trying to keep things moving forward.) |
yep no problem… will review now, and try to catch up this weekend |
this lgtm |
@colllin thanks so much for this ❤️ great work! |
thanks! happy to help :) On Fri, Apr 25, 2014 at 4:44 PM, Jacob [email protected] wrote:
|
@fat So, merge this? It auto-merges cleanly and passes the test suite. |
Fix #11464 - JS noConflict() mode not working in 3.0.x
<3 If @fat says looks good, it's him saying go ahead and merge (we talked about it in person awhile back) :). |
NAVER - http://www.naver.com/[email protected] 님께 보내신 메일 <Re: [bootstrap] Fix #11464 - JS noConflict() mode not working in 3.0.x (#11966)> 이 다음과 같은 이유로 전송 실패했습니다. 받는 사람이 회원님의 메일을 수신차단 하였습니다. |
It's nice to see this merged. 2014-05-01 2:46 GMT+02:00 Mark Otto [email protected]:
Zlatan Vasović - ZDroid |
Refactor tests to run everything in noConflict mode. This is a philosophy change, from "We're testing a jQuery plugin" to "We're testing a library that depends on jQuery". Then, almost as an afterthought, there is an additional test to make sure the library correctly gets attached as a jQuery plugin.
Refactor all plugins to use an internal
Plugin
reference to the plugin function. The plugins can't expect to be attached to the jQuery object when in noConflict mode.