head 1.19;
access;
symbols;
locks; strict;
comment @# @;
1.19
date 2006.03.27.20.16.24; author rse; state Exp;
branches;
next 1.18;
commitid ZzptQZgMiiIflRqr;
1.18
date 2006.03.27.15.37.30; author rse; state Exp;
branches;
next 1.17;
commitid 1QjKKvPKUMbANPqr;
1.17
date 2006.03.14.17.00.40; author rse; state Exp;
branches;
next 1.16;
commitid novA3CyEjNP0Gapr;
1.16
date 2006.03.13.18.06.15; author rse; state Exp;
branches;
next 1.15;
commitid FGhZJI7tgEbv43pr;
1.15
date 2006.03.13.12.41.21; author rse; state Exp;
branches;
next 1.14;
commitid 3cjMcnrWW1c3h1pr;
1.14
date 2006.03.13.12.06.25; author rse; state Exp;
branches;
next 1.13;
commitid 0aUXNSSI8AB351pr;
1.13
date 2006.03.13.07.44.22; author rse; state Exp;
branches;
next 1.12;
commitid qd2MBGor57qaDZor;
1.12
date 2006.03.12.19.16.35; author rse; state Exp;
branches;
next 1.11;
commitid B23qzzqu5d3CuVor;
1.11
date 2006.03.12.17.40.46; author rse; state Exp;
branches;
next 1.10;
commitid 60nCZ3BJaoqLXUor;
1.10
date 2006.03.11.16.32.59; author rse; state Exp;
branches;
next 1.9;
commitid Sc38vyOyirIuCMor;
1.9
date 2006.03.11.13.08.17; author rse; state Exp;
branches;
next 1.8;
commitid dw82p8FVtXchuLor;
1.8
date 2006.03.09.19.12.10; author rse; state Exp;
branches;
next 1.7;
commitid epriXSkS92w5zxor;
1.7
date 2006.02.20.08.34.35; author rse; state Exp;
branches;
next 1.6;
commitid XGwb4UIHrCifAimr;
1.6
date 2006.02.17.08.59.45; author rse; state Exp;
branches;
next 1.5;
commitid iogEp2hgTxvROUlr;
1.5
date 2005.11.27.13.30.58; author rse; state Exp;
branches;
next 1.4;
commitid VLeS3H60IwUjXobr;
1.4
date 2005.11.27.13.24.50; author rse; state Exp;
branches;
next 1.3;
commitid 2FbYYMLToymdVobr;
1.3
date 2005.11.27.13.16.43; author rse; state Exp;
branches;
next 1.2;
commitid QKieM66Y2qWpSobr;
1.2
date 2005.11.25.20.44.56; author rse; state Exp;
branches;
next 1.1;
commitid 7lW0CQ8E7bObqbbr;
1.1
date 2005.11.25.16.20.58; author rse; state Exp;
branches;
next ;
commitid c9X5QxZIdGHCX9br;
desc
@@
1.19
log
@slow down the toggling minimally
@
text
@
div.navbar {
margin-bottom: 20px;
font-family: sans-serif,helvetica,lucida,verdana,arial;
font-size: 9pt;
}
div.navbar ul {
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
div.navbar li {
list-style: none;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
div.navbar a {
display: block;
width: 160px;
padding: 1px 0px 1px 0px;
margin: 0px 0px 0px 0px;
text-decoration: none;
font-weight: normal;
color: #000000;
}
div.navbar li.active > a {
font-weight: bold;
background-attachment: scroll;
background-position: left top;
background-image: url('canvas/canvas-crop-glass-dark-T.png');
}
div.navbar ul ul li a {
width: 150px;
padding: 1px 0px 1px 10px;
}
div.navbar ul ul ul li a {
width: 140px;
padding: 1px 0px 1px 20px;
}
div.navbar ul ul ul ul li a {
width: 130px;
padding: 1px 0px 1px 30px;
}
div.navbar > ul {
border-top: 1px solid #908070;
border-bottom: 1px solid #908070;
}
div.navbar li {
border-top: 1px solid #c0b0a0;
}
div.navbar > ul > li:first-child {
border-top: none;
}
div.navbar a:visited {
color: #000000;
font-weight: normal;
}
div.navbar a:hover {
background-attachment: scroll;
background-position: left top;
background-image: url('canvas/canvas-crop-glass-dark-T.png');
text-decoration: none;
color: #000000;
font-weight: normal;
}
div.navbar li.active > a:hover {
font-weight: bold;
}
/* dynamic navigation bar item expading/collapsing */
var navbar_default = "";
var navbar_active = navbar_default;
function navbar_over(event) {
window.status = this.a.href;
navbar_active = this.id;
defer_cancel("navbar_out");
defer_schedule("navbar_over", "navbar_toggle();", 600);
}
function navbar_out(event) {
window.status = "";
defer_schedule("navbar_out", "navbar_out_stage2('"+this.id+"');", 600);
}
function navbar_out_stage2(id) {
if (navbar_active != id)
return;
navbar_active = navbar_default;
navbar_cleanup();
}
function navbar_toggle() {
var root = document.getElementById(navbar_active);
var li = DOM.getNode("> ul > li", root);
for (var i = 0; i < li.length; i++) {
var display = (li[i].style.display != "none" ? "none" : "block");
li[i].style.display = display;
}
return;
}
function navbar_cleanup() {
var li = document.getElementsByTagName("li");
var active_a = navbar_active.split(".");
active_a.pop();
var active_prefix = active_a.join(".");
var li = document.getElementsByTagName("li");
for (var i = 0; i < li.length; i++) {
var id_s = li[i].id;
var id_a = id_s.split(".");
if (id_a[0] != "navbar")
continue;
id_a.pop();
var id_prefix = id_a.join(".");
if ( active_prefix.indexOf(id_prefix) == 0 /* siblings */
|| id_prefix == navbar_active) /* childs */
display = 'block';
else
display = 'none';
if (li[i].style.display != display)
li[i].style.display = display;
}
return;
}
/* DOM event activation */
function nav_bar_setevents(e) {
var nodes = DOM.getNode("div.navbar li");
for (var i = 0; i < nodes.length; i++) {
var anchor = DOM.getNode("a", nodes[i])[0];
var obj = { id: nodes[i].id, li: nodes[i], a: anchor };
DOM.setEvent(anchor, "mouseover", navbar_over, obj, true);
DOM.setEvent(anchor, "mouseout", navbar_out, obj, true);
}
}
DOM.setEvent(window, "load", nav_bar_setevents);
@
1.18
log
@switch navigation bar to toggle mode on THL request
@
text
@d135 1
a135 1
defer_schedule("navbar_over", "navbar_toggle();", 500);
d140 1
a140 1
defer_schedule("navbar_out", "navbar_out_stage2('"+this.id+"');", 500);
@
1.17
log
@many cleanups and more documentation
@
text
@d135 1
a135 1
defer_schedule("navbar_over", "navbar_update();", 800);
d140 1
a140 1
defer_schedule("navbar_out", "navbar_out_stage2('"+this.id+"');", 4000);
d147 1
a147 1
navbar_update();
d150 12
a161 1
function navbar_update() {
@
1.16
log
@remove double selector definition and add visited link styling for IE
@
text
@a39 1
white-space: nowrap;
a44 1
white-space: nowrap;
d48 1
a48 1
width: 180px;
a50 1
white-space: nowrap;
d62 1
a62 1
width: 170px;
d66 1
a66 1
width: 160px;
d70 1
a70 1
width: 150px;
d119 1
@
1.15
log
@restyle navigation bar from scratch by styling instead of tags to workaround problems with brain-dead Internet Explorer 6
@
text
@d86 4
a93 2
}
div.navbar a:hover {
@
1.14
log
@cleanup navigation bar style
@
text
@a32 1
width: 180px;
a42 1
display: block;
d44 1
a44 1
padding: 1px 0px 1px 0px;
d46 1
d49 5
d60 15
a74 3
}
div.navbar ul ul li {
padding-left: 12px;
d86 13
@
1.13
log
@simplify processing by passing a whole object to the event callback functions
@
text
@a42 7
div.navbar ul ul {
margin-left: 0px;
padding-left: 0px;
}
div.navbar li.active > a {
font-weight: bold;
}
d46 2
a47 1
padding: 0px 0px 0px 0px;
d54 3
d58 1
a58 1
padding-left: 8px;
d60 3
a62 2
div.navbar li:first-child {
border-top: 1px solid #c5c0b0;
d65 1
a65 4
border-bottom: 1px solid #c5c0b0;
}
div.navbar li:last-child {
border-bottom: none;
d67 2
a68 2
div.navbar > ul > li:last-child {
border-bottom: 1px solid #c5c0b0;
@
1.12
log
@code cosmetics
@
text
@d108 2
a109 4
var id = this;
var el = document.getElementById(id).getElementsByTagName('a')[0];
window.status = el.href;
navbar_active = id;
a114 1
var id = this;
d116 1
a116 1
defer_schedule("navbar_out", "navbar_out_stage2('"+id+"');", 4000);
d155 3
a157 2
DOM.setEvent(anchor, "mouseover", navbar_over, nodes[i].id, true);
DOM.setEvent(anchor, "mouseout", navbar_out, nodes[i].id, true);
@
1.11
log
@more complete style
@
text
@d32 1
a32 1
DIV.navbar {
d35 2
a36 2
font-family: sans-serif,helvetica,lucida,verdana,arial;
font-size: 9pt;
d38 4
a41 4
DIV.navbar UL {
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
white-space: nowrap;
d43 2
a44 2
DIV.navbar UL UL {
margin-left: 0px;
d47 1
a47 1
DIV.navbar LI.active > A {
d50 3
a52 3
DIV.navbar LI {
display: block;
list-style: none;
d55 1
a55 1
DIV.navbar A {
d60 1
a60 1
DIV.navbar UL UL LI {
d63 1
a63 1
DIV.navbar LI:first-child {
d66 1
a66 1
DIV.navbar LI {
d69 1
a69 1
DIV.navbar LI:last-child {
d72 1
a72 1
DIV.navbar > UL > LI:last-child {
a101 20
/* smart deferred execution */
var defer_scheduled = Array();
var defer_handle = Array();
function defer_schedule (id, cmd, delay) {
if (defer_scheduled[id])
clearTimeout(defer_handle[id]);
defer_scheduled[id] = 1;
defer_handle[id] = setTimeout("defer_scheduled["+id+"] = 0; " + cmd, delay);
return;
}
function defer_cancel (id) {
if (defer_scheduled[id])
clearTimeout(defer_handle[id]);
defer_scheduled[id] = 0;
return;
}
d107 1
a107 1
function navbar_over (e) {
d116 1
a116 1
function navbar_out (e) {
d122 1
a122 1
function navbar_out_stage2 (id) {
d129 1
a129 1
function navbar_update () {
d155 1
a155 1
var nodes = DOM.getNode("DIV.navbar LI");
d157 1
a157 1
var anchor = DOM.getNode("A", nodes[i])[0];
@
1.10
log
@switch to global configuration array variables instead of a dozend individual variables
@
text
@d39 2
a40 2
padding: 0px;
margin: 0px;
@
1.9
log
@fix navigation bar dynamic processing
@
text
@d84 1
a84 1
if (preg_match("/^$prefix/", $path)) {
d91 1
a91 1
$html = preg_replace("/(echo "navbar.".$path";
@
1.8
log
@flush all other pending changes to improve the website layout
@
text
@a91 1
#$html = preg_replace("/(]*>
var nodes = DOM.getNode("DIV.navbar LI");
for (var i = 0; i < nodes.length; i++) {
DOM.setEvent(nodes[i], "mouseover", navbar_over, nodes[i].id, true); /* "navbar_over('"+nodes[i].id+"'); return true;"); */
DOM.setEvent(nodes[i], "mouseout", navbar_out, nodes[i].id, true); /* ('"+nodes[i].id+"'); return true;"); */
}
d127 3
a129 3
function navbar_over (id) {
/* var el = document.getElementById(id).getElementsByTagName('a')[0]; */
var el = document.getElementById(this).getElementsByTagName('a')[0];
d136 2
a137 1
function navbar_out (id) {
d139 1
a139 2
/* defer_schedule("navbar_out", "navbar_out_stage2('"+id+"');", 4000); */
defer_schedule("navbar_out", "navbar_out_stage2('"+this+"');", 4000);
a149 2
if (!document.getElementById)
return;
d172 13
@
1.7
log
@cleanups for 2006
@
text
@d92 1
a92 1
$html = preg_replace("/(]*>
## Copyright (c) 2005 Ralf S. Engelschall
@
1.5
log
@more cleanups and bugfixes
@
text
@d36 1
a36 1
font-size: 10pt;
@
1.4
log
@I don't know how this ever has worked, but the href attribute is part of the child anchor tag and not part of the list item tag
@
text
@d24 1
a24 1
## canvas-navbar.php: canvas navigation bar
@
1.3
log
@fix prototype
@
text
@d129 1
a129 1
var el = document.getElementsById(id);
@
1.2
log
@emulate the default onMouseOver/Out behaviour of displaying the URL
@
text
@d148 1
a148 1
function navbar_update (id) {
@
1.1
log
@rename files to be more pretty on the shell ;-)
@
text
@d129 2
d137 1
@