summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorwingedfox <wingedfox@debugger.ru>2007-05-15 06:58:00 +0200
committerwingedfox <wingedfox@debugger.ru>2007-05-15 06:58:00 +0200
commit42a2974e5c0ce173f492c248f74393c729eb2bfc (patch)
tree4d4f90f8150582f1c12eee8e267b3b26c2405339 /lib/scripts
parentbce7456f87f9060247aba585a11f29404493e15b (diff)
downloadrpg-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/scripts')
-rw-r--r--lib/scripts/script.js10
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>&#8211;</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>&#8211;</span>';
obj.className = 'toc_close';
} else {
toc.style.display = 'none';