tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r578522 - in /tapestry/tapestry5/trunk/tapestry-core/src: main/java/org/apache/tapestry/internal/services/DocumentScriptBuilderImpl.java test/resources/org/apache/tapestry/internal/services/add_script.txt
Date Sat, 22 Sep 2007 23:07:44 GMT
Author: hlship
Date: Sat Sep 22 16:07:43 2007
New Revision: 578522

URL: http://svn.apache.org/viewvc?rev=578522&view=rev
Log:
TAPESTRY-1625: T5 Form Component Generates Script Tag With Deprecated Language Attribute

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/DocumentScriptBuilderImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/internal/services/add_script.txt

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/DocumentScriptBuilderImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/DocumentScriptBuilderImpl.java?rev=578522&r1=578521&r2=578522&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/DocumentScriptBuilderImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/DocumentScriptBuilderImpl.java
Sat Sep 22 16:07:43 2007
@@ -30,16 +30,14 @@
 
     public void addScriptLink(String scriptURL)
     {
-        if (_scripts.contains(scriptURL))
-            return;
+        if (_scripts.contains(scriptURL)) return;
 
         _scripts.add(scriptURL);
     }
 
     public void addScript(String script)
     {
-        if (InternalUtils.isBlank(script))
-            return;
+        if (InternalUtils.isBlank(script)) return;
 
         _scriptBlock.append(script);
         _scriptBlock.append("\n");
@@ -49,8 +47,7 @@
     {
         Element body = document.find("html/body");
 
-        if (body == null)
-            return;
+        if (body == null) return;
 
         for (int i = 0; i < _scripts.size(); i++)
         {
@@ -61,17 +58,17 @@
 
         if (_scriptBlock.length() > 0)
         {
-            Element e = body.element("script", "type", "text/javascript", "language", "javascript");
+            Element e = body.element("script", "type", "text/javascript");
             e.raw("\n<!--\n");
 
             // This assumes that Prototype is available.
-            
+
             e.text("Event.observe(window, \"load\", function() {\n");
-            
+
             e.text(_scriptBlock.toString());
 
             e.text("});\n");
-            
+
             e.raw("// -->\n");
         }
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/internal/services/add_script.txt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/internal/services/add_script.txt?rev=578522&r1=578521&r2=578522&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/internal/services/add_script.txt
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/internal/services/add_script.txt
Sat Sep 22 16:07:43 2007
@@ -1,4 +1,4 @@
-<html><body><p>Ready to be updated with scripts.</p><script language="javascript"
type="text/javascript">
+<html><body><p>Ready to be updated with scripts.</p><script type="text/javascript">
 <!--
 Event.observe(window, "load", function() {
 doSomething();



Mime
View raw message