click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r948368 - in /click/trunk/click: examples/webapp/assets/css/style.css framework/src/META-INF/resources/click/control.css framework/src/org/apache/click/control/AbstractLink.java
Date Wed, 26 May 2010 09:10:06 GMT
Author: sabob
Date: Wed May 26 09:10:06 2010
New Revision: 948368

URL: http://svn.apache.org/viewvc?rev=948368&view=rev
Log:
Moved CLK-545 into examples.

Modified:
    click/trunk/click/examples/webapp/assets/css/style.css
    click/trunk/click/framework/src/META-INF/resources/click/control.css
    click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java

Modified: click/trunk/click/examples/webapp/assets/css/style.css
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/webapp/assets/css/style.css?rev=948368&r1=948367&r2=948368&view=diff
==============================================================================
--- click/trunk/click/examples/webapp/assets/css/style.css (original)
+++ click/trunk/click/examples/webapp/assets/css/style.css Wed May 26 09:10:06 2010
@@ -237,7 +237,7 @@ a.tb_label {
     margin-right: 2px;
 }
 
-.image-link {
+.image-link, .image-link.disabled {
     text-decoration: none;
 }
 
@@ -250,6 +250,19 @@ a.tb_label {
     padding-right: 2px;
 }
 
+span.disabled img {
+    filter: alpha( opacity = 50 );
+    -moz-opacity: 0.5;
+    -khtml-opacity: 0.5;
+    opacity: 0.5;
+}
+
+span.disabled {
+   cursor: pointer;
+   color: #6D6D6D;
+   text-decoration: underline;
+}
+
 /* Exporter */
 
 .export-attached, .export-detached {

Modified: click/trunk/click/framework/src/META-INF/resources/click/control.css
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/META-INF/resources/click/control.css?rev=948368&r1=948367&r2=948368&view=diff
==============================================================================
--- click/trunk/click/framework/src/META-INF/resources/click/control.css (original)
+++ click/trunk/click/framework/src/META-INF/resources/click/control.css Wed May 26 09:10:06
2010
@@ -27,14 +27,6 @@ a.error {
 a:visited.error {
 	color: red;
 }
-a:link.controlDisabled,
-a:visited.controlDisabled {
-   cursor:default;
-   filter: alpha( opacity = 50 );
-   -moz-opacity: 0.5;
-   -khtml-opacity: 0.5;
-   opacity: 0.5;
-}
 input.disabled {
 	background: lightgray;
 }

Modified: click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java?rev=948368&r1=948367&r2=948368&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java Wed May 26
09:10:06 2010
@@ -22,12 +22,9 @@ import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 import org.apache.click.Context;
-import org.apache.click.element.CssImport;
-import org.apache.click.element.Element;
 import org.apache.click.util.ClickUtils;
 import org.apache.click.util.HtmlStringBuffer;
 
@@ -521,18 +518,14 @@ public abstract class AbstractLink exten
 
         if (isDisabled()) {
 
-            buffer.elementStart(getTag());
-
-            buffer.appendAttribute("href", "#");
+            buffer.elementStart("span");
             buffer.appendAttribute("id", getId());
-            buffer.appendAttribute("title", "Disabled Link!");
-            addStyleClass("controlDisabled");
+            addStyleClass("disabled");
+            buffer.appendAttribute("class", getAttribute("class"));
 
             if (hasAttribute("style")) {
                 buffer.appendAttribute("style", getAttribute("style"));
             }
-            buffer.appendAttribute("onClick", "return false;");
-            appendAttributes(buffer);
 
             buffer.closeTag();
 
@@ -548,7 +541,7 @@ public abstract class AbstractLink exten
                 }
             }
 
-            buffer.elementEnd(getTag());
+            buffer.elementEnd("span");
                        
         } else {
             buffer.elementStart(getTag());
@@ -580,30 +573,6 @@ public abstract class AbstractLink exten
         }
     }
 
-    /**
-     * Return the Form HTML HEAD elements for the following resources:
-     *
-     * <ul>
-     * <li><tt>click/control.css</tt></li>
-     * </ul>
-     *
-     * @see org.apache.click.Control#getHeadElements()
-     *
-     * @return the form list of HEAD elements to be included in the page
-     */
-    @Override
-    public List<Element> getHeadElements() {
-        if (headElements == null) {
-            headElements = super.getHeadElements();
-
-            Context context = getContext();
-            String versionIndicator = ClickUtils.getResourceVersionIndicator(context);
-
-            headElements.add(new CssImport("/click/control.css", versionIndicator));
-        }
-        return headElements;
-    }
-    
     // Protected Methods ------------------------------------------------------
 
     /**



Mime
View raw message