Author: alevkovsky
Date: 2008-10-30 11:13:51 -0400 (Thu, 30 Oct 2008)
New Revision: 10983
Modified:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/resources/EditorHTMLRenderer.java
Log:
HTML resource renderer adaptation for images and styles
Modified:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/resources/EditorHTMLRenderer.java
===================================================================
---
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/resources/EditorHTMLRenderer.java 2008-10-30
14:48:59 UTC (rev 10982)
+++
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/resources/EditorHTMLRenderer.java 2008-10-30
15:13:51 UTC (rev 10983)
@@ -114,9 +114,27 @@
try {
while (br.ready()) {
String line = br.readLine();
- if (line.indexOf(".js") != -1) {
- line = line.replace(".js", ".js" + mappingSuffix);
+ if(line.indexOf("script") != -1 && line.indexOf("src=")
!= -1){
+ if (line.indexOf(".js") != -1) {
+ line = line.replace(".js", ".js" + mappingSuffix);
+ }
}
+ if(line.indexOf("img") != -1 && line.indexOf("src=") !=
-1 && line.indexOf("src=\"http:") == -1){
+ if (line.indexOf(".gif") != -1) {
+ line = line.replace(".gif", ".gif" + mappingSuffix);
+ }
+ if (line.indexOf(".png") != -1) {
+ line = line.replace(".png", ".png" + mappingSuffix);
+ }
+ if (line.indexOf(".jpg") != -1) {
+ line = line.replace(".jpg", ".jpg" + mappingSuffix);
+ }
+ }
+ if(line.indexOf("link") != -1 && line.indexOf("href=") !=
-1){
+ if (line.indexOf(".css") != -1) {
+ line = line.replace(".css", ".xcss" + mappingSuffix);
+ }
+ }
bw.write(line);
bw.newLine();
total += line.getBytes().length;
Show replies by date