Search and Top Navigation
Ticket #3682: accordion-fillspace.patch
File accordion-fillspace.patch, 1.2 KB (added by vmx, December 20, 2008 04:55AM UTC)
Fixes fillSpace bug
Index: ui.accordion.js
===================================================================
--- ui.accordion.js (revision 1187)
+++ ui.accordion.js (working copy)
@@ -56,7 +56,9 @@
var maxPadding = 0;
options.headers.next().each(function() {
maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
- }).height(maxHeight - maxPadding);
+ })
+ .height(maxHeight - maxPadding)
+ .css('overflow', 'auto');
} else if ( options.autoHeight ) {
maxHeight = 0;
options.headers.next().each(function() {
@@ -202,7 +204,10 @@
toHide: toHide,
complete: complete,
down: down,
- autoHeight: options.autoHeight
+ // autoHeight == true: height was set by the
+ // accordion plugin, either through autoHeight
+ // or fillSpace
+ autoHeight: options.autoHeight || options.fillSpace
};
} else {
animOptions = {
@@ -210,7 +215,7 @@
toHide: toHide,
complete: complete,
down: down,
- autoHeight: options.autoHeight
+ autoHeight: options.autoHeight || options.fillSpace
};
}
@@ -339,6 +344,7 @@
alwaysOpen: true,
animated: 'slide',
event: "click",
+ fillSpace: false,
header: "a",
headerIcon: "ui-icon-triangle-1-e",
headerIconSelected: "ui-icon-triangle-1-s",
Download in other formats:
Original Format
File accordion-fillspace.patch, 1.2 KB (added by vmx, December 20, 2008 04:55AM UTC)
Fixes fillSpace bug
Index: ui.accordion.js
===================================================================
--- ui.accordion.js (revision 1187)
+++ ui.accordion.js (working copy)
@@ -56,7 +56,9 @@
var maxPadding = 0;
options.headers.next().each(function() {
maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
- }).height(maxHeight - maxPadding);
+ })
+ .height(maxHeight - maxPadding)
+ .css('overflow', 'auto');
} else if ( options.autoHeight ) {
maxHeight = 0;
options.headers.next().each(function() {
@@ -202,7 +204,10 @@
toHide: toHide,
complete: complete,
down: down,
- autoHeight: options.autoHeight
+ // autoHeight == true: height was set by the
+ // accordion plugin, either through autoHeight
+ // or fillSpace
+ autoHeight: options.autoHeight || options.fillSpace
};
} else {
animOptions = {
@@ -210,7 +215,7 @@
toHide: toHide,
complete: complete,
down: down,
- autoHeight: options.autoHeight
+ autoHeight: options.autoHeight || options.fillSpace
};
}
@@ -339,6 +344,7 @@
alwaysOpen: true,
animated: 'slide',
event: "click",
+ fillSpace: false,
header: "a",
headerIcon: "ui-icon-triangle-1-e",
headerIconSelected: "ui-icon-triangle-1-s",