css_inliner 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README +46 -0
- data/Rakefile +23 -0
- data/bin/css-inliner +27 -0
- data/bin/css-inliner-multifile +29 -0
- data/css_inliner.gemspec +29 -0
- data/lib/css_inliner.rb +15 -0
- data/lib/css_inliner/extractor.rb +58 -0
- data/lib/css_inliner/inliner.rb +42 -0
- data/lib/css_inliner/version.rb +3 -0
- data/setup.rb +1585 -0
- data/test/fixtures/sample1/CSSInliner.html +197 -0
- data/test/fixtures/sample1/created.rid +3 -0
- data/test/fixtures/sample1/images/brick.png +0 -0
- data/test/fixtures/sample1/images/brick_link.png +0 -0
- data/test/fixtures/sample1/images/bug.png +0 -0
- data/test/fixtures/sample1/images/bullet_black.png +0 -0
- data/test/fixtures/sample1/images/bullet_toggle_minus.png +0 -0
- data/test/fixtures/sample1/images/bullet_toggle_plus.png +0 -0
- data/test/fixtures/sample1/images/date.png +0 -0
- data/test/fixtures/sample1/images/find.png +0 -0
- data/test/fixtures/sample1/images/loadingAnimation.gif +0 -0
- data/test/fixtures/sample1/images/macFFBgHack.png +0 -0
- data/test/fixtures/sample1/images/package.png +0 -0
- data/test/fixtures/sample1/images/page_green.png +0 -0
- data/test/fixtures/sample1/images/page_white_text.png +0 -0
- data/test/fixtures/sample1/images/page_white_width.png +0 -0
- data/test/fixtures/sample1/images/plugin.png +0 -0
- data/test/fixtures/sample1/images/ruby.png +0 -0
- data/test/fixtures/sample1/images/tag_green.png +0 -0
- data/test/fixtures/sample1/images/wrench.png +0 -0
- data/test/fixtures/sample1/images/wrench_orange.png +0 -0
- data/test/fixtures/sample1/images/zoom.png +0 -0
- data/test/fixtures/sample1/index.html +51 -0
- data/test/fixtures/sample1/index.inlined.html +36 -0
- data/test/fixtures/sample1/js/darkfish.js +116 -0
- data/test/fixtures/sample1/js/jquery.js +32 -0
- data/test/fixtures/sample1/js/quicksearch.js +114 -0
- data/test/fixtures/sample1/js/thickbox-compressed.js +10 -0
- data/test/fixtures/sample1/lib/css_inliner/version_rb.html +52 -0
- data/test/fixtures/sample1/lib/css_inliner_rb.html +64 -0
- data/test/fixtures/sample1/rdoc.css +763 -0
- data/test/fixtures/sample2/CSSInliner.html +197 -0
- data/test/fixtures/sample2/created.rid +3 -0
- data/test/fixtures/sample2/images/brick.png +0 -0
- data/test/fixtures/sample2/images/brick_link.png +0 -0
- data/test/fixtures/sample2/images/bug.png +0 -0
- data/test/fixtures/sample2/images/bullet_black.png +0 -0
- data/test/fixtures/sample2/images/bullet_toggle_minus.png +0 -0
- data/test/fixtures/sample2/images/bullet_toggle_plus.png +0 -0
- data/test/fixtures/sample2/images/date.png +0 -0
- data/test/fixtures/sample2/images/find.png +0 -0
- data/test/fixtures/sample2/images/loadingAnimation.gif +0 -0
- data/test/fixtures/sample2/images/macFFBgHack.png +0 -0
- data/test/fixtures/sample2/images/package.png +0 -0
- data/test/fixtures/sample2/images/page_green.png +0 -0
- data/test/fixtures/sample2/images/page_white_text.png +0 -0
- data/test/fixtures/sample2/images/page_white_width.png +0 -0
- data/test/fixtures/sample2/images/plugin.png +0 -0
- data/test/fixtures/sample2/images/ruby.png +0 -0
- data/test/fixtures/sample2/images/tag_green.png +0 -0
- data/test/fixtures/sample2/images/wrench.png +0 -0
- data/test/fixtures/sample2/images/wrench_orange.png +0 -0
- data/test/fixtures/sample2/images/zoom.png +0 -0
- data/test/fixtures/sample2/index.html +51 -0
- data/test/fixtures/sample2/index.html~ +51 -0
- data/test/fixtures/sample2/index.inlined.html +36 -0
- data/test/fixtures/sample2/index.inlined.html~ +36 -0
- data/test/fixtures/sample2/js/darkfish.js +116 -0
- data/test/fixtures/sample2/js/jquery.js +32 -0
- data/test/fixtures/sample2/js/quicksearch.js +114 -0
- data/test/fixtures/sample2/js/thickbox-compressed.js +10 -0
- data/test/fixtures/sample2/lib/css_inliner/version_rb.html +52 -0
- data/test/fixtures/sample2/lib/css_inliner_rb.html +64 -0
- data/test/fixtures/sample2/rdoc.css +763 -0
- data/test/fixtures/sample3/CSSInliner.html +197 -0
- data/test/fixtures/sample3/created.rid +3 -0
- data/test/fixtures/sample3/images/brick.png +0 -0
- data/test/fixtures/sample3/images/brick_link.png +0 -0
- data/test/fixtures/sample3/images/bug.png +0 -0
- data/test/fixtures/sample3/images/bullet_black.png +0 -0
- data/test/fixtures/sample3/images/bullet_toggle_minus.png +0 -0
- data/test/fixtures/sample3/images/bullet_toggle_plus.png +0 -0
- data/test/fixtures/sample3/images/date.png +0 -0
- data/test/fixtures/sample3/images/find.png +0 -0
- data/test/fixtures/sample3/images/loadingAnimation.gif +0 -0
- data/test/fixtures/sample3/images/macFFBgHack.png +0 -0
- data/test/fixtures/sample3/images/package.png +0 -0
- data/test/fixtures/sample3/images/page_green.png +0 -0
- data/test/fixtures/sample3/images/page_white_text.png +0 -0
- data/test/fixtures/sample3/images/page_white_width.png +0 -0
- data/test/fixtures/sample3/images/plugin.png +0 -0
- data/test/fixtures/sample3/images/ruby.png +0 -0
- data/test/fixtures/sample3/images/tag_green.png +0 -0
- data/test/fixtures/sample3/images/wrench.png +0 -0
- data/test/fixtures/sample3/images/wrench_orange.png +0 -0
- data/test/fixtures/sample3/images/zoom.png +0 -0
- data/test/fixtures/sample3/index.html +55 -0
- data/test/fixtures/sample3/index.inlined.html +36 -0
- data/test/fixtures/sample3/js/darkfish.js +116 -0
- data/test/fixtures/sample3/js/jquery.js +32 -0
- data/test/fixtures/sample3/js/quicksearch.js +114 -0
- data/test/fixtures/sample3/js/thickbox-compressed.js +10 -0
- data/test/fixtures/sample3/lib/css_inliner/version_rb.html +52 -0
- data/test/fixtures/sample3/lib/css_inliner_rb.html +64 -0
- data/test/fixtures/sample3/rdoc.css +763 -0
- data/test/fixtures/sample4/CSSInliner.html +197 -0
- data/test/fixtures/sample4/created.rid +3 -0
- data/test/fixtures/sample4/images/brick.png +0 -0
- data/test/fixtures/sample4/images/brick_link.png +0 -0
- data/test/fixtures/sample4/images/bug.png +0 -0
- data/test/fixtures/sample4/images/bullet_black.png +0 -0
- data/test/fixtures/sample4/images/bullet_toggle_minus.png +0 -0
- data/test/fixtures/sample4/images/bullet_toggle_plus.png +0 -0
- data/test/fixtures/sample4/images/date.png +0 -0
- data/test/fixtures/sample4/images/find.png +0 -0
- data/test/fixtures/sample4/images/loadingAnimation.gif +0 -0
- data/test/fixtures/sample4/images/macFFBgHack.png +0 -0
- data/test/fixtures/sample4/images/package.png +0 -0
- data/test/fixtures/sample4/images/page_green.png +0 -0
- data/test/fixtures/sample4/images/page_white_text.png +0 -0
- data/test/fixtures/sample4/images/page_white_width.png +0 -0
- data/test/fixtures/sample4/images/plugin.png +0 -0
- data/test/fixtures/sample4/images/ruby.png +0 -0
- data/test/fixtures/sample4/images/tag_green.png +0 -0
- data/test/fixtures/sample4/images/wrench.png +0 -0
- data/test/fixtures/sample4/images/wrench_orange.png +0 -0
- data/test/fixtures/sample4/images/zoom.png +0 -0
- data/test/fixtures/sample4/index.html +55 -0
- data/test/fixtures/sample4/index.inlined.html +36 -0
- data/test/fixtures/sample4/js/darkfish.js +116 -0
- data/test/fixtures/sample4/js/jquery.js +32 -0
- data/test/fixtures/sample4/js/quicksearch.js +114 -0
- data/test/fixtures/sample4/js/thickbox-compressed.js +10 -0
- data/test/fixtures/sample4/lib/css_inliner/version_rb.html +52 -0
- data/test/fixtures/sample4/lib/css_inliner_rb.html +64 -0
- data/test/fixtures/sample4/rdoc.css +763 -0
- data/test/helper.rb +27 -0
- data/test/test_css_inliner.rb +22 -0
- data/test/test_extractor.rb +54 -0
- metadata +234 -0
@@ -0,0 +1,197 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Module: CSSInliner</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body id="top" class="module">
|
19
|
+
|
20
|
+
<div id="metadata">
|
21
|
+
<div id="home-metadata">
|
22
|
+
<div id="home-section" class="section">
|
23
|
+
<h3 class="section-header">
|
24
|
+
<a href="./index.html">Home</a>
|
25
|
+
<a href="./index.html#classes">Classes</a>
|
26
|
+
<a href="./index.html#methods">Methods</a>
|
27
|
+
</h3>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div id="file-metadata">
|
32
|
+
<div id="file-list-section" class="section">
|
33
|
+
<h3 class="section-header">In Files</h3>
|
34
|
+
<div class="section-body">
|
35
|
+
<ul>
|
36
|
+
|
37
|
+
<li><a href="./lib/css_inliner/version_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
+
class="thickbox" title="lib/css_inliner/version.rb">lib/css_inliner/version.rb</a></li>
|
39
|
+
|
40
|
+
<li><a href="./lib/css_inliner_rb.html?TB_iframe=true&height=550&width=785"
|
41
|
+
class="thickbox" title="lib/css_inliner.rb">lib/css_inliner.rb</a></li>
|
42
|
+
|
43
|
+
</ul>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div id="class-metadata">
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<!-- Method Quickref -->
|
59
|
+
<div id="method-list-section" class="section">
|
60
|
+
<h3 class="section-header">Methods</h3>
|
61
|
+
<ul class="link-list">
|
62
|
+
|
63
|
+
<li><a href="#method-c-process">::process</a></li>
|
64
|
+
|
65
|
+
</ul>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</div>
|
71
|
+
|
72
|
+
<div id="project-metadata">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
<div id="classindex-section" class="section project-section">
|
77
|
+
<h3 class="section-header">Class/Module Index
|
78
|
+
<span class="search-toggle"><img src="./images/find.png"
|
79
|
+
height="16" width="16" alt="[+]"
|
80
|
+
title="show/hide quicksearch" /></span></h3>
|
81
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
82
|
+
<fieldset>
|
83
|
+
<legend>Quicksearch</legend>
|
84
|
+
<input type="text" name="quicksearch" value=""
|
85
|
+
class="quicksearch-field" />
|
86
|
+
</fieldset>
|
87
|
+
</form>
|
88
|
+
|
89
|
+
<ul class="link-list">
|
90
|
+
|
91
|
+
<li><a href="./CSSInliner.html">CSSInliner</a></li>
|
92
|
+
|
93
|
+
</ul>
|
94
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
<div id="documentation">
|
102
|
+
<h1 class="module">CSSInliner</h1>
|
103
|
+
|
104
|
+
<div id="description" class="description">
|
105
|
+
|
106
|
+
</div><!-- description -->
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<!-- Constants -->
|
118
|
+
<div id="constants-list" class="section">
|
119
|
+
<h3 class="section-header">Constants</h3>
|
120
|
+
<dl>
|
121
|
+
|
122
|
+
<dt><a name="VERSION">VERSION</a></dt>
|
123
|
+
|
124
|
+
<dd class="description"></dd>
|
125
|
+
|
126
|
+
|
127
|
+
</dl>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<!-- Methods -->
|
134
|
+
|
135
|
+
<div id="public-class-method-details" class="method-section section">
|
136
|
+
<h3 class="section-header">Public Class Methods</h3>
|
137
|
+
|
138
|
+
|
139
|
+
<div id="process-method" class="method-detail ">
|
140
|
+
<a name="method-c-process"></a>
|
141
|
+
|
142
|
+
|
143
|
+
<div class="method-heading">
|
144
|
+
<span class="method-name">process</span><span
|
145
|
+
class="method-args">(html, basedir = '.')</span>
|
146
|
+
<span class="method-click-advice">click to toggle source</span>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
|
150
|
+
<div class="method-description">
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<div class="method-source-code" id="process-source">
|
157
|
+
<pre>
|
158
|
+
<span class="ruby-comment"># File lib/css_inliner.rb, line 10</span>
|
159
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">html</span>, <span class="ruby-identifier">basedir</span> = <span class="ruby-string">'.'</span>)
|
160
|
+
<span class="ruby-comment"># Make DOM</span>
|
161
|
+
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">Nokogiri</span>.<span class="ruby-constant">HTML</span> <span class="ruby-identifier">html</span>
|
162
|
+
|
163
|
+
<span class="ruby-comment"># Structure CSS</span>
|
164
|
+
<span class="ruby-identifier">csss</span> = <span class="ruby-identifier">find_css</span> <span class="ruby-identifier">doc</span>, <span class="ruby-identifier">basedir</span>
|
165
|
+
<span class="ruby-identifier">css_parser</span> = <span class="ruby-constant">CssParser</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">new</span>
|
166
|
+
<span class="ruby-identifier">csss</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">css</span><span class="ruby-operator">|</span> <span class="ruby-identifier">css_parser</span>.<span class="ruby-identifier">add_block!</span> <span class="ruby-identifier">css</span>}
|
167
|
+
<span class="ruby-identifier">css_map</span> = <span class="ruby-identifier">create_css_map</span> <span class="ruby-identifier">css_parser</span>
|
168
|
+
|
169
|
+
<span class="ruby-comment"># Inline CSS</span>
|
170
|
+
<span class="ruby-identifier">inline</span>(<span class="ruby-identifier">doc</span>, <span class="ruby-identifier">css_map</span>).<span class="ruby-identifier">to_s</span>
|
171
|
+
<span class="ruby-keyword">end</span></pre>
|
172
|
+
</div><!-- process-source -->
|
173
|
+
|
174
|
+
</div>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</div><!-- process-method -->
|
180
|
+
|
181
|
+
|
182
|
+
</div><!-- public-class-method-details -->
|
183
|
+
|
184
|
+
</div><!-- 5Buntitled-5D -->
|
185
|
+
|
186
|
+
|
187
|
+
</div><!-- documentation -->
|
188
|
+
|
189
|
+
<div id="validator-badges">
|
190
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
191
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
192
|
+
Rdoc Generator</a> 2</small>.</p>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
</body>
|
196
|
+
</html>
|
197
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
4
|
+
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
6
|
+
<head>
|
7
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
|
+
|
9
|
+
<title>css_inliner-0.0.1 Documentation</title>
|
10
|
+
|
11
|
+
<link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />
|
12
|
+
|
13
|
+
<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script src="js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<script src="js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
16
|
+
<script src="js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
17
|
+
|
18
|
+
</head>
|
19
|
+
<body class="indexpage">
|
20
|
+
|
21
|
+
|
22
|
+
<h1>css_inliner-0.0.1 Documentation</h1>
|
23
|
+
|
24
|
+
|
25
|
+
<p>This is the API documentation for 'css_inliner-0.0.1 Documentation'.</p>
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
<h2 id="classes">Classes/Modules</h2>
|
32
|
+
<ul>
|
33
|
+
|
34
|
+
<li class="module"><a href="CSSInliner.html">CSSInliner</a></li>
|
35
|
+
|
36
|
+
</ul>
|
37
|
+
|
38
|
+
<h2 id="methods">Methods</h2>
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="CSSInliner.html#method-c-process">::process — CSSInliner</a></li>
|
42
|
+
|
43
|
+
</ul>
|
44
|
+
|
45
|
+
<div id="validator-badges">
|
46
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
47
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
48
|
+
Rdoc Generator</a> 2</small>.</p>
|
49
|
+
</div>
|
50
|
+
</body>
|
51
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
+
<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
3
|
+
<head>
|
4
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
5
|
+
<title>css_inliner-0.0.1 Documentation</title>
|
6
|
+
<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script><script src="js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script><script src="js/quicksearch.js" type="text/javascript" charset="utf-8"></script><script src="js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
7
|
+
</head>
|
8
|
+
<body class="indexpage" style='background: #efefef; margin: 1em 3em; padding: 0; font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif;'>
|
9
|
+
|
10
|
+
|
11
|
+
<h1 style="font-size: 300%; text-shadow: rgba(135,145,135,0.65) 2px 2px 3px; color: #6C8C22; margin: 0; padding: 0;">css_inliner-0.0.1 Documentation</h1>
|
12
|
+
|
13
|
+
|
14
|
+
<p style="margin: 1em 0; padding: 0;">This is the API documentation for 'css_inliner-0.0.1 Documentation'.</p>
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
<h2 id="classes" style="margin: 1.5em 0 0; padding: 0;">Classes/Modules</h2>
|
21
|
+
<ul style="line-height: 160%; list-style: none; margin: 0; padding: 0;">
|
22
|
+
<li class="module" style="background: url(images/package.png) no-repeat left 4px; margin: 0; padding: 0 0 0 20px;"><a href="CSSInliner.html" style="margin: 0; padding: 0;">CSSInliner</a></li>
|
23
|
+
|
24
|
+
</ul>
|
25
|
+
<h2 id="methods" style="margin: 1.5em 0 0; padding: 0;">Methods</h2>
|
26
|
+
<ul style="line-height: 160%; list-style: none; margin: 0; padding: 0;">
|
27
|
+
<li style="background: url(images/bullet_black.png) no-repeat left 4px; margin: 0; padding: 0 0 0 20px;"><a href="CSSInliner.html#method-c-process" style="margin: 0; padding: 0;">::process — CSSInliner</a></li>
|
28
|
+
|
29
|
+
</ul>
|
30
|
+
<div id="validator-badges" style="clear: both; margin: 1em 1em 2em; padding: 0;">
|
31
|
+
<p style="margin: 1em 0; padding: 0;"><small style="margin: 0; padding: 0;"><a href="http://validator.w3.org/check/referer" style="margin: 0; padding: 0;">[Validate]</a></small></p>
|
32
|
+
<p style="margin: 1em 0; padding: 0;"><small style="margin: 0; padding: 0;">Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/" style="margin: 0; padding: 0;">Darkfish
|
33
|
+
Rdoc Generator</a> 2</small>.</p>
|
34
|
+
</div>
|
35
|
+
</body>
|
36
|
+
</html>
|
@@ -0,0 +1,116 @@
|
|
1
|
+
/**
|
2
|
+
*
|
3
|
+
* Darkfish Page Functions
|
4
|
+
* $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
|
5
|
+
*
|
6
|
+
* Author: Michael Granger <mgranger@laika.com>
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
|
10
|
+
/* Provide console simulation for firebug-less environments */
|
11
|
+
if (!("console" in window) || !("firebug" in console)) {
|
12
|
+
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
13
|
+
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
14
|
+
|
15
|
+
window.console = {};
|
16
|
+
for (var i = 0; i < names.length; ++i)
|
17
|
+
window.console[names[i]] = function() {};
|
18
|
+
};
|
19
|
+
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Unwrap the first element that matches the given @expr@ from the targets and return them.
|
23
|
+
*/
|
24
|
+
$.fn.unwrap = function( expr ) {
|
25
|
+
return this.each( function() {
|
26
|
+
$(this).parents( expr ).eq( 0 ).after( this ).remove();
|
27
|
+
});
|
28
|
+
};
|
29
|
+
|
30
|
+
|
31
|
+
function showSource( e ) {
|
32
|
+
var target = e.target;
|
33
|
+
var codeSections = $(target).
|
34
|
+
parents('.method-detail').
|
35
|
+
find('.method-source-code');
|
36
|
+
|
37
|
+
$(target).
|
38
|
+
parents('.method-detail').
|
39
|
+
find('.method-source-code').
|
40
|
+
slideToggle();
|
41
|
+
};
|
42
|
+
|
43
|
+
function hookSourceViews() {
|
44
|
+
$('.method-description,.method-heading').click( showSource );
|
45
|
+
};
|
46
|
+
|
47
|
+
function toggleDebuggingSection() {
|
48
|
+
$('.debugging-section').slideToggle();
|
49
|
+
};
|
50
|
+
|
51
|
+
function hookDebuggingToggle() {
|
52
|
+
$('#debugging-toggle img').click( toggleDebuggingSection );
|
53
|
+
};
|
54
|
+
|
55
|
+
function hookQuickSearch() {
|
56
|
+
$('.quicksearch-field').each( function() {
|
57
|
+
var searchElems = $(this).parents('.section').find( 'li' );
|
58
|
+
var toggle = $(this).parents('.section').find('h3 .search-toggle');
|
59
|
+
// console.debug( "Toggle is: %o", toggle );
|
60
|
+
var qsbox = $(this).parents('form').get( 0 );
|
61
|
+
|
62
|
+
$(this).quicksearch( this, searchElems, {
|
63
|
+
noSearchResultsIndicator: 'no-class-search-results',
|
64
|
+
focusOnLoad: false
|
65
|
+
});
|
66
|
+
$(toggle).click( function() {
|
67
|
+
// console.debug( "Toggling qsbox: %o", qsbox );
|
68
|
+
$(qsbox).toggle();
|
69
|
+
});
|
70
|
+
});
|
71
|
+
};
|
72
|
+
|
73
|
+
function highlightTarget( anchor ) {
|
74
|
+
console.debug( "Highlighting target '%s'.", anchor );
|
75
|
+
|
76
|
+
$("a[name=" + anchor + "]").each( function() {
|
77
|
+
if ( !$(this).parent().parent().hasClass('target-section') ) {
|
78
|
+
console.debug( "Wrapping the target-section" );
|
79
|
+
$('div.method-detail').unwrap( 'div.target-section' );
|
80
|
+
$(this).parent().wrap( '<div class="target-section"></div>' );
|
81
|
+
} else {
|
82
|
+
console.debug( "Already wrapped." );
|
83
|
+
}
|
84
|
+
});
|
85
|
+
};
|
86
|
+
|
87
|
+
function highlightLocationTarget() {
|
88
|
+
console.debug( "Location hash: %s", window.location.hash );
|
89
|
+
if ( ! window.location.hash || window.location.hash.length == 0 ) return;
|
90
|
+
|
91
|
+
var anchor = window.location.hash.substring(1);
|
92
|
+
console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
|
93
|
+
|
94
|
+
highlightTarget( anchor );
|
95
|
+
};
|
96
|
+
|
97
|
+
function highlightClickTarget( event ) {
|
98
|
+
console.debug( "Highlighting click target for event %o", event.target );
|
99
|
+
try {
|
100
|
+
var anchor = $(event.target).attr( 'href' ).substring(1);
|
101
|
+
console.debug( "Found target anchor: %s", anchor );
|
102
|
+
highlightTarget( anchor );
|
103
|
+
} catch ( err ) {
|
104
|
+
console.error( "Exception while highlighting: %o", err );
|
105
|
+
};
|
106
|
+
};
|
107
|
+
|
108
|
+
|
109
|
+
$(document).ready( function() {
|
110
|
+
hookSourceViews();
|
111
|
+
hookDebuggingToggle();
|
112
|
+
hookQuickSearch();
|
113
|
+
highlightLocationTarget();
|
114
|
+
|
115
|
+
$('ul.link-list a').bind( "click", highlightClickTarget );
|
116
|
+
});
|