Added a toggle button to expand/collapse all krumo sub-trees at once
This commit is contained in:
@@ -30,6 +30,8 @@ Jordi Boggiano - <j.boggiano@seld.be><br />
|
|||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
- 1.1.0
|
||||||
|
- Added a toggle button to expand/collapse all krumo sub-trees at once
|
||||||
- 1.0.0
|
- 1.0.0
|
||||||
- Initial Public Release
|
- Initial Public Release
|
||||||
|
|
||||||
|
|||||||
@@ -55,4 +55,16 @@ $(function() {
|
|||||||
$('textarea[name="code"]').focus();
|
$('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;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #88f;
|
||||||
|
}
|
||||||
|
|
||||||
.output {
|
.output {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
margin: 10px .4%;
|
margin: 10px .4%;
|
||||||
|
|||||||
Reference in New Issue
Block a user