Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit df6762d

Browse files
toddparkerWilto
authored andcommitted
Added mini feature to api ref, options tab, button pages.
1 parent 9a4dfd0 commit df6762d

File tree

11 files changed

+412
-15
lines changed

11 files changed

+412
-15
lines changed

css/structure/jquery.mobile.core.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ div.ui-mobile-viewport { overflow-x: hidden; }
4545
.ui-bar h1, .ui-bar h2, .ui-bar h3, .ui-bar h4, .ui-bar h5, .ui-bar h6 { margin: 0; padding: 0; font-size: 16px; display: inline-block; }
4646

4747
.ui-header, .ui-footer { position: relative; overflow: hidden; width: 100%; border-left-width: 0; border-right-width: 0; }
48-
.ui-header .ui-btn-left { position: absolute; left: 10px; top: .4em; }
48+
.ui-header .ui-btn-left { position: absolute; left: 10px; top: .em; }
4949
.ui-header .ui-btn-right { position: absolute; right: 10px; top: .4em; }
5050
.ui-header .ui-title, .ui-footer .ui-title { min-height: 1.1em; text-align: center; font-size: 16px; display: block; margin: .6em 30% .8em; padding: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; outline: 0 !important; }
5151
.ui-footer .ui-title { margin: .6em 15px .8em; }

docs/api/data-attributes.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ <h2><a href="../buttons/buttons-types.html">Button</a></h2>
5454
<th>data-inline</th>
5555
<td>true | <strong>false</strong></td>
5656
</tr>
57+
<tr>
58+
<th>data-mini</th>
59+
<td>true | <strong>false</strong> - Compact sized version</td>
60+
</tr>
5761
<tr>
5862
<th>data-shadow</th>
5963
<td><strong>true</strong> | false</td>
@@ -73,6 +77,10 @@ <h2><a href="../forms/checkboxes/">Checkbox</a></h2>
7377
<th>data-role</th>
7478
<td>none (prevents auto-enhancement to use native control)</td>
7579
</tr>
80+
<tr>
81+
<th>data-mini</th>
82+
<td>true | <strong>false</strong> - Compact sized version</td>
83+
</tr>
7684
<tr>
7785
<th>data-theme</th>
7886
<td>swatch letter (a-z) - Added to the form element</td>
@@ -90,6 +98,10 @@ <h2><a href="../content/content-collapsible.html">Collapsible</a></h2>
9098
<th>data-content-theme</th>
9199
<td>swatch letter (a-z)</td>
92100
</tr>
101+
<tr>
102+
<th>data-mini</th>
103+
<td>true | <strong>false</strong> - Compact sized version</td>
104+
</tr>
93105
<tr>
94106
<th>data-theme</th>
95107
<td>swatch letter (a-z)</td>
@@ -103,6 +115,10 @@ <h2><a href="../content/content-collapsible-set.html">Collapsible set</a></h2>
103115
<th>data-content-theme</th>
104116
<td>swatch letter (a-z) - Sets all collapsibles in set</td>
105117
</tr>
118+
<tr>
119+
<th>data-mini</th>
120+
<td>true | <strong>false</strong> - Compact sized version</td>
121+
</tr>
106122
<tr>
107123
<th>data-theme</th>
108124
<td>swatch letter (a-z) - Sets all collapsibles in set</td>
@@ -158,6 +174,10 @@ <h2><a href="../forms/switch/">Flip toggle switch</a></h2>
158174
<th>data-role</th>
159175
<td>none (prevents auto-enhancement to use native control)</td>
160176
</tr>
177+
<tr>
178+
<th>data-mini</th>
179+
<td>true | <strong>false</strong> - Compact sized version</td>
180+
</tr>
161181
<tr>
162182
<th>data-theme</th>
163183
<td>swatch letter (a-z) - Added to the form element</td>
@@ -354,6 +374,10 @@ <h2><a href="../forms/radiobuttons/">Radio button</a></h2>
354374
<th>data-role</th>
355375
<td>none (prevents auto-enhancement to use native control)</td>
356376
</tr>
377+
<tr>
378+
<th>data-mini</th>
379+
<td>true | <strong>false</strong> - Compact sized version</td>
380+
</tr>
357381
<tr>
358382
<th>data-theme</th>
359383
<td>swatch letter (a-z) - Added to the form element</td>
@@ -375,6 +399,10 @@ <h2><a href="../forms/selects/">Select</a></h2>
375399
<th>data-inline</th>
376400
<td>true | <strong>false</strong></td>
377401
</tr>
402+
<tr>
403+
<th>data-mini</th>
404+
<td>true | <strong>false</strong> - Compact sized version</td>
405+
</tr>
378406
<tr>
379407
<th>data-native-menu</th>
380408
<td><strong>true</strong> | false</td>
@@ -401,6 +429,14 @@ <h2><a href="../forms/selects/">Select</a></h2>
401429
<h2><a href="../forms/slider/">Slider</a></h2>
402430
<p>Inputs with <code>type="range"</code> are auto-enhanced, no <code>data-role</code> required</p>
403431
<table>
432+
<tr>
433+
<th>data-highlight</th>
434+
<td>true | <strong>false</strong> - Adds an active state fill on track to handle</td>
435+
</tr>
436+
<tr>
437+
<th>data-mini</th>
438+
<td>true | <strong>false</strong> - Compact sized version</td>
439+
</tr>
404440
<tr>
405441
<th>data-role</th>
406442
<td>none (prevents auto-enhancement to use native control)</td>
@@ -418,6 +454,10 @@ <h2><a href="../forms/slider/">Slider</a></h2>
418454
<h2><a href="../forms/textinputs/">Text input &amp; Textarea</a></h2>
419455
<p>Input <code>type="text|number|search|etc."</code> or <code>textarea</code> elements are auto-enhanced, no <code>data-role</code> required</p>
420456
<table>
457+
<tr>
458+
<th>data-mini</th>
459+
<td>true | <strong>false</strong> - Compact sized version</td>
460+
</tr>
421461
<tr>
422462
<th>data-role</th>
423463
<td>none (prevents auto-enhancement to use native control)</td>

