| | |
| | | <replacevalue> |
| | | <script src="http://code.jquery.com/jquery-latest.min.js"></script> |
| | | <script> |
| | | // On double-click, reformat <pre class="screen"> for easy copying. |
| | | // On double-click, reformat <div class="screen"> for easy copying. |
| | | $(document).ready(function() { |
| | | $(".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.\">" + |
| | | "<div class=\"flat\" title=\"Double-click [+] to wrap long lines.\">" + |
| | | $(this).html().replace(/minus\.png/,"plus.png").replace(/\n /g," ") + "\n<!--" + $(this).html() + "-->" + |
| | | "</pre>"); |
| | | "</div>"); |
| | | }); |
| | | $(".flat").live("dblclick", function() { |
| | | $(this).replaceWith( |
| | | "<pre class=\"screen\" title=\"Double-click [-] to flatten lines.\">" + |
| | | "<div class=\"screen\" title=\"Double-click [-] to flatten lines.\">" + |
| | | $(this).html().replace(/(.|\n)+<!\-\-/m,"").replace(/\-\-\>/,"").replace(/plus\.png/,"minus.png") + |
| | | "</pre>"); |
| | | "</div>"); |
| | | }); |
| | | </script> |
| | | <link rel="shortcut icon" href="http://forgerock.org/favicon.ico"> |
| | |
| | | <replacevalue> |
| | | <script src="http://code.jquery.com/jquery-latest.min.js"></script> |
| | | <script> |
| | | // On double-click, reformat <pre class="screen"> for easy copying. |
| | | // On double-click, reformat <div class="screen"> for easy copying. |
| | | $(document).ready(function() { |
| | | $(".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.\">" + |
| | | "<div class=\"flat\" title=\"Double-click [+] to wrap long lines.\">" + |
| | | $(this).html().replace(/minus\.png/,"plus.png").replace(/\n /g," ") + "\n<!--" + $(this).html() + "-->" + |
| | | "</pre>"); |
| | | "</div>"); |
| | | }); |
| | | $(".flat").live("dblclick", function() { |
| | | $(this).replaceWith( |
| | | "<pre class=\"screen\" title=\"Double-click [-] to flatten lines.\">" + |
| | | "<div class=\"screen\" title=\"Double-click [-] to flatten lines.\">" + |
| | | $(this).html().replace(/(.|\n)+<!\-\-/m,"").replace(/\-\-\>/,"").replace(/plus\.png/,"minus.png") + |
| | | "</pre>"); |
| | | "</div>"); |
| | | }); |
| | | </script> |
| | | <link rel="shortcut icon" href="http://forgerock.org/favicon.ico"> |