From eae550469800e57d860efa6d6f5c8dd8f274363b Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 27 Aug 2010 13:16:40 +0200 Subject: [PATCH] Added a toggle button to expand/collapse all krumo sub-trees at once --- README.mdown | 2 ++ php-console.js | 12 ++++++++++++ styles.css | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/README.mdown b/README.mdown index c840b6a..af5630e 100644 --- a/README.mdown +++ b/README.mdown @@ -30,6 +30,8 @@ Jordi Boggiano -
Changelog --------- +- 1.1.0 + - Added a toggle button to expand/collapse all krumo sub-trees at once - 1.0.0 - Initial Public Release diff --git a/php-console.js b/php-console.js index cdf441f..94300f4 100644 --- a/php-console.js +++ b/php-console.js @@ -55,4 +55,16 @@ $(function() { $('textarea[name="code"]').focus(); } }); + + // adds a toggle button to expand/collapse all krumo sub-trees at once + if ($('.krumo-expand').length > 0) { + $('Toggle all') + .click(function(e) { + $('div.krumo-element.krumo-expand').each(function(idx, el) { + krumo.toggle(el); + }); + e.preventDefault(); + }) + .prependTo('.output'); + } }); diff --git a/styles.css b/styles.css index 5b0af32..4976889 100644 --- a/styles.css +++ b/styles.css @@ -20,6 +20,10 @@ input { font-size: 20px; } +a { + color: #88f; +} + .output { padding: 5px 10px; margin: 10px .4%;