Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Fixes #3496 - Styling of added checkbox incorrect when in controlgroup #4299

Merged
merged 1 commit into from
May 15, 2012
Merged

Fixes #3496 - Styling of added checkbox incorrect when in controlgroup #4299

merged 1 commit into from
May 15, 2012

Conversation

jaspermdegroot
Copy link
Contributor

Issue: When a new controlgroup item (button, selectmenu, checkbox/radio) is dynamically injected, the controlgroup corner styling can't be refreshed.
Cause: The controlgroup function doesn't consider situations where the controlgroup element is already styled as a controlgroup.
Fix: Added classes to the list of classes that have to be removed before corner classes getting assigned (again).

Passed all unit tests. Live test page: http://ugomobi.github.com/controlgroup/

Fixes: #3496

@jaspermdegroot
Copy link
Contributor Author

To do after this got pulled:

Add information to docs about how to refresh a controlgroup.
Note the difference with refreshing listview and other 'real' widgets: $('#mycontrolgroup').controlgroup(); versus $('#mylist').listview('refresh');

@agcolom could you help with this? Thanks!

@agcolom
Copy link
Contributor

agcolom commented May 6, 2012

@uGoMobi Hi Jasper, yes the demo looks really great. I was talking with @toddparker just last week about adding some examples on dynamically generated content as I believe the docs are not great on that at the moment and your demo page looks fantastic for that. What I'd like to do is to have the code above each example, and have other elements as well that are not in a control group. Can I/we reuse your code for that? Do you want to work together on that or do you want me to do it?

Thanks,

Anne

@jaspermdegroot
Copy link
Contributor Author

hi Anne,

Sure, sounds like a good plan. We can do this together. My suggestion is that you point out what kind of examples and where they need to go (on excisting pages or new ones). Then I will create the examples with the code above it. After that you could add introduction text where needed. Ok?

Jasper

BTW - This will most probably solve #4297

@agcolom
Copy link
Contributor

agcolom commented May 6, 2012

Hi Jasper,

That sounds perfect. I'll start on it tomorrow,

Anne

@scottjehl
Copy link

This change looks fine to me. Nice work, @uGoMobi . Merging now.

scottjehl pushed a commit that referenced this pull request May 15, 2012
Fixes #3496 - Styling of added checkbox incorrect when in controlgroup
@scottjehl scottjehl merged commit a21eb90 into jquery-archive:master May 15, 2012
scottjehl pushed a commit that referenced this pull request May 24, 2012
Fixes #3496 - Styling of added checkbox incorrect when in controlgroup
@avilaviad
Copy link

Hi,
This fix is working perfectly if you try to add checkbox to the current visible page,
However, there's a bug within this fix -
when you try to dynamically add checkbox to pageA from pageB the new checkbox style isn't look as part of the controlgroup.

FYI

@jaspermdegroot
Copy link
Contributor Author

@avilaviad - Can you open a new issue and provide a simple test page that illustrate the issue? Here is a template you can use http://jsbin.com/otepum/edit#html
If you think the bug is caused by the changes made by merging this pull request you can refer to it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Styling of added checkbox incorrect when in controlgroup
4 participants