aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.accordion.js
diff options
context:
space:
mode:
authorkborchers <kris.borchers@gmail.com>2011-12-01 12:53:35 -0600
committerkborchers <kris.borchers@gmail.com>2011-12-01 12:53:35 -0600
commit490dc4d36b6a0bf1dac5d8a9ba86aef7c9c27ee9 (patch)
treee65043eb657d9232888dcc1435bdd6907f990d15 /ui/jquery.ui.accordion.js
parente206e549352684a4c30ad53e38c5544599328f2d (diff)
parentce7918fc73c161ab237f052bad070e34250526be (diff)
downloadjquery-ui-490dc4d36b6a0bf1dac5d8a9ba86aef7c9c27ee9.tar.gz
jquery-ui-490dc4d36b6a0bf1dac5d8a9ba86aef7c9c27ee9.zip
Merge branch 'master' into menubar_otherStructures
Diffstat (limited to 'ui/jquery.ui.accordion.js')
-rw-r--r--ui/jquery.ui.accordion.js26
1 files changed, 14 insertions, 12 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 580009d33..127099d59 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -12,7 +12,7 @@
* jquery.ui.widget.js
*/
(function( $, undefined ) {
-
+
// TODO: use ui-accordion-header-active class and fix styling
$.widget( "ui.accordion", {
version: "@VERSION",
@@ -167,7 +167,7 @@ $.widget( "ui.accordion", {
this._setupEvents( value );
}
- this._super( "_setOption", key, value );
+ this._super( key, value );
// setting collapsible: false while collapsed; open first panel
if ( key === "collapsible" && !value && this.options.active === false ) {
@@ -244,7 +244,7 @@ $.widget( "ui.accordion", {
if ( position === "absolute" || position === "fixed" ) {
return;
}
- maxHeight -= elem.outerHeight( true );
+ maxHeight -= elem.outerHeight( true );
});
if ( overflow ) {
parent.css( "overflow", overflow );
@@ -437,7 +437,7 @@ $.extend( $.ui.accordion, {
options.prevHide.stop( true, true );
options.toHide = options.prevShow;
}
-
+
var showOverflow = options.toShow.css( "overflow" ),
hideOverflow = options.toHide.css( "overflow" ),
percentDone = 0,
@@ -449,7 +449,7 @@ $.extend( $.ui.accordion, {
easing: "swing",
duration: 300
}, options, additions );
-
+
options.widget.lastToggle = options;
if ( !options.toHide.size() ) {
@@ -483,11 +483,11 @@ $.extend( $.ui.accordion, {
// fix width before calculating height of hidden element
var s = options.toShow;
originalWidth = s[0].style.width;
- s.width( parseInt( s.parent().width(), 10 )
- - parseInt( s.css( "paddingLeft" ), 10 )
- - parseInt( s.css( "paddingRight" ), 10 )
- - ( parseInt( s.css( "borderLeftWidth" ), 10 ) || 0 )
- - ( parseInt( s.css( "borderRightWidth" ), 10) || 0 ) );
+ s.width( s.parent().width()
+ - parseFloat( s.css( "paddingLeft" ) )
+ - parseFloat( s.css( "paddingRight" ) )
+ - ( parseFloat( s.css( "borderLeftWidth" ) ) || 0 )
+ - ( parseFloat( s.css( "borderRightWidth" ) ) || 0 ) );
$.each( fxAttrs, function( i, prop ) {
hideProps[ prop ] = "hide";
@@ -628,8 +628,10 @@ if ( $.uiBackCompat !== false ) {
var _createIcons = prototype._createIcons;
prototype._createIcons = function() {
- this.options.icons.activeHeader = this.options.icons.activeHeader ||
- this.options.icons.headerSelected;
+ if ( this.options.icons ) {
+ this.options.icons.activeHeader = this.options.icons.activeHeader ||
+ this.options.icons.headerSelected;
+ }
_createIcons.call( this );
};
}( jQuery, jQuery.ui.accordion.prototype ) );