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 2011/08/09 12:04:24 UTC
svn commit: r1155294 - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/context/
tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
tobago-theme/tobago-the...
Author: lofwyr
Date: Tue Aug 9 10:04:23 2011
New Revision: 1155294
URL: http://svn.apache.org/viewvc?rev=1155294&view=rev
Log:
TOBAGO-377: Tree
- add markup for treeNode and treeMenuNode
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeMenuNodeRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java?rev=1155294&r1=1155293&r2=1155294&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java Tue Aug 9 10:04:23 2011
@@ -55,6 +55,7 @@ public final class Markup implements Ser
public static final Markup DISABLED = valueOf("disabled");
public static final Markup ERROR = valueOf("error");
public static final Markup EVEN = valueOf("even");
+ public static final Markup EXPANDED = valueOf("expanded");
public static final Markup FATAL = valueOf("fatal");
public static final Markup FIRST = valueOf("first");
public static final Markup FOLDER = valueOf("folder");
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeMenuNodeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeMenuNodeRenderer.java?rev=1155294&r1=1155293&r2=1155294&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeMenuNodeRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeMenuNodeRenderer.java Tue Aug 9 10:04:23 2011
@@ -92,6 +92,9 @@ public class TreeMenuNodeRenderer extend
if (node.isFolder()) {
node.setCurrentMarkup(Markup.FOLDER.add(node.getCurrentMarkup()));
}
+ if (node.isExpanded()) {
+ node.setCurrentMarkup(Markup.EXPANDED.add(node.getCurrentMarkup()));
+ }
}
@Override
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java?rev=1155294&r1=1155293&r2=1155294&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java Tue Aug 9 10:04:23 2011
@@ -113,6 +113,9 @@ public class TreeNodeRenderer extends La
if (node.isFolder()) {
node.setCurrentMarkup(Markup.FOLDER.add(node.getCurrentMarkup()));
}
+ if (node.isExpanded()) {
+ node.setCurrentMarkup(Markup.EXPANDED.add(node.getCurrentMarkup()));
+ }
}
@Override
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml?rev=1155294&r1=1155293&r2=1155294&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml Tue Aug 9 10:04:23 2011
@@ -301,6 +301,7 @@
<markup>strong</markup>
<markup>marked</markup>
<markup>folder</markup>
+ <markup>expanded</markup>
</supported-markup>
</renderer>
<renderer>
@@ -311,6 +312,7 @@
<markup>strong</markup>
<markup>marked</markup>
<markup>folder</markup>
+ <markup>expanded</markup>
</supported-markup>
</renderer>
</renderers>
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js?rev=1155294&r1=1155293&r2=1155294&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js Tue Aug 9 10:04:23 2011
@@ -85,6 +85,8 @@ function tobagoTreeNodeToggle(element) {
Tobago.fixPngAlpha(this);
});
expanded.attr("value", "true");
+ node.filter(".tobago-treeNode").addClass("tobago-treeNode-markup-expanded");
+ node.filter(".tobago-treeMenuNode").addClass("tobago-treeMenuNode-markup-expanded");
} else {
content.css("display", "none");
toggle.each(function() {
@@ -92,11 +94,13 @@ function tobagoTreeNodeToggle(element) {
Tobago.fixPngAlpha(this);
});
expanded.attr("value", "false");
+ node.filter(".tobago-treeNode").removeClass("tobago-treeNode-markup-expanded");
+ node.filter(".tobago-treeMenuNode").removeClass("tobago-treeMenuNode-markup-expanded");
}
}
function nodeStateId(node) {
- // this must do the same as nodeStateId() in TreeRenderer.java
+ // this must do the same as nodeStateId() in TreeRenderer.java
return node.id.substring(node.id.lastIndexOf(':') + 1);
}