You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/11/24 11:57:46 UTC
svn commit: r478833 - in /myfaces/tobago/trunk/theme:
scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/
scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/styl...
Author: weber
Date: Fri Nov 24 02:57:42 2006
New Revision: 478833
URL: http://svn.apache.org/viewvc?view=rev&rev=478833
Log:
TOBAGO-197 (treeMarker is not shown in IE)
Modified:
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tree.js
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js?view=diff&rev=478833&r1=478832&r2=478833
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tree.js Fri Nov 24 02:57:42 2006
@@ -274,8 +274,10 @@
function storeMarker(node, treeHiddenId) {
var markerHidden = document.getElementById(treeHiddenId + '-marker');
if (markerHidden) {
+ Tobago.Tree.updateMarker(markerHidden.value, false);
markerHidden.value = node.id;
}
+ Tobago.Tree.updateMarker(node.id, true);
}
function nodeStateId(node) {
@@ -538,7 +540,8 @@
eval(this.onclick);
} else {
if (this.mutable) {
- storeMarker(Tobago.element(this.id), this.treeHiddenId);
+ // nothing to do, storeMarker is already don in onFocus()
+// storeMarker(Tobago.element(this.id), this.treeHiddenId);
} else if (this.selectable) {
toggleSelect(Tobago.element(this.id),
this.treeHiddenId,
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?view=diff&rev=478833&r1=478832&r2=478833
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Fri Nov 24 02:57:42 2006
@@ -135,14 +135,14 @@
text-decoration: underline;
}
-.tree-folder-label:active, .tree-item-label:active {
+/*.tree-folder-label:active, .tree-item-label:active {
background: highlight;
color: highlighttext;
text-decoration: none;
-}
+}*/
-.tree-item-marker {
- background-color: lightgray;
+.tree-item-marker, .tree-item-marker:focus, a.tree-item-marker, a.tree-item-marker:focus {
+ background-color: lightgrey;
}
.tree-folder-label:focus, .tree-item-label:focus {
Modified: myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css?view=diff&rev=478833&r1=478832&r2=478833
==============================================================================
--- myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css (original)
+++ myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css Fri Nov 24 02:57:42 2006
@@ -206,6 +206,10 @@
color: #000000;
}
+a.tree-item-marker, a.tree-item-marker:focus {
+ background-color: lightgrey;
+}
+
/* -----------------------------------------------------------------------------
these styles are only for tree-items which have no href, for that
reason they are not defined as a:link
Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tree.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tree.js?view=diff&rev=478833&r1=478832&r2=478833
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tree.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tree.js Fri Nov 24 02:57:42 2006
@@ -45,4 +45,23 @@
if (treeNode) {
treeNode.onDblClick();
}
-};
\ No newline at end of file
+};
+
+Tobago.Tree.updateMarker = function(node, add) {
+ node = Tobago.element(node);
+ if (node) {
+ node = node.firstChild;
+ while (node) {
+ if (node.className &&
+ (node.className.indexOf("tree-item-label") > -1
+ || node.className.indexOf("tree-folder-label") > -1)) {
+ if (add) {
+ Tobago.addCssClass(node, "tree-item-marker");
+ } else {
+ Tobago.removeCssClass(node, "tree-item-marker");
+ }
+ }
+ node = node.nextSibling;
+ }
+ }
+}
\ No newline at end of file