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

Button markup corners can be string #5241

Merged
merged 14 commits into from
Nov 2, 2012

Conversation

gabrielschulhof
Copy link

This branch contains the implementation of the controlgroup widget, which is a roadmap item. It also fixes a problem that occurs when calling buttonMarup() on a button that is a member of the controlgroup (#3635).

@ghost ghost assigned jaspermdegroot Nov 1, 2012
@gabrielschulhof
Copy link
Author

Implications:

  • controlgroups use ui-btn-corner-all because otherwise the shadows do not line up with the outlines of the buttons. This means that vertical controlgroups, such as the ones of the form

    [ ] checkbox1
    [ ] checkbox2
    [ ] checkbox3

    now look less like listviews, because their corner radii are larger.

  • classes ui-btn-corner-(tl|tr|bl|br|left|top|right|bottom) which have not been referenced from anywhere in our code are now being used

@gabrielschulhof
Copy link
Author

Briefly:

Before/After

@gabrielschulhof
Copy link
Author

I guess we could special-case the corner radii of buttons inside controlgroups from CSS, to coincide with the ui-corner-* values and then I can change controlgroup back so that it adds ui-corner-all to the outer container, rather than ui-btn-corner-all, and the shadows and border radii will work as before.

@gseguin
Copy link
Contributor

gseguin commented Nov 1, 2012

Yeah I was just going to ask about the corner radius. It looks odd to me but that doesn't mean it's wrong.

@toddparker
Copy link
Contributor

This change will affect a lot of widgets - grouped checks, radios, etc. We can't special case radii because these are themable CSS properties.

We need to clarify our shadow classes since we have two: in ThemeRoller, we call these "group" and "button" so we should be applying the group class here.

@gabrielschulhof
Copy link
Author

OK, with the new cornerstyle option the group corner style is once again being applied to controlgroup widgets.

@gabrielschulhof
Copy link
Author

BTW: This also fixes #3496 when controlgroup's refresh() method is called after adding new items.

@gabrielschulhof
Copy link
Author

Here's a fixed version of the fiddle from #3496 using this branch: http://jsfiddle.net/JwWpX/19/

//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

function flipClasses( els, flCorners ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this can't be on the widget? (nitpick)

gabrielschulhof pushed a commit that referenced this pull request Nov 2, 2012
Button markup corners can be string -- Fixes #3496
@gabrielschulhof gabrielschulhof merged commit abcddc9 into master Nov 2, 2012
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.

5 participants