You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2007/01/22 16:53:40 UTC

svn commit: r498693 - in /incubator/xap/trunk/codebase: css/xapDefault.css src/xap/bridges/xap/LinkBridge.js

Author: mturyn
Date: Mon Jan 22 08:53:39 2007
New Revision: 498693

URL: http://svn.apache.org/viewvc?view=rev&rev=498693
Log:
Made links look more like standard links:  default colour "blue", underlined (by showing the bottom border of the contents box), purplish if link has been clicked-on before in this page viewing---not sticky on refreshing, unfortunately.  The "visited" visual cue is done with a slight change to the bridge's onmousedown():  a style "Visited" is added to the styles for the box and contents.

While mouse-downed, a dotted grey box is drawn around the entire link (not just the text contents). The link also turns red, as in Mozilla browsers.  
IE6/7 don't do the colour change, but the cue can't hurt---and if it does, it's easily changed in the stylesheet.


Modified:
    incubator/xap/trunk/codebase/css/xapDefault.css
    incubator/xap/trunk/codebase/src/xap/bridges/xap/LinkBridge.js

Modified: incubator/xap/trunk/codebase/css/xapDefault.css
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/css/xapDefault.css?view=diff&rev=498693&r1=498692&r2=498693
==============================================================================
--- incubator/xap/trunk/codebase/css/xapDefault.css (original)
+++ incubator/xap/trunk/codebase/css/xapDefault.css Mon Jan 22 08:53:39 2007
@@ -33,22 +33,35 @@
 .xapLinkContents{
 	cursor:pointer;
 	text-align: left;
+	color:blue;
+	border-bottom: 1px solid ;
+	margin:2px ;
+}
+
+.xapLinkContentsVisited{
+	color:rgb(128,16,106) ;
 }
 
 
 .xapLink{
 	cursor:pointer;
 	text-align: left;
-	color: blue;	
+	border:1px solid transparent;
 }
 
 .xapLinkMouseOver{
 	color:rgb(0,0,175) ;
 }
 
+
+.xapLinkContentsMouseDown{
+	color: red;
+}
+
 .xapLinkMouseDown{
-	color: black;
+	border:1px dotted gray ;
 }
+
 
 .xapLinkDisabled{
 	color : gray;

Modified: incubator/xap/trunk/codebase/src/xap/bridges/xap/LinkBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/xap/LinkBridge.js?view=diff&rev=498693&r1=498692&r2=498693
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/xap/LinkBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/xap/LinkBridge.js Mon Jan 22 08:53:39 2007
@@ -37,3 +37,13 @@
 xap.bridges.xap.LinkBridge.prototype.getNewAllowedAttributes = function() {	
 	return [""];
 }
+
+xap.bridges.xap.LinkBridge.prototype.onclick = function(e){
+	xap.bridges.xap.ButtonBridge.prototype.onclick.call(this,e) ;
+	if( !this._visited ){
+		this.addStyleState("Visited");
+		this._visited= true ;
+	}
+}
+
+