You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gp...@apache.org on 2011/04/04 21:37:12 UTC

svn commit: r1088756 - in /myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main: java/org/apache/myfaces/extensions/cdi/example/jsf20/view/util/ webapp/layout/ webapp/resources/styles/

Author: gpetracek
Date: Mon Apr  4 19:37:12 2011
New Revision: 1088756

URL: http://svn.apache.org/viewvc?rev=1088756&view=rev
Log:
community links

Added:
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/java/org/apache/myfaces/extensions/cdi/example/jsf20/view/util/WindowPropertiesBean.java
Modified:
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/layout/main-template.xhtml
    myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/resources/styles/theme.css

Added: myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/java/org/apache/myfaces/extensions/cdi/example/jsf20/view/util/WindowPropertiesBean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/java/org/apache/myfaces/extensions/cdi/example/jsf20/view/util/WindowPropertiesBean.java?rev=1088756&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/java/org/apache/myfaces/extensions/cdi/example/jsf20/view/util/WindowPropertiesBean.java (added)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/java/org/apache/myfaces/extensions/cdi/example/jsf20/view/util/WindowPropertiesBean.java Mon Apr  4 19:37:12 2011
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.extensions.cdi.example.jsf20.view.util;
+
+import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.WindowScoped;
+
+import javax.inject.Named;
+import java.io.Serializable;
+
+@Named
+@WindowScoped
+public class WindowPropertiesBean implements Serializable
+{
+    private static final long serialVersionUID = -8691851089096574347L;
+
+    private boolean showCommunityLinks = true;
+
+    public void toggleCommunityLinks()
+    {
+        this.showCommunityLinks = !this.showCommunityLinks;
+    }
+
+    public boolean isShowCommunityLinks()
+    {
+        return showCommunityLinks;
+    }
+}

Modified: myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/layout/main-template.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/layout/main-template.xhtml?rev=1088756&r1=1088755&r2=1088756&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/layout/main-template.xhtml (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/layout/main-template.xhtml Mon Apr  4 19:37:12 2011
@@ -128,5 +128,144 @@
                 </p>
             </div>
         </div>
+
+        <div style="
+                      overflow: hidden;
+                      position: fixed;
+                      left: 0.25em;
+                      bottom: 0;
+        ">
+            <h:form>
+                <h:commandLink action="#{windowPropertiesBean.toggleCommunityLinks}"
+                               value="#{windowPropertiesBean.showCommunityLinks ? 'x' : '+'}"
+                               style="
+                                      color: #000;
+                                      font: bold 120% Arial, sans-serif;
+
+                                      display: block;
+                                      z-index:4;
+
+                                      margin: 0.05em 0 0.075em 0;
+                                      padding: 0.5em 3em 0.5em -0.5em;
+
+                                      text-align: center;
+                                      text-decoration: none;
+
+                                      text-shadow: 0 0 0.5em #444;
+                "/>
+            </h:form>
+        </div>
+
+        <h:panelGroup rendered="#{windowPropertiesBean.showCommunityLinks}">
+            <div id="communityHints">
+                <div style="
+                              background-color: #558ED5;
+
+                              overflow: hidden;
+                              position: fixed;
+                              left: -3.2em;
+                              bottom: 1.0em;
+
+                              -moz-transform: rotate(45deg);
+                              -webkit-transform: rotate(45deg);
+
+                              -moz-box-shadow: 0 0 1em #888;
+                              -webkit-box-shadow: 0 0 1em #888;
+                ">
+                    <a href="http://twitter.com/MyFacesTeam" onclick="void(window.open(this.href, '', '')); return false;"
+                       style="
+                              border: 1px solid #00B0F0;
+                              color: #fff;
+                              font: bold Arial, sans-serif;
+
+                              display: block;
+                              z-index:3;
+
+                              margin: 0.05em 0 0.075em 0;
+                              padding: 0.5em 3em 0.5em 3em;
+
+                              text-align: center;
+                              text-decoration: none;
+
+                              text-shadow: 0 0 0.5em #444;
+                    ">Follow us!</a>
+                </div>
+
+                <div style="
+                              background-color: #a00;
+
+                              overflow: hidden;
+                              position: fixed;
+                              left: -3.7em;
+                              bottom: 2.5em;
+
+                              -moz-transform: rotate(45deg);
+                              -webkit-transform: rotate(45deg);
+
+                              -moz-box-shadow: 0 0 1em #888;
+                              -webkit-box-shadow: 0 0 1em #888;
+                ">
+                    <a href="https://github.com/apache/myfaces-extcdi"
+                       onclick="void(window.open(this.href, '', '')); return false;"
+                       style="
+                              border: 1px solid #faa;
+                              color: #fff;
+                              font: bold Arial, sans-serif;
+
+                              display: block;
+                              z-index:2;
+
+                              margin: 0.05em 0 0.075em 0;
+                              padding: 0.5em 4.5em 0.5em 3.5em;
+
+                              text-align: center;
+                              text-decoration: none;
+
+                              text-shadow: 0 0 0.5em #444;
+                    ">Fork me on GitHub</a>
+                </div>
+
+                <div style="
+                              background-color: #809E22;
+
+                              overflow: hidden;
+                              position: fixed;
+                              left: -8em;
+                              bottom: 4.2em;
+
+                              -moz-transform: rotate(45deg);
+                              -webkit-transform: rotate(45deg);
+
+                              -moz-box-shadow: 0 0 1em #888;
+                              -webkit-box-shadow: 0 0 1em #888;
+                ">
+                    <a href="https://bitbucket.org/os890/codi-mirror"
+                       onclick="void(window.open(this.href, '', '')); return false;"
+                       style="
+                              border: 1px solid #CDF185;
+                              color: #fff;
+                              font: bold Arial, sans-serif;
+
+                              display: block;
+                              z-index:1;
+
+                              margin: 0.05em 0 0.075em 0;
+                              padding: 0.5em 11em 0.5em 9em;
+
+                              text-align: center;
+                              text-decoration: none;
+
+                              text-shadow: 0 0 0.5em #444;
+                    ">Fork me on Bitbucket</a>
+                </div>
+            </div>
+        </h:panelGroup>
+
+        <script type="text/javascript">
+            /*workaround*/
+            if(navigator.userAgent.indexOf("Gecko") == -1) {
+                document.getElementById("communityHints").style.display='none';
+            }
+        </script>
     </h:body>
 </html>

Modified: myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/resources/styles/theme.css
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/resources/styles/theme.css?rev=1088756&r1=1088755&r2=1088756&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/resources/styles/theme.css (original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/resources/styles/theme.css Mon Apr  4 19:37:12 2011
@@ -171,6 +171,7 @@ img {
 .copyright {
     margin: 0px auto 0px auto;
     padding-top: 15px;
+    padding-left: 500px;
 }
 
 /* logo_banner_container layout --------------------------------------------- */