[VarDumper] Changed tooltip to expand-all keybinding in OS X

Expand all keybinding is Cmd+click in OS X
This commit is contained in:
Taylan Kasap 2015-06-02 09:40:38 +03:00 committed by Nicolas Grekas
parent dc296cc951
commit 88093623ea
1 changed files with 3 additions and 2 deletions

View File

@ -116,6 +116,7 @@ Sfdump = window.Sfdump || (function (doc) {
var refStyle = doc.createElement('style'),
rxEsc = /([.*+?^${}()|\[\]\/\\])/g,
idRx = /\bsf-dump-\d+-ref[012]\w+\b/,
keyHint = 0 <= navigator.platform.toUpperCase().indexOf('MAC') ? 'Cmd' : 'Ctrl',
addEventListener = function (e, n, cb) {
e.addEventListener(n, cb, false);
};
@ -255,7 +256,7 @@ return function (root) {
} else {
a.innerHTML += ' ';
}
a.title = (a.title ? a.title+'\n' : '')+'[Ctrl+click] Expand all children';
a.title = (a.title ? a.title+'\n[' : '[')+keyHint+'+click] Expand all children';
a.innerHTML += '<span>▼</span>';
a.className += ' sf-dump-toggle';
if ('sf-dump' != elt.parentNode.className) {
@ -388,7 +389,7 @@ EOHTML;
$style .= sprintf(' title="%s%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : '');
} elseif ('note' === $style) {
if (false !== $c = strrpos($v, '\\')) {
return sprintf('<abbr title="%s" class=sf-dump-%s>%s</abbr>', $v, $style, substr($v, $c+1));
return sprintf('<abbr title="%s" class=sf-dump-%s>%s</abbr>', $v, $style, substr($v, $c + 1));
} elseif (':' === $v[0]) {
return sprintf('<abbr title="`%s` resource" class=sf-dump-%s>%s</abbr>', substr($v, 1), $style, $v);
}