Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

feature request: tabviewer = support for data-type="horizontal" on collapsible-sets #4865

Closed
wants to merge 6 commits into from

3 participants

@frequent

I've been working on this for a while and wanted to share, because I think tabs are still something that's missing in JQM.

The tabviewer is a collapsible set with data-type="horizontal" specified. It's based on button controlgroups and content-grids, which I both fiddled into the collapsible widgets.

It's not a lot of changes (except for the CSS), so I gave up trying to make this a standalone widget/plugin.

A demo page can be found here.

The trickiest parts are getting the corner toggles right and embedding a tabviewer within page contents without having to specify a height for the collapsible set. Both are working ok now. It needs some polishing (data-inset, content-corners, active class, small displays), but I'm already using it in production and it's working well.

frequent added some commits
@frequent frequent add support for collapsible-set tab-viewer
- Adding direction and checking for it in a collapsible-set. The direction is specified like in a controlgroup by setting data-type="horizontal".
- Adding a check for direction when toggling the bottom class of the last collapsible in a set to prevent adding bottom-corners on the last tab.
2462dfc
@frequent frequent add support for collapsible-set tab-viewer
- Adding `grid` to use JQM grids on the collapsible
- Adding `direction` for collapsible-sets with `data-type="horizontal"`
- Adding `toggleCorners` which sets corners for horizontal/regular collapsibles
- Adding an `index` (which collapsible), `togClass` (which class to toggle) to event handler
- Moved toggling of classes into function `tog()`
- In `tog()` loop through variable `collapsible`, which will be a single collapsible (default) or the first and last collapsible in a horizontal set
- Setting `index` to loop count `i`(0 or 1) will switch between toggling bottom left/right corners on the first/last collapsible in a horizontal set. On regular collapsible sets, `togClass` defaults to `ui-corner-bottom` and `index` will always be 0, as there is only one element passed into the function.
- The function `tog()` is called from the following `if statement`. In horizontal collapsibles, the variable `collapsible` is changed to first AND last collapsible. The opening `expand` sets `isCollapse=false` to remove corners. Adding corners must only be done on the single `collapse` event and not the `collapse` events triggered together with the single `expand`. Therefore I'm comparing all collapsible to open collapsibles. If both match the `collapse` event was from closing a collapsible, so this triggers `tog()` with first/last collapsible and `isCollapse=true` to add back the bottom corners. 
- Inside `refresh` cleaning the corners has been changed to clean depending on `toggleCols` which in horizontal collapsible-sets defaults to top-left/bottom-left and top-right/bottom-right, while regular sets get the default top/bottom corners removed.
7cfa414
@frequent frequent add support for collapsible-set tab-viewer
- Added rules for horizontal collapsibles based on JQM grid.
e41426d
@toddparker

@frequent - this is a very cool idea. I really like the idea of just using data-type="horizontal" on the collapsible sets to make a tab. Two bits of feedback:

  • I think these should default to not showing an icon, just like we do for the horizontal checks/radios. Maybe if you set the icons explicitly for the expanded/collapsed, we can show them but by default, not having icons leaves more room for text and makes these look more like tabs.

  • Since there isn't a physical connection between the header and content as there is in an accordion, I'd like to apply the active class to the expanded collapsible to show an on state.

Is this coded to handle any number of tabs (within reason)?
I also wonder if we should apply a content theme by default or just document that you should add this.

Maybe @uGoMobi can work with you to refine this a bit and we can try to land this for 1.3.

@jaspermdegroot
Collaborator

@frequent

Nice idea! I am going to look into your PR and @toddparker his comments.

Jasper

BTW - It's better to create a branch for a PR.

@frequent

@toddparker

Sounds good. I agree with the icons (need a lot of space, will try to remove) and content-theme (make an option). I have set it up for 4 tabs right now, but maybe it can be done like the navbar to wrap to multiple lines (checking). Active state should already by there. I might have overwritten the CSS to not show it (also checking).

@uGoMobi

I'm only "white-belt" in Github. So I set up a branch in my local repo, make my changes in there. Then do a normal pull-request?

@jaspermdegroot
Collaborator

@frequent

Yes. If you do it like that you will see that the PR will be a request to merge [your branch name] into master.
If you want to make changes afterwards you can commit local and push that branch again. The new commits will be added to the PR.
It's better to keep your master branch in sync with the jQuery Mobile repo to avoid git conflicts and unrelated commits being added to this PR.

