Added a toggle button to expand/collapse all krumo sub-trees at once

master
Jordi Boggiano 14 years ago
parent 743e4ecee6
commit eae5504698
  1. 2
      README.mdown
  2. 12
      php-console.js
  3. 4
      styles.css

@ -30,6 +30,8 @@ Jordi Boggiano - <j.boggiano@seld.be><br />
Changelog
---------
- 1.1.0
- Added a toggle button to expand/collapse all krumo sub-trees at once
- 1.0.0
- Initial Public Release

@ -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) {
$('<a class="expand" href="#">Toggle all</a>')
.click(function(e) {
$('div.krumo-element.krumo-expand').each(function(idx, el) {
krumo.toggle(el);
});
e.preventDefault();
})
.prependTo('.output');
}
});

@ -20,6 +20,10 @@ input {
font-size: 20px;
}
a {
color: #88f;
}
.output {
padding: 5px 10px;
margin: 10px .4%;

Loading…
Cancel
Save