mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Mark Craig
21.28.2011 c2b6112754620182c87f5ea7971002305115ec06
Didn't have time to decorate the tree, so am trying to decorate some <screen> output in the HTML instead.
2 files added
2 files modified
38 ■■■■■ changed files
opendj3/pom.xml 30 ●●●● patch | view | raw | blame | history
opendj3/src/main/resources/css/coredoc.css 8 ●●●●● patch | view | raw | blame | history
opendj3/src/main/resources/images/minus.png patch | view | raw | blame | history
opendj3/src/main/resources/images/plus.png patch | view | raw | blame | history
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;
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
opendj3/src/main/resources/images/minus.png
opendj3/src/main/resources/images/plus.png