2015-04-03 19:24:09 +00:00
|
|
|
define( [
|
|
|
|
"lib/common",
|
2015-07-15 01:54:33 +00:00
|
|
|
"ui/widgets/accordion"
|
2015-04-03 19:24:09 +00:00
|
|
|
], function( common ) {
|
|
|
|
|
|
|
|
common.testWidget( "accordion", {
|
2011-01-25 00:20:09 +00:00
|
|
|
defaults: {
|
|
|
|
active: 0,
|
2012-02-16 21:51:46 +00:00
|
|
|
animate: {},
|
2014-12-03 16:23:19 +00:00
|
|
|
classes: {
|
|
|
|
"ui-accordion-header": "ui-corner-top",
|
|
|
|
"ui-accordion-header-collapsed": "ui-corner-all",
|
|
|
|
"ui-accordion-content": "ui-corner-bottom"
|
|
|
|
},
|
2011-01-25 00:20:09 +00:00
|
|
|
collapsible: false,
|
|
|
|
disabled: false,
|
|
|
|
event: "click",
|
2020-01-22 15:44:34 +00:00
|
|
|
header: function( elem ) {
|
2024-05-10 12:45:59 +00:00
|
|
|
return elem
|
|
|
|
.find( "> li > :first-child" )
|
|
|
|
.add(
|
|
|
|
elem.find( "> :not(li)" )
|
|
|
|
|
|
|
|
// Support: jQuery <3.5 only
|
|
|
|
// We could use `.even()` but that's unavailable in older jQuery.
|
|
|
|
.filter( function( i ) {
|
|
|
|
return i % 2 === 0;
|
|
|
|
} )
|
|
|
|
);
|
2020-01-22 15:44:34 +00:00
|
|
|
},
|
2011-01-25 00:20:09 +00:00
|
|
|
heightStyle: "auto",
|
|
|
|
icons: {
|
|
|
|
"activeHeader": "ui-icon-triangle-1-s",
|
|
|
|
"header": "ui-icon-triangle-1-e"
|
2011-04-25 12:10:39 +00:00
|
|
|
},
|
|
|
|
|
2015-08-21 04:12:07 +00:00
|
|
|
// Callbacks
|
2011-04-25 12:10:39 +00:00
|
|
|
activate: null,
|
2011-04-25 18:04:30 +00:00
|
|
|
beforeActivate: null,
|
|
|
|
create: null
|
2011-01-24 19:38:23 +00:00
|
|
|
}
|
2015-08-21 04:12:07 +00:00
|
|
|
} );
|
2015-04-03 19:24:09 +00:00
|
|
|
|
|
|
|
} );
|