From 6b6b9e2699e5bbdef7b605a5b58c7827ad5137d2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 14 Feb 2009 17:11:35 +0100 Subject: highlight section on section edit button mouseover Ignore-this: 128d5873729a0a00558465b45d5d9f58 Some people seem to have problems to see which section will be edited when using a section editing button. This patch adds a litle bit JavaScript magic to highlight the edited section to be, when hovering over a section button. darcs-hash:20090214161135-7ad00-59db7d9185784ba1fec2f2c2da30c6e64ae1ccc3.gz --- lib/scripts/script.js | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'lib/scripts') diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 2421f3577..5ef9aef85 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -520,7 +520,7 @@ addInitEvent(function(){ /** * Display error for Windows Shares on browsers other than IE * - * Michael Klier + * @author Michael Klier */ function checkWindowsShares() { var elems = getElementsByClass('windows',document,'a'); @@ -539,8 +539,34 @@ function checkWindowsShares() { /** * Add the event handler for the Windows Shares check * - * Michael Klier + * @author Michael Klier */ addInitEvent(function(){ checkWindowsShares(); }); + +/** + * Highlight the section when hovering over the appropriate section edit button + * + * @author Andreas Gohr + */ +addInitEvent(function(){ + var btns = getElementsByClass('btn_secedit',document,'form'); + for(var i=0; i