- Revision
- 231
- Author
- mward
- Date
- 2007-07-05 22:38:14 -0500 (Thu, 05 Jul 2007)
Log Message
updated the rest of the docs ... no longer dynamically converting <div><pre> to textareas for syntax highlighting. This was only needed when we were using maven apt (which was much less forgiving than xsite is)
Modified Paths
- trunk/distribution/src/site/content/examples/hello-world.html
- trunk/distribution/src/site/content/examples/simple-calculator.html
- trunk/distribution/src/site/content/taglib/button.html
- trunk/distribution/src/site/content/taglib/calendar.html
- trunk/distribution/src/site/content/taglib/hidden.html
- trunk/distribution/src/site/content/taglib/select.html
- trunk/distribution/src/site/content/taglib/submit.html
- trunk/distribution/src/site/content/taglib/taglib.html
- trunk/distribution/src/site/content/taglib/text.html
- trunk/distribution/src/site/content/taglib/textarea.html
- trunk/distribution/src/site/content/tutorials/tutorial-one.html
- trunk/distribution/src/site/content/tutorials/tutorial-two.html
- trunk/distribution/src/site/templates/skin.html
Diff
Modified: trunk/distribution/src/site/content/examples/hello-world.html (230 => 231)
--- trunk/distribution/src/site/content/examples/hello-world.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/examples/hello-world.html 2007-07-06 03:38:14 UTC (rev 231) @@ -69,19 +69,19 @@ <textarea class="xml:nogutter:nocontrols" name="code"> <?xml version="1.0" encoding="UTF-8"?> - <html xmlns="http://www.w3.org/1999/xhtml" - xmlns:jsp="http://java.sun.com/JSP/Page"> + <html xmlns="http://www.w3.org/1999/xhtml" + xmlns:jsp="http://java.sun.com/JSP/Page"> <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <jsp:directive.page contentType="text/html;charset=UTF-8"/> - <head><title>Hello World Controller</title></head> - <body> + <head><title>Hello World Controller</title></head> + <body> <h1>${controller.greeting}</h1> - </body> - </html> + </body> + </html> </textarea> <h4>Running...</h4>
Modified: trunk/distribution/src/site/content/examples/simple-calculator.html (230 => 231)
--- trunk/distribution/src/site/content/examples/simple-calculator.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/examples/simple-calculator.html 2007-07-06 03:38:14 UTC (rev 231) @@ -76,9 +76,9 @@ <textarea class="xml:nogutter:nocontrols" name="code"> <?xml version="1.0" encoding="UTF-8"?> - <html xmlns="http://www.w3.org/1999/xhtml" + <html xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:c="http://java.sun.com/jsp/jstl/core"> + xmlns:c="http://java.sun.com/jsp/jstl/core"> <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" @@ -95,8 +95,8 @@ </script> </head> - <body> - <form action="" method="post"> + <body> + <form action="" method="post"> <h3>Waffle example: Calculator</h3> @@ -121,17 +121,18 @@ <a href="" | <a href="" - </form> - </body> + </form> + </body> - </html> + </html> </textarea> <p>Lines <b>44 and 45</b> in the example above do not pragmatically define how their argument values are to be resolved. So in order to handle this we can add an annotation to each of those methods in the Action. Below we have updated the - CalculatorController with two <b>ActionMethod</b> annotations (lines 12 and 17).</p></div><h3>Annotated Controller: - CalculatorController</h3> + CalculatorController with two <b>ActionMethod</b> annotations (lines 12 and 17).</p> +<h3>Annotated Controller: CalculatorController</h3> + <textarea class="java:nogutter:nocontrols" name="code"> public class CalculatorController { public Number result;
Modified: trunk/distribution/src/site/content/taglib/button.html (230 => 231)
--- trunk/distribution/src/site/content/taglib/button.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/taglib/button.html 2007-07-06 03:38:14 UTC (rev 231) @@ -9,11 +9,18 @@ <p>In order to create a form button, use the tag <i>w:button</i>. Its caption is the internationalized <i>value</i> attribute</p> -</div> <h2>Example</h2> -<div class="source"><pre><w:button value="execute" + +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:button value="execute" +</textarea> + <p>And add to your i18n file:</p> -<div class="source"><pre>execute = Execute this button</pre></div> + +<textarea class="xml:nogutter:nocontrols" name="code"> + execute = Execute this button +</textarea> + </body> </html>
Modified: trunk/distribution/src/site/content/taglib/calendar.html (230 => 231)
--- trunk/distribution/src/site/content/taglib/calendar.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/taglib/calendar.html 2007-07-06 03:38:14 UTC (rev 231) @@ -11,29 +11,35 @@ given <i>value</i> and a button which shows an _javascript_ calendar. The date will be formated by the specified <i>pattern</i> .</p> <p>Example:</p> -<div class="source"><pre><w:calendar name="birthday" value="${date}" pattern="yyyy-MM-dd" /></pre></div> + +<textarea class="java:nogutter:nocontrols" name="code"> + <w:calendar name="birthday" value="${date}" pattern="yyyy-MM-dd" /> +</textarea> + <p>The calendar is based on the http://www.dynarch.com/projects/calendar/ project. In order to show the calendar you must provide the necessary files, which are:</p> <p>calendar.js calendar-en.js calendar-setup.js calendar-brown.css</p> <p>There are different languages and style sheets available. You have to import the files in your jsp file, for example:</p> -<div class="source"><pre><%@ taglib uri="http://waffle.codehaus.org" prefix="w" %> +<textarea class="xml:nogutter:nocontrols" name="code"> + <%@ taglib uri="http://waffle.codehaus.org" prefix="w" %> -<head> -<meta http-equiv="content-type" content="text/xml; charset=utf-8" /> + <head> + <meta http-equiv="content-type" content="text/xml; charset=utf-8" /> -<link rel="stylesheet" type="text/css" media="all" href="" + <link rel="stylesheet" type="text/css" media="all" href="" -<script type="text/_javascript_" src="" -<script type="text/_javascript_" src="" -<script type="text/_javascript_" src="" + <script type="text/_javascript_" src="" + <script type="text/_javascript_" src="" + <script type="text/_javascript_" src="" -</head> -<body> - <w:calendar name="birthday" value="${date}" pattern="yyyy-MM-dd" /> -</body> -</head></pre></div> + </head> + <body> + <w:calendar name="birthday" value="${date}" pattern="yyyy-MM-dd" /> + </body> + </head> +</textarea> </body> </html>
Modified: trunk/distribution/src/site/content/taglib/hidden.html (230 => 231)
--- trunk/distribution/src/site/content/taglib/hidden.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/taglib/hidden.html 2007-07-06 03:38:14 UTC (rev 231) @@ -1,13 +1,37 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> - <head> - <title>Hidden Tag</title> - </head> - <body> - - - <h2>Hidden Tag</h2><p>You can use the <i>hidden</i> tag in order to create hidden html fields:</p><div class="source"><pre><w:hidden name="fornecedor.id" value="${fornecedor.id}"/></pre></div><p>The <b>w:hidden</b> tag does not add rows to your form, if it has some type of table display.</p></div><h2>Default value</h2><p>The default <i>value</i> attribute value is the _expression_ language evaluation of the name attribute. Therefore the result from writing:</p><div class="source"><pre><w:hidden name="supplier.id" value="${supplier.id}"/></pre></div><p>Is the same one as:</p><div class="source"><pre><w:hidden name="supplier.id"/></pre></div> - </body> +<head> + <title>Hidden Tag</title> +</head> +<body> + +<h2>Hidden Tag</h2> + +<p>You can use the <i>hidden</i> tag in order to create hidden html fields:</p> + +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:hidden name="fornecedor.id" value="${fornecedor.id}"/> +</textarea> +<p>The <b>w:hidden</b> tag does not add rows to your form, if it has some type of table display.</p> + +<h2>Default value</h2> + +<p>The default <i>value</i> attribute value is the _expression_ language evaluation of the name attribute. Therefore the + result from writing:</p> + +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:hidden name="supplier.id" value="${supplier.id}"/> +</textarea> + +<p>Is the same one as:</p> + +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:hidden name="supplier.id"/> +</textarea> + +</body> + </html>
Modified: trunk/distribution/src/site/content/taglib/select.html (230 => 231)
--- trunk/distribution/src/site/content/taglib/select.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/taglib/select.html 2007-07-06 03:38:14 UTC (rev 231) @@ -13,33 +13,36 @@ list is available in any context as <b>products</b>, it could easily be browsed as:</p> -<div class="source"><pre><w:select name="product.id" items="${products}" value="id" var="product" > - ${product.name} -</w:select></pre></div> -</div> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:select name="product.id" items="${products}" value="id" var="product" > + ${product.name} + </w:select> +</textarea> <h2>Adding an empty line</h2> <p>In order to add an empty option, use the <i>addEmpty</i> attribute:</p> -<div class="source"><pre><w:select name="product.id" items="${products}" value="id" var="product" addEmpty="true" > - ${product.name} -</w:select></pre></div> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:select name="product.id" items="${products}" value="id" var="product" addEmpty="true" > + ${product.name} + </w:select> +</textarea> -</div> <h2>Setting the default selected item</h2> <p>You can set the selected item by specifying the <i>selected</i> attribute:</p> -<div class="source"><pre><w:select name="product.id" items="${products}" value="id" var="product" selected="${2}" > - ${product.name} -</w:select></pre></div> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:select name="product.id" items="${products}" value="id" var="product" selected="${2}" > + ${product.name} + </w:select> +</textarea> <p>It will compare the <i>selected</i> attribute value with the <i>id</i> of each one of your products.</p> -</div> <h2>Showing radio buttons</h2> @@ -47,12 +50,12 @@ collection of elements. One can create radio buttons by using the <i>type</i> attribute:</p> -<div class="source"><pre><w:select name="product.id" items="${products}" value="id" var="product" type="radio" > - ${product.name} -</w:select></pre></div> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:select name="product.id" items="${products}" value="id" var="product" type="radio" > + ${product.name} + </w:select> +</textarea> -</div> - <h2>Using tokens instead of collections</h2> <p>Sometimes one faces the problem of iterating over a small list of @@ -61,9 +64,11 @@ but instead of iterating over a collection, it uses a comma separated list of keys and values:</p> -<div class="source"><pre><w:selectTokens name="writtenPosition" tokens="first,1,second,2,third,3,fourth,4,fifth,5,sixth,6,seventh,7" var="number" > - ${number} -</w:selectTokens></pre></div> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:selectTokens name="writtenPosition" tokens="first,1,second,2,third,3,fourth,4,fifth,5,sixth,6,seventh,7" var="number" > + ${number} + </w:selectTokens> +</textarea> <p>The above code will generate a combo box with items labeled 1, 2, ..., 7 and hidden values named first, second, ..., seventh.</p>
Modified: trunk/distribution/src/site/content/taglib/submit.html (230 => 231)
--- trunk/distribution/src/site/content/taglib/submit.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/taglib/submit.html 2007-07-06 03:38:14 UTC (rev 231) @@ -8,17 +8,22 @@ <h2>Submit Tag</h2> <p>In order to submit your form, use the <b>w:submit</b> tag:</p> -<div class="source"><pre><w:submit value="submit"/></pre></div> -</div> + +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:submit value="submit"/> +</textarea> + <h2>Multiple submit buttons on the same form</h2> <p>You can create one form with multiple submit buttons to different actions by setting the action attribute:</p> -<div class="source"><pre><w:form action="" type="table" id="myform"> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:form action="" type="table" id="myform"> <w:hidden name="supplier.id"/> <w:text name="supplier.name"/> <w:submit value="update" action="" <w:submit value="remove" action="" -</w:form></pre></div> + </w:form> +</textarea> <p>In order to such form work, one needs to add some _javascript_ code, therefore do not forge to define a unique <i>id</i> attribute in your form.</p>
Modified: trunk/distribution/src/site/content/taglib/taglib.html (230 => 231)
--- trunk/distribution/src/site/content/taglib/taglib.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/taglib/taglib.html 2007-07-06 03:38:14 UTC (rev 231) @@ -10,41 +10,53 @@ <p>Waffle taglib is a sample library which aimed at making it easier to create custom forms using the JSP technology. The most important step it to declare the taglib itself in your jsp file:</p> -<div class="source"><pre><%@ taglib uri="http://waffle.codehaus.org" prefix="w" %></pre></div> -</div> + +<textarea class="xml:nogutter:nocontrols" name="code"> + <%@ taglib uri="http://waffle.codehaus.org" prefix="w" %> +</textarea> + <h2>Basic usage</h2> <p>The following example shows how to create a form inside a table, containing many different fields:</p> -<div class="source"><pre><w:form action="" type="table" id="sendForm"> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:form action="" type="table" id="sendForm"> <w:hidden name="supplier.id"/> <w:text name="supplier.code"/> <w:text name="supplier.name"/> <w:text name="supplier.phone"/> <w:textarea name="supplier.details" cols="60" rows="7">${supplier.details}</w:textarea> <w:submit value="send"/> -</w:form></pre></div> + </w:form> +</textarea> + <p>Due to internationalization issues, you should add the following items to your messages.properties file: <i>supplier.name</i>, <i>supplier.code</i>, <i>supplier.phone</i>, <i>supplier.details</i> and <i>send</i>.</p> -<div class="source"><pre>supplier.name = Name -supplier.code = Code -supplier.phone = Phone -supplier.details = Details -send = send</pre></div> -</div> +<textarea class="java:nogutter:nocontrols" name="code"> + supplier.name = Name + supplier.code = Code + supplier.phone = Phone + supplier.details = Details + send = send +</textarea> <h2>Login form example</h2> <p>The following example shows a sample login form:</p> -<div class="source"><pre><w:form action="" type="table" id="login"> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:form action="" type="table" id="login"> <w:text name="username"/> <w:password name="password"/> <w:submit value="login"/> -</w:form></pre></div> + </w:form> +</textarea> + <p>Once again, due to internationalization issues, you should register add the following items to your messages.properties file: <i>username</i>, <i>password</i> and <i>login</i>.</p> -<div class="source"><pre>username = Username -password = Password -login = Login</pre></div> +<textarea class="java:nogutter:nocontrols" name="code"> + username = Username + password = Password + login = Login +</textarea> </body> </html>
Modified: trunk/distribution/src/site/content/taglib/text.html (230 => 231)
--- trunk/distribution/src/site/content/taglib/text.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/taglib/text.html 2007-07-06 03:38:14 UTC (rev 231) @@ -9,40 +9,54 @@ <p>The most common and simple html tag is the usual input text field. A common use of its html form is:</p> -<div class="source"><pre><input type="text" name="supplier.name" value="${supplier.name}"/></pre></div> +<textarea class="xml:nogutter:nocontrols" name="code"> + <input type="text" name="supplier.name" value="${supplier.name}"/> +</textarea> <p>The <b>w:text</b> tag allows you to generate the above code by defining:</p> -<div class="source"><pre><w:text name="supplier.name" /></pre></div> -</div> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:text name="supplier.name" /> +</textarea> <h2>Advantage</h2> <p>The above example does not show all the power behind the waffle form taglib. Let's add a form and a table to the sample html shown earlier:</p> -<div class="source"><pre><form action="" -<table> -<tr> -<td>suppliers name</td> -<td><input type="text" name="supplier.name" value="${supplier.name}"/></td> -</tr> -</table> -</form></pre></div> +<textarea class="xml:nogutter:nocontrols" name="code"> + <form action="" + <table> + <tr> + <td>suppliers name</td> + <td><input type="text" name="supplier.name" value="${supplier.name}"/></td> + </tr> + </table> + </form> +</textarea> <p>Using the waffle taglib, one can easily output the above result by defining:</p> -<div class="source"><pre><w:form action="" type="table"> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:form action="" type="table"> <w:text name="supplier.name" /> -</w:form></pre></div> + </w:form></textarea> <p>And registering the following key into your i18n file:</p> -<div class="source"><pre>supplier.name = Suppliers name</pre></div> + +<textarea class="java:nogutter:nocontrols" name="code"> + supplier.name = Suppliers name +</textarea> <p>You can learn more about form types by reading the <b>w:form</b> tag documentation.</p> -</div> <h2>Fully customized tag</h2> <p>Here is an example of label and default value customization:</p> -<div class="source"><pre><w:form action="" type="table"> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:form action="" type="table"> <w:text label="i18n.key" name="supplier.name" value="${supplier.name}"/> -</w:form></pre></div> + </w:form> +</textarea> <p>And i18n file:</p> -<div class="source"><pre>i18n.key = Suppliers name</pre></div> + +<textarea class="java:nogutter:nocontrols" name="code"> + i18n.key = Suppliers name +</textarea> + </body> </html>
Modified: trunk/distribution/src/site/content/taglib/textarea.html (230 => 231)
--- trunk/distribution/src/site/content/taglib/textarea.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/taglib/textarea.html 2007-07-06 03:38:14 UTC (rev 231) @@ -10,12 +10,13 @@ <p>In order to create a textarea, use the tag <i>w:textarea</i>. Its caption is the internationalized <i>name</i> attribute</p> -</div> <h2>Example</h2> -<div class="source"><pre><w:textarea name="supplier.comments" > - ${supplier.comments} -</w:textarea></pre></div> +<textarea class="xml:nogutter:nocontrols" name="code"> + <w:textarea name="supplier.comments" > + ${supplier.comments} + </w:textarea> +</textarea> <p>And add to your i18n file:</p> <div class="source"><pre>supplier.comments = Comments</pre></div>
Modified: trunk/distribution/src/site/content/tutorials/tutorial-one.html (230 => 231)
--- trunk/distribution/src/site/content/tutorials/tutorial-one.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/tutorials/tutorial-one.html 2007-07-06 03:38:14 UTC (rev 231) @@ -196,7 +196,7 @@ Tomcat, Jetty). So when we run the application and direct the browser to <b>http://localhost:8080/hello/automobile.waffle</b> we see the following:</p> -<img src="" /> +<img src="" /> <p>When Waffle's front controller, WaffleServlet, handled this request it first located the "automobile" Controller, which we registered earlier to the session.</p> @@ -204,7 +204,7 @@ directly onto the Controller. If we append the value "<b>?model=ranger</b>" to the original url we will now have: <b>http://localhost:8080/hello/automobile.waffle?model=ranger</b>. Notice that the url and the value of the Model field has been updated.</p> -<img src="" /> +<img src="" /> <h3>More to see</h3> <p>This has only been an introduction to Waffle and it provides a
Modified: trunk/distribution/src/site/content/tutorials/tutorial-two.html (230 => 231)
--- trunk/distribution/src/site/content/tutorials/tutorial-two.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/content/tutorials/tutorial-two.html 2007-07-06 03:38:14 UTC (rev 231) @@ -14,7 +14,7 @@ it the ability to both <b>accelerate</b> and <b>stop</b>. We need to add a <i>speed</i> field so we can maintain the current speed of the automobile. We add a <i>getter</i> for speed so we can make sure that -the speed is in fact increasing. And we add two <b>event</b> methods: <b>void +the speed is in fact increasing. And we add two <b>action</b> methods: <b>void accelerate(String)</b> and <b>void stop()</b>. Remember we added the "automobile" to the Registrar as a <i>Session-Level</i> component. So each user will have their own instance of the autombile @@ -97,7 +97,7 @@ </html> </pre></div> <p>For this example we will concentrate on the more interesting of -the two events, <i>accelerate</i>. The accelerate event is defined as <b>automobile.waffle?event=accelerate|15</b>. +the two actions, <i>accelerate</i>. The accelerate action is defined as <b>automobile.waffle?method=accelerate|15</b>. Let's dissect this to get a better understanding of what is going on. Starting from left to right we will break this request out and explain each piece separately:</p> @@ -148,7 +148,7 @@ shown earlier is a powerful feature. From a development perspective it is nice because it reduces much of the classic searching through the request parameters to determine what to do next. But Waffle provides -even more capabilities for triggering events.</p> +even more capabilities for triggering actions.</p> <h4>ActionMethod arguments</h4> <p>Notice the <b>void accelerate(int)</b> ActionMethod that we used earlier. Waffle can automatically convert the String values received @@ -181,7 +181,7 @@ myActionMethod(Map)</b>. Assume we have registered this controller under the name "sample". We can have Waffle fire this ActionMethod by submitting the url request <b>sample.waffle?method=myActionMethod|{dictionary}</b>. -So just to make sure it's clear, we will dissect the value of the <b>event</b> +So just to make sure it's clear, we will dissect the value of the <b>action</b> parameter:</p> <table class="bodyTable"> <tbody>
Modified: trunk/distribution/src/site/templates/skin.html (230 => 231)
--- trunk/distribution/src/site/templates/skin.html 2007-07-06 03:08:10 UTC (rev 230) +++ trunk/distribution/src/site/templates/skin.html 2007-07-06 03:38:14 UTC (rev 231) @@ -30,7 +30,7 @@ <body class="composite"> <div id="banner"> - <img src="" alt="Waffle" /> + <img src="" alt="Waffle" /> <div class="clear"></div> </div> <div id="breadcrumbs"> @@ -52,12 +52,15 @@ </#list> </ul> </#list> - <h1>Hosted at</h1> - <img alt="Hosted at Codehaus" src="" /><br/> - <h1>Tools</h1> - <img alt="Build with Maven 2" src="" /> <br/> - <img alt="IDEA" src="" /> <br/> - <h1>Ads</h1> + <h1>Project Documentation</h1> + <ul> + <li class="collapsed"> <a href="" Information</a> </li> + <img alt="Hosted at Codehaus" src="" /><br/> + </ul> + <h1>Tools</h1> + <img alt="Build with Maven 2" src="" /> <br/> + <img alt="IDEA" src="" /> <br/> + <h1>Ads</h1> <script type="text/_javascript_"><!-- google_ad_client = "pub-8973208330688044"; google_ad_width = 125; @@ -86,7 +89,7 @@ </body> -<!-- SyntaxHighlighter scripts: MUST be left AFTER the body --> +<!-- Scripts to highlight code: MUST be left AFTER the body --> <script language="_javascript_" src="" // </script> @@ -96,25 +99,16 @@ <script language="_javascript_" src="" // </script> -<script language="_javascript_" src="" + <script language="_javascript_" src="" // </script> -<script language="_javascript_" src="" + <script language="_javascript_" src="" // </script> <script type="text/_javascript_"> - // <![CDATA[ - var elements = document.getElementsByClassName('source'); - elements.each(function(element) { - var content = element.getElementsByTagName('pre')[0].innerHTML; - var classType = /^</.test(content) ? "xml" : "java"; - content = "<textarea name=\"code\" class=\"" + classType + "\">" + content + "</textarea>"; - new Insertion.Before(element, content); - element.remove(element); - }); + // <![CDATA[ + dp.SyntaxHighlighter.HighlightAll('code', false, false); + // ]]> +</script> - dp.SyntaxHighlighter.HighlightAll('code', false, false); - // ]]> - </script> - </html>
To unsubscribe from this list please visit:
