allison 2.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +1 -0
- data/CHANGELOG +12 -0
- data/LICENSE +184 -0
- data/Manifest +23 -0
- data/README +66 -0
- data/allison.gemspec +45 -0
- data/bin/allison +9 -0
- data/cache/BODY +571 -0
- data/cache/CLASS_INDEX +4 -0
- data/cache/CLASS_PAGE +1 -0
- data/cache/FILE_INDEX +4 -0
- data/cache/FILE_PAGE +1 -0
- data/cache/FONTS +1 -0
- data/cache/FR_INDEX_BODY +1 -0
- data/cache/INDEX +1 -0
- data/cache/JAVASCRIPT +317 -0
- data/cache/METHOD_INDEX +4 -0
- data/cache/METHOD_LIST +1 -0
- data/cache/PROJECT +1 -0
- data/cache/SRC_PAGE +1 -0
- data/cache/STYLE +321 -0
- data/contrib/Rakefile +147 -0
- data/lib/allison.css +315 -0
- data/lib/allison.js +317 -0
- data/lib/allison.rb +281 -0
- metadata +97 -0
- metadata.gz.sig +3 -0
data.tar.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
�<�4+�_�J��
|
data/CHANGELOG
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
Academic Free License (AFL) v. 3.0
|
2
|
+
|
3
|
+
This Academic Free License (the "License") applies to any original work
|
4
|
+
of authorship (the "Original Work") whose owner (the "Licensor") has
|
5
|
+
placed the following licensing notice adjacent to the copyright notice
|
6
|
+
for the Original Work:
|
7
|
+
|
8
|
+
Licensed under the Academic Free License version 3.0
|
9
|
+
|
10
|
+
1) Grant of Copyright License. Licensor grants You a worldwide,
|
11
|
+
royalty-free, non-exclusive, sublicensable license, for the duration of
|
12
|
+
the copyright, to do the following:
|
13
|
+
|
14
|
+
a) to reproduce the Original Work in copies, either alone or as part of
|
15
|
+
a collective work;
|
16
|
+
|
17
|
+
b) to translate, adapt, alter, transform, modify, or arrange the
|
18
|
+
Original Work, thereby creating derivative works ("Derivative Works")
|
19
|
+
based upon the Original Work;
|
20
|
+
|
21
|
+
c) to distribute or communicate copies of the Original Work and
|
22
|
+
Derivative Works to the public, under any license of your choice that
|
23
|
+
does not contradict the terms and conditions, including Licensor's
|
24
|
+
reserved rights and remedies, in this Academic Free License;
|
25
|
+
|
26
|
+
d) to perform the Original Work publicly; and
|
27
|
+
|
28
|
+
e) to display the Original Work publicly.
|
29
|
+
|
30
|
+
2) Grant of Patent License. Licensor grants You a worldwide,
|
31
|
+
royalty-free, non-exclusive, sublicensable license, under patent claims
|
32
|
+
owned or controlled by the Licensor that are embodied in the Original
|
33
|
+
Work as furnished by the Licensor, for the duration of the patents, to
|
34
|
+
make, use, sell, offer for sale, have made, and import the Original Work
|
35
|
+
and Derivative Works.
|
36
|
+
|
37
|
+
3) Grant of Source Code License. The term "Source Code" means the
|
38
|
+
preferred form of the Original Work for making modifications to it and
|
39
|
+
all available documentation describing how to modify the Original Work.
|
40
|
+
Licensor agrees to provide a machine-readable copy of the Source Code of
|
41
|
+
the Original Work along with each copy of the Original Work that
|
42
|
+
Licensor distributes. Licensor reserves the right to satisfy this
|
43
|
+
obligation by placing a machine-readable copy of the Source Code in an
|
44
|
+
information repository reasonably calculated to permit inexpensive and
|
45
|
+
convenient access by You for as long as Licensor continues to distribute
|
46
|
+
the Original Work.
|
47
|
+
|
48
|
+
4) Exclusions From License Grant. Neither the names of Licensor, nor the
|
49
|
+
names of any contributors to the Original Work, nor any of their
|
50
|
+
trademarks or service marks, may be used to endorse or promote products
|
51
|
+
derived from this Original Work without express prior permission of the
|
52
|
+
Licensor. Except as expressly stated herein, nothing in this License
|
53
|
+
grants any license to Licensor's trademarks, copyrights, patents, trade
|
54
|
+
secrets or any other intellectual property. No patent license is granted
|
55
|
+
to make, use, sell, offer for sale, have made, or import embodiments of
|
56
|
+
any patent claims other than the licensed claims defined in Section 2.
|
57
|
+
No license is granted to the trademarks of Licensor even if such marks
|
58
|
+
are included in the Original Work. Nothing in this License shall be
|
59
|
+
interpreted to prohibit Licensor from licensing under terms different
|
60
|
+
from this License any Original Work that Licensor otherwise would have a
|
61
|
+
right to license.
|
62
|
+
|
63
|
+
5) External Deployment. The term "External Deployment" means the use,
|
64
|
+
distribution, or communication of the Original Work or Derivative Works
|
65
|
+
in any way such that the Original Work or Derivative Works may be used
|
66
|
+
by anyone other than You, whether those works are distributed or
|
67
|
+
communicated to those persons or made available as an application
|
68
|
+
intended for use over a network. As an express condition for the grants
|
69
|
+
of license hereunder, You must treat any External Deployment by You of
|
70
|
+
the Original Work or a Derivative Work as a distribution under section
|
71
|
+
1(c).
|
72
|
+
|
73
|
+
6) Attribution Rights. You must retain, in the Source Code of any
|
74
|
+
Derivative Works that You create, all copyright, patent, or trademark
|
75
|
+
notices from the Source Code of the Original Work, as well as any
|
76
|
+
notices of licensing and any descriptive text identified therein as an
|
77
|
+
"Attribution Notice." You must cause the Source Code for any Derivative
|
78
|
+
Works that You create to carry a prominent Attribution Notice reasonably
|
79
|
+
calculated to inform recipients that You have modified the Original
|
80
|
+
Work.
|
81
|
+
|
82
|
+
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants
|
83
|
+
that the copyright in and to the Original Work and the patent rights
|
84
|
+
granted herein by Licensor are owned by the Licensor or are sublicensed
|
85
|
+
to You under the terms of this License with the permission of the
|
86
|
+
contributor(s) of those copyrights and patent rights. Except as
|
87
|
+
expressly stated in the immediately preceding sentence, the Original
|
88
|
+
Work is provided under this License on an "AS IS" BASIS and WITHOUT
|
89
|
+
WARRANTY, either express or implied, including, without limitation, the
|
90
|
+
warranties of non-infringement, merchantability or fitness for a
|
91
|
+
particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
|
92
|
+
WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential
|
93
|
+
part of this License. No license to the Original Work is granted by this
|
94
|
+
License except under this disclaimer.
|
95
|
+
|
96
|
+
8) Limitation of Liability. Under no circumstances and under no legal
|
97
|
+
theory, whether in tort (including negligence), contract, or otherwise,
|
98
|
+
shall the Licensor be liable to anyone for any indirect, special,
|
99
|
+
incidental, or consequential damages of any character arising as a
|
100
|
+
result of this License or the use of the Original Work including,
|
101
|
+
without limitation, damages for loss of goodwill, work stoppage,
|
102
|
+
computer failure or malfunction, or any and all other commercial damages
|
103
|
+
or losses. This limitation of liability shall not apply to the extent
|
104
|
+
applicable law prohibits such limitation.
|
105
|
+
|
106
|
+
9) Acceptance and Termination. If, at any time, You expressly assented
|
107
|
+
to this License, that assent indicates your clear and irrevocable
|
108
|
+
acceptance of this License and all of its terms and conditions. If You
|
109
|
+
distribute or communicate copies of the Original Work or a Derivative
|
110
|
+
Work, You must make a reasonable effort under the circumstances to
|
111
|
+
obtain the express assent of recipients to the terms of this License.
|
112
|
+
This License conditions your rights to undertake the activities listed
|
113
|
+
in Section 1, including your right to create Derivative Works based upon
|
114
|
+
the Original Work, and doing so without honoring these terms and
|
115
|
+
conditions is prohibited by copyright law and international treaty.
|
116
|
+
Nothing in this License is intended to affect copyright exceptions and
|
117
|
+
limitations (including "fair use" or "fair dealing"). This License shall
|
118
|
+
terminate immediately and You may no longer exercise any of the rights
|
119
|
+
granted to You by this License upon your failure to honor the conditions
|
120
|
+
in Section 1(c).
|
121
|
+
|
122
|
+
10) Termination for Patent Action. This License shall terminate
|
123
|
+
automatically and You may no longer exercise any of the rights granted
|
124
|
+
to You by this License as of the date You commence an action, including
|
125
|
+
a cross-claim or counterclaim, against Licensor or any licensee alleging
|
126
|
+
that the Original Work infringes a patent. This termination provision
|
127
|
+
shall not apply for an action alleging patent infringement by
|
128
|
+
combinations of the Original Work with other software or hardware.
|
129
|
+
|
130
|
+
11) Jurisdiction, Venue and Governing Law. Any action or suit relating
|
131
|
+
to this License may be brought only in the courts of a jurisdiction
|
132
|
+
wherein the Licensor resides or in which Licensor conducts its primary
|
133
|
+
business, and under the laws of that jurisdiction excluding its
|
134
|
+
conflict-of-law provisions. The application of the United Nations
|
135
|
+
Convention on Contracts for the International Sale of Goods is expressly
|
136
|
+
excluded. Any use of the Original Work outside the scope of this License
|
137
|
+
or after its termination shall be subject to the requirements and
|
138
|
+
penalties of copyright or patent law in the appropriate jurisdiction.
|
139
|
+
This section shall survive the termination of this License.
|
140
|
+
|
141
|
+
12) Attorneys' Fees. In any action to enforce the terms of this License
|
142
|
+
or seeking damages relating thereto, the prevailing party shall be
|
143
|
+
entitled to recover its costs and expenses, including, without
|
144
|
+
limitation, reasonable attorneys' fees and costs incurred in connection
|
145
|
+
with such action, including any appeal of such action. This section
|
146
|
+
shall survive the termination of this License.
|
147
|
+
|
148
|
+
13) Miscellaneous. If any provision of this License is held to be
|
149
|
+
unenforceable, such provision shall be reformed only to the extent
|
150
|
+
necessary to make it enforceable.
|
151
|
+
|
152
|
+
14) Definition of "You" in This License. "You" throughout this License,
|
153
|
+
whether in upper or lower case, means an individual or a legal entity
|
154
|
+
exercising rights under, and complying with all of the terms of, this
|
155
|
+
License. For legal entities, "You" includes any entity that controls, is
|
156
|
+
controlled by, or is under common control with you. For purposes of this
|
157
|
+
definition, "control" means (i) the power, direct or indirect, to cause
|
158
|
+
the direction or management of such entity, whether by contract or
|
159
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
160
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
161
|
+
|
162
|
+
15) Right to Use. You may use the Original Work in all ways not
|
163
|
+
otherwise restricted or conditioned by this License or by law, and
|
164
|
+
Licensor promises not to interfere with or be responsible for such uses
|
165
|
+
by You.
|
166
|
+
|
167
|
+
16) Modification of This License. This License is Copyright (c) 2005
|
168
|
+
Lawrence Rosen. Permission is granted to copy, distribute, or
|
169
|
+
communicate this License without modification. Nothing in this License
|
170
|
+
permits You to modify this License as applied to the Original Work or to
|
171
|
+
Derivative Works. However, You may modify the text of this License and
|
172
|
+
copy, distribute or communicate your modified version (the "Modified
|
173
|
+
License") and apply it to other original works of authorship subject to
|
174
|
+
the following conditions: (i) You may not indicate in any way that your
|
175
|
+
Modified License is the "Academic Free License" or "AFL" and you may not
|
176
|
+
use those names in the name of your Modified License; (ii) You must
|
177
|
+
replace the notice specified in the first paragraph above with the
|
178
|
+
notice "Licensed under <insert your license name here>" or with a notice
|
179
|
+
of your own that is not confusingly similar to the notice in this
|
180
|
+
License; and (iii) You may not claim that your original works are open
|
181
|
+
source software unless your Modified License has been approved by Open
|
182
|
+
Source Initiative (OSI) and You comply with its license review and
|
183
|
+
certification process.
|
184
|
+
|
data/Manifest
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
bin/allison
|
2
|
+
cache/BODY
|
3
|
+
cache/CLASS_INDEX
|
4
|
+
cache/CLASS_PAGE
|
5
|
+
cache/FILE_INDEX
|
6
|
+
cache/FILE_PAGE
|
7
|
+
cache/FONTS
|
8
|
+
cache/FR_INDEX_BODY
|
9
|
+
cache/INDEX
|
10
|
+
cache/JAVASCRIPT
|
11
|
+
cache/METHOD_INDEX
|
12
|
+
cache/METHOD_LIST
|
13
|
+
cache/PROJECT
|
14
|
+
cache/SRC_PAGE
|
15
|
+
cache/STYLE
|
16
|
+
CHANGELOG
|
17
|
+
contrib/Rakefile
|
18
|
+
lib/allison.css
|
19
|
+
lib/allison.js
|
20
|
+
lib/allison.rb
|
21
|
+
LICENSE
|
22
|
+
Manifest
|
23
|
+
README
|
data/README
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
|
2
|
+
Allison
|
3
|
+
|
4
|
+
A modern, pretty RDoc template.
|
5
|
+
|
6
|
+
== License
|
7
|
+
|
8
|
+
Copyright 2007 Cloudburst, LLC. See included LICENSE file.
|
9
|
+
|
10
|
+
The public certificate for this gem is at http://rubyforge.org/frs/download.php/25331/evan_weaver-original-public_cert.pem.
|
11
|
+
|
12
|
+
== Installation
|
13
|
+
|
14
|
+
sudo gem install allison
|
15
|
+
|
16
|
+
== Usage
|
17
|
+
|
18
|
+
To use the template, just run <tt>allison</tt> with your normal RDoc options. For example:
|
19
|
+
|
20
|
+
$ allison --title 'My RDoc' --line-numbers --main README --promiscuous *
|
21
|
+
|
22
|
+
Note that some options like <tt>--one-file</tt> and <tt>--diagram</tt> might not work well.
|
23
|
+
|
24
|
+
= Extras
|
25
|
+
|
26
|
+
== Rake task
|
27
|
+
|
28
|
+
You can set up a Rake task if you want. First, find the path to your local machine's template by running <tt>allison --path</tt>. Then add something like the following to your <tt>Rakefile</tt>:
|
29
|
+
|
30
|
+
require 'rake/rdoctask'
|
31
|
+
|
32
|
+
Rake::RDocTask.new do |rdoc|
|
33
|
+
files = ['README', 'LICENSE', 'CHANGELOG',
|
34
|
+
'lib/**/*.rb', 'doc/**/*.rdoc', 'test/*.rb']
|
35
|
+
rdoc.rdoc_files.add(files)
|
36
|
+
rdoc.main = 'README'
|
37
|
+
rdoc.title = 'My RDoc'
|
38
|
+
rdoc.template = '/path/to/gems/allison-2.0/lib/allison'
|
39
|
+
rdoc.rdoc_dir = 'doc'
|
40
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
41
|
+
end
|
42
|
+
|
43
|
+
Now you can run <tt>rake rdoc</tt> to invoke the task.
|
44
|
+
|
45
|
+
== Sample
|
46
|
+
|
47
|
+
http://blog.evanweaver.com/files/allison_release.png
|
48
|
+
|
49
|
+
== Generating documentation for Rails
|
50
|
+
|
51
|
+
If you want to generate documentation for Ruby on Rails, there is a handy trick. Rails’ RDoc tasks obey the <tt>template</tt> environment variable. For instance, to document ActiveRecord, run:
|
52
|
+
|
53
|
+
cd vendor/rails/activerecord/
|
54
|
+
template=`allison --path` rake rerdoc
|
55
|
+
|
56
|
+
== Reporting problems
|
57
|
+
|
58
|
+
* http://rubyforge.org/forum/forum.php?forum_id=16451
|
59
|
+
|
60
|
+
Patches and contributions are very welcome. Please note that contributors are required to assign copyright for their additions to Cloudburst, LLC.
|
61
|
+
|
62
|
+
== Further resources
|
63
|
+
|
64
|
+
* http://blog.evanweaver.com/articles/2007/11/08/usability-redesign-for-the-allison-template
|
65
|
+
* http://blog.evanweaver.com/articles/2006/11/15/allison-released
|
66
|
+
* http://blog.evanweaver.com/articles/2006/11/12/allison-an-rdoc-template
|
data/allison.gemspec
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
|
2
|
+
# Gem::Specification for Allison-2.0
|
3
|
+
# Originally generated by Echoe
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = %q{allison}
|
7
|
+
s.version = "2.0"
|
8
|
+
|
9
|
+
s.specification_version = 2 if s.respond_to? :specification_version=
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.authors = ["Evan Weaver"]
|
13
|
+
s.date = %q{2007-11-08}
|
14
|
+
s.default_executable = %q{allison}
|
15
|
+
s.description = %q{A modern, pretty RDoc template.}
|
16
|
+
s.email = %q{}
|
17
|
+
s.executables = ["allison"]
|
18
|
+
s.files = ["bin/allison", "cache/BODY", "cache/CLASS_INDEX", "cache/CLASS_PAGE", "cache/FILE_INDEX", "cache/FILE_PAGE", "cache/FONTS", "cache/FR_INDEX_BODY", "cache/INDEX", "cache/JAVASCRIPT", "cache/METHOD_INDEX", "cache/METHOD_LIST", "cache/PROJECT", "cache/SRC_PAGE", "cache/STYLE", "CHANGELOG", "contrib/Rakefile", "lib/allison.css", "lib/allison.js", "lib/allison.rb", "LICENSE", "Manifest", "README", "allison.gemspec"]
|
19
|
+
s.has_rdoc = true
|
20
|
+
s.homepage = %q{http://blog.evanweaver.com/pages/code#allison}
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
s.rubyforge_project = %q{fauna}
|
23
|
+
s.rubygems_version = %q{0.9.4.5}
|
24
|
+
s.summary = %q{A modern, pretty RDoc template.}
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
# # Original Rakefile source (requires the Echoe gem):
|
29
|
+
#
|
30
|
+
#
|
31
|
+
# require 'rubygems'
|
32
|
+
# require 'echoe'
|
33
|
+
#
|
34
|
+
# Echoe.new('allison') do |p|
|
35
|
+
# p.project = 'fauna'
|
36
|
+
# p.author = 'Evan Weaver'
|
37
|
+
# p.summary = 'A modern, pretty RDoc template.'
|
38
|
+
# p.url = 'http://blog.evanweaver.com/pages/code#allison'
|
39
|
+
# p.docs_host = 'blog.evanweaver.com:~/www/bax/public/files/doc/'
|
40
|
+
# p.rdoc_pattern = /\.rb|^README|^CHANGELOG|^TODO|^LICENSE$/
|
41
|
+
# p.clean_pattern = /^doc|^pkg/
|
42
|
+
# p.rdoc_template = File.expand_path(File.dirname(__FILE__) + "/lib/allison")
|
43
|
+
# end
|
44
|
+
#
|
45
|
+
# task :"cache/BODY" => [:clean, :doc] # Rebuild the cache before packaging
|
data/bin/allison
ADDED
data/cache/BODY
ADDED
@@ -0,0 +1,571 @@
|
|
1
|
+
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>%title%</title><link type="text/css" href="%style_url%" rel="stylesheet" media="screen"/><script type="text/javascript">
|
2
|
+
// Allison 3 template
|
3
|
+
// Copyright 2007 Cloudburst LLC, all rights reserved
|
4
|
+
// Redistribution or modification prohibited
|
5
|
+
|
6
|
+
var href_base = '%style_url%'.replace(/(.*\/).*/, '$1'); // inline js is good for something
|
7
|
+
|
8
|
+
function $(id) {
|
9
|
+
if (document.getElementById)
|
10
|
+
elem = document.getElementById(id);
|
11
|
+
else if ( document.all )
|
12
|
+
elem = eval("document.all." + id);
|
13
|
+
else
|
14
|
+
return false;
|
15
|
+
return elem;
|
16
|
+
}
|
17
|
+
|
18
|
+
function toggle(id) {
|
19
|
+
elem = $(id);
|
20
|
+
elemStyle = elem.style;
|
21
|
+
if (elemStyle.display == "block") {
|
22
|
+
elemStyle.display = "none"
|
23
|
+
} else {
|
24
|
+
elemStyle.display = "block"
|
25
|
+
}
|
26
|
+
return true;
|
27
|
+
}
|
28
|
+
|
29
|
+
function toggleText(id) {
|
30
|
+
elem = $(id)
|
31
|
+
if (m = elem.innerHTML.match(/(Hide)(.*)/)) {
|
32
|
+
elem.innerHTML = "Show" + m[2];
|
33
|
+
} else if (m = elem.innerHTML.match(/(Show)(.*)/)) {
|
34
|
+
elem.innerHTML = "Hide" + m[2];
|
35
|
+
}
|
36
|
+
return true;
|
37
|
+
}
|
38
|
+
|
39
|
+
function span(s, klass) {
|
40
|
+
return '<span class="' + klass + '">' + s + '</span>';
|
41
|
+
}
|
42
|
+
|
43
|
+
function highlightSymbols() {
|
44
|
+
pres = document.getElementsByTagName('pre');
|
45
|
+
for(var i = 0; i < pres.length; i++) {
|
46
|
+
pre = pres[i];
|
47
|
+
spans = pre.getElementsByTagName('span');
|
48
|
+
for(var k = 0; k < spans.length; k++) {
|
49
|
+
span = spans[k];
|
50
|
+
if (span.className.match(/ruby-identifier/)) {
|
51
|
+
if (span.innerHTML.match(/^:/)) {
|
52
|
+
span.className += " ruby-symbol";
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
function hasClass(obj) {
|
60
|
+
var result = false;
|
61
|
+
if (obj.getAttributeNode("class") != null) {
|
62
|
+
result = obj.getAttributeNode("class").value;
|
63
|
+
}
|
64
|
+
return result;
|
65
|
+
}
|
66
|
+
|
67
|
+
function stripe() {
|
68
|
+
var even = true;
|
69
|
+
var color = "#e4ebed";
|
70
|
+
var tables = document.getElementsByTagName('table');
|
71
|
+
if (tables.length == 0) { return; }
|
72
|
+
for (var h = 0; h < tables.length; h++) {
|
73
|
+
var trs = tables[h].getElementsByTagName("tr");
|
74
|
+
for (var i = 0; i < trs.length; i++) {
|
75
|
+
var tds = trs[i].getElementsByTagName("td");
|
76
|
+
for (var j = 0; j < tds.length; j++) {
|
77
|
+
if (hasClass(tds[j]) != "first") {
|
78
|
+
var mytd = tds[j];
|
79
|
+
if (even) {
|
80
|
+
mytd.style.backgroundColor = color;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
even = ! even;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
function ajaxGet(url) {
|
90
|
+
url = (href_base + url).replace('/./', '/')
|
91
|
+
var req = false;
|
92
|
+
|
93
|
+
if (window.ActiveXObject) {
|
94
|
+
try {
|
95
|
+
// stupid hack because IE7 disables local Ajax with the native xmlhttprequest object
|
96
|
+
// for security purposes. Yet ActiveX still works. Thanks, Microsoft. I hate you. Die.
|
97
|
+
req = new ActiveXObject("MSXML2.XMLHTTP.3.0");
|
98
|
+
} catch (e) {
|
99
|
+
try {
|
100
|
+
/* IE 6 and maybe 5, don't know, don't care */
|
101
|
+
req = new ActiveXObject("Msxml2.XMLHTTP");
|
102
|
+
} catch (e) {
|
103
|
+
try {
|
104
|
+
req = new ActiveXObject("Microsoft.XMLHTTP");
|
105
|
+
} catch (e) {
|
106
|
+
req = false;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
/* real browsers */
|
113
|
+
if (!req && window.XMLHttpRequest) {
|
114
|
+
try {
|
115
|
+
req = new XMLHttpRequest();
|
116
|
+
} catch (e) {
|
117
|
+
req = false;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
if (req) {
|
122
|
+
req.open('GET', url, false);
|
123
|
+
req.send(null);
|
124
|
+
return req.responseText;
|
125
|
+
} else {
|
126
|
+
return "Ajax error";
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
|
131
|
+
function addEvent(elm, evType, fn, useCapture) {
|
132
|
+
if (elm.addEventListener) {
|
133
|
+
elm.addEventListener(evType, fn, useCapture);
|
134
|
+
return true;
|
135
|
+
} else if (elm.attachEvent) {
|
136
|
+
var r = elm.attachEvent('on' + evType, fn);
|
137
|
+
return r;
|
138
|
+
} else {
|
139
|
+
elm['on' + evType] = fn;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
function insertIndices() {
|
144
|
+
pages = ["class", "file", "method"]
|
145
|
+
for (x in pages) {
|
146
|
+
$(pages[x]).innerHTML += ajaxGet('fr_' + pages[x] + '_index.html').replace(/(href=")/g, '$1' + href_base);
|
147
|
+
}
|
148
|
+
/* mouseoverify method links */
|
149
|
+
links = $('method').getElementsByTagName('a');
|
150
|
+
for (var x = 0; x < links.length; x++) {
|
151
|
+
if (m = links[x].innerHTML.match(/(.*)\s\((.*)\)/)) {
|
152
|
+
links[x].innerHTML = m[1] + '<br>';
|
153
|
+
links[x].title = m[2];
|
154
|
+
}
|
155
|
+
}
|
156
|
+
/* this is stupid */
|
157
|
+
$('class').style.display = "block";
|
158
|
+
$('file').style.display = "block";
|
159
|
+
|
160
|
+
/* has to be here because IE7 does not guarantee the onLoad callback order */
|
161
|
+
abbreviateIndicesInner(["class", "file"], 25, "a");
|
162
|
+
/* same, linkTitle() depends on the class link list */
|
163
|
+
linkTitle();
|
164
|
+
}
|
165
|
+
|
166
|
+
function abbreviateIndices() {
|
167
|
+
var ids = ["defined_in", "child_of", "includes", "requires", "method", "methods"];
|
168
|
+
abbreviateIndicesInner(ids, 25, 'a');
|
169
|
+
abbreviateIndicesInner(ids, 25, 'span');
|
170
|
+
}
|
171
|
+
|
172
|
+
function abbreviateIndicesInner(indices, amount, tag) {
|
173
|
+
for (var x = 0; x < indices.length; x++) {
|
174
|
+
var the_index = $(indices[x]);
|
175
|
+
if (the_index) {
|
176
|
+
links = the_index.getElementsByTagName(tag);
|
177
|
+
for (var y = 0; y < links.length; y++) {
|
178
|
+
var link = links[y];
|
179
|
+
if (link.getElementsByTagName('span').length == 0 && link.getElementsByTagName('a').length == 0) {
|
180
|
+
// avoid nesting
|
181
|
+
link.innerHTML = link.innerHTML.replace(/<br>|\n/gi, '');
|
182
|
+
link.title = link.innerHTML;
|
183
|
+
link.innerHTML = abbreviate(link.innerHTML, amount) + '<br>';
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
function linkTitle() {
|
191
|
+
|
192
|
+
/* grab the correct title element from the index */
|
193
|
+
var index_page = ajaxGet('index.html');
|
194
|
+
title_text = index_page.match(/<title>(.*)<\/title>/m)[1];
|
195
|
+
document.title = title_text + " - " + document.title;
|
196
|
+
var p = $('header').getElementsByTagName('p')[0]
|
197
|
+
if (p.innerHTML.match(/^\s*$/)) {
|
198
|
+
p.innerHTML = title_text;
|
199
|
+
} else {
|
200
|
+
p.innerHTML = title_text + ": " + p.innerHTML;
|
201
|
+
}
|
202
|
+
|
203
|
+
/* set the link properly */
|
204
|
+
title_link = index_page.match(/<a\s+href="(.*?)"/)[1];
|
205
|
+
var element = $('title');
|
206
|
+
var item_type = "";
|
207
|
+
var item_name = "";
|
208
|
+
if (m = element.innerHTML.match(/(Class:|Module:|File:)\s*(.*)/)) {
|
209
|
+
item_type = m[1];
|
210
|
+
item_name = m[2];
|
211
|
+
} else {
|
212
|
+
item_name = element.innerHTML;
|
213
|
+
}
|
214
|
+
element.innerHTML = '<a href="' + href_base + title_link + '">' + item_type + " " + abbreviate(item_name, 45) + '</a>';
|
215
|
+
element.getElementsByTagName('a')[0].title = item_name
|
216
|
+
|
217
|
+
/* breadcrumb navigation */
|
218
|
+
items = item_name.split("::");
|
219
|
+
items_new = item_name.split("::");
|
220
|
+
file_links = $('class').getElementsByTagName('a');
|
221
|
+
for (var x = 0; x < items.length - 1; x++ ){
|
222
|
+
var item = items[x];
|
223
|
+
link = ("/classes/" + items.slice(0,x).join("/") + "/" + item + ".html").replace('//', '/');
|
224
|
+
regex = new RegExp(RegExp.escape(link) + '$');
|
225
|
+
for (var y = 0; y < file_links.length; y++) {
|
226
|
+
if (file_links[y].href.match(regex)) {
|
227
|
+
items_new[x] = '<a href="' + href_base + link + '">' + item + '</a>';
|
228
|
+
break;
|
229
|
+
}
|
230
|
+
}
|
231
|
+
}
|
232
|
+
$('item_name').innerHTML = item_type + ' ' + items_new.join(" :: ");
|
233
|
+
}
|
234
|
+
|
235
|
+
function abbreviate(s, size) {
|
236
|
+
while (s.length > size) {
|
237
|
+
var old_s = s;
|
238
|
+
s = s.replace(/\s|\n/mg, '');
|
239
|
+
s = s.replace(/([A-Z])[a-z]+/m, '$1');
|
240
|
+
if (!s || old_s == s) {
|
241
|
+
return "..." + s.substring(s.length - size, s.length);
|
242
|
+
}
|
243
|
+
}
|
244
|
+
return s;
|
245
|
+
}
|
246
|
+
|
247
|
+
function disableSubmit(event) {
|
248
|
+
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
249
|
+
if (keyCode == 13) {
|
250
|
+
return false;
|
251
|
+
} else {
|
252
|
+
return true;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
|
256
|
+
function filterList(id, s, event) {
|
257
|
+
|
258
|
+
/* some weak escaping */
|
259
|
+
s = s.replace(/[^\w\d\.\_\-\/\:\=\[\]\?\!]/g, '');
|
260
|
+
s = RegExp.escape(s);
|
261
|
+
|
262
|
+
var show_all = false;
|
263
|
+
if (s.match(/^\s*$/)) {
|
264
|
+
show_all = true;
|
265
|
+
}
|
266
|
+
|
267
|
+
links = $(id).getElementsByTagName('a')
|
268
|
+
regex = new RegExp(s, 'i');
|
269
|
+
|
270
|
+
for (var x = 0; x < links.length; x++) {
|
271
|
+
var link = links[x];
|
272
|
+
if (show_all) {
|
273
|
+
link.style.display = 'inline';
|
274
|
+
} else {
|
275
|
+
if (link.innerHTML.match(regex)) {
|
276
|
+
link.style.display = 'inline';
|
277
|
+
} else {
|
278
|
+
link.style.display = 'none';
|
279
|
+
}
|
280
|
+
}
|
281
|
+
}
|
282
|
+
return true;
|
283
|
+
}
|
284
|
+
|
285
|
+
RegExp.escape = function(text) {
|
286
|
+
if (!arguments.callee.sRE) {
|
287
|
+
var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\\\'];
|
288
|
+
arguments.callee.sRE = new RegExp(
|
289
|
+
'(\\\\' + specials.join('|\\\\') + ')', 'g'
|
290
|
+
);
|
291
|
+
}
|
292
|
+
return text.replace(arguments.callee.sRE, '\\\\$1');
|
293
|
+
}
|
294
|
+
|
295
|
+
function hacks() {
|
296
|
+
// show the spacer if necessary,
|
297
|
+
divs = document.getElementsByTagName('div');
|
298
|
+
for(var x = 0; x < divs.length; x++) {
|
299
|
+
if (divs[x].className && divs[x].className.match(/top/)) {
|
300
|
+
document.getElementById('spacer').style.display = 'block';
|
301
|
+
}
|
302
|
+
}
|
303
|
+
// remove extra colons from tables
|
304
|
+
tds = document.getElementsByTagName('td');
|
305
|
+
for(var x = 0; x < tds.length; x++) {
|
306
|
+
str = tds[x].innerHTML
|
307
|
+
if (str.charAt(str.length - 1) == ":") {
|
308
|
+
tds[x].innerHTML = str.slice(0, str.length - 1)
|
309
|
+
}
|
310
|
+
}
|
311
|
+
}
|
312
|
+
|
313
|
+
addEvent(window, 'load', insertIndices, false);
|
314
|
+
addEvent(window, 'load', abbreviateIndices, false);
|
315
|
+
addEvent(window, 'load', stripe, false);
|
316
|
+
addEvent(window, 'load', highlightSymbols, false);
|
317
|
+
addEvent(window, 'load', hacks, false);
|
318
|
+
</script></head><body><div id="container"><div class="curve" id="preheader_curve_0"></div><div class="curve" id="preheader_curve_1"></div><div class="curve" id="preheader_curve_2"></div><div class="curve" id="preheader_curve_3"></div><div class="curve" id="preheader_curve_4"></div><div class="curve" id="preheader_curve_5"></div><div id="header"><p>
|
319
|
+
IF:full_path
|
320
|
+
%full_path%
|
321
|
+
ENDIF:full_path
|
322
|
+
</p><span><h1 id="title">
|
323
|
+
IF:title
|
324
|
+
%title%
|
325
|
+
ENDIF:title
|
326
|
+
</h1></span>!INCLUDE!</div><div class="clear"></div><div id="left">
|
327
|
+
IF:parent
|
328
|
+
<div class="navigation darker top" id="child_of"><h3>Child of</h3><span>
|
329
|
+
|
330
|
+
IF:par_url
|
331
|
+
<a href='%par_url%'>
|
332
|
+
ENDIF:par_url
|
333
|
+
%parent%
|
334
|
+
IF:par_url
|
335
|
+
</a>
|
336
|
+
ENDIF:par_url
|
337
|
+
</span></div>
|
338
|
+
ENDIF:parent
|
339
|
+
|
340
|
+
IF:infiles
|
341
|
+
<div class="navigation darker top" id="defined_in"><h3>Defined in</h3>
|
342
|
+
START:infiles
|
343
|
+
|
344
|
+
IF:full_path_url
|
345
|
+
<a href="%full_path_url%">%full_path%</a>
|
346
|
+
ENDIF:full_path_url
|
347
|
+
|
348
|
+
END:infiles
|
349
|
+
</div>
|
350
|
+
ENDIF:infiles
|
351
|
+
|
352
|
+
IF:includes
|
353
|
+
<div class="navigation top" id="includes"><h3>Includes</h3>
|
354
|
+
START:includes
|
355
|
+
|
356
|
+
IF:name
|
357
|
+
|
358
|
+
IF:aref
|
359
|
+
<a href='%aref%'>
|
360
|
+
ENDIF:aref
|
361
|
+
%name%<br/>
|
362
|
+
IF:aref
|
363
|
+
</a>
|
364
|
+
ENDIF:aref
|
365
|
+
|
366
|
+
ENDIF:name
|
367
|
+
|
368
|
+
END:includes
|
369
|
+
</div>
|
370
|
+
ENDIF:includes
|
371
|
+
|
372
|
+
IF:requires
|
373
|
+
<div class="navigation top" id="requires"><h3>Requires</h3>
|
374
|
+
START:requires
|
375
|
+
|
376
|
+
IF:name
|
377
|
+
|
378
|
+
IF:aref
|
379
|
+
<a href='%aref%'>
|
380
|
+
ENDIF:aref
|
381
|
+
%name%<br/>
|
382
|
+
IF:aref
|
383
|
+
</a>
|
384
|
+
ENDIF:aref
|
385
|
+
|
386
|
+
ENDIF:name
|
387
|
+
|
388
|
+
END:requires
|
389
|
+
</div>
|
390
|
+
ENDIF:requires
|
391
|
+
|
392
|
+
IF:methods
|
393
|
+
<div class="navigation top" id="methods"><h3>Methods</h3>
|
394
|
+
START:methods
|
395
|
+
|
396
|
+
IF:name
|
397
|
+
|
398
|
+
IF:aref
|
399
|
+
<a href='%aref%'>
|
400
|
+
ENDIF:aref
|
401
|
+
%name%<br/>
|
402
|
+
IF:aref
|
403
|
+
</a>
|
404
|
+
ENDIF:aref
|
405
|
+
|
406
|
+
ENDIF:name
|
407
|
+
|
408
|
+
END:methods
|
409
|
+
</div>
|
410
|
+
ENDIF:methods
|
411
|
+
<div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a href="#" onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter: </label><input type="text" onKeyUp="return filterList('class', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_class"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a href="#" onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter: </label><input type="text" onKeyUp="return filterList('file', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_file"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a href="#" onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter: </label><input type="text" onKeyUp="return filterList('method', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_method"></input></form></div></div></div><div id="content">
|
412
|
+
IF:title
|
413
|
+
<h1 id="item_name">%title%</h1>
|
414
|
+
ENDIF:title
|
415
|
+
|
416
|
+
IF:description
|
417
|
+
<div id="description">%description%</div>
|
418
|
+
ENDIF:description
|
419
|
+
|
420
|
+
IF:sections
|
421
|
+
|
422
|
+
START:sections
|
423
|
+
|
424
|
+
IF:sectitle
|
425
|
+
<h1><a name="%secsequence%">%sectitle%</a></h1>
|
426
|
+
ENDIF:sectitle
|
427
|
+
|
428
|
+
IF:seccomment
|
429
|
+
<p>%seccomment%</p>
|
430
|
+
ENDIF:seccomment
|
431
|
+
|
432
|
+
IF:classlist
|
433
|
+
<h1>Child modules and classes</h1><p>%classlist%</p>
|
434
|
+
ENDIF:classlist
|
435
|
+
|
436
|
+
IF:constants
|
437
|
+
<h1>Constants</h1><p><table><tr><th>Name</th><th>Value</th></tr>
|
438
|
+
START:constants
|
439
|
+
<tr>
|
440
|
+
IF:name
|
441
|
+
<td class="highlight">%name%</td>
|
442
|
+
ENDIF:name
|
443
|
+
|
444
|
+
IF:value
|
445
|
+
<td class="normal">%value%</td>
|
446
|
+
ENDIF:value
|
447
|
+
|
448
|
+
IF:old_name
|
449
|
+
<td class="highlight">%old_name%</td>
|
450
|
+
ENDIF:old_name
|
451
|
+
|
452
|
+
IF:new_name
|
453
|
+
<td class="normal">%new_name%</td>
|
454
|
+
ENDIF:new_name
|
455
|
+
|
456
|
+
IF:rw
|
457
|
+
<td class="normal">%rw%</td>
|
458
|
+
ENDIF:rw
|
459
|
+
</tr>
|
460
|
+
END:constants
|
461
|
+
</table></p>
|
462
|
+
ENDIF:constants
|
463
|
+
|
464
|
+
IF:aliases
|
465
|
+
<h1>Aliases</h1><p><table><tr><th>Old name</th><th>New name</th></tr>
|
466
|
+
START:aliases
|
467
|
+
<tr>
|
468
|
+
IF:name
|
469
|
+
<td class="highlight">%name%</td>
|
470
|
+
ENDIF:name
|
471
|
+
|
472
|
+
IF:value
|
473
|
+
<td class="normal">%value%</td>
|
474
|
+
ENDIF:value
|
475
|
+
|
476
|
+
IF:old_name
|
477
|
+
<td class="highlight">%old_name%</td>
|
478
|
+
ENDIF:old_name
|
479
|
+
|
480
|
+
IF:new_name
|
481
|
+
<td class="normal">%new_name%</td>
|
482
|
+
ENDIF:new_name
|
483
|
+
|
484
|
+
IF:rw
|
485
|
+
<td class="normal">%rw%</td>
|
486
|
+
ENDIF:rw
|
487
|
+
</tr>
|
488
|
+
END:aliases
|
489
|
+
</table></p>
|
490
|
+
ENDIF:aliases
|
491
|
+
|
492
|
+
IF:attributes
|
493
|
+
<h1>Attributes</h1><p><table><tr><th>Name</th><th>Read/write?</th></tr>
|
494
|
+
START:attributes
|
495
|
+
<tr>
|
496
|
+
IF:name
|
497
|
+
<td class="highlight">%name%</td>
|
498
|
+
ENDIF:name
|
499
|
+
|
500
|
+
IF:value
|
501
|
+
<td class="normal">%value%</td>
|
502
|
+
ENDIF:value
|
503
|
+
|
504
|
+
IF:old_name
|
505
|
+
<td class="highlight">%old_name%</td>
|
506
|
+
ENDIF:old_name
|
507
|
+
|
508
|
+
IF:new_name
|
509
|
+
<td class="normal">%new_name%</td>
|
510
|
+
ENDIF:new_name
|
511
|
+
|
512
|
+
IF:rw
|
513
|
+
<td class="normal">%rw%</td>
|
514
|
+
ENDIF:rw
|
515
|
+
</tr>
|
516
|
+
END:attributes
|
517
|
+
</table></p>
|
518
|
+
ENDIF:attributes
|
519
|
+
|
520
|
+
IF:method_list
|
521
|
+
|
522
|
+
START:method_list
|
523
|
+
<h1>%type% %category% Methods</h1>
|
524
|
+
IF:methods
|
525
|
+
|
526
|
+
START:methods
|
527
|
+
|
528
|
+
IF:aref
|
529
|
+
<a class="small" name="%aref%"><br/></a>
|
530
|
+
ENDIF:aref
|
531
|
+
<div class="method_block"><h3>
|
532
|
+
IF:aref
|
533
|
+
<a href='#%aref%'>
|
534
|
+
ENDIF:aref
|
535
|
+
|
536
|
+
IF:callseq
|
537
|
+
%callseq%
|
538
|
+
ENDIF:callseq
|
539
|
+
|
540
|
+
IF:name
|
541
|
+
%name%
|
542
|
+
ENDIF:name
|
543
|
+
|
544
|
+
IF:params
|
545
|
+
%params%
|
546
|
+
ENDIF:params
|
547
|
+
|
548
|
+
IF:aref
|
549
|
+
</a>
|
550
|
+
ENDIF:aref
|
551
|
+
</h3>
|
552
|
+
IF:m_desc
|
553
|
+
%m_desc%
|
554
|
+
ENDIF:m_desc
|
555
|
+
|
556
|
+
IF:sourcecode
|
557
|
+
<p class="source_link" id="%aref%-show-link"><a href="#" onclick="toggle('%aref%-source'); toggleText('%aref%-link'); return false;" id="%aref%-link">Show source...</a></p><div class="source" id="%aref%-source"><pre>%sourcecode%</pre></div>
|
558
|
+
ENDIF:sourcecode
|
559
|
+
</div>
|
560
|
+
END:methods
|
561
|
+
|
562
|
+
ENDIF:methods
|
563
|
+
|
564
|
+
END:method_list
|
565
|
+
|
566
|
+
ENDIF:method_list
|
567
|
+
|
568
|
+
END:sections
|
569
|
+
|
570
|
+
ENDIF:sections
|
571
|
+
</div><div class="clear" id="footer">Generated on Nov 8, 2007 / Allison 2 © 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a></div></div><script src="http://feeds.feedburner.com/~s/snax" type="text/javascript" charset="utf-8"></script></body></html>
|