Skip to content
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

Horizontal buttonset appears vertical again #77

Closed
blasky opened this issue Nov 29, 2012 · 3 comments
Closed

Horizontal buttonset appears vertical again #77

blasky opened this issue Nov 29, 2012 · 3 comments

Comments

@blasky
Copy link

blasky commented Nov 29, 2012

I saw there was a previous issue about horizontal buttonsets being rendered vertically. This issue appears to be back again in the 1.1.2-SNAPSHOT.js. It appears that there are extra "fieldset" tags being generated.

See the fiddle. Thanks.

http://jsfiddle.net/wDc9w/

@tbosch
Copy link
Contributor

tbosch commented Nov 29, 2012

Hi,
yes, we do generate extra

around checkboxes (which are used in your example) and their labels. This is required for the integration between angular and jquery (see the Changelog.md for details). However, you can place your own around the label and input element. Then the adapter will not generate another element.

So you could end up with something like this for a horizontal array of checkboxes: http://jsfiddle.net/wDc9w/1/

<div data-role="controlgroup" data-type="horizontal">
        <fieldset ng-repeat="thing in things" style="display:inline">                
            <input type="checkbox" id="c-{{thing}}" />
            <label for="c-{{thing}}">{{thing}}</label>            
        </fieldset>
</div>

The trick is to use your own fieldset element with a style of display:inline.

Thanks for reporting this. I have to think about this a little more and therefore will leave this ticket open...

Tobias

@blasky
Copy link
Author

blasky commented Nov 29, 2012

Seems like a perfectly reasonable work around (...or solution) for this case. I'll keep my eye out for other cases. Thanks.

@tbosch
Copy link
Contributor

tbosch commented Dec 21, 2012

Hello, your initial jsfiddle works well now.

@tbosch tbosch closed this as completed Dec 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants