From ef8b4cac27e76793099bf0fc9f73a4d4afb04661 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.

---
 opendj-sdk/opendj3/src/main/resources/images/minus.png |    0 
 opendj-sdk/opendj3/src/main/resources/images/plus.png  |    0 
 opendj-sdk/opendj3/src/main/resources/css/coredoc.css  |    8 ++++++++
 opendj-sdk/opendj3/pom.xml                             |   30 ++++++++++++++++--------------
 4 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/opendj-sdk/opendj3/pom.xml b/opendj-sdk/opendj3/pom.xml
index 6f45a68..478eff9 100644
--- a/opendj-sdk/opendj3/pom.xml
+++ b/opendj-sdk/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;
diff --git a/opendj-sdk/opendj3/src/main/resources/css/coredoc.css b/opendj-sdk/opendj3/src/main/resources/css/coredoc.css
index e5611c5..7d18611 100644
--- a/opendj-sdk/opendj3/src/main/resources/css/coredoc.css
+++ b/opendj-sdk/opendj3/src/main/resources/css/coredoc.css
@@ -169,6 +169,14 @@
     background-color: #fafafa;
     border: thin dashed #ccc;
     padding: 6px;
+    text-indent: -18px;
+}
+
+.toggle
+{
+ position: relative;
+ left: -40px;
+ float:left;
 }
 
 div.abstract,div.important,div.caution,div.note,div.tip,div.warning,div.example,div.toc
diff --git a/opendj-sdk/opendj3/src/main/resources/images/minus.png b/opendj-sdk/opendj3/src/main/resources/images/minus.png
new file mode 100644
index 0000000..55404b2
--- /dev/null
+++ b/opendj-sdk/opendj3/src/main/resources/images/minus.png
Binary files differ
diff --git a/opendj-sdk/opendj3/src/main/resources/images/plus.png b/opendj-sdk/opendj3/src/main/resources/images/plus.png
new file mode 100644
index 0000000..8317f33
--- /dev/null
+++ b/opendj-sdk/opendj3/src/main/resources/images/plus.png
Binary files differ

--
Gitblit v1.10.0