docs/buttons/buttons-inline.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ <h1>Inline buttons</h1>
4343

4444
<a href="index.html" data-role="button" data-inline="true">Cancel</a>
4545
<a href="index.html" data-role="button" data-theme="b" data-inline="true">Save</a>
46+
47+
<p>Adding the <code>data-mini="true"</code> to the inline buttons creates a more compact version:</p>
48+
49+
<a href="index.html" data-role="button" data-inline="true" data-mini="true">Cancel</a>
50+
<a href="index.html" data-role="button" data-theme="b" data-inline="true" data-mini="true">Save</a>
4651

4752

4853
<p>If you want buttons to sit side-by-side but stretch to fill the width of the screen, you can use the <a href="../content/content-grids.html">content column grids</a> to put normal full-width buttons into 2- or 3-columns.</p>

docs/buttons/buttons-options.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ <h2>Button basics</h2>
7575
<a href="#" data-role="button" data-inline="true">Inline</a>
7676
</dd>
7777

78+
<dt><code>mini</code> <em>boolean</em></dt>
79+
<dd>
80+
<p class="default">default: null (false)</p>
81+
<p>If set to true, this will display a more compact version of the button that uses less vertical height. Possible values: true, false. This option is also exposed as a data attribute: <code>data-mini=&quot;true&quot;</code></p>
82+
<pre><code>$('a').buttonMarkup(<strong>{ mini: "true" }</strong>);</code></pre>
83+
<a href="#" data-role="button" data-mini="true">Inline</a>
84+
</dd>
85+
7886
<dt><code>shadow</code> <em>boolean</em></dt>
7987
<dd>
8088
<p class="default">default: true</p>

docs/buttons/buttons-types.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,20 @@ <h2>Styling links as buttons</h2>
4545
<p>Produces this <strong>link-based</strong> button:</p>
4646
<a href="index.html" data-role="button">Link button</a>
4747

