Browse Source

TITLE property

Make sure the correct heading is used as the =org-html-manager.TITLE= property.
Thanks to tgbit on http://github.com/tgbit for the hint.
Sebastian Rose, Hannover, Germany 10 years ago
parent
commit
bd9847d3d6
3 changed files with 12 additions and 6 deletions
  1. 6 0
      code/org-info-js/changes.org
  2. 4 4
      code/org-info-js/org-info-src.js
  3. 2 2
      code/org-info-js/org-info.js

+ 6 - 0
code/org-info-js/changes.org

@@ -10,6 +10,12 @@
 
 
 
+* 2010-09-01 --- t.TITLE
+
+  Make sure the correct heading is used as the =org-html-manager.TITLE= property.
+
+  Thanks to tgbit on http://github.com/tgbit for the hint.
+
 * 2010-04-24 --- Valid CSS2 IDs
 
   * Changed =org_html_manager::SID_REGEX= to match valid CSS-IDs. Dots are not

+ 4 - 4
code/org-info-js/org-info-src.js

@@ -2,7 +2,7 @@
  * @file
  * org-info.js
  *
- * Version: 0.1.3
+ * Version: 0.1.4
  *
  * @author Sebastian Rose, Hannover, Germany - sebastian_rose at gmx dot de
  *
@@ -495,8 +495,8 @@ var org_html_manager = {
     t.BODY = document.getElementById("content");
     if(null == t.BODY) {
       if(5 > t.RUNS) {
-      t.LOAD_CHECK = window.setTimeout("OrgHtmlManagerLoadCheck()", t.RUN_INTERVAL);
-      return;
+        t.LOAD_CHECK = window.setTimeout("OrgHtmlManagerLoadCheck()", t.RUN_INTERVAL);
+        return;
       } else { // be backward compatible
         t.BODY = document.getElementsByTagName("body")[0];
       }}
@@ -715,7 +715,7 @@ var org_html_manager = {
 
     // Move the title into the first visible section.
     // TODO: show title above everything if FIXED_TOC !!!
-    t.TITLE = document.getElementsByTagName("h1")[0];
+    t.TITLE = t.BODY.getElementsByTagName("h1")[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)

File diff suppressed because it is too large
+ 2 - 2
code/org-info-js/org-info.js