OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [classpath/] [tools/] [resource/] [gnu/] [classpath/] [tools/] [gjdoc/] [htmldoclet/] [gjdoc.js] - Blame information for rev 779

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 779 jeremybenn
/* gjdoc.js
2
 Copyright (C) 2004 Free Software Foundation, Inc.
3
 
4
 This file is part of GNU Classpath.
5
 
6
 GNU Classpath is free software; you can redistribute it and/or modify
7
 it under the terms of the GNU General Public License as published by
8
 the Free Software Foundation; either version 2, or (at your option)
9
 any later version.
10
 
11
 GNU Classpath is distributed in the hope that it will be useful, but
12
 WITHOUT ANY WARRANTY; without even the implied warranty of
13
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 General Public License for more details.
15
 
16
 You should have received a copy of the GNU General Public License
17
 along with GNU Classpath; see the file COPYING.  If not, write to the
18
 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19
 02111-1307 USA. */
20
 
21
/**
22
 *  Sets a new stylesheet for a single frame.
23
 */
24
function setStyleSheetForFrame(title, frame_name)
25
{
26
   var i, num, a, main;
27
   f = eval("top.frames." + frame_name);
28
   for(i=0; (a = f.document.getElementsByTagName("link")[i]); i++) {
29
      if(a.getAttribute("rel").indexOf("style") != -1
30
         && a.getAttribute("title")) {
31
         a.disabled = true;
32
         a.disabled = (a.getAttribute("title") != title);
33
      }
34
   }
35
}
36
 
37
/**
38
 *  Sets a new stylesheet for a single document.
39
 */
40
function setStyleSheetForDocument(title)
41
{
42
   var i, num, a, main;
43
   for(i=0; (a = top.document.getElementsByTagName("link")[i]); i++) {
44
      if(a.getAttribute("rel").indexOf("style") != -1
45
         && a.getAttribute("title")) {
46
         a.disabled = true;
47
         a.disabled = (a.getAttribute("title") != title);
48
      }
49
   }
50
}
51
 
52
/**
53
 *  Sets a new stylesheets for all frames.
54
 */
55
function setStyleSheet(title)
56
{
57
   var i, num, a, main;
58
   num = top.frames.length;
59
   if (num > 0) {
60
      for (i=0; i<num; i++) {
61
         setStyleSheetForFrame(title, top.frames[i].name);
62
      }
63
   }
64
   else {
65
      setStyleSheetForDocument(title);
66
   }
67
   top.selectedSheet = title;
68
   return false;
69
}
70
 
71
/**
72
 *  Returns the title of the set of stylesheets that is active in the
73
 *  given frame.
74
 */
75
function getActiveStylesheetTitle(frame)
76
{
77
   for(i=0; (a = frame.document.getElementsByTagName("link")[i]); i++) {
78
      if(a.getAttribute("rel").indexOf("style") != -1
79
         && a.getAttribute("title")) {
80
         if (!a.disabled) {
81
            return a.getAttribute("title");
82
         }
83
      }
84
   }
85
   return "";
86
}
87
 
88
/**
89
 *  Invoked when a page in the main content frame has been loaded.
90
 */
91
function contentPageLoaded(title)
92
{
93
   if (title) {
94
      top.document.title = title;
95
   }
96
   /** 20050204: removed since there is only one stylesheet at the time
97
   if (top.frames.length > 0) {
98
      setStyleSheet(getActiveStylesheetTitle(top.frames.packages), "content");
99
   }
100
   else if (top.selectedSheet) {
101
      setStyleSheet(top.selectedSheet, "content");
102
   }
103
   **/
104
}
105
 
106
/**
107
 *  Invoked when a page in one of the two frames on the left hand has
108
 *  been loaded.
109
 */
110
function secondaryPageLoaded(frame_name)
111
{
112
   /** 20050204: removed since there is only one stylesheet at the time
113
   setStyleSheet(getActiveStylesheetTitle(top.frames.packages), frame_name);
114
   **/
115
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.