48-
<p>Links styled like buttons have all the same visual options as true form-based buttons below, but there are a few important differences. Link-based buttons aren't part of the <code>button</code> plugin and only just use the underlying <code>buttonMarkup</code> plugin to generate the button styles so the form button methods (enable, disable, refresh) aren't supported. If you need to disable a link-based button (or any element), it's possible to apply the disabled class ui-disabled yourself with JavaScript to achieve the same effect.</p>
48+
<p><strong>Note:</strong> Links styled like buttons have all the same visual options as true form-based buttons below, but there are a few important differences. Link-based buttons aren't part of the <code>button</code> plugin and only just use the underlying <code>buttonMarkup</code> plugin to generate the button styles so the form button methods (enable, disable, refresh) aren't supported. If you need to disable a link-based button (or any element), it's possible to apply the disabled class ui-disabled yourself with JavaScript to achieve the same effect.</p>
49+
50+
<h2>Mini size</h2>
51+
52+
<p>For a more compact version that is useful in toolbars and tight spaces, add the <code>data-mini="true"</code> attribute to the button to create a <a href="../forms/forms-all-mini.html">mini version</a>. </p>
53+
54+
<pre><code>
55+
&lt;a href=&quot;index.html&quot; data-role=&quot;button&quot;&gt;Link button&lt;/a <strong>data-mini=&quot;true&quot;</strong> &gt;
56+
</code></pre>
57+
58+
<p>This will produce a search input that a not as tall as the standard version and has a smaller text size.</p>
59+
<a href="index.html" data-role="button" data-mini="true">Link button</a>
60+
61+
4962

5063
<h2>Form buttons</h2>
5164
<p>For ease of styling, the framework automatically converts any <code>button</code> or <code>input</code> element with a <code>type</code> of <code>submit</code>, <code>reset</code>, <code>button</code>, or <code>image</code> into a custom styled button &mdash; there is no need to add the <code> data-role="button"</code> attribute. However, if needed, you can directly call the button plugin on any selector, just like any jQuery plugin:</p>

docs/content/content-collapsible-set.html

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,41 @@ <h3>Section 1</h3>
5353
<div data-role="collapsible">
5454
<h3>Section 2</h3>
5555
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
56-
5756
</div>
5857
<div data-role="collapsible">
5958
<h3>Section 3</h3>
6059
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
61-
6260
</div>
6361
<div data-role="collapsible">
6462
<h3>Section 4</h3>
6563
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
66-
6764
</div>
6865
<div data-role="collapsible">
6966
<h3>Section 5</h3>
7067
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
71-
7268
</div>
7369
</div>
7470

71+
<h2>Mini collapsible sets</h2>
72+
73+
<p>For a more compact version that is useful in tight spaces, add the <code>data-mini="true"</code> attribute to the element to create a <a href="../forms-all-mini.html">mini version</a>. </p>
74+
75+
<div data-role="collapsible-set" data-theme="c" data-content-theme="d" data-mini="true">
76+
<div data-role="collapsible">
77+
<h3>Section 1</h3>
78+
<p>Collapsible content</p>
79+
</div>
80+
<div data-role="collapsible">
81+
<h3>Section 2</h3>
82+
<p>Collapsible content</p>
83+
84+
</div>
85+
<div data-role="collapsible">
86+
<h3>Section 3</h3>
87+
<p>Collapsible content</p>
88+
</div>
89+
</div>
90+
7591
<h2>Theming collapsible content</h2>
7692
<p>The standard <code>data-theme</code> attribute can be used to set the color of each collapsible in a set. To provide a clearer visual grouping of the content with the headers, add the <code>data-content-theme</code> attribute with a swatch letter. This adds a themed background color and border to the content block. For consistent theming, add these attributes to the parent collapsible set.</p>
7793

docs/content/content-collapsible.html

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ <h3>I'm a header</h3>
4545

4646
<h2>Expanding collapsibles on load</h2>
4747

48-
<p>To expand the content when the page loads, add the <code>data-collapsed="false"</code> attribute to the wrapper.</p>
48+
<p>To expand the content when the page loads, add the <code>data-collapsed="false"</code> attribute to the wrapper.</p>
4949

