myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmarinsc...@apache.org
Subject svn commit: r294828 - in /myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion: HtmlAccordionPanelRenderer.java resource/toggler.js
Date Tue, 04 Oct 2005 17:00:03 GMT
Author: mmarinschek
Date: Tue Oct  4 09:59:56 2005
New Revision: 294828

URL: http://svn.apache.org/viewcvs?rev=294828&view=rev
Log:
Accordion revamped

Modified:
    myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
    myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/resource/toggler.js

Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java?rev=294828&r1=294827&r2=294828&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
(original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
Tue Oct  4 09:59:56 2005
@@ -95,7 +95,7 @@
                         writer.endElement(HTML.DIV_ELEM);
 
                         UIComponent closedContent = pane.getFacet("closedContent");
-                    
+
                         if(closedContent != null)
                         {
                             writer.startElement(HTML.DIV_ELEM, child);
@@ -111,7 +111,7 @@
                     writer.endElement(HTML.DIV_ELEM);
 
                 }
-                else throw new IllegalStateException("no other childs accepted");
+                else throw new IllegalStateException("no other children accepted");
             }
         }
 

Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/resource/toggler.js
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/resource/toggler.js?rev=294828&r1=294827&r2=294828&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/resource/toggler.js
(original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/resource/toggler.js
Tue Oct  4 09:59:56 2005
@@ -42,6 +42,7 @@
             borderColor         : '#1f669b',
             panelHeight         : 200,
             closedPanelHeight   : 50,
+            useRealHeight       : true,
             onHideTab           : null,
             onShowTab           : null
         }.extend(options || {});
@@ -139,6 +140,9 @@
                     accordionTab.showExpanded();
                     if (accordionTab.accordion.options.onShowTab)
                         accordionTab.accordion.options.onShowTab(accordionTab);
+
+                    if(accordionTab.accordion.options.useRealHeight)
+                        accordionTab.content.style.height = "";
                 } });
             }
             else
@@ -153,13 +157,19 @@
                     accordionTab.showExpanded();
                     if (accordionTab.accordion.options.onShowTab)
                         accordionTab.accordion.options.onShowTab(accordionTab);
+
+                    if(accordionTab.accordion.options.useRealHeight)
+                        accordionTab.content.style.height = "";
                 } });
             }
 
         }
         else
         {
-            accordionTab.content.style.height = this.options.panelHeight + "px";
+            if(accordionTab.accordion.options.useRealHeight)
+                accordionTab.content.style.height = "";
+            else
+                accordionTab.content.style.height = this.options.panelHeight + "px";
 
             if (accordionTab.closedContent)
             {



Mime
View raw message