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 2013/04/26 19:51:43 UTC

svn commit: r1476319 - in /myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp: WEB-INF/tags/layout/overview.xhtml content/60-command/command.xhtml demo.js

Author: lofwyr
Date: Fri Apr 26 17:51:41 2013
New Revision: 1476319

URL: http://svn.apache.org/r1476319
Log:
TOBAGO-1171: Support for the Content Security Policy (CSP)
TOBAGO-1219: Evaluate jQuery UI Widget Factory
TOBAGO-1258: New attribute "omit" for commands

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tags/layout/overview.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/60-command/command.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/demo.js

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tags/layout/overview.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tags/layout/overview.xhtml?rev=1476319&r1=1476318&r2=1476319&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tags/layout/overview.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tags/layout/overview.xhtml Fri Apr 26 17:51:41 2013
@@ -52,13 +52,15 @@
             </tc:menu>
 
             <tc:menu label="#{overviewBundle.menu_help}">
-              <tc:menuCommand
-                  onclick="alert('#{overviewBundle.pageTitle}' + String.fromCharCode(10) + '#{info.version}' + String.fromCharCode(10) + '#{overviewBundle.tobago_url}' + String.fromCharCode(10))"
-                  label="#{overviewBundle.menu_about}"/>
+              <tc:menuCommand label="#{overviewBundle.menu_about}">
+                <tc:dataAttribute name="alert-text"
+                                  value="#{overviewBundle.pageTitle} - #{info.version} - #{overviewBundle.tobago_url}"/>
+              </tc:menuCommand>
               <tc:menuCommand link="http://myfaces.apache.org/tobago" label="Tobago in the Web"/>
-              <tc:menuCommand onclick="LOG.show();"
-                              label="#{overviewBundle.menu_showLog}"
-                              rendered="#{clientConfigController.debugMode}"/>
+              <tc:menuCommand label="#{overviewBundle.menu_showLog}" omit="true"
+                              rendered="#{clientConfigController.debugMode}">
+                <tc:dataAttribute name="show-log" value="true"/>
+              </tc:menuCommand>
               <tc:menuCommand action="server-info" immediate="true"
                               label="Server Info"
                               disabled="#{! info.enabled}"/>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/60-command/command.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/60-command/command.xhtml?rev=1476319&r1=1476318&r2=1476319&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/60-command/command.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/60-command/command.xhtml Fri Apr 26 17:51:41 2013
@@ -44,7 +44,7 @@
       <!-- code-sniplet-start id="button" -->
       <tc:button label="Action" action="#{command.action}"/>
       <!-- code-sniplet-end id="button" -->
-      <tc:button label="On Click" onclick="/* fixme: avoid submit */">
+      <tc:button label="On Click" omit="true">
         <tc:dataAttribute name="alert" value="Hello Tobago! (button)"/>
       </tc:button>
       <tc:button label="Link" link="http://www.apache.org/"/>
@@ -54,7 +54,7 @@
       <!-- code-sniplet-start id="link" -->
       <tc:link label="Action" action="#{command.action}"/>
       <!-- code-sniplet-end id="link" -->
-      <tc:link label="On Click" onclick="/* fixme: avoid submit */">
+      <tc:link label="On Click" omit="true">
         <tc:dataAttribute name="alert" value="Hello Tobago! (link)"/>
       </tc:link>
       <tc:link label="Link" link="http://www.apache.org/"/>
@@ -72,7 +72,7 @@
           <tc:out value="Are you sure?"/>
         </f:facet>
       </tc:button>
-      <tc:button label="On Click" onclick="/* fixme: avoid submit */;">
+      <tc:button label="On Click" omit="true">
         <f:facet name="confirmation">
           <tc:out value="Are you sure?"/>
         </f:facet>
@@ -95,7 +95,7 @@
           <tc:out value="Are you sure?"/>
         </f:facet>
       </tc:link>
-      <tc:link label="On Click xxx" onclick="/* fixme: avoid submit */">
+      <tc:link label="On Click xxx" omit="true">
         <f:facet name="confirmation">
           <tc:out value="Are you sure?"/>
         </f:facet>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/demo.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/demo.js?rev=1476319&r1=1476318&r2=1476319&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/demo.js (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/demo.js Fri Apr 26 17:51:41 2013
@@ -16,10 +16,7 @@
  */
 
 (function ($) {
-
-
   $.widget("demo.alert", {
-
     _create: function () {
       this._on({
         click: function (event) {
@@ -27,20 +24,22 @@
           alert(text);
         }
       });
-    },
-
-    _setOption: function (key, value) {
-    },
-
-    _destroy: function () {
     }
-
   });
-
+  $.widget("demo.show", {
+    _create: function () {
+      this._on({
+        click: function (event) {
+          LOG.show();
+        }
+      });
+    }
+  });
 }(jQuery));
 
 var initAlert = function () {
   jQuery("[data-alert-text]").alert();
+  jQuery("[data-show-log]").show();
 };
 
 Tobago.registerListener(initAlert, Tobago.Phase.DOCUMENT_READY);