[richfaces-svn-commits] JBoss Rich Faces SVN: r18479 - in root/tests/metamer/trunk/application/src/main/webapp: resources/css and 2 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Aug 4 10:24:33 EDT 2010


Author: ppitonak at redhat.com
Date: 2010-08-04 10:24:33 -0400 (Wed, 04 Aug 2010)
New Revision: 18479

Modified:
   root/tests/metamer/trunk/application/src/main/webapp/components/a4jLog/simple.xhtml
   root/tests/metamer/trunk/application/src/main/webapp/resources/css/common.ecss
   root/tests/metamer/trunk/application/src/main/webapp/resources/script/common.js
   root/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
   root/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
Log:
* a4j:log on the page refactored. Now it is rendered all the time but hidden by default. Page for testing log doesn't contain this common log.



Modified: root/tests/metamer/trunk/application/src/main/webapp/components/a4jLog/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/a4jLog/simple.xhtml	2010-08-04 13:24:25 UTC (rev 18478)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/a4jLog/simple.xhtml	2010-08-04 14:24:33 UTC (rev 18479)
@@ -67,5 +67,8 @@
             <metamer:attributes value="#{a4jLogBean.attributes}" id="attributes" render="log"/>
         </ui:define>
 
+        <!-- we don't want two logs on the page -->
+        <ui:define name="beforeFooter"></ui:define>
+
     </ui:composition>
 </html>
\ No newline at end of file

Modified: root/tests/metamer/trunk/application/src/main/webapp/resources/css/common.ecss
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/resources/css/common.ecss	2010-08-04 13:24:25 UTC (rev 18478)
+++ root/tests/metamer/trunk/application/src/main/webapp/resources/css/common.ecss	2010-08-04 14:24:33 UTC (rev 18479)
@@ -31,4 +31,8 @@
 ul a.link {
     font-size: 16px;
     font-weight: bold;
+}
+
+.log-panel {
+    display: none;
 }
\ No newline at end of file

Modified: root/tests/metamer/trunk/application/src/main/webapp/resources/script/common.js
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/resources/script/common.js	2010-08-04 13:24:25 UTC (rev 18478)
+++ root/tests/metamer/trunk/application/src/main/webapp/resources/script/common.js	2010-08-04 14:24:33 UTC (rev 18479)
@@ -58,3 +58,15 @@
     jQuery('table.attributes').show();
 }
 
+/**
+ * Shows or hides the a4j:log above page footer.
+ */
+function showOrHideLog() {
+    if (jQuery('input[id$=a4jLogCheckbox]').is(':checked')) {
+        jQuery('div.log-panel').show();
+    } else {
+        jQuery('div.log-panel').hide();
+    }
+}
+
+

Modified: root/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml	2010-08-04 13:24:25 UTC (rev 18478)
+++ root/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml	2010-08-04 14:24:33 UTC (rev 18479)
@@ -36,9 +36,8 @@
 
         <h:panelGrid columns="2" width="230px">
             <h:outputText id="a4jLogLabel" value="Display log" />
-            <h:selectBooleanCheckbox id="a4jLogCheckbox" value="#{richBean.log}">
-                <a4j:ajax event="change" execute="@this" render="a4jLogPanel" />
-            </h:selectBooleanCheckbox>
+            
+            <h:selectBooleanCheckbox id="a4jLogCheckbox" value="false" onchange="showOrHideLog()"/>
 
             <h:outputText id="a4jStatusLabel" value="Status" />
             <a4j:status id="a4jStatus">

Modified: root/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml	2010-08-04 13:24:25 UTC (rev 18478)
+++ root/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml	2010-08-04 14:24:33 UTC (rev 18479)
@@ -49,9 +49,11 @@
 
             </div>
 
-            <h:panelGroup  id="a4jLogPanel" styleClass="log-panel" layout="block">
-                <a4j:log id="a4jLog" height="300px" rendered="#{richBean.log}" level="debug"/>
-            </h:panelGroup>
+            <ui:insert name="beforeFooter">
+                <h:panelGroup  id="a4jLogPanel" styleClass="log-panel" layout="block">
+                    <a4j:log id="a4jLog" height="300px" level="debug"/>
+                </h:panelGroup>
+            </ui:insert>
 
             <div class="footer">
                 <ui:insert name="footer">



More information about the richfaces-svn-commits mailing list