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