client/player/development-bundle/docs/progressbar.html
changeset 1 436d4791d7ac
equal deleted inserted replaced
0:ecdfc63274bf 1:436d4791d7ac
       
     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>
       
    15 The 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>
       
    18 This 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 </ul>
       
    26     </div>
       
    27     <div id="overview-example">
       
    28         <h3>Example</h3>
       
    29         <div id="overview-example" class="example">
       
    30 <ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
       
    31 <p><div id="demo" class="tabs-container" rel="100">
       
    32 A simple jQuery UI Progressbar.<br />
       
    33 </p>
       
    34 <pre>$(&quot;#progressbar&quot;).progressbar({ value: 37 });
       
    35 </pre>
       
    36 <p></div><div id="source" class="tabs-container">
       
    37 </p>
       
    38 <pre>&lt;!DOCTYPE html&gt;
       
    39 &lt;html&gt;
       
    40 &lt;head&gt;
       
    41   &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;
       
    42   &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;&gt;&lt;/script&gt;
       
    43   &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
       
    44   
       
    45   &lt;script&gt;
       
    46   $(document).ready(function() {
       
    47     $(&quot;#progressbar&quot;).progressbar({ value: 37 });
       
    48   });
       
    49   &lt;/script&gt;
       
    50 &lt;/head&gt;
       
    51 &lt;body style="font-size:62.5%;"&gt;
       
    52   
       
    53 &lt;div id=&quot;progressbar&quot;&gt;&lt;/div&gt;
       
    54 
       
    55 &lt;/body&gt;
       
    56 &lt;/html&gt;
       
    57 </pre>
       
    58 <p></div>
       
    59 </p><p></div>
       
    60     </div>
       
    61   </div>
       
    62   <div id="options">
       
    63     <h2 class="top-header">Options</h2>
       
    64     <ul class="options-list">
       
    65       
       
    66 <li class="option" id="option-disabled">
       
    67   <div class="option-header">
       
    68     <h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
       
    69     <dl>
       
    70       <dt class="option-type-label">Type:</dt>
       
    71         <dd class="option-type">Boolean</dd>
       
    72       
       
    73       <dt class="option-default-label">Default:</dt>
       
    74         <dd class="option-default">false</dd>
       
    75       
       
    76     </dl>
       
    77   </div>
       
    78   <div class="option-description">
       
    79     <p>Disables (true) or enables (false) the progressbar. Can be set when initialising (first creating) the progressbar.</p>
       
    80   </div>
       
    81   <div class="option-examples">
       
    82     <h4>Code examples</h4>
       
    83     <dl class="option-examples-list">
       
    84     
       
    85 <dt>
       
    86   Initialize a progressbar with the <code>disabled</code> option specified.
       
    87 </dt>
       
    88 <dd>
       
    89 <pre><code>$( ".selector" ).progressbar({ disabled: true });</code></pre>
       
    90 </dd>
       
    91 
       
    92     
       
    93 <dt>
       
    94   Get or set the <code>disabled</code> option, after init.
       
    95 </dt>
       
    96 <dd>
       
    97 <pre><code>//getter
       
    98 var disabled = $( ".selector" ).progressbar( "option", "disabled" );
       
    99 //setter
       
   100 $( ".selector" ).progressbar( "option", "disabled", true );</code></pre>
       
   101 </dd>
       
   102 
       
   103     </dl>
       
   104   </div>
       
   105 </li>
       
   106 
       
   107 
       
   108 <li class="option" id="option-value">
       
   109   <div class="option-header">
       
   110     <h3 class="option-name"><a href="#option-value">value</a></h3>
       
   111     <dl>
       
   112       <dt class="option-type-label">Type:</dt>
       
   113         <dd class="option-type">Number</dd>
       
   114       
       
   115       <dt class="option-default-label">Default:</dt>
       
   116         <dd class="option-default">0</dd>
       
   117       
       
   118     </dl>
       
   119   </div>
       
   120   <div class="option-description">
       
   121     <p>The value of the progressbar.</p>
       
   122   </div>
       
   123   <div class="option-examples">
       
   124     <h4>Code examples</h4>
       
   125     <dl class="option-examples-list">
       
   126     
       
   127 <dt>
       
   128   Initialize a progressbar with the <code>value</code> option specified.
       
   129 </dt>
       
   130 <dd>
       
   131 <pre><code>$( ".selector" ).progressbar({ value: 37 });</code></pre>
       
   132 </dd>
       
   133 
       
   134     
       
   135 <dt>
       
   136   Get or set the <code>value</code> option, after init.
       
   137 </dt>
       
   138 <dd>
       
   139 <pre><code>//getter
       
   140 var value = $( ".selector" ).progressbar( "option", "value" );
       
   141 //setter
       
   142 $( ".selector" ).progressbar( "option", "value", 37 );</code></pre>
       
   143 </dd>
       
   144 
       
   145     </dl>
       
   146   </div>
       
   147 </li>
       
   148 
       
   149     </ul>
       
   150   </div>
       
   151   <div id="events">
       
   152     <h2 class="top-header">Events</h2>
       
   153     <ul class="events-list">
       
   154       
       
   155 <li class="event" id="event-change">
       
   156   <div class="event-header">
       
   157     <h3 class="event-name"><a href="#event-change">change</a></h3>
       
   158     <dl>
       
   159       <dt class="event-type-label">Type:</dt>
       
   160         <dd class="event-type">progressbarchange</dd>
       
   161     </dl>
       
   162   </div>
       
   163   <div class="event-description">
       
   164     <p>This event is triggered when the value of the progressbar changes.</p>
       
   165   </div>
       
   166   <div class="event-examples">
       
   167     <h4>Code examples</h4>
       
   168     <dl class="event-examples-list">
       
   169     
       
   170 <dt>
       
   171   Supply a callback function to handle the <code>change</code> event as an init option.
       
   172 </dt>
       
   173 <dd>
       
   174 <pre><code>$( &quot;.selector&quot; ).progressbar({
       
   175    change: function(event, ui) { ... }
       
   176 });</code></pre>
       
   177 </dd>
       
   178 
       
   179     
       
   180 <dt>
       
   181   Bind to the <code>change</code> event by type: <code>progressbarchange</code>.
       
   182 </dt>
       
   183 <dd>
       
   184 <pre><code>$( &quot;.selector&quot; ).bind( &quot;progressbarchange&quot;, function(event, ui) {
       
   185   ...
       
   186 });</code></pre>
       
   187 </dd>
       
   188 
       
   189     </dl>
       
   190   </div>
       
   191 </li>
       
   192 
       
   193     </ul>
       
   194   </div>
       
   195   <div id="methods">
       
   196     <h2 class="top-header">Methods</h2>
       
   197     <ul class="methods-list">
       
   198       
       
   199 <li class="method" id="method-destroy">
       
   200   <div class="method-header">
       
   201     <h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
       
   202     <dl>
       
   203       <dt class="method-signature-label">Signature:</dt>
       
   204         <dd class="method-signature">.progressbar( "destroy"
       
   205 
       
   206 
       
   207 
       
   208 
       
   209 
       
   210 
       
   211 
       
   212 )</dd>
       
   213     </dl>
       
   214   </div>
       
   215   <div class="method-description">
       
   216     <p>Remove the progressbar functionality completely. This will return the element back to its pre-init state.</p>
       
   217   </div>
       
   218 </li>
       
   219 
       
   220 
       
   221 <li class="method" id="method-disable">
       
   222   <div class="method-header">
       
   223     <h3 class="method-name"><a href="#method-disable">disable</a></h3>
       
   224     <dl>
       
   225       <dt class="method-signature-label">Signature:</dt>
       
   226         <dd class="method-signature">.progressbar( "disable"
       
   227 
       
   228 
       
   229 
       
   230 
       
   231 
       
   232 
       
   233 
       
   234 )</dd>
       
   235     </dl>
       
   236   </div>
       
   237   <div class="method-description">
       
   238     <p>Disable the progressbar.</p>
       
   239   </div>
       
   240 </li>
       
   241 
       
   242 
       
   243 <li class="method" id="method-enable">
       
   244   <div class="method-header">
       
   245     <h3 class="method-name"><a href="#method-enable">enable</a></h3>
       
   246     <dl>
       
   247       <dt class="method-signature-label">Signature:</dt>
       
   248         <dd class="method-signature">.progressbar( "enable"
       
   249 
       
   250 
       
   251 
       
   252 
       
   253 
       
   254 
       
   255 
       
   256 )</dd>
       
   257     </dl>
       
   258   </div>
       
   259   <div class="method-description">
       
   260     <p>Enable the progressbar.</p>
       
   261   </div>
       
   262 </li>
       
   263 
       
   264 
       
   265 <li class="method" id="method-option">
       
   266   <div class="method-header">
       
   267     <h3 class="method-name"><a href="#method-option">option</a></h3>
       
   268     <dl>
       
   269       <dt class="method-signature-label">Signature:</dt>
       
   270         <dd class="method-signature">.progressbar( "option"
       
   271 
       
   272 , optionName
       
   273 
       
   274 , <span class="optional">[</span>value<span class="optional">] </span>
       
   275 
       
   276 
       
   277 
       
   278 )</dd>
       
   279     </dl>
       
   280   </div>
       
   281   <div class="method-description">
       
   282     <p>Get or set any progressbar option. If no value is specified, will act as a getter.</p>
       
   283   </div>
       
   284 </li>
       
   285 
       
   286 
       
   287 <li class="method" id="method-option">
       
   288   <div class="method-header">
       
   289     <h3 class="method-name"><a href="#method-option">option</a></h3>
       
   290     <dl>
       
   291       <dt class="method-signature-label">Signature:</dt>
       
   292         <dd class="method-signature">.progressbar( "option"
       
   293 
       
   294 , options
       
   295 
       
   296 
       
   297 
       
   298 
       
   299 
       
   300 )</dd>
       
   301     </dl>
       
   302   </div>
       
   303   <div class="method-description">
       
   304     <p>Set multiple progressbar options at once by providing an options object.</p>
       
   305   </div>
       
   306 </li>
       
   307 
       
   308 
       
   309 <li class="method" id="method-widget">
       
   310   <div class="method-header">
       
   311     <h3 class="method-name"><a href="#method-widget">widget</a></h3>
       
   312     <dl>
       
   313       <dt class="method-signature-label">Signature:</dt>
       
   314         <dd class="method-signature">.progressbar( "widget"
       
   315 
       
   316 
       
   317 
       
   318 
       
   319 
       
   320 
       
   321 
       
   322 )</dd>
       
   323     </dl>
       
   324   </div>
       
   325   <div class="method-description">
       
   326     <p>Returns the .ui-progressbar element.</p>
       
   327   </div>
       
   328 </li>
       
   329 
       
   330 
       
   331 <li class="method" id="method-value">
       
   332   <div class="method-header">
       
   333     <h3 class="method-name"><a href="#method-value">value</a></h3>
       
   334     <dl>
       
   335       <dt class="method-signature-label">Signature:</dt>
       
   336         <dd class="method-signature">.progressbar( "value"
       
   337 
       
   338 , <span class="optional">[</span>value<span class="optional">] </span>
       
   339 
       
   340 
       
   341 
       
   342 
       
   343 
       
   344 )</dd>
       
   345     </dl>
       
   346   </div>
       
   347   <div class="method-description">
       
   348     <p>This method gets or sets the current value of the progressbar.</p>
       
   349   </div>
       
   350 </li>
       
   351 
       
   352     </ul>
       
   353   </div>
       
   354   <div id="theming">
       
   355     <h2 class="top-header">Theming</h2>
       
   356     <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.
       
   357 </p>
       
   358   <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.
       
   359 </p>
       
   360     
       
   361   <h3>Sample markup with jQuery UI CSS Framework classes</h3>
       
   362   &lt;div class=&quot;<strong>ui-progressbar </strong>ui-widget ui-widget-content ui-corner-all&quot;&gt;<br />
       
   363 	&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 />
       
   364 	&lt;/div&gt;
       
   365   <p class="theme-note">
       
   366     <strong>
       
   367       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;.
       
   368     </strong>
       
   369   </p>
       
   370 
       
   371   </div>
       
   372 </div>
       
   373 
       
   374 </p><!-- 
       
   375 Pre-expand include size: 18800 bytes
       
   376 Post-expand include size: 21667 bytes
       
   377 Template argument size: 8533 bytes
       
   378 Maximum: 2097152 bytes
       
   379 -->
       
   380 
       
   381 <!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3780-1!1!0!!en!2 and timestamp 20100421015944 -->