You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2017/09/20 14:27:25 UTC

[myfaces-tobago] 05/07: demo: client info as popup

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 44917cf3c344aba69402bef030010d3281c8db0e
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Sep 20 15:59:03 2017 +0200

    demo: client info as popup
---
 .../tobago-example-demo/src/main/webapp/main.xhtml      | 15 +++++++++++++++
 .../tobago-example-demo/src/main/webapp/menu.xhtml      | 17 +++++------------
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/webapp/main.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/main.xhtml
index debedaa..cfe24e9 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/main.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/main.xhtml
@@ -72,6 +72,21 @@
 
       </tc:segmentLayout>
 
+      <tc:popup id="info" collapsedMode="hidden">
+        <tc:box label="Client Information">
+          <f:facet name="bar">
+            <tc:button image="fa-close">
+              <tc:operation name="hide" for="info"/>
+            </tc:button>
+          </f:facet>
+          <tc:out label="Theme:" value="#{clientConfigController.localizedTheme}" />
+          <tc:out label="Locale:" value="#{clientConfigController.localizedLocale}"/>
+          <tc:out label="Project Stage:" value="#{facesContext.application.projectStage}"/>
+          <tc:out label="CSP mode:" value="#{tobagoContext.tobagoConfig.contentSecurityPolicy.mode}"/>
+          <tc:out label="Requests:" value="#{activityList.values[0].jsfRequest} / AJAX: #{activityList.values[0].ajaxRequest}"/>
+        </tc:box>
+      </tc:popup>
+
       <tc:footer fixed="true">
         © 2017 Apache Software Foundation, Licensed under the <a
           href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
index 71bf392..5b2c244 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
@@ -65,10 +65,13 @@
               <tc:dataAttribute name="alert-text"
                                 value="#{demoBundle.pageTitle} - #{info.version} - #{demoBundle.tobago_url}"/>
             </tc:link>
-            <tc:link link="http://myfaces.apache.org/tobago" label="Tobago in the Web"/>
+            <tc:link omit="true" label="Client Info" id="headerInfo">
+              <tc:operation name="show" for=":::info"/>
+            </tc:link>
             <tc:link action="/server-info.xhtml" immediate="true" label="Server Info" disabled="#{! info.enabled}"/>
             <tc:link action="/logging-info.xhtml" immediate="true" label="Logging Info"
                         disabled="#{! info.enabled}"/>
+            <tc:link link="http://myfaces.apache.org/tobago" label="Tobago in the Web"/>
             <tc:separator/>
             <tc:link label="Sub-Menu" omit="true">
               <tc:link label="Sub 1" omit="true"/>
@@ -85,17 +88,6 @@
             </tc:link>
           </tc:link>
 
-          <!-- TBD: this is not nice: can we put tc:out or tc:label into the menu?
-          or we do that with a popup, oder a lighter variant of a popup -->
-          <tc:link omit="true" label="Info" id="headerInfo">
-            <tc:link omit="true" label="Theme: #{clientConfigController.localizedTheme}" disabled="true"/>
-            <tc:link omit="true" label="Locale: #{clientConfigController.localizedLocale}"/>
-            <tc:link omit="true" label="Project Stage: #{facesContext.application.projectStage}"/>
-            <tc:link omit="true" label="CSP mode: #{tobagoContext.tobagoConfig.contentSecurityPolicy.mode}"/>
-            <tc:link omit="true"
-                        label="Requests: #{activityList.values[0].jsfRequest} / AJAX: #{activityList.values[0].ajaxRequest}"/>
-          </tc:link>
-
           <tc:link label="#{demoBundle.menu_test}" omit="true">
             <tc:link id="runtest" label="#{demoBundle.menu_runTest}" outcome="/test.xhtml"
                      immediate="true" disabled="#{!testController.hasTest()}">
@@ -109,6 +101,7 @@
           </tc:link>
 
         </tc:links>
+
       </tc:form>
 
       <f:facet name="after">

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.