50-
<code>
51-
&lt;div data-role=&quot;collapsible&quot; <strong>data-collapsed=&quot;false&quot;&gt;</strong>
52-
</code>
50+
<code>
51+
&lt;div data-role=&quot;collapsible&quot; <strong>data-collapsed=&quot;false&quot;&gt;</strong>
52+
</code>
5353

5454
<p>This code will create a collapsible widget like this:</p>
5555

@@ -59,6 +59,21 @@ <h3>I'm a header</h3>
5959
<p>I'm the collapsible content. I'm expanded by default because I have the "collapsed" state set to false.</p>
6060
</div>
6161

62+
<h2>Mini collapsibles</h2>
63+
64+
<p>For a more compact version that is useful in toolbars and tight spaces, add the <code>data-mini="true"</code> attribute to the element to create a <a href="../forms-all-mini.html">mini version</a>. </p>
65+
66+
<code>
67+
&lt;div data-role=&quot;collapsible&quot; <strong>data-mini=&quot;true&quot;&gt;</strong>
68+
</code>
69+
70+
<p>This code will create a mini collapsible widget:</p>
71+
72+
<div data-role="collapsible" data-mini="true">
73+
<h3>I'm a mini header</h3>
74+
<p>I'm the collapsible content. I'm expanded by default because I have the "collapsed" state set to false.</p>
75+
</div>
76+
6277
<h2>Theming collapsible content</h2>
6378

6479

docs/forms/forms-all-mini.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h1>Mini forms</h1>
2626

2727
<h2>Mini form elements</h2>
2828

29-
<p>All form controls accept a <code>data-mini="true"</code> attribute that renders a smaller version of the enhanced element. In the case of grouped buttons, the <code>data-mini="true"</code> attribute can be added to the containing controlgroup. <a href="forms-all-compare.html">Compare mini and normal form elements</a></p>
29+
<p>All form controls accept a <code>data-mini="true"</code> attribute that renders a smaller version of the <a href="forms-all.html">standard-sized</a> form elements. In the case of grouped buttons, the <code>data-mini="true"</code> attribute can be added to the containing controlgroup. <a href="forms-all-compare.html">Compare mini and normal</a> form elements side-by-side.</p>
3030

3131
<div data-role="fieldcontain">
3232
<label for="name">Text Input:</label>

docs/forms/forms-all.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ <h1>Forms</h1>
2626

2727
<h2>Form elements</h2>
2828

29-
<p>This page contains various progressive-enhancement driven form controls. Native elements are sometimes hidden from view, but their values are maintained so the form can be submitted normally. </p>
30-
31-
<p>Browsers that don't support the custom controls will still deliver a usable experience, because all are based on native form elements.</p>
29+
<p>This page contains various progressive-enhancement driven form controls. Native elements are sometimes hidden from view, but their values are maintained so the form can be submitted normally.Browsers that don't support the custom controls will still deliver a usable experience, because all are based on native form elements.</p>
30+
31+
<p>There is a complete set of <a href="forms-all-mini.html">mini-sized</a> form elements which are useful for toolbars or tighter spaces. <a href="forms-all-compare.html">Compare mini and normal</a> form elements side-by-side.</p>
3232

3333
<div data-role="fieldcontain">
3434
<label for="name">Text Input:</label>

docs/forms/slider/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ <h2>Mini version</h2>
8282

8383
<pre><code>
8484
&lt;label for=&quot;slider-0&quot;&gt;Input slider:&lt;/label&gt;
85-
&lt;input type=&quot;range&quot; name=&quot;slider&quot; id=&quot;slider-0&quot; value=&quot;25&quot; min=&quot;0&quot; max=&quot;100&quot; <strong>data-mini=&quot;true&quot;</strong> /&gt;
85+
&lt;input type=&quot;range&quot; name=&quot;slider&quot; id=&quot;slider-0&quot; value=&quot;25&quot; min=&quot;0&quot; max=&quot;100&quot; data-highlight=&quot;true&quot; <strong>data-mini=&quot;true&quot;</strong> /&gt;
8686
</code></pre>
8787

8888
<p>This will produce an input that a not as tall as the standard version and has a smaller text size.</p>

0 commit comments

Comments
 (0)