diff options
author | wingedfox <wingedfox@debugger.ru> | 2007-05-15 06:58:00 +0200 |
---|---|---|
committer | wingedfox <wingedfox@debugger.ru> | 2007-05-15 06:58:00 +0200 |
commit | 42a2974e5c0ce173f492c248f74393c729eb2bfc (patch) | |
tree | 4d4f90f8150582f1c12eee8e267b3b26c2405339 /lib | |
parent | bce7456f87f9060247aba585a11f29404493e15b (diff) | |
download | rpg-42a2974e5c0ce173f492c248f74393c729eb2bfc.tar.gz rpg-42a2974e5c0ce173f492c248f74393c729eb2bfc.tar.bz2 |
TOC toggle usability fix
Changes:
1. click event handler moved to the toc__header, because plus and minus signs are too small and not usable because of this
2. minus sign replaced with the bigger one, see http://debugger.ru/temp/cross-plus-9x9.html testcases
3. added the pointer cursor to the toc header
darcs-hash:20070515045800-00f02-ed34ebd337c66e3bac731f300f2ce385f64f5e21.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scripts/script.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js index f03bc4b75..21a3ae8f7 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -245,12 +245,16 @@ function addTocToggle() { var obj = document.createElement('span'); obj.id = 'toc__toggle'; - obj.innerHTML = '<span>-</span>'; + obj.innerHTML = '<span>–</span>'; obj.className = 'toc_close'; - obj.onclick = toggleToc; obj.style.cursor = 'pointer'; prependChild(header,obj); + obj.parentNode.onclick = toggleToc; + try { + obj.parentNode.style.cursor = 'pointer'; + obj.parentNode.style.cursor = 'hand'; + }catch(e){} } /** @@ -261,7 +265,7 @@ function toggleToc() { var obj = $('toc__toggle'); if(toc.style.display == 'none') { toc.style.display = ''; - obj.innerHTML = '<span>-</span>'; + obj.innerHTML = '<span>–</span>'; obj.className = 'toc_close'; } else { toc.style.display = 'none'; |