From 7a5803057952f6fdbc2f423d1fadc36b448df057 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Fri, 26 Dec 2008 10:18:38 +0000 Subject: accordion: Fixed #3682, setting overflow:auto for fillSpace:true accordions; added demo --- demos/accordion/fillspace.html | 44 ++++++++++++++++++++++++++++++++++++++++++ demos/accordion/index.html | 1 + ui/ui.accordion.js | 7 ++++--- 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 demos/accordion/fillspace.html diff --git a/demos/accordion/fillspace.html b/demos/accordion/fillspace.html new file mode 100644 index 000000000..a96e6392b --- /dev/null +++ b/demos/accordion/fillspace.html @@ -0,0 +1,44 @@ + + + + jQuery UI Accordion - FillSpace Demo + + + + + + + + + +
+
+

Nullam blandit

+
+ Duis pretium. Nullam venenatis. Donec ornare. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet magna ac lorem elementum euismod. Nulla eu leo. Phasellus purus arcu, semper sed, scelerisque eget, molestie vitae, ante. Nam et purus. Vivamus nec lacus. Mauris pulvinar vehicula orci. Nunc quam metus, iaculis ut, viverra at, tempor vel, arcu. Aliquam dictum massa non diam. Pellentesque vel odio. Integer volutpat placerat velit. Phasellus rhoncus, diam ac fermentum suscipit, velit est eleifend dolor, et cursus massa pede et diam. Cras eu tortor. Quisque vitae ante nec erat venenatis luctus. Donec commodo suscipit nulla. Nunc nec ligula id nulla dictum dictum. +
+
+
+

Aliquam nulla

+
+ Ut varius. Cras gravida, ante vel porttitor porttitor, sapien magna eleifend dolor, sit amet eleifend justo neque sit amet neque. Donec a nisl sed orci pharetra sodales. Proin ullamcorper, mi sit amet tempor blandit, dolor diam vestibulum nibh, eu sollicitudin lorem risus quis tellus. Ut scelerisque consequat ipsum. Vivamus tellus velit, faucibus eu, venenatis sit amet, varius eu, turpis. In molestie nisi id purus. Pellentesque et dolor. Proin metus nisl, sollicitudin at, aliquet eu, porta eget, est. Donec ut libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; +
+
+
+

Proin tincidunt

+
+ Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Ut quam massa, scelerisque sit amet, lacinia sit amet, facilisis ullamcorper, nunc. Nulla vehicula auctor felis. Nullam lobortis erat quis metus. Maecenas molestie, quam lobortis tincidunt ultricies, dolor ante rutrum nisl, in vestibulum nisi odio consectetur enim. Nam tellus felis, ultrices nec, elementum malesuada, congue quis, lacus. Aliquam hendrerit interdum eros. Etiam egestas iaculis urna. Cras venenatis pharetra nunc. Etiam scelerisque mauris eget massa. Nam nec lectus eu purus tempus feugiat. Nunc quam. In facilisis venenatis nisl. Nullam id sapien. Nullam lacinia quam facilisis sem. Nullam facilisis convallis justo. Praesent dictum facilisis purus. Integer cursus ligula at nibh. Mauris in felis id nisl porttitor auctor. Quisque erat. +
+
+
+ + + diff --git a/demos/accordion/index.html b/demos/accordion/index.html index 54412586c..7b472c9e5 100644 --- a/demos/accordion/index.html +++ b/demos/accordion/index.html @@ -16,6 +16,7 @@
Accordion
Default
Mouseover
+
FillSpace
diff --git a/ui/ui.accordion.js b/ui/ui.accordion.js index 39dfc55bf..2fa08dd21 100644 --- a/ui/ui.accordion.js +++ b/ui/ui.accordion.js @@ -141,7 +141,8 @@ $.widget("ui.accordion", { 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() { @@ -207,7 +208,7 @@ function toggle(toShow, toHide, data, clickedActive, down) { toHide: toHide, complete: complete, down: down, - autoHeight: options.autoHeight + autoHeight: options.autoHeight || options.fillSpace }; } else { animOptions = { @@ -215,7 +216,7 @@ function toggle(toShow, toHide, data, clickedActive, down) { toHide: toHide, complete: complete, down: down, - autoHeight: options.autoHeight + autoHeight: options.autoHeight || options.fillSpace }; } -- cgit v1.2.3