From c2b6112754620182c87f5ea7971002305115ec06 Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Wed, 21 Dec 2011 16:28:51 +0000
Subject: [PATCH] Didn't have time to decorate the tree, so am trying to decorate some <screen> output in the HTML instead.

---
 opendj3/pom.xml |   30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/opendj3/pom.xml b/opendj3/pom.xml
index 6f45a68..478eff9 100644
--- a/opendj3/pom.xml
+++ b/opendj3/pom.xml
@@ -419,22 +419,23 @@
                   token="&lt;/head&gt;">
                   <include name="**/**/*.html" />
                   <replacevalue>
-&lt;script  src="http://code.jquery.com/jquery-1.6.4.min.js"&gt;&lt;/script&gt;
-&lt;script type="text/javascript"&gt;
+&lt;script src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
+&lt;script&gt;
 // On double-click, reformat &lt;pre class="screen"&gt; for easy copying.
 $(document).ready(function() {
-  $(".screen").attr("title", "Double-click to unwrap lines.");
+  $(".screen").attr("title", "Double-click [-] to flatten lines.");
+  $(".screen").prepend('&lt;img src="../images/minus.png" class="toggle"&gt;');
 });
 $(".screen").live("dblclick", function() {
   $(this).replaceWith(
-    "&lt;pre class=\"flat\" title=\"Double-click to wrap long lines.\"&gt;" +
-    $(this).text().replace(/\n /g," ") + "\n&lt;!--" + $(this).text() + "--&gt;" +
+    "&lt;pre class=\"flat\" title=\"Double-click [+] to wrap long lines.\"&gt;" +
+    $(this).html().replace(/minus\.png/,"plus.png").replace(/\n /g," ") + "\n&lt;!--" + $(this).html() + "--&gt;" +
     "&lt;/pre&gt;");
 });
 $(".flat").live("dblclick", function() {
   $(this).replaceWith(
-    "&lt;pre class=\"screen\" title=\"Double-click to unwrap lines.\"&gt;" +
-    $(this).html().replace(/(.|\n)+&lt;!\-\-/m,"").replace(/\-\-\&gt;/,"") +
+    "&lt;pre class=\"screen\" title=\"Double-click [-] to flatten lines.\"&gt;" +
+    $(this).html().replace(/(.|\n)+&lt;!\-\-/m,"").replace(/\-\-\&gt;/,"").replace(/plus\.png/,"minus.png") +
     "&lt;/pre&gt;");
 });
 &lt;/script&gt;
@@ -502,22 +503,23 @@
                   token="&lt;/head&gt;">
                   <include name="**/**/**/*.html" />
                   <replacevalue>
-&lt;script  src="http://code.jquery.com/jquery-1.6.4.min.js"&gt;&lt;/script&gt;
-&lt;script type="text/javascript"&gt;
+&lt;script src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
+&lt;script&gt;
 // On double-click, reformat &lt;pre class="screen"&gt; for easy copying.
 $(document).ready(function() {
-  $(".screen").attr("title", "Double-click to unwrap lines.");
+  $(".screen").attr("title", "Double-click [-] to flatten lines.");
+  $(".screen").prepend('&lt;img src="../images/minus.png" class="toggle"&gt;');
 });
 $(".screen").live("dblclick", function() {
   $(this).replaceWith(
-    "&lt;pre class=\"flat\" title=\"Double-click to wrap long lines.\"&gt;" +
-    $(this).text().replace(/\n /g," ") + "\n&lt;!--" + $(this).text() + "--&gt;" +
+    "&lt;pre class=\"flat\" title=\"Double-click [+] to wrap long lines.\"&gt;" +
+    $(this).html().replace(/minus\.png/,"plus.png").replace(/\n /g," ") + "\n&lt;!--" + $(this).html() + "--&gt;" +
     "&lt;/pre&gt;");
 });
 $(".flat").live("dblclick", function() {
   $(this).replaceWith(
-    "&lt;pre class=\"screen\" title=\"Double-click to unwrap lines.\"&gt;" +
-    $(this).html().replace(/(.|\n)+&lt;!\-\-/m,"").replace(/\-\-\&gt;/,"") +
+    "&lt;pre class=\"screen\" title=\"Double-click [-] to flatten lines.\"&gt;" +
+    $(this).html().replace(/(.|\n)+&lt;!\-\-/m,"").replace(/\-\-\&gt;/,"").replace(/plus\.png/,"minus.png") +
     "&lt;/pre&gt;");
 });
 &lt;/script&gt;

--
Gitblit v1.10.0