source: other-projects/tipple-android/i-greenstone-server-files/greenstone/webapps/greenstone3/interfaces/default/js/jquery-ui-1.8.15/docs/progressbar.html@ 26899

Last change on this file since 26899 was 26899, checked in by davidb, 11 years ago

Tipple reborn after Chris's Summer of Code 2013

File size: 12.0 KB
Line 
1
2<ul class="UIAPIPlugin-toc">
3<li><a href="#overview">Overview</a></li>
4<li><a href="#options">Options</a></li>
5<li><a href="#events">Events</a></li>
6<li><a href="#methods">Methods</a></li>
7<li><a href="#theming">Theming</a></li>
8</ul>
9<div class="UIAPIPlugin">
10 <h1>jQuery UI Progressbar</h1>
11 <div id="overview">
12 <h2 class="top-header">Overview</h2>
13 <div id="overview-main">
14 <p>
15The progress bar is designed to simply display the current % complete for a process. The bar is coded to be flexibly sized through CSS and will scale to fit inside it's parent container by default.
16</p>
17<p>
18This is a determinate progress bar, meaning that it should only be used in situations where the system can accurately update the current status complete. A determinate progress bar should never fill from left to right, then loop back to empty for a single process -- if the actual percent complete status cannot be calculated, an indeterminate progress bar (coming soon) or spinner animation is a better way to provide user feedback.
19</p>
20 </div>
21 <div id="overview-dependencies">
22 <h3>Dependencies</h3>
23 <ul>
24<li>UI Core</li>
25<li>UI Widget</li>
26</ul>
27 </div>
28 <div id="overview-example">
29 <h3>Example</h3>
30 <div id="overview-example" class="example">
31<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
32<p><div id="demo" class="tabs-container" rel="100">
33A simple jQuery UI Progressbar.<br />
34</p>
35<pre>$(&quot;#progressbar&quot;).progressbar({ value: 37 });
36</pre>
37<p></div><div id="source" class="tabs-container">
38</p>
39<pre>&lt;!DOCTYPE html&gt;
40&lt;html&gt;
41&lt;head&gt;
42 &lt;link href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
43 &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js&quot;&gt;&lt;/script&gt;
44 &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
45
46 &lt;script&gt;
47 $(document).ready(function() {
48 $(&quot;#progressbar&quot;).progressbar({ value: 37 });
49 });
50 &lt;/script&gt;
51&lt;/head&gt;
52&lt;body style="font-size:62.5%;"&gt;
53
54&lt;div id=&quot;progressbar&quot;&gt;&lt;/div&gt;
55
56&lt;/body&gt;
57&lt;/html&gt;
58</pre>
59<p></div>
60</p><p></div>
61 </div>
62 </div>
63 <div id="options">
64 <h2 class="top-header">Options</h2>
65 <ul class="options-list">
66
67<li class="option" id="option-disabled">
68 <div class="option-header">
69 <h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
70 <dl>
71 <dt class="option-type-label">Type:</dt>
72 <dd class="option-type">Boolean</dd>
73
74 <dt class="option-default-label">Default:</dt>
75 <dd class="option-default">false</dd>
76
77 </dl>
78 </div>
79 <div class="option-description">
80 <p>Disables (true) or enables (false) the progressbar. Can be set when initialising (first creating) the progressbar.</p>
81 </div>
82 <div class="option-examples">
83 <h4>Code examples</h4>
84 <dl class="option-examples-list">
85
86<dt>
87 Initialize a progressbar with the <code>disabled</code> option specified.
88</dt>
89<dd>
90<pre><code>$( ".selector" ).progressbar({ disabled: true });</code></pre>
91</dd>
92
93
94<dt>
95 Get or set the <code>disabled</code> option, after init.
96</dt>
97<dd>
98<pre><code>//getter
99var disabled = $( ".selector" ).progressbar( "option", "disabled" );
100//setter
101$( ".selector" ).progressbar( "option", "disabled", true );</code></pre>
102</dd>
103
104 </dl>
105 </div>
106</li>
107
108
109<li class="option" id="option-value">
110 <div class="option-header">
111 <h3 class="option-name"><a href="#option-value">value</a></h3>
112 <dl>
113 <dt class="option-type-label">Type:</dt>
114 <dd class="option-type">Number</dd>
115
116 <dt class="option-default-label">Default:</dt>
117 <dd class="option-default">0</dd>
118
119 </dl>
120 </div>
121 <div class="option-description">
122 <p>The value of the progressbar.</p>
123 </div>
124 <div class="option-examples">
125 <h4>Code examples</h4>
126 <dl class="option-examples-list">
127
128<dt>
129 Initialize a progressbar with the <code>value</code> option specified.
130</dt>
131<dd>
132<pre><code>$( ".selector" ).progressbar({ value: 37 });</code></pre>
133</dd>
134
135
136<dt>
137 Get or set the <code>value</code> option, after init.
138</dt>
139<dd>
140<pre><code>//getter
141var value = $( ".selector" ).progressbar( "option", "value" );
142//setter
143$( ".selector" ).progressbar( "option", "value", 37 );</code></pre>
144</dd>
145
146 </dl>
147 </div>
148</li>
149
150 </ul>
151 </div>
152 <div id="events">
153 <h2 class="top-header">Events</h2>
154 <ul class="events-list">
155
156<li class="event" id="event-create">
157 <div class="event-header">
158 <h3 class="event-name"><a href="#event-create">create</a></h3>
159 <dl>
160 <dt class="event-type-label">Type:</dt>
161 <dd class="event-type">progressbarcreate</dd>
162 </dl>
163 </div>
164 <div class="event-description">
165 <p>This event is triggered when progressbar is created.</p>
166 </div>
167 <div class="event-examples">
168 <h4>Code examples</h4>
169 <dl class="event-examples-list">
170
171<dt>
172 Supply a callback function to handle the <code>create</code> event as an init option.
173</dt>
174<dd>
175<pre><code>$( &quot;.selector&quot; ).progressbar({
176 create: function(event, ui) { ... }
177});</code></pre>
178</dd>
179
180
181<dt>
182 Bind to the <code>create</code> event by type: <code>progressbarcreate</code>.
183</dt>
184<dd>
185<pre><code>$( &quot;.selector&quot; ).bind( &quot;progressbarcreate&quot;, function(event, ui) {
186 ...
187});</code></pre>
188</dd>
189
190 </dl>
191 </div>
192</li>
193
194
195<li class="event" id="event-change">
196 <div class="event-header">
197 <h3 class="event-name"><a href="#event-change">change</a></h3>
198 <dl>
199 <dt class="event-type-label">Type:</dt>
200 <dd class="event-type">progressbarchange</dd>
201 </dl>
202 </div>
203 <div class="event-description">
204 <p>This event is triggered when the value of the progressbar changes.</p>
205 </div>
206 <div class="event-examples">
207 <h4>Code examples</h4>
208 <dl class="event-examples-list">
209
210<dt>
211 Supply a callback function to handle the <code>change</code> event as an init option.
212</dt>
213<dd>
214<pre><code>$( &quot;.selector&quot; ).progressbar({
215 change: function(event, ui) { ... }
216});</code></pre>
217</dd>
218
219
220<dt>
221 Bind to the <code>change</code> event by type: <code>progressbarchange</code>.
222</dt>
223<dd>
224<pre><code>$( &quot;.selector&quot; ).bind( &quot;progressbarchange&quot;, function(event, ui) {
225 ...
226});</code></pre>
227</dd>
228
229 </dl>
230 </div>
231</li>
232
233
234<li class="event" id="event-complete">
235 <div class="event-header">
236 <h3 class="event-name"><a href="#event-complete">complete</a></h3>
237 <dl>
238 <dt class="event-type-label">Type:</dt>
239 <dd class="event-type">progressbarcomplete</dd>
240 </dl>
241 </div>
242 <div class="event-description">
243 <p>This event is triggered when the value of the progressbar reaches the maximum value of 100.</p>
244 </div>
245 <div class="event-examples">
246 <h4>Code examples</h4>
247 <dl class="event-examples-list">
248
249<dt>
250 Supply a callback function to handle the <code>complete</code> event as an init option.
251</dt>
252<dd>
253<pre><code>$( &quot;.selector&quot; ).progressbar({
254 complete: function(event, ui) { ... }
255});</code></pre>
256</dd>
257
258
259<dt>
260 Bind to the <code>complete</code> event by type: <code>progressbarcomplete</code>.
261</dt>
262<dd>
263<pre><code>$( &quot;.selector&quot; ).bind( &quot;progressbarcomplete&quot;, function(event, ui) {
264 ...
265});</code></pre>
266</dd>
267
268 </dl>
269 </div>
270</li>
271
272 </ul>
273 </div>
274 <div id="methods">
275 <h2 class="top-header">Methods</h2>
276 <ul class="methods-list">
277
278<li class="method" id="method-destroy">
279 <div class="method-header">
280 <h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
281 <dl>
282 <dt class="method-signature-label">Signature:</dt>
283 <dd class="method-signature">.progressbar( "destroy"
284
285
286
287
288
289
290
291)</dd>
292 </dl>
293 </div>
294 <div class="method-description">
295 <p>Remove the progressbar functionality completely. This will return the element back to its pre-init state.</p>
296 </div>
297</li>
298
299
300<li class="method" id="method-disable">
301 <div class="method-header">
302 <h3 class="method-name"><a href="#method-disable">disable</a></h3>
303 <dl>
304 <dt class="method-signature-label">Signature:</dt>
305 <dd class="method-signature">.progressbar( "disable"
306
307
308
309
310
311
312
313)</dd>
314 </dl>
315 </div>
316 <div class="method-description">
317 <p>Disable the progressbar.</p>
318 </div>
319</li>
320
321
322<li class="method" id="method-enable">
323 <div class="method-header">
324 <h3 class="method-name"><a href="#method-enable">enable</a></h3>
325 <dl>
326 <dt class="method-signature-label">Signature:</dt>
327 <dd class="method-signature">.progressbar( "enable"
328
329
330
331
332
333
334
335)</dd>
336 </dl>
337 </div>
338 <div class="method-description">
339 <p>Enable the progressbar.</p>
340 </div>
341</li>
342
343
344<li class="method" id="method-option">
345 <div class="method-header">
346 <h3 class="method-name"><a href="#method-option">option</a></h3>
347 <dl>
348 <dt class="method-signature-label">Signature:</dt>
349 <dd class="method-signature">.progressbar( "option"
350
351, optionName
352
353, <span class="optional">[</span>value<span class="optional">] </span>
354
355
356
357)</dd>
358 </dl>
359 </div>
360 <div class="method-description">
361 <p>Get or set any progressbar option. If no value is specified, will act as a getter.</p>
362 </div>
363</li>
364
365
366<li class="method" id="method-option">
367 <div class="method-header">
368 <h3 class="method-name"><a href="#method-option">option</a></h3>
369 <dl>
370 <dt class="method-signature-label">Signature:</dt>
371 <dd class="method-signature">.progressbar( "option"
372
373, options
374
375
376
377
378
379)</dd>
380 </dl>
381 </div>
382 <div class="method-description">
383 <p>Set multiple progressbar options at once by providing an options object.</p>
384 </div>
385</li>
386
387
388<li class="method" id="method-widget">
389 <div class="method-header">
390 <h3 class="method-name"><a href="#method-widget">widget</a></h3>
391 <dl>
392 <dt class="method-signature-label">Signature:</dt>
393 <dd class="method-signature">.progressbar( "widget"
394
395
396
397
398
399
400
401)</dd>
402 </dl>
403 </div>
404 <div class="method-description">
405 <p>Returns the .ui-progressbar element.</p>
406 </div>
407</li>
408
409
410<li class="method" id="method-value">
411 <div class="method-header">
412 <h3 class="method-name"><a href="#method-value">value</a></h3>
413 <dl>
414 <dt class="method-signature-label">Signature:</dt>
415 <dd class="method-signature">.progressbar( "value"
416
417, <span class="optional">[</span>value<span class="optional">] </span>
418
419
420
421
422
423)</dd>
424 </dl>
425 </div>
426 <div class="method-description">
427 <p>This method gets or sets the current value of the progressbar.</p>
428 </div>
429</li>
430
431 </ul>
432 </div>
433 <div id="theming">
434 <h2 class="top-header">Theming</h2>
435 <p>The jQuery UI Progressbar plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
436</p>
437 <p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.progressbar.css stylesheet that can be modified. These classes are highlighed in bold below.
438</p>
439
440 <h3>Sample markup with jQuery UI CSS Framework classes</h3>
441 &lt;div class=&quot;<strong>ui-progressbar </strong>ui-widget ui-widget-content ui-corner-all&quot;&gt;<br />
442 &nbsp;&nbsp;&nbsp;&lt;div style=&quot;width: 37%;&quot; class=&quot;<strong>ui-progressbar-value</strong> ui-widget-header ui-corner-left&quot;&gt;&lt;/div&gt;<br />
443 &lt;/div&gt;
444 <p class="theme-note">
445 <strong>
446 Note: This is a sample of markup generated by the progressbar plugin, not markup you should use to create a progressbar. The only markup needed for that is &lt;div&gt;&lt;/div&gt;.
447 </strong>
448 </p>
449
450 </div>
451</div>
452
453</p><!--
454Pre-expand include size: 21669 bytes
455Post-expand include size: 26877 bytes
456Template argument size: 10769 bytes
457Maximum: 2097152 bytes
458-->
459
460<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3780-1!1!0!!en!2 and timestamp 20110801224126 -->
Note: See TracBrowser for help on using the repository browser.