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

Merged
merged 1 commit into from May 15, 2012

Conversation

Projects
None yet
4 participants
@jaspermdegroot
Member

jaspermdegroot commented May 6, 2012

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

This comment has been minimized.

Show comment Hide comment
@jaspermdegroot

jaspermdegroot May 6, 2012

Member

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!

Member

jaspermdegroot commented May 6, 2012

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

This comment has been minimized.

Show comment Hide comment
@agcolom

agcolom May 6, 2012

Member

@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

Member

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

This comment has been minimized.

Show comment Hide comment
@jaspermdegroot

jaspermdegroot May 6, 2012

Member

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

Member

jaspermdegroot commented May 6, 2012

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

This comment has been minimized.

Show comment Hide comment
@agcolom

agcolom May 6, 2012

Member

Hi Jasper,

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

Anne

Member

agcolom commented May 6, 2012

Hi Jasper,

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

Anne

@scottjehl

This comment has been minimized.

Show comment Hide comment
@scottjehl

scottjehl May 15, 2012

Contributor

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

Contributor

scottjehl commented May 15, 2012

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

scottjehl pushed a commit that referenced this pull request May 15, 2012

Scott Jehl
Merge pull request #4299 from uGoMobi/issue_#3496
Fixes #3496 - Styling of added checkbox incorrect when in controlgroup

@scottjehl scottjehl merged commit a21eb90 into jquery:master May 15, 2012

scottjehl pushed a commit that referenced this pull request May 24, 2012

Merge pull request #4299 from uGoMobi/issue_#3496
Fixes #3496 - Styling of added checkbox incorrect when in controlgroup
@avilaviad

This comment has been minimized.

Show comment Hide comment
@avilaviad

avilaviad Jun 10, 2012

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

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

This comment has been minimized.

Show comment Hide comment
@jaspermdegroot

jaspermdegroot Jun 10, 2012

Member

@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.

Member

jaspermdegroot commented Jun 10, 2012

@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 join this conversation on GitHub. Already have an account? Sign in to comment