/[suikacvs]/www/2005/object-viewer/tree.html
Suika

Contents of /www/2005/object-viewer/tree.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Sun Apr 24 07:58:59 2005 UTC (19 years, 7 months ago) by wakaba
Branch: MAIN
File MIME type: text/html
New

1 wakaba 1.1 <!DOCTYPE html SYSTEM>
2     <html xmlns="http://www.w3.org/1999/xhtml">
3     <head>
4     <title lang="en">Object Viewer</title>
5     <style type="text/css" media="all">
6     body {
7     line-height: 2.0;
8     }
9    
10     code, pre {
11     font-size: 100%;
12     }
13    
14     .attribute-name {
15     width: 10em;
16     color: green;
17     font-family: "Courier New", "Courier", monospace;
18     }
19    
20     .attribute-value {
21     display: inline;
22     height: 2em;
23     border-left: 1px #C0C0C0 solid;
24     border-right: 1px #C0C0C0 solid;
25     padding-left: 0.2em;
26     padding-right: 0.2em;
27     overflow: auto;
28     }
29    
30     .boolean {
31     list-style-image: url(http://suika.fam.cx/icons/pie4);
32     }
33     .number {
34     list-style-image: url(http://suika.fam.cx/icons/binary);
35     }
36     .string {
37     list-style-image: url(http://suika.fam.cx/icons/text);
38     }
39     .function {
40     list-style-image: url(http://suika.fam.cx/icons/link);
41     }
42     .object {
43     list-style-image: url(http://suika.fam.cx/icons/sphere2);
44     }
45     .open {
46     list-style-image: url(http://suika.fam.cx/icons/sphere1);
47     }
48     .undefined {
49     list-style-image: url(http://suika.fam.cx/icons/unknown);
50     }
51     .error {
52     list-style-image: url(http://suika.fam.cx/icons/bomb);
53     }
54    
55     </style>
56     </head>
57     <body>
58     <h1 lang="en">Object Viewer</h1>
59    
60     <div id="documentObjectViewerContainer">
61     <button lang="en" onclick="
62     var list = document.getElementById ('documentObjectViewerList');
63     list.innerHTML = '';
64     expandChild (list, 'parent.contentFrame');
65     ">Reconstruct</button>
66    
67     <div id="documentObjectViewerList"></div>
68    
69     <script type="text/javascript">
70     function changeState (parentElement, varName) {
71     var ul = parentElement.getElementsByTagName ('ul')[0];
72     if (ul) {
73     parentElement.removeChild (ul);
74     parentElement.className = parentElement.className.replace (/\bopen\b/, 'close');
75     } else {
76     expandChild (parentElement, varName);
77     parentElement.className = parentElement.className.replace (/\bclose\b/, 'open');
78     }
79     }
80    
81     function expandChild (parentElement, varName) {
82     var list = document.createElement ('ul');
83     parentElement.appendChild (list);
84     for (var a in eval(varName)) {
85     var af = varName + "['" + a.replace (/([\\'])/, '\\$1') + "']";
86     appendItem (list, a, af);
87     }
88     }
89     function appendItem (list, a, af) {
90     var li = list.appendChild (document.createElement ('li'));
91     var attrname = li.appendChild (document.createElement ('code'));
92     attrname.className = 'attribute-name';
93     attrname.appendChild (document.createTextNode (a));
94     attrname.onclick = new Function ('changeState (this.parentNode, "' +
95     af.replace (/([\\"])/, '\\$1') + '")');
96     try {
97     li.className = 'close ' + typeof eval (af);
98     } catch (e) {
99     li.className = 'close error';
100     }
101     li.appendChild (document.createTextNode (' '));
102     var attrval = li.appendChild (document.createElement ('pre'));
103     attrval.className = 'attribute-value';
104     try {
105     attrval.appendChild (document.createTextNode (eval (af)));
106     } catch (e) {
107     }
108     }
109    
110     function init () {
111     expandChild (document.getElementById ('documentObjectViewerList'),
112     'parent.contentFrame');
113     }
114     </script>
115     </div>
116    
117     </body>
118     </html>
119    
120     <!-- Revision: $Date: 2005/03/13 10:24:13 $ -->
121    
122     <!-- ***** BEGIN LICENSE BLOCK *****
123     - Version: MPL 1.1/GPL 2.0/LGPL 2.1
124     -
125     - The contents of this file are subject to the Mozilla Public License Version
126     - 1.1 (the "License"); you may not use this file except in compliance with
127     - the License. You may obtain a copy of the License at
128     - <http://www.mozilla.org/MPL/>
129     -
130     - Software distributed under the License is distributed on an "AS IS" basis,
131     - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
132     - for the specific language governing rights and limitations under the
133     - License.
134     -
135     - The Original Code is Object Viewer code.
136     -
137     - The Initial Developer of the Original Code is Wakaba.
138     - Portions created by the Initial Developer are Copyright (C) 2005
139     - the Initial Developer. All Rights Reserved.
140     -
141     - Contributor(s):
142     - Wakaba <w@suika.fam.cx>
143     -
144     - Alternatively, the contents of this file may be used under the terms of
145     - either the GNU General Public License Version 2 or later (the "GPL"), or
146     - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
147     - in which case the provisions of the GPL or the LGPL are applicable instead
148     - of those above. If you wish to allow use of your version of this file only
149     - under the terms of either the GPL or the LGPL, and not to allow others to
150     - use your version of this file under the terms of the MPL, indicate your
151     - decision by deleting the provisions above and replace them with the notice
152     - and other provisions required by the LGPL or the GPL. If you do not delete
153     - the provisions above, a recipient may use your version of this file under
154     - the terms of any one of the MPL, the GPL or the LGPL.
155     -
156     - ***** END LICENSE BLOCK ***** -->

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24