1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 21:38:14 +01:00

Use pretty value for variable list

This commit is contained in:
Barry vd. Heuvel 2014-03-23 21:22:46 +01:00
parent 328a160ce5
commit 64e5f4bd00

View File

@ -194,11 +194,12 @@ if (typeof(PhpDebugBar) == 'undefined') {
if (v && v.length > 100) {
v = v.substr(0, 100) + "...";
}
var prettyVal = createCodeBlock(value);
dd.text(v).click(function() {
if (dd.hasClass(csscls('pretty'))) {
dd.text(v).removeClass(csscls('pretty'));
} else {
dd.html(htmlize(value)).addClass(csscls('pretty'));
dd.addClass(csscls('pretty')).empty().append(prettyVal);
}
});
}