bivouac 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README +6 -7
- data/bin/bivouac +1 -1
- data/doc/rdoc/classes/BivouacHelpers/BaseView.html +178 -0
- data/doc/rdoc/classes/BivouacHelpers/FormView.html +398 -0
- data/doc/rdoc/classes/BivouacHelpers/HtmlView.html +305 -0
- data/doc/rdoc/classes/BivouacHelpers/JavaScriptView.html +573 -0
- data/doc/rdoc/classes/BivouacHelpers/ScriptAculoUsView.html +258 -0
- data/doc/rdoc/classes/BivouacHelpers/TooltipView.html +158 -0
- data/doc/rdoc/classes/BivouacHelpers.html +117 -0
- data/doc/rdoc/classes/JavaScriptGenerator.html +564 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/AUTHORS.html +109 -0
- data/doc/rdoc/files/COPYING.html +533 -0
- data/doc/rdoc/files/README.html +427 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/base_rb.html +109 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/form_rb.html +109 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/html_rb.html +109 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/javascript_rb.html +113 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html +113 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/tooltip_rb.html +109 -0
- data/doc/rdoc/index.html +10 -0
- data/doc/rdoc/permalink.gif +0 -0
- data/doc/rdoc/rdoc-style.css +106 -0
- data/doc/rdoc/rubyfr.png +0 -0
- data/examples/bivouac_sample/Rakefile +48 -0
- data/examples/bivouac_sample/app/bivouac_sample.rb +15 -7
- data/examples/bivouac_sample/app/controllers/index.rb +2 -2
- data/examples/bivouac_sample/app/controllers/sound.rb +10 -0
- data/examples/bivouac_sample/app/helpers/_helpers.rb +6 -3
- data/examples/bivouac_sample/app/views/sound.rb +16 -0
- data/examples/bivouac_sample/config/environment.rb +5 -2
- data/examples/bivouac_sample/config/postamble.rb +89 -18
- data/examples/bivouac_sample/public/javascripts/builder.js +12 -7
- data/examples/bivouac_sample/public/javascripts/controls.js +485 -355
- data/examples/bivouac_sample/public/javascripts/dragdrop.js +82 -52
- data/examples/bivouac_sample/public/javascripts/effects.js +361 -329
- data/examples/bivouac_sample/public/javascripts/prototype.js +2826 -1120
- data/examples/bivouac_sample/public/javascripts/scriptaculous.js +15 -8
- data/examples/bivouac_sample/public/javascripts/slider.js +40 -43
- data/examples/bivouac_sample/public/javascripts/sound.js +55 -0
- data/examples/bivouac_sample/public/javascripts/unittest.js +16 -12
- data/examples/bivouac_sample/public/sound/sword.mp3 +0 -0
- data/examples/bivouac_sample/script/console +6 -0
- data/examples/bivouac_sample/script/plugin +3 -0
- data/examples/bivouac_sample/script/server +2 -1
- data/examples/bivouac_sample/test/test_sound.rb +15 -0
- data/lib/bivouac/helpers/view/goh/sound.rb +38 -0
- data/lib/bivouac/template/application/helpers_goh.rb +2 -0
- data/lib/bivouac/template/static/builder.js +12 -7
- data/lib/bivouac/template/static/controls.js +485 -355
- data/lib/bivouac/template/static/dragdrop.js +82 -52
- data/lib/bivouac/template/static/effects.js +361 -329
- data/lib/bivouac/template/static/prototype.js +2826 -1120
- data/lib/bivouac/template/static/scriptaculous.js +15 -8
- data/lib/bivouac/template/static/slider.js +40 -43
- data/lib/bivouac/template/static/sound.js +55 -0
- data/lib/bivouac/template/static/unittest.js +16 -12
- metadata +45 -2
@@ -0,0 +1,258 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title>
|
6
|
+
Bivouac, the Documentation » Module: BivouacHelpers::ScriptAculoUsView
|
7
|
+
</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
<script language="JavaScript" type="text/javascript">
|
11
|
+
// <![CDATA[
|
12
|
+
|
13
|
+
function toggleSource( id )
|
14
|
+
{
|
15
|
+
var elem
|
16
|
+
var link
|
17
|
+
|
18
|
+
if( document.getElementById )
|
19
|
+
{
|
20
|
+
elem = document.getElementById( id )
|
21
|
+
link = document.getElementById( "l_" + id )
|
22
|
+
}
|
23
|
+
else if ( document.all )
|
24
|
+
{
|
25
|
+
elem = eval( "document.all." + id )
|
26
|
+
link = eval( "document.all.l_" + id )
|
27
|
+
}
|
28
|
+
else
|
29
|
+
return false;
|
30
|
+
|
31
|
+
if( elem.style.display == "block" )
|
32
|
+
{
|
33
|
+
elem.style.display = "none"
|
34
|
+
link.innerHTML = "show source"
|
35
|
+
}
|
36
|
+
else
|
37
|
+
{
|
38
|
+
elem.style.display = "block"
|
39
|
+
link.innerHTML = "hide source"
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
function openCode( url )
|
44
|
+
{
|
45
|
+
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
46
|
+
}
|
47
|
+
// ]]>
|
48
|
+
</script>
|
49
|
+
</head>
|
50
|
+
<body>
|
51
|
+
<!--
|
52
|
+
<div id="menu">
|
53
|
+
<h3 class="title">Module: BivouacHelpers::ScriptAculoUsView</h3>
|
54
|
+
</div>
|
55
|
+
-->
|
56
|
+
<div id="fullpage">
|
57
|
+
<div id="pager">
|
58
|
+
<table>
|
59
|
+
<tr><td><img src="../../rubyfr.png" /></td>
|
60
|
+
<td id="pagertd">
|
61
|
+
<strong># Module: BivouacHelpers::ScriptAculoUsView<br />
|
62
|
+
[
|
63
|
+
"<a href="../../files/README.html" value="File: README">README</a>",
|
64
|
+
"<a href="../../files/AUTHORS.html" value="File: AUTHORS">AUTHORS</a>",
|
65
|
+
"<a href="../../files/COPYING.html" value="File: COPYING">COPYING</a>",
|
66
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/base_rb.html" value="File: base.rb">lib/bivouac/helpers/view/goh/base.rb</a>",
|
67
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/form_rb.html" value="File: form.rb">lib/bivouac/helpers/view/goh/form.rb</a>",
|
68
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/html_rb.html" value="File: html.rb">lib/bivouac/helpers/view/goh/html.rb</a>",
|
69
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/tooltip_rb.html" value="File: tooltip.rb">lib/bivouac/helpers/view/goh/tooltip.rb</a>",
|
70
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html" value="File: scriptaculous.rb">lib/bivouac/helpers/view/goh/scriptaculous.rb</a>",
|
71
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/javascript_rb.html" value="File: javascript.rb">lib/bivouac/helpers/view/goh/javascript.rb</a>",
|
72
|
+
<a href="http://greg.rubyfr.net">nil</a>].each do<br />
|
73
|
+
<a href="../../classes/JavaScriptGenerator.html" title="Class: JavaScriptGenerator">JavaScriptGenerator</a>.view_html<br />
|
74
|
+
<a href="../../classes/BivouacHelpers.html" title="Module: BivouacHelpers">BivouacHelpers</a>.view_html<br />
|
75
|
+
<a href="../../classes/BivouacHelpers/TooltipView.html" title="Module: BivouacHelpers::TooltipView">BivouacHelpers::TooltipView</a>.view_html<br />
|
76
|
+
<a href="../../classes/BivouacHelpers/ScriptAculoUsView.html" title="Module: BivouacHelpers::ScriptAculoUsView">BivouacHelpers::ScriptAculoUsView</a>.view_html<br />
|
77
|
+
<a href="../../classes/BivouacHelpers/BaseView.html" title="Module: BivouacHelpers::BaseView">BivouacHelpers::BaseView</a>.view_html<br />
|
78
|
+
<a href="../../classes/BivouacHelpers/JavaScriptView.html" title="Module: BivouacHelpers::JavaScriptView">BivouacHelpers::JavaScriptView</a>.view_html<br />
|
79
|
+
<a href="../../classes/BivouacHelpers/HtmlView.html" title="Module: BivouacHelpers::HtmlView">BivouacHelpers::HtmlView</a>.view_html<br />
|
80
|
+
<a href="../../classes/BivouacHelpers/FormView.html" title="Module: BivouacHelpers::FormView">BivouacHelpers::FormView</a>.view_html<br />
|
81
|
+
end</strong>
|
82
|
+
</td></tr>
|
83
|
+
</table>
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
<div id="BivouacHelpers::ScriptAculoUsView" class="page_shade">
|
89
|
+
<div class="page">
|
90
|
+
<h3>Module BivouacHelpers::ScriptAculoUsView < Object</h3>
|
91
|
+
|
92
|
+
(in files
|
93
|
+
<a href="../../files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html">lib/bivouac/helpers/view/goh/scriptaculous.rb</a>
|
94
|
+
)
|
95
|
+
|
96
|
+
<p>
|
97
|
+
bivouac/helpers/view/html
|
98
|
+
</p>
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<h2 class="ruled">Methods</h2>
|
105
|
+
<h4 class="ruled">Public Instance method:
|
106
|
+
<strong><a name="M000024">draggable_element(element_id, options = {})</a></strong> <a href="#M000024"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: draggable_element" /></a></h4>
|
107
|
+
|
108
|
+
<p>
|
109
|
+
Makes the element with the DOM ID specified by <tt>element_id</tt>
|
110
|
+
draggable.
|
111
|
+
</p>
|
112
|
+
<p>
|
113
|
+
Example:
|
114
|
+
</p>
|
115
|
+
<pre>
|
116
|
+
draggable_element("my_image", :revert => true)
|
117
|
+
</pre>
|
118
|
+
<p>
|
119
|
+
You can change the behaviour with various options, see <a
|
120
|
+
href="http://script.aculo.us">script.aculo.us</a> for more documentation.
|
121
|
+
</p>
|
122
|
+
|
123
|
+
<div class="sourcecode">
|
124
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show source</a> ]</p>
|
125
|
+
<div id="M000024_source" class="dyn-source">
|
126
|
+
<pre>
|
127
|
+
<span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/scriptaculous.rb, line 94</span>
|
128
|
+
94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">draggable_element</span>(<span class="ruby-identifier">element_id</span>, <span class="ruby-identifier">options</span> = {})
|
129
|
+
95: <span class="ruby-identifier">javascript_tag</span>(<span class="ruby-identifier">draggable_element_js</span>(<span class="ruby-identifier">element_id</span>, <span class="ruby-identifier">options</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">";\n"</span>)
|
130
|
+
96: <span class="ruby-keyword kw">end</span>
|
131
|
+
</pre>
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
<h4 class="ruled">Public Instance method:
|
135
|
+
<strong><a name="M000025">drop_receiving_element(element_id, options = {})</a></strong> <a href="#M000025"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: drop_receiving_element" /></a></h4>
|
136
|
+
|
137
|
+
<p>
|
138
|
+
Makes the element with the DOM ID specified by <tt>element_id</tt> receive
|
139
|
+
dropped draggable elements (created by <a
|
140
|
+
href="ScriptAculoUsView.html#M000024">draggable_element</a>). and make an
|
141
|
+
AJAX call. By default, the action called gets the DOM ID of the element as
|
142
|
+
parameter.
|
143
|
+
</p>
|
144
|
+
<p>
|
145
|
+
Example:
|
146
|
+
</p>
|
147
|
+
<pre>
|
148
|
+
drop_receiving_element("my_cart", :onDrop => {
|
149
|
+
:url => R(CartAdd),
|
150
|
+
:update => 'drop-info'
|
151
|
+
} )
|
152
|
+
</pre>
|
153
|
+
<p>
|
154
|
+
You can change the behaviour with various options, see <a
|
155
|
+
href="http://script.aculo.us">script.aculo.us</a> for more documentation.
|
156
|
+
</p>
|
157
|
+
|
158
|
+
<div class="sourcecode">
|
159
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p>
|
160
|
+
<div id="M000025_source" class="dyn-source">
|
161
|
+
<pre>
|
162
|
+
<span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/scriptaculous.rb, line 115</span>
|
163
|
+
115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">drop_receiving_element</span>(<span class="ruby-identifier">element_id</span>, <span class="ruby-identifier">options</span> = {})
|
164
|
+
116: <span class="ruby-identifier">javascript_tag</span>(<span class="ruby-identifier">drop_receiving_element_js</span>(<span class="ruby-identifier">element_id</span>, <span class="ruby-identifier">options</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">";\n"</span>)
|
165
|
+
117: <span class="ruby-keyword kw">end</span>
|
166
|
+
</pre>
|
167
|
+
</div>
|
168
|
+
</div>
|
169
|
+
<h4 class="ruled">Public Instance method:
|
170
|
+
<strong><a name="M000023">sortable_element( element_id, options = {} )</a></strong> <a href="#M000023"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: sortable_element" /></a></h4>
|
171
|
+
|
172
|
+
<p>
|
173
|
+
Makes the element with the DOM ID specified by <tt>element_id</tt> sortable
|
174
|
+
by drag-and-drop and make an Ajax call whenever the sort order has changed.
|
175
|
+
By default, the action called gets the serialized sortable element as
|
176
|
+
parameters.
|
177
|
+
</p>
|
178
|
+
<p>
|
179
|
+
See <a href="http://script.aculo.us">script.aculo.us</a> for avalaible
|
180
|
+
options.
|
181
|
+
</p>
|
182
|
+
<p>
|
183
|
+
If you wan‘t to use <tt>onChange</tt> and/or <tt>onUpdate</tt> you
|
184
|
+
can pass a javascript string or a Hash, if you want to call a remote
|
185
|
+
function.
|
186
|
+
</p>
|
187
|
+
<p>
|
188
|
+
Example:
|
189
|
+
</p>
|
190
|
+
<pre>
|
191
|
+
ul( :id => 'my_list' ) do
|
192
|
+
li "Google"
|
193
|
+
li "Yahoo"
|
194
|
+
li "Accoona"
|
195
|
+
li "Ask.com"
|
196
|
+
li "Baidu"
|
197
|
+
li "Exalead"
|
198
|
+
li "Voila"
|
199
|
+
li "Lycos"
|
200
|
+
end
|
201
|
+
sortable_element( 'my_list',
|
202
|
+
:onChange => {
|
203
|
+
:url => R(SaveListOrder),
|
204
|
+
:success => visual_effect( :highlight, 'my_list' )
|
205
|
+
}
|
206
|
+
)
|
207
|
+
</pre>
|
208
|
+
|
209
|
+
<div class="sourcecode">
|
210
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show source</a> ]</p>
|
211
|
+
<div id="M000023_source" class="dyn-source">
|
212
|
+
<pre>
|
213
|
+
<span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/scriptaculous.rb, line 54</span>
|
214
|
+
54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sortable_element</span>( <span class="ruby-identifier">element_id</span>, <span class="ruby-identifier">options</span> = {} )
|
215
|
+
55: <span class="ruby-identifier">javascript_tag</span>( <span class="ruby-identifier">sortable_element_js</span>( <span class="ruby-identifier">element_id</span>, <span class="ruby-identifier">options</span> ) <span class="ruby-operator">+</span> <span class="ruby-value str">";\n"</span> )
|
216
|
+
56: <span class="ruby-keyword kw">end</span>
|
217
|
+
</pre>
|
218
|
+
</div>
|
219
|
+
</div>
|
220
|
+
<h4 class="ruled">Public Instance method:
|
221
|
+
<strong><a name="M000022">visual_effect(name, element_id = false, js_options = {})</a></strong> <a href="#M000022"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: visual_effect" /></a></h4>
|
222
|
+
|
223
|
+
<p>
|
224
|
+
Returns a JavaScript snippet to be used on the Ajax callbacks for starting
|
225
|
+
visual effects.
|
226
|
+
</p>
|
227
|
+
|
228
|
+
<div class="sourcecode">
|
229
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show source</a> ]</p>
|
230
|
+
<div id="M000022_source" class="dyn-source">
|
231
|
+
<pre>
|
232
|
+
<span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/scriptaculous.rb, line 11</span>
|
233
|
+
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">visual_effect</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">element_id</span> = <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">js_options</span> = {})
|
234
|
+
12: <span class="ruby-identifier">element</span> = <span class="ruby-identifier">element_id</span> <span class="ruby-value">? </span><span class="ruby-identifier">element_id</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"element"</span>
|
235
|
+
13:
|
236
|
+
14: <span class="ruby-identifier">js_options</span>[<span class="ruby-identifier">:queue</span>] = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">js_options</span>[<span class="ruby-identifier">:queue</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
237
|
+
15: <span class="ruby-value str">'{'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">js_options</span>[<span class="ruby-identifier">:queue</span>].<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:limit</span> <span class="ruby-operator">?</span> <span class="ruby-node">"#{k}:#{v}"</span> <span class="ruby-operator">:</span> <span class="ruby-node">"#{k}:'#{v}'"</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">','</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'}'</span>
|
238
|
+
16: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">js_options</span>[<span class="ruby-identifier">:queue</span>]
|
239
|
+
17: <span class="ruby-node">"'#{js_options[:queue]}'"</span>
|
240
|
+
18: <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">js_options</span>[<span class="ruby-identifier">:queue</span>]
|
241
|
+
19:
|
242
|
+
20: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">TOGGLE_EFFECTS</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>
|
243
|
+
21: <span class="ruby-node">%(Effect.toggle(#{element.inspect},'#{name.to_s.gsub(/^toggle_/,'')}',#{options_for_javascript(js_options)}))</span>
|
244
|
+
22: <span class="ruby-keyword kw">else</span>
|
245
|
+
23: <span class="ruby-node">%(new Effect.#{name.to_s.camelize}('#{element}',#{options_for_javascript(js_options)}))</span>
|
246
|
+
24: <span class="ruby-keyword kw">end</span>
|
247
|
+
25: <span class="ruby-keyword kw">end</span>
|
248
|
+
</pre>
|
249
|
+
</div>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
</div>
|
253
|
+
</div>
|
254
|
+
|
255
|
+
|
256
|
+
</div>
|
257
|
+
</body>
|
258
|
+
</html>
|
@@ -0,0 +1,158 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title>
|
6
|
+
Bivouac, the Documentation » Module: BivouacHelpers::TooltipView
|
7
|
+
</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
<script language="JavaScript" type="text/javascript">
|
11
|
+
// <![CDATA[
|
12
|
+
|
13
|
+
function toggleSource( id )
|
14
|
+
{
|
15
|
+
var elem
|
16
|
+
var link
|
17
|
+
|
18
|
+
if( document.getElementById )
|
19
|
+
{
|
20
|
+
elem = document.getElementById( id )
|
21
|
+
link = document.getElementById( "l_" + id )
|
22
|
+
}
|
23
|
+
else if ( document.all )
|
24
|
+
{
|
25
|
+
elem = eval( "document.all." + id )
|
26
|
+
link = eval( "document.all.l_" + id )
|
27
|
+
}
|
28
|
+
else
|
29
|
+
return false;
|
30
|
+
|
31
|
+
if( elem.style.display == "block" )
|
32
|
+
{
|
33
|
+
elem.style.display = "none"
|
34
|
+
link.innerHTML = "show source"
|
35
|
+
}
|
36
|
+
else
|
37
|
+
{
|
38
|
+
elem.style.display = "block"
|
39
|
+
link.innerHTML = "hide source"
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
function openCode( url )
|
44
|
+
{
|
45
|
+
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
46
|
+
}
|
47
|
+
// ]]>
|
48
|
+
</script>
|
49
|
+
</head>
|
50
|
+
<body>
|
51
|
+
<!--
|
52
|
+
<div id="menu">
|
53
|
+
<h3 class="title">Module: BivouacHelpers::TooltipView</h3>
|
54
|
+
</div>
|
55
|
+
-->
|
56
|
+
<div id="fullpage">
|
57
|
+
<div id="pager">
|
58
|
+
<table>
|
59
|
+
<tr><td><img src="../../rubyfr.png" /></td>
|
60
|
+
<td id="pagertd">
|
61
|
+
<strong># Module: BivouacHelpers::TooltipView<br />
|
62
|
+
[
|
63
|
+
"<a href="../../files/README.html" value="File: README">README</a>",
|
64
|
+
"<a href="../../files/AUTHORS.html" value="File: AUTHORS">AUTHORS</a>",
|
65
|
+
"<a href="../../files/COPYING.html" value="File: COPYING">COPYING</a>",
|
66
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/base_rb.html" value="File: base.rb">lib/bivouac/helpers/view/goh/base.rb</a>",
|
67
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/form_rb.html" value="File: form.rb">lib/bivouac/helpers/view/goh/form.rb</a>",
|
68
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/html_rb.html" value="File: html.rb">lib/bivouac/helpers/view/goh/html.rb</a>",
|
69
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/tooltip_rb.html" value="File: tooltip.rb">lib/bivouac/helpers/view/goh/tooltip.rb</a>",
|
70
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html" value="File: scriptaculous.rb">lib/bivouac/helpers/view/goh/scriptaculous.rb</a>",
|
71
|
+
"<a href="../../files/lib/bivouac/helpers/view/goh/javascript_rb.html" value="File: javascript.rb">lib/bivouac/helpers/view/goh/javascript.rb</a>",
|
72
|
+
<a href="http://greg.rubyfr.net">nil</a>].each do<br />
|
73
|
+
<a href="../../classes/JavaScriptGenerator.html" title="Class: JavaScriptGenerator">JavaScriptGenerator</a>.view_html<br />
|
74
|
+
<a href="../../classes/BivouacHelpers.html" title="Module: BivouacHelpers">BivouacHelpers</a>.view_html<br />
|
75
|
+
<a href="../../classes/BivouacHelpers/TooltipView.html" title="Module: BivouacHelpers::TooltipView">BivouacHelpers::TooltipView</a>.view_html<br />
|
76
|
+
<a href="../../classes/BivouacHelpers/ScriptAculoUsView.html" title="Module: BivouacHelpers::ScriptAculoUsView">BivouacHelpers::ScriptAculoUsView</a>.view_html<br />
|
77
|
+
<a href="../../classes/BivouacHelpers/BaseView.html" title="Module: BivouacHelpers::BaseView">BivouacHelpers::BaseView</a>.view_html<br />
|
78
|
+
<a href="../../classes/BivouacHelpers/JavaScriptView.html" title="Module: BivouacHelpers::JavaScriptView">BivouacHelpers::JavaScriptView</a>.view_html<br />
|
79
|
+
<a href="../../classes/BivouacHelpers/HtmlView.html" title="Module: BivouacHelpers::HtmlView">BivouacHelpers::HtmlView</a>.view_html<br />
|
80
|
+
<a href="../../classes/BivouacHelpers/FormView.html" title="Module: BivouacHelpers::FormView">BivouacHelpers::FormView</a>.view_html<br />
|
81
|
+
end</strong>
|
82
|
+
</td></tr>
|
83
|
+
</table>
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
<div id="BivouacHelpers::TooltipView" class="page_shade">
|
89
|
+
<div class="page">
|
90
|
+
<h3>Module BivouacHelpers::TooltipView < Object</h3>
|
91
|
+
|
92
|
+
(in files
|
93
|
+
<a href="../../files/lib/bivouac/helpers/view/goh/tooltip_rb.html">lib/bivouac/helpers/view/goh/tooltip.rb</a>
|
94
|
+
)
|
95
|
+
|
96
|
+
<p>
|
97
|
+
bivouac/helpers/view/html
|
98
|
+
</p>
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<h2 class="ruled">Methods</h2>
|
105
|
+
<h4 class="ruled">Public Instance method:
|
106
|
+
<strong><a name="M000021">tooltip( name, element ) {|| ...}</a></strong> <a href="#M000021"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: tooltip" /></a></h4>
|
107
|
+
|
108
|
+
<p>
|
109
|
+
Returns an html div (id <tt>name</tt>) as a <a
|
110
|
+
href="TooltipView.html#M000021">tooltip</a> for <tt>element</tt>.
|
111
|
+
</p>
|
112
|
+
<pre>
|
113
|
+
div( id => "tooltip_me" ) do
|
114
|
+
"Hello World"
|
115
|
+
end
|
116
|
+
tooltip( "i_m_the_tooltip", "tooltip_me" ) do
|
117
|
+
"Content of the tooltip"
|
118
|
+
end # =>
|
119
|
+
<div id="tooltip_me">
|
120
|
+
Hello World
|
121
|
+
</div>
|
122
|
+
<div id = "i_m_the_tooltip" style = "display:none;">
|
123
|
+
Content of the tooltip
|
124
|
+
</div>
|
125
|
+
<script>
|
126
|
+
var i_m_the_tooltip = new Tooltip( 'tooltip_me', 'i_m_the_tooltip' )
|
127
|
+
</script>
|
128
|
+
</pre>
|
129
|
+
<p>
|
130
|
+
See <a
|
131
|
+
href="http://blog.innerewut.de/tooltip">blog.innerewut.de/tooltip</a> for
|
132
|
+
more information about <a href="TooltipView.html#M000021">tooltip</a>
|
133
|
+
</p>
|
134
|
+
|
135
|
+
<div class="sourcecode">
|
136
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show source</a> ]</p>
|
137
|
+
<div id="M000021_source" class="dyn-source">
|
138
|
+
<pre>
|
139
|
+
<span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/tooltip.rb, line 24</span>
|
140
|
+
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tooltip</span>( <span class="ruby-identifier">name</span>, <span class="ruby-identifier">element</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> )
|
141
|
+
25: <span class="ruby-identifier">div</span>( <span class="ruby-identifier">:id</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">:style</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"display:none;"</span> ) <span class="ruby-keyword kw">do</span>
|
142
|
+
26: <span class="ruby-keyword kw">yield</span>( )
|
143
|
+
27: <span class="ruby-keyword kw">end</span>
|
144
|
+
28: <span class="ruby-identifier">script</span> <span class="ruby-keyword kw">do</span>
|
145
|
+
29: <span class="ruby-node">"var #{name} = new Tooltip( '#{element}', '#{name}' )"</span>
|
146
|
+
30: <span class="ruby-keyword kw">end</span>
|
147
|
+
31: <span class="ruby-keyword kw">end</span>
|
148
|
+
</pre>
|
149
|
+
</div>
|
150
|
+
</div>
|
151
|
+
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
|
156
|
+
</div>
|
157
|
+
</body>
|
158
|
+
</html>
|
@@ -0,0 +1,117 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title>
|
6
|
+
Bivouac, the Documentation » Module: BivouacHelpers
|
7
|
+
</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
<script language="JavaScript" type="text/javascript">
|
11
|
+
// <![CDATA[
|
12
|
+
|
13
|
+
function toggleSource( id )
|
14
|
+
{
|
15
|
+
var elem
|
16
|
+
var link
|
17
|
+
|
18
|
+
if( document.getElementById )
|
19
|
+
{
|
20
|
+
elem = document.getElementById( id )
|
21
|
+
link = document.getElementById( "l_" + id )
|
22
|
+
}
|
23
|
+
else if ( document.all )
|
24
|
+
{
|
25
|
+
elem = eval( "document.all." + id )
|
26
|
+
link = eval( "document.all.l_" + id )
|
27
|
+
}
|
28
|
+
else
|
29
|
+
return false;
|
30
|
+
|
31
|
+
if( elem.style.display == "block" )
|
32
|
+
{
|
33
|
+
elem.style.display = "none"
|
34
|
+
link.innerHTML = "show source"
|
35
|
+
}
|
36
|
+
else
|
37
|
+
{
|
38
|
+
elem.style.display = "block"
|
39
|
+
link.innerHTML = "hide source"
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
function openCode( url )
|
44
|
+
{
|
45
|
+
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
46
|
+
}
|
47
|
+
// ]]>
|
48
|
+
</script>
|
49
|
+
</head>
|
50
|
+
<body>
|
51
|
+
<!--
|
52
|
+
<div id="menu">
|
53
|
+
<h3 class="title">Module: BivouacHelpers</h3>
|
54
|
+
</div>
|
55
|
+
-->
|
56
|
+
<div id="fullpage">
|
57
|
+
<div id="pager">
|
58
|
+
<table>
|
59
|
+
<tr><td><img src="../rubyfr.png" /></td>
|
60
|
+
<td id="pagertd">
|
61
|
+
<strong># Module: BivouacHelpers<br />
|
62
|
+
[
|
63
|
+
"<a href="../files/README.html" value="File: README">README</a>",
|
64
|
+
"<a href="../files/AUTHORS.html" value="File: AUTHORS">AUTHORS</a>",
|
65
|
+
"<a href="../files/COPYING.html" value="File: COPYING">COPYING</a>",
|
66
|
+
"<a href="../files/lib/bivouac/helpers/view/goh/base_rb.html" value="File: base.rb">lib/bivouac/helpers/view/goh/base.rb</a>",
|
67
|
+
"<a href="../files/lib/bivouac/helpers/view/goh/form_rb.html" value="File: form.rb">lib/bivouac/helpers/view/goh/form.rb</a>",
|
68
|
+
"<a href="../files/lib/bivouac/helpers/view/goh/html_rb.html" value="File: html.rb">lib/bivouac/helpers/view/goh/html.rb</a>",
|
69
|
+
"<a href="../files/lib/bivouac/helpers/view/goh/tooltip_rb.html" value="File: tooltip.rb">lib/bivouac/helpers/view/goh/tooltip.rb</a>",
|
70
|
+
"<a href="../files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html" value="File: scriptaculous.rb">lib/bivouac/helpers/view/goh/scriptaculous.rb</a>",
|
71
|
+
"<a href="../files/lib/bivouac/helpers/view/goh/javascript_rb.html" value="File: javascript.rb">lib/bivouac/helpers/view/goh/javascript.rb</a>",
|
72
|
+
<a href="http://greg.rubyfr.net">nil</a>].each do<br />
|
73
|
+
<a href="../classes/JavaScriptGenerator.html" title="Class: JavaScriptGenerator">JavaScriptGenerator</a>.view_html<br />
|
74
|
+
<a href="../classes/BivouacHelpers.html" title="Module: BivouacHelpers">BivouacHelpers</a>.view_html<br />
|
75
|
+
<a href="../classes/BivouacHelpers/TooltipView.html" title="Module: BivouacHelpers::TooltipView">BivouacHelpers::TooltipView</a>.view_html<br />
|
76
|
+
<a href="../classes/BivouacHelpers/ScriptAculoUsView.html" title="Module: BivouacHelpers::ScriptAculoUsView">BivouacHelpers::ScriptAculoUsView</a>.view_html<br />
|
77
|
+
<a href="../classes/BivouacHelpers/BaseView.html" title="Module: BivouacHelpers::BaseView">BivouacHelpers::BaseView</a>.view_html<br />
|
78
|
+
<a href="../classes/BivouacHelpers/JavaScriptView.html" title="Module: BivouacHelpers::JavaScriptView">BivouacHelpers::JavaScriptView</a>.view_html<br />
|
79
|
+
<a href="../classes/BivouacHelpers/HtmlView.html" title="Module: BivouacHelpers::HtmlView">BivouacHelpers::HtmlView</a>.view_html<br />
|
80
|
+
<a href="../classes/BivouacHelpers/FormView.html" title="Module: BivouacHelpers::FormView">BivouacHelpers::FormView</a>.view_html<br />
|
81
|
+
end</strong>
|
82
|
+
</td></tr>
|
83
|
+
</table>
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
<div id="BivouacHelpers" class="page_shade">
|
89
|
+
<div class="page">
|
90
|
+
<h3>Module BivouacHelpers < Object</h3>
|
91
|
+
|
92
|
+
(in files
|
93
|
+
<a href="../files/lib/bivouac/helpers/view/goh/base_rb.html">lib/bivouac/helpers/view/goh/base.rb</a>
|
94
|
+
<a href="../files/lib/bivouac/helpers/view/goh/form_rb.html">lib/bivouac/helpers/view/goh/form.rb</a>
|
95
|
+
<a href="../files/lib/bivouac/helpers/view/goh/html_rb.html">lib/bivouac/helpers/view/goh/html.rb</a>
|
96
|
+
<a href="../files/lib/bivouac/helpers/view/goh/tooltip_rb.html">lib/bivouac/helpers/view/goh/tooltip.rb</a>
|
97
|
+
<a href="../files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html">lib/bivouac/helpers/view/goh/scriptaculous.rb</a>
|
98
|
+
<a href="../files/lib/bivouac/helpers/view/goh/javascript_rb.html">lib/bivouac/helpers/view/goh/javascript.rb</a>
|
99
|
+
)
|
100
|
+
|
101
|
+
<p>
|
102
|
+
bivouac/helpers/view/html
|
103
|
+
</p>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</body>
|
117
|
+
</html>
|