From c6bcae18f5590f7ad3d55d8bb23a874e8a50e165 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 16 Oct 2009 11:09:46 +0200 Subject: Fix paragraph highlighting for mouseover on edit buttons Dokuwiki does not generate section edit buttons for h4 sections. Therefor, the edit button next to a h4 section belongs to a previous higher-level section. The AJAX-y paragraph highlighting onmouseover the edit button does not highlight all sections up to to higher-level section which owns the edit button, but only the last, i. e. h4 section. This patch highlights all sections up to the heading the edit button refers to. darcs-hash:20091016090946-e4919-fa9ed1f627a6cab9654eb66c5fb4760f3d4d9fcf.gz --- lib/scripts/script.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/scripts') diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 032741397..418d2f069 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -557,6 +557,7 @@ addInitEvent(function(){ * @author Andreas Gohr */ addInitEvent(function(){ + var highlightorfinish = new RegExp('DIV|H[123]'); var btns = getElementsByClass('btn_secedit',document,'form'); for(var i=0; i