@frequent

@uGoMobi - Ok. I will try that. I have the non-icon default working (based on radios). Looking at active state and 4+ tabs next. I guess the easiest way to do 4+ is to mimic the footer, which is also based on JQM grids, isn't it? If I can get it to work the tabs would "break" to two rows if more than 5 are used. Let see if I can get this to work.

@toddparker

@frequent - yeah, take a look at how we approached the navbar, that will be a very solid start.

@toddparker

One thing to consider is whether the is enough shared logic with collapsibles to make tabs part of that plugin. I like the elegance of the idea, but if there is a lot of difference in the appearance or behavior that requires you to have to work against collapsibles, we can build a separate tabs plugin.

@frequent

@toddparker - Ok. Trying to fit into collapsibles first. Seems to work so far without bloating up the code

@frequent

@uGoMobi, @toddparker: need your feedback on some points.

1) (done) - keep active class on active collaspibles
2) (done) - if not specified, tabs are without icons by default
3) (need input!) - max number of tabs: This is tricky... 5 is no problem, also breaking to multiple lines if more than 5 tabs (same as navbar). I have been fiddling with another approach (dummy), where I'm trying to get by without setting any width/min-width on the tabs and just expand depending on text size while breaking to multiple lines on smaller screens. I have pretty much tried all CSS trickery I know but I can't fill the top row gaps when the screen shrinks. Do you have any idea if this is possible at all? If so, I would try making element four and five into first and last, so they would shrink/grow independently (so I can set corners).

Todos:
4) (will do next) data-inset not working yet
5) (will do next) set up with/without data-content-theme
6) (what do you think?) data-icons-only="true" on small screens if icons are specified on all collapsibles
7) (what do you think?) data-bottom-bar="true" to add a footer to the content section (sample coming up)
8) (what do you think?) data-tabs="left|right|bottom|top" just an idea, but I saw a nice native app using sidebars along header/footer. I would give it a try and see if this is settable with a class and CSS, so the tabs would be the sidebar.

@toddparker

Hi @frequent - Good to hear you're making progress. In general, I'd rather keep this simpler wherever possible but here are a few answers...

1 & 2 - Great. Is there an updated demo?
3 - I can see this getting complex. I'd vote to just to just max be 5 to avoid needing to stack to multiple rows because that's not good UI.
4 - this will be a good one to get working
5 - this should work without, but I can see us recommending that they use a theme for better visual connection
6 - i see the appeal, but let's just truncate text for now and look at this later
7 - seems like we could just allow people to add a footer to the content and we can make sure the styles look ok. I wouldn't add anything more than that.
8 - this would be nice, but i'd like to get the minimum in and see how much that adds to the code, then decide what to add. Bottom would be a good next step imho.

@frequent

@Toddparker, @uGoMobi

I have updated the tabview sample page to show with/without icons/content-theme and data-inset options.

