Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

collapsise : abitilty to have no icon #5327

Merged
merged 1 commit into from

2 participants

@ErwanMAS

move default values from collapsedIcon / expandedIcon / iconPos in the "options"
section of the widget instead in the main code .

so we have the ability do not display a icon for collapsible ( with setting collapsedIcon to false )

@ErwanMAS ErwanMAS [collapsible] move default values from collapsedIcon / expandedIcon /…
… iconPos in the "options" section of the widget instead in the main code .

               so we have the ability do not display a icon for collapsible .
2af7570
@jaspermdegroot
Collaborator

@ErwanMAS

Thanks for the PR. I will test this and see if we need to make adjusments in CSS as well for this no-icon option. After that we can pull this in for 1.3.

@jaspermdegroot
Collaborator

@ErwanMAS

The collapsible unit tests 12.3 and 12.4 fail. Can you give that a look? Thanks!

@jaspermdegroot jaspermdegroot merged commit 2af7570 into from
@jaspermdegroot
Collaborator

@ErwanMAS

I made the required changes to make things work in collapsible sets. The tests pass now. I also made a minor change in the CSS so it covers a collapsible without icon as well. Your commit and these changes are merged in branch master now.

Note that if you want a collapsible to have no icons and the correct CSS to be applied, you have to set all three options collapsedIcon, expandedIcon and iconpos to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 24, 2012
  1. @ErwanMAS

    [collapsible] move default values from collapsedIcon / expandedIcon /…

    ErwanMAS authored
    … iconPos in the "options" section of the widget instead in the main code .
    
                   so we have the ability do not display a icon for collapsible .
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 3 deletions.
  1. +6 −3 js/widgets/collapsible.js
View
9 js/widgets/collapsible.js
@@ -15,6 +15,9 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
collapseCueText: " click to collapse contents",
collapsed: true,
heading: "h1,h2,h3,h4,h5,h6,legend",
+ collapsedIcon: "plus",
+ expandedIcon: "minus",
+ iconPos: "left",
theme: null,
contentTheme: null,
inset: true,
@@ -96,8 +99,8 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
collapsible.addClass( collapsibleClasses );
}
- collapsedIcon = $el.jqmData( "collapsed-icon" ) || o.collapsedIcon || "plus";
- expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon || "minus";
+ collapsedIcon = $el.jqmData( "collapsed-icon" ) || o.collapsedIcon ;
+ expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon ;
collapsibleHeading
//drop heading in before content
@@ -111,7 +114,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
.buttonMarkup({
shadow: false,
corners: false,
- iconpos: $el.jqmData( "iconpos" ) || o.iconpos || "left",
+ iconpos: $el.jqmData( "iconpos" ) || o.iconpos ,
icon: collapsedIcon,
mini: o.mini,
theme: o.theme
Something went wrong with that request. Please try again.