Bastien <b...@altern.org> writes:
> Well, the HTML page was empty -- same error than with the unpatched
> version of org-info.js.

Fetching a stale copy from cache perhaps?  I did all my testing locally
and changed things around to make sure it would really load the version
I just created...

> If you're confident this works with this structure:
>
>   <div id="preamble">
>     <h1 class="title">Title</h1>
>   <div>
>   
>   <div id="content">
>   ...
>   <div>
>
> then I will apply the patch (with a ChangeLog!)

That works for me in Firefox6 and Konqueror (both KHTML and WebKit mode)
in both the minified and the source version.  I've used the latest
version of yuicompressor (2.4.6 instead of 2.4.2), but that should not
make a difference.  Proper patch attached.

>From 55fd3d1b7f82460e28d8fcc50c6ea0eb41197fef Mon Sep 17 00:00:00 2001
From: Achim Gratz <strom...@stromeko.de>
Date: Wed, 17 Aug 2011 17:49:56 +0200
Subject: [PATCH] Find title differently to allow it to reside in preamble

  * org-info-src.js: find the title heading via it's class property instead of
    relying on it to be the first heading in div content

TINYCHANGE
---
 code/org-info-js/org-info-src.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/code/org-info-js/org-info-src.js b/code/org-info-js/org-info-src.js
index 2e49e9c..b521c50 100644
--- a/code/org-info-js/org-info-src.js
+++ b/code/org-info-js/org-info-src.js
@@ -738,7 +738,7 @@ var org_html_manager = {
 
     // Move the title into the first visible section.
     // TODO: show title above everything if FIXED_TOC !!!
-    t.TITLE = t.BODY.getElementsByTagName("h1")[0];
+    t.TITLE = document.getElementsByClassName("title")[0];
     if(t.INNER_TITLE && !t.FIXED_TOC && t.VIEW != t.SLIDE_VIEW) {
       t.INNER_TITLE = t.TITLE.cloneNode(true);
       /* TODO: this is still based on wrong behaviour of browsers (same id for two elements)
-- 
1.7.6


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

Reply via email to