Added the ability to enable/disable a group of radio buttons #362

Closed
wants to merge 8 commits into
from

Projects

None yet

3 participants

@karancan
Contributor

Added the following:
*_Function that allows you to disable/enable a group of radio buttons given a group name
*_Function that allows you to get the disable status of a group of radio buttons
**Function that allows you to get the disable status of an individual radio button

@timwindsor
Member

Forgot to tell you about the wiki as well. Can you update the wiki page for Radio Buttons with the new methods that you added: https://github.com/blackberry/bbUI.js/wiki/Radio-Buttons

@karancan
Contributor
karancan commented Oct 1, 2012

Hey Tim,
I'll have that done by the end of today.

@tneil
Member
tneil commented Oct 1, 2012

I figured I would tie this together with issue #154 for enabling and disabling radio buttons #154

@tneil
Member
tneil commented Oct 1, 2012

From taking a look at the enable/disable group of radio buttons, these group functions should be part of the _bb10_radio object.

We should also have an enable()/disable() function on each radio item.

For styling a radio button we should use some enabled/disabled classes instead of changing the style in javascript. This then allows the item to style itself as disabled when it finds the disabled attribute on first styling.

@karancan
Contributor
karancan commented Oct 1, 2012

Thanks for the feedback. I'll get cracking on the points you mentioned. Should I get rid of this pull request? I'll work on the changes and then make another one.

@karancan
Contributor
karancan commented Oct 7, 2012

@tneil After taking into account everything you posted above, this is a summary of all the functionality I have added:

1- Function to enable() a group of radio buttons -> enableGroup(groupName)
2- Function to disable() a group of radio buttons -> disableGroup(groupName)
3- Function to enable() an individual radio button -> enableRadio(radioId)
4- Function to disable() an individual radio button -> disableRadio(radioId)
5- Function to get the status of a group of radio buttons (i.e. if they are enabled or disabled) -> getGroupStatus(groupName)
6- Function to get the status of an individual radio button -> getRadioStatus(radioId)

*_All the changes were first testing in the samples and then integrated into the _bb10_radio object in samples
*_All disabled styling is now done through CSS classes

If all these changes are okay, I can run the jakefile on it and move it into the pkg folder

@tneil
Member
tneil commented Oct 9, 2012

The current pull request says that it cannot be merged automatically. Can you merge the latest code from the next branch into your changes first. You may have to close this pull request and open a new one.

@karancan karancan Merge branch 'next' of https://github.com/blackberry/bbUI.js into next
Conflicts:
	pkg/bbui-0.9.4.js
	samples/bbui-0.9.4.js
3250ecc
@karancan karancan closed this Oct 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment