]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add full firebugLite only in debug mode
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 26 Mar 2007 09:17:46 +0000 (09:17 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 26 Mar 2007 09:17:46 +0000 (09:17 +0000)
svn changeset:1033/svn branch:trunk

src/com/itmill/toolkit/terminal/web/ApplicationServlet.java

index 02f2d333e25c07aa50233b4ab04210f394c935bd..5928138a66610ebc403dcd48f43b547a785feea0 100644 (file)
@@ -859,11 +859,17 @@ public class ApplicationServlet extends HttpServlet implements
                                                        + getResourceLocation(t.getName(),
                                                                        new ThemeResource(file))
                                                        + "\" type=\"text/css\" />\n");
-                               else if (file.endsWith(".js"))
-                                       page.write("<script src=\""
-                                                       + getResourceLocation(t.getName(),
-                                                                       new ThemeResource(file))
-                                                       + "\" type=\"text/javascript\"></script>\n");
+                               else if (file.endsWith(".js")) {
+                                       page.write("<script src=\"");
+                                       
+                                       // TODO remove this and implement behaviour in themes description.xml files
+                                       if(file.endsWith("firebug.js") && !isDebugMode(unhandledParameters)) {
+                                               file = file.replace("bug.js", "bugx.js");
+                                       }
+                                       page.write(getResourceLocation(t.getName(),
+                                                                       new ThemeResource(file)));
+                                       page.write( "\" type=\"text/javascript\"></script>\n");
+                               }
                        }
 
                }