So far it looks ok, although I will need to polish small displays and see how to fine tune the content-theme width. Let me know what else you find, so I can try to include it in my next edits (hopefully in the branch, which I still haven't figured out how to commit to...)

@toddparker

Looks like these will need some more styling cleanup but we can help out there - maybe hop on IRC to discuss.

Is there a way for me to see a diff of what changes you've made to the JS and CSS so far?

@frequent

@Toddparker - yeah, I'll hop on later today.

I have made a repo with commented collapsible.js, collapsibleSet.js and jquery.mobile.collapsible.css.

Just follow my xxx frequent labelled comments on all changes and let me know if this is workable.

@jaspermdegroot
Collaborator

hi @frequent

Thanks for all the work so far!

I had a look at your sample page and was wondering if we can think of a different approach to make the collapsible content full width and stick to the left. The problem with the fixed width is that you have to set the padding of the collapsible content to 0. Using box-sizing border-box would solve this for most browsers, but unfortunately IE7/8 and WP don't support this.

Let's discuss on IRC.

@frequent

@uGoMobi - ok. I'm on.

@jaspermdegroot
Collaborator

@frequent - I can't get on IRC because IRCCloud is down due to maintenance. Will keep trying or look for another IRC client if it takes too long.

@frequent

@uGoMobi - I'm using Firefox Chatzilla extension. No IRC expert, but it seems to do it's job.

@frequent

@uGoMobi - did you have any luck in css- ing the collapsle content section? not so easy...

@jaspermdegroot
Collaborator

@frequent - I tried some different approaches, but didn't find a good solution yet. I have to spend some more time on it.

@toddparker

We've decided to look at pulling in the UI tab widget for 1.5 so we probably won't pursue this approach since it will be duplicative. @frequent - if you end up getting this to work as an extension, please release it and we'll promote it ont eh resources page.

@toddparker toddparker closed this
@frequent

@toddparker: yeah, I saw it in the roadmap. I will try to polish it some and let you know once it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 19, 2012
  1. @frequent

    add support for collapsible-set tab-viewer

    frequent authored
    - Adding direction and checking for it in a collapsible-set. The direction is specified like in a controlgroup by setting data-type="horizontal".
    - Adding a check for direction when toggling the bottom class of the last collapsible in a set to prevent adding bottom-corners on the last tab.
  2. @frequent

    add support for collapsible-set tab-viewer

    frequent authored
    - Adding `grid` to use JQM grids on the collapsible
    - Adding `direction` for collapsible-sets with `data-type="horizontal"`
    - Adding `toggleCorners` which sets corners for horizontal/regular collapsibles
    - Adding an `index` (which collapsible), `togClass` (which class to toggle) to event handler
    - Moved toggling of classes into function `tog()`
    - In `tog()` loop through variable `collapsible`, which will be a single collapsible (default) or the first and last collapsible in a horizontal set
    - Setting `index` to loop count `i`(0 or 1) will switch between toggling bottom left/right corners on the first/last collapsible in a horizontal set. On regular collapsible sets, `togClass` defaults to `ui-corner-bottom` and `index` will always be 0, as there is only one element passed into the function.
    - The function `tog()` is called from the following `if statement`. In horizontal collapsibles, the variable `collapsible` is changed to first AND last collapsible. The opening `expand` sets `isCollapse=false` to remove corners. Adding corners must only be done on the single `collapse` event and not the `collapse` events triggered together with the single `expand`. Therefore I'm comparing all collapsible to open collapsibles. If both match the `collapse` event was from closing a collapsible, so this triggers `tog()` with first/last collapsible and `isCollapse=true` to add back the bottom corners. 
    - Inside `refresh` cleaning the corners has been changed to clean depending on `toggleCols` which in horizontal collapsible-sets defaults to top-left/bottom-left and top-right/bottom-right, while regular sets get the default top/bottom corners removed.
  3. @frequent

    add support for collapsible-set tab-viewer

    frequent authored
    - Added rules for horizontal collapsibles based on JQM grid.
Commits on Sep 10, 2012
  1. @frequent
Commits on Sep 12, 2012
  1. @frequent

    updated tabview

    frequent authored
Commits on Sep 13, 2012
  1. @frequent

    bugfixes

    frequent authored
This page is out of date. Refresh to see the latest.
View
35 css/structure/jquery.mobile.collapsible.css
@@ -30,3 +30,38 @@
.ui-collapsible-set { margin: .5em 0; }
.ui-collapsible-set .ui-collapsible { margin: -1px 0 0; }
.ui-collapsible-set .ui-collapsible:first-child { margin-top: 0; }
+
+/* horizontal tabs */
+.ui-collapsible-set-horizontal { margin: .5em -15px; }
+.ui-collapsible-no-inset { margin-left: 0px; margin-right: 0px;}
+.ui-collapsible-set-horizontal .ui-collapsible h3 .ui-btn { border-bottom-width: 1px; }
+.ui-collapsible-set-horizontal .ui-collapsible h3 .ui-btn .ui-btn-text { white-space: normal; }
+.ui-collapsible-set .ui-collapsible { margin-top: 0;}
+.ui-collapsible-set-horizontal.ui-collapsible-inset { margin: 0 15px; }
+.ui-collapsible-set-horizontal .ui-collapsible-heading .ui-btn-inner { padding-left: 20px;}
+.ui-collapsible-set-horizontal .ui-collapsible-heading .ui-btn-icon-left .ui-btn-inner { padding-left: 40px;}
+.ui-collapsible-set-horizontal .ui-collapsible-heading { width: 100%; margin: 0; }
+.ui-collapsible-set-horizontal .ui-collapsible-content { position: relative; margin: 0; padding: 0; }
+/* 2tabs */
+.ui-collapsible-set-horizontal.ui-grid-a .ui-block-a .ui-collapsible-content { width: 199.3%; }
+.ui-collapsible-set-horizontal.ui-grid-a .ui-block-b .ui-collapsible-content { left: -99.19%; width: 198.5%;}
+/* 3tabs */
+.ui-collapsible-set-horizontal.ui-grid-b .ui-block-a .ui-collapsible-content { width: 299.5%; }
+.ui-collapsible-set-horizontal.ui-grid-b .ui-block-b .ui-collapsible-content { width: 299.5%; left: -100%; }
+.ui-collapsible-set-horizontal.ui-grid-b .ui-block-c .ui-collapsible-content { width: 299.5%; left: -200%; }
+/* 4tabs */
+.ui-collapsible-set-horizontal.ui-grid-c .ui-block-a .ui-collapsible-content { width: 399.5%; }
+.ui-collapsible-set-horizontal.ui-grid-c .ui-block-b .ui-collapsible-content { width: 399.5%; left: -100%; }
+.ui-collapsible-set-horizontal.ui-grid-c .ui-block-c .ui-collapsible-content { width: 399.5%; left: -200%; }
+.ui-collapsible-set-horizontal.ui-grid-c .ui-block-d .ui-collapsible-content { width: 399.5%; left: -300%; }
+/* 5tabs */
+.ui-collapsible-set-horizontal.ui-grid-d .ui-block-a .ui-collapsible-content { width: 499.5%; }
+.ui-collapsible-set-horizontal.ui-grid-d .ui-block-b .ui-collapsible-content { width: 499.5%; left: -100%; }
+.ui-collapsible-set-horizontal.ui-grid-d .ui-block-c .ui-collapsible-content { width: 499.5%; left: -200%; }
+.ui-collapsible-set-horizontal.ui-grid-d .ui-block-d .ui-collapsible-content { width: 499.5%; left: -300%; }
+.ui-collapsible-set-horizontal.ui-grid-d .ui-block-e .ui-collapsible-content { width: 499.5%; left: -400%; }
+/* misc */
+.ui-collapsible-set-horizontal .ui-collapsible .ui-btn-active { border-bottom-width: 0; }
+.ui-collapsible-set-horizontal .ui-collapsible-collapsed .ui-btn { border-bottom-width: 1px; }
+.ui-collapsible-set-horizontal .ui-collapsible .ui-collapsible-content { border-top-width: 0; }
+.ui-collapsible-set-horizontal .ui-collapsible-heading-status { position: absolute !important; left: -9999px; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
View
27 js/widgets/collapsible.js
@@ -19,6 +19,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
contentTheme: null,
inset: true,
mini: false,
+ direction: "",
initSelector: ":jqmData(role='collapsible')"
},
_create: function() {
@@ -31,7 +32,6 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon,
collapsibleContent = collapsible.wrapInner( "<div class='ui-collapsible-content'></div>" ).children( ".ui-collapsible-content" ),
collapsibleSet = $el.closest( ":jqmData(role='collapsible-set')" ).addClass( "ui-collapsible-set" );
-
// Replace collapsibleHeading if it's a legend
if ( collapsibleHeading.is( "legend" ) ) {
collapsibleHeading = $( "<div role='heading'>"+ collapsibleHeading.html() +"</div>" ).insertBefore( collapsibleHeading );
@@ -40,6 +40,10 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
// If we are in a collapsible set
if ( collapsibleSet.length ) {
+ // Add direction
+ if ( collapsibleSet.jqmData( "type" ) == "horizontal" ){
+ o.direction = "horizontal";
+ }
// Inherit the theme from collapsible-set
if ( !o.theme ) {
o.theme = collapsibleSet.jqmData( "theme" ) || $.mobile.getInheritedTheme( collapsibleSet, "c" );
@@ -48,7 +52,6 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
if ( !o.contentTheme ) {
o.contentTheme = collapsibleSet.jqmData( "content-theme" );
}
-
// Get the preference for collapsed icon in the set
if ( !o.collapsedIcon ) {
o.collapsedIcon = collapsibleSet.jqmData( "collapsed-icon" );
@@ -77,15 +80,14 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
o.theme = $.mobile.getInheritedTheme( $el, "c" );
}
}
-
if ( !!o.inset ) {
collapsible.addClass( "ui-collapsible-inset" );
}
-
+
collapsibleContent.addClass( ( o.contentTheme ) ? ( "ui-body-" + o.contentTheme ) : "");
- collapsedIcon = $el.jqmData( "collapsed-icon" ) || o.collapsedIcon || "plus";
- expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon || "minus";
+ collapsedIcon = $el.jqmData( "collapsed-icon" ) || o.collapsedIcon || ( o.direction == "horizontal" ? undefined : "plus" );
+ expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon || ( o.direction == "horizontal" ? undefined : "minus" );
collapsibleHeading
//drop heading in before content
@@ -99,7 +101,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
.buttonMarkup({
shadow: false,
corners: false,
- iconpos: $el.jqmData( "iconpos" ) || o.iconPos || "left",
+ iconpos: $el.jqmData( "iconpos" ) || o.iconPos || ( collapsedIcon == undefined ? null : "left" ),
icon: collapsedIcon,
mini: o.mini,
theme: o.theme
@@ -120,7 +122,6 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
contentTheme = o.contentTheme;
event.preventDefault();
-
collapsibleHeading
.toggleClass( "ui-collapsible-heading-collapsed", isCollapse )
.find( ".ui-collapsible-heading-status" )
@@ -129,14 +130,14 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
.find( ".ui-icon" )
.toggleClass( "ui-icon-" + expandedIcon, !isCollapse )
// logic or cause same icon for expanded/collapsed state would remove the ui-icon-class
- .toggleClass( "ui-icon-" + collapsedIcon, ( isCollapse || expandedIcon === collapsedIcon ) )
+ .toggleClass( "ui-icon-" + collapsedIcon, ( isCollapse || expandedIcon === collapsedIcon ) )
.end()
- .find( "a" ).first().removeClass( $.mobile.activeBtnClass );
-
+ .find( "a" ).first()[o.direction == 'horizontal' ? 'toggleClass':'removeClass']( $.mobile.activeBtnClass , ( o.direction == "horizontal" ? !isCollapse : false ) );
+
$this.toggleClass( "ui-collapsible-collapsed", isCollapse );
collapsibleContent.toggleClass( "ui-collapsible-content-collapsed", isCollapse ).attr( "aria-hidden", isCollapse );
- if ( contentTheme && !!o.inset && ( !collapsibleSet.length || collapsible.jqmData( "collapsible-last" ) ) ) {
+ if ( contentTheme && !!o.inset && ( !collapsibleSet.length || collapsible.jqmData( "collapsible-last" ) ) && o.direction != "horizontal" ) {
collapsibleHeading
.find( "a" ).first().add( collapsibleHeading.find( ".ui-btn-inner" ) )
.toggleClass( "ui-corner-bottom", isCollapse );
@@ -171,4 +172,4 @@ $( document ).bind( "pagecreate create", function( e ) {
})( jQuery );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
-//>>excludeEnd("jqmBuildExclude");
+//>>excludeEnd("jqmBuildExclude");
View
75 js/widgets/collapsibleSet.js
@@ -11,12 +11,19 @@ define( [ "jquery", "../jquery.mobile.widget", "./collapsible" ], function( $ )
$.widget( "mobile.collapsibleset", $.mobile.widget, {
options: {
- initSelector: ":jqmData(role='collapsible-set')"
+ grid: null,
+ inset: true
},
_create: function() {
var $el = this.element.addClass( "ui-collapsible-set" ),
- o = this.options;
+ o = $.extend({ direction: $el.jqmData("type") || "" }, this.options );
+
+ toggleCorners = o.direction == "horizontal" ? [ "ui-corner-tl ui-corner-bl","ui-corner-tr ui-corner-br" ] : ["ui-corner-top ", "ui-corner-bottom" ];
+ // Add horizontal class and grid
+ if ( o.direction == "horizontal" ) {
+ $el.addClass("ui-collapsible-set-horizontal").grid({ grid: this.options.grid });
+ }
// Inherit the theme from collapsible-set
if ( !o.theme ) {
o.theme = $.mobile.getInheritedTheme( $el, "c" );
@@ -25,12 +32,13 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
if ( !o.contentTheme ) {
o.contentTheme = $el.jqmData( "content-theme" );
}
-
if ( $el.jqmData( "inset" ) !== undefined ) {
o.inset = $el.jqmData( "inset" );
}
- o.inset = o.inset !== undefined ? o.inset : true;
-
+ // Add inset class
+ if ( !!o.inset && o.direction == "horizontal" ){
+ $el.addClass( "ui-collapsible-no-inset" );
+ }
// Initialize the collapsible set if it's not already initialized
if ( !$el.jqmData( "collapsiblebound" ) ) {
$el
@@ -38,14 +46,41 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
.bind( "expand collapse", function( event ) {
var isCollapse = ( event.type === "collapse" ),
collapsible = $( event.target ).closest( ".ui-collapsible" ),
- widget = collapsible.data( "collapsible" );
- if ( collapsible.jqmData( "collapsible-last" ) && !!o.inset ) {
- collapsible.find( ".ui-collapsible-heading" ).first()
- .find( "a" ).first()
- .toggleClass( "ui-corner-bottom", isCollapse )
- .find( ".ui-btn-inner" )
- .toggleClass( "ui-corner-bottom", isCollapse );
+ widget = collapsible.data( "collapsible" ),
+ index = $el.find('.ui-collapsible').index( collapsible ),
+ togClass = "ui-corner-bottom",
+ tog = function() {
+ if ( !!o.inset ){
+ // triggers on clicked or first&last collapsible
+ for ( var i = 0; i < collapsible.length; i++ ){
+ index = i;
+ togClass = o.direction == "horizontal" ? ( index == 0 ? "ui-corner-bl" : "ui-corner-br") : "ui-corner-bottom";
+ collapsible.eq(i).find( widget.options.heading ).first()
+ .find( "a" ).first()
+ .toggleClass( togClass, isCollapse )
+ .find( ".ui-btn-inner" )
+ .toggleClass( togClass, isCollapse );
+ }
+ }
+ };
+
+ // toggle content bottom corners
+ if ( !!o.inset && ( o.direction == "horizontal" || collapsible.jqmData( "collapsible-last" ) ) ) {
collapsible.find( ".ui-collapsible-content" ).toggleClass( "ui-corner-bottom", !isCollapse );
+ }
+ if ( o.direction == "horizontal" ){
+ // set collapsible to first&last and set event
+ collapsible = $el.find('.ui-collapsible').first().add( $el.find('.ui-collapsible').eq( $el.find('.ui-collapsible').length-1) );
+ if ( event.type == "expand" ){
+ isCollapse = false;
+ tog();
+ } else if ( $el.find('.ui-collapsible').length == $el.find('.ui-collapsible-collapsed').length ) {
+ isCollapse = true;
+ tog();
+ }
+ // plain collapsibleSet
+ } else if (collapsible.jqmData( "collapsible-last" ) && !!o.inset ) {
+ tog();
}
})
.bind( "expand", function( event ) {
@@ -77,7 +112,7 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
collapsiblesInSet = $el.children( ":jqmData(role='collapsible')" );
$.mobile.collapsible.prototype.enhance( collapsiblesInSet.not( ".ui-collapsible" ) );
-
+
// clean up borders
if ( !!o.inset ) {
collapsiblesInSet.each(function() {
@@ -92,18 +127,18 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
collapsiblesInSet.first()
.find( "a" )
.first()
- .addClass( "ui-corner-top" )
+ .addClass( toggleCorners[0] )
.find( ".ui-btn-inner" )
- .addClass( "ui-corner-top" );
-
+ .addClass( toggleCorners[0] );
+
collapsiblesInSet.last()
.jqmData( "collapsible-last", true )
.find( "a" )
.first()
- .addClass( "ui-corner-bottom" )
+ .addClass( toggleCorners[1] )
.find( ".ui-btn-inner" )
- .addClass( "ui-corner-bottom" );
- }
+ .addClass( toggleCorners[1] );
+ }
}
});
@@ -115,4 +150,4 @@ $( document ).bind( "pagecreate create", function( e ) {
})( jQuery );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
-//>>excludeEnd("jqmBuildExclude");
+//>>excludeEnd("jqmBuildExclude");
Something went wrong with that request. Please try again.