Author: sergeyhalipov
Date: 2007-07-24 13:14:02 -0400 (Tue, 24 Jul 2007)
New Revision: 1828
Modified:
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DragIndicatorRendererBase.java
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
trunk/ui/tree/src/main/templates/htmlTree.jspx
Log:
http://jira.jboss.com/jira/browse/RF-488
http://jira.jboss.com/jira/browse/RF-500
Restoring tree after refactoring in repository.
Modified:
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DragIndicatorRendererBase.java
===================================================================
---
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DragIndicatorRendererBase.java 2007-07-24
17:09:24 UTC (rev 1827)
+++
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DragIndicatorRendererBase.java 2007-07-24
17:14:02 UTC (rev 1828)
@@ -30,6 +30,7 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.javascript.JSEncoder;
import org.richfaces.component.UIDragIndicator;
import org.richfaces.component.nsutils.NSUtils;
//import org.richfaces.org.apache.commons.lang.StringEscapeUtils;
@@ -102,8 +103,20 @@
protected String getPredefinedMarker(FacesContext context, Object facetName) {
if (MARKERS_PREDEFINED.contains(facetName)) {
- //return StringEscapeUtils.escapeJavaScript("<img alt=\"\"
border=\"0\" width=\"16\" height=\"16\" src=\"" +
- // getResource("/org/richfaces/renderkit/html/images/" + facetName +
".gif").getUri(context, null) +"\" />");
+ StringBuffer buff = new StringBuffer();
+ JSEncoder encoder = new JSEncoder();
+ String source = "<img alt=\"\" border=\"0\"
width=\"16\" height=\"16\" src=\"" +
+ getResource("/org/richfaces/renderkit/html/images/" + facetName +
".gif").getUri(context, null) +"\" />";
+ char chars[] = source.toString().toCharArray();
+ for (int i = 0; i < chars.length; i++) {
+ char c = chars[i];
+ if (!encoder.compile(c)) {
+ buff.append(encoder.encode(c));
+ } else {
+ buff.append(c);
+ }
+ }
+ return buff.toString();
}
throw new IllegalArgumentException("No predefined marker with [" + facetName
+ "] name exists!");
Modified: trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
===================================================================
---
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2007-07-24
17:09:24 UTC (rev 1827)
+++
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2007-07-24
17:14:02 UTC (rev 1828)
@@ -109,7 +109,7 @@
},
getElements: function() {
- var contentId = this.id + Tree.ID_DEVIDER + Tree.ID_CHILDS_ROW + Tree.ID_DEVIDER +
Tree.ID_CHILDS_TD;
+ var contentId = this.id;
this.elements.contentTd = $(contentId);
Modified: trunk/ui/tree/src/main/templates/htmlTree.jspx
===================================================================
--- trunk/ui/tree/src/main/templates/htmlTree.jspx 2007-07-24 17:09:24 UTC (rev 1827)
+++ trunk/ui/tree/src/main/templates/htmlTree.jspx 2007-07-24 17:14:02 UTC (rev 1828)
@@ -17,7 +17,7 @@
new org.ajax4jsf.javascript.PrototypeScript(),
new org.ajax4jsf.javascript.AjaxScript(),
/org/richfaces/renderkit/html/scripts/utils.js,
- /org/ajax4jsf/renderkit/html/scripts/form.js,
+ /org/ajax4jsf/javascript/scripts/form.js,
/org/richfaces/renderkit/html/scripts/form.js,
/org/richfaces/renderkit/html/scripts/events.js,
/org/richfaces/renderkit/html/scripts/tree.js,