Skip to content

Commit db80fa3

Browse files
committed
took header and content out of entries2html and added it to the example code. Fixes jquery#48
1 parent 9800a67 commit db80fa3

18 files changed

+117
-63
lines changed

entries/button.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,14 @@ $('[type="submit"]').button('refresh');
399399
</method>
400400
</methods>
401401
<example>
402+
<!--<height>200</height>-->
402403
<desc>A basic example of a button</desc>
403-
<code><![CDATA[]]></code>
404-
<html><![CDATA[
405-
<a href="index.html" data-role="button">A link button</a> ]]></html>
404+
<html><![CDATA[<div data-role="header">
405+
<h1>jQuery Mobile Example</h1>
406+
</div>
407+
<div data-role="content">
408+
<a href="index.html" data-role="button">A link button</a>
409+
</div>]]></html>
406410
</example>
407411
<category slug="widgets"/>
408412
</entry>

entries/checkbox.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,18 @@ $("input[type='checkbox']:first").attr("checked",true).checkboxradio("refresh");
113113
</methods>
114114
<example>
115115
<desc>A basic example of a checkbox in a fieldcontainer</desc>
116-
<code><![CDATA[]]></code>
117-
<html><![CDATA[
116+
<html><![CDATA[<div data-role="header">
117+
<h1>jQuery Mobile Example</h1>
118+
</div>
119+
<div data-role="content">
118120
<div data-role="fieldcontain">
119121
<fieldset data-role="controlgroup">
120122
<legend>Agree to the terms:</legend>
121123
<input type="checkbox" name="checkbox-2" id="checkbox-2" class="custom" />
122124
<label for="checkbox-2">I agree</label>
123125
</fieldset>
124-
</div> ]]></html>
126+
</div>
127+
</div> ]]></html>
125128
</example>
126129
<category slug="widgets"/>
127130
</entry>

entries/collapsible-set.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ $( "#myCollapsibleSet" ).children().trigger( "collapse" );
173173
</methods>
174174
<example>
175175
<desc>A basic example of a collapsible set.</desc>
176-
<code><![CDATA[]]></code>
177-
<html><![CDATA[
176+
<html><![CDATA[<div data-role="header">
177+
<h1>jQuery Mobile Example</h1>
178+
</div>
179+
<div data-role="content">
178180
<div data-role="collapsible-set">
179181
<div data-role="collapsible" data-collapsed="false">
180182
<h3>Section A</h3>
@@ -184,7 +186,8 @@ $( "#myCollapsibleSet" ).children().trigger( "collapse" );
184186
<h3>Section B</h3>
185187
<p>I'm the collapsible set content for section B.</p>
186188
</div>
187-
</div>]]></html>
189+
</div>
190+
</div>]]></html>
188191
</example>
189192
<category slug="widgets"/>
190193
</entry>

entries/collapsible.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,15 @@ $( ".selector" ).trigger( "expand" );
285285
</methods>
286286
<example>
287287
<desc>A basic example of a collapsible content block.</desc>
288-
<code><![CDATA[]]></code>
289-
<html><![CDATA[
288+
<html><![CDATA[<div data-role="header">
289+
<h1>jQuery Mobile Example</h1>
290+
</div>
291+
<div data-role="content">
290292
<div data-role="collapsible">
291293
<h3>I'm a header</h3>
292294
<p>I'm the collapsible content. By default I'm closed, but you can click the header to open me.</p>
293-
</div>]]></html>
295+
</div>
296+
</div>]]></html>
294297
</example>
295298
<category slug="widgets"/>
296299
</entry>

entries/dialog.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ $( document ).bind( "mobileinit", function() {
110110
</methods>
111111
<example>
112112
<desc>A basic example of opening a page as a dialog by adding <code>data-rel="dialog"</code> to the anchor tag.</desc>
113-
<html><![CDATA[
113+
<html><![CDATA[<div data-role="header">
114+
<h1>jQuery Mobile Example</h1>
115+
</div>
116+
<div data-role="content">
114117
<a href="#dialogPage" data-rel="dialog">Open dialog</a>
115118
</div>
116119
<div data-role="footer">
@@ -123,7 +126,8 @@ $( document ).bind( "mobileinit", function() {
123126
<h2>Dialog</h2>
124127
</div>
125128
<div data-role="content">
126-
<p>I am a dialog</p>]]></html>
129+
<p>I am a dialog</p>
130+
</div>]]></html>
127131
</example>
128132
<category slug="widgets"/>
129133
</entry>

entries/footer.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@
5757
<added>1.0</added>
5858
<example>
5959
<desc>A basic example of a footer</desc>
60-
<code><![CDATA[]]></code>
61-
<html><![CDATA[
62-
<div data-role="footer">
63-
<h4>Footer content</h4>
64-
</div> ]]></html>
60+
<html><![CDATA[<div data-role="header">
61+
<h1>jQuery Mobile Example</h1>
62+
</div>
63+
<div data-role="content">
64+
<p>Some content here</p>
65+
</div>
66+
<div data-role="footer">
67+
<h4>Footer content</h4>
68+
</div> ]]></html>
6569
</example>
6670
<category slug="widgets"/>
6771
</entry>

entries/grid-layout.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,16 @@
109109
</methods>
110110
<example>
111111
<desc>A basic example of grid layout</desc>
112-
<code><![CDATA[]]></code>
113-
<html><![CDATA[<fieldset class="ui-grid-a">
112+
<html><![CDATA[<div data-role="header">
113+
<h1>jQuery Mobile Example</h1>
114+
</div>
115+
<div data-role="content">
116+
<fieldset class="ui-grid-a">
114117
<div class="ui-grid-a">
115118
<div class="ui-block-a"><strong>I'm Block A</strong> and text inside will wrap.</div>
116119
<div class="ui-block-b"><strong>I'm Block B</strong> and text inside will wrap.</div>
117-
</div><!-- /grid-a -->]]></html>
120+
</div><!-- /grid-a -->
121+
</div>]]></html>
118122
</example>
119123
<category slug="misc"/>
120124
</entry>

entries/header.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,12 @@ If you're doing this programmatically, set this option inside the mobileinit eve
108108
<added>1.0</added>
109109
<example>
110110
<desc>A basic example of a header</desc>
111-
<code><![CDATA[]]></code>
112-
<html><![CDATA[
113-
<div data-role="header">
114-
<h1>Page Title</h1>
115-
</div> ]]></html>
111+
<html><![CDATA[<div data-role="header">
112+
<h1>Page Title</h1>
113+
</div>
114+
<div data-role="content">
115+
<p>Some content here</p>
116+
</div> ]]></html>
116117
</example>
117118
<category slug="widgets"/>
118119
</entry>

entries/listview.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,18 @@ $('.selector').listview('refresh');
310310
</methods>
311311
<example>
312312
<desc>A basic example of a listview</desc>
313-
<code><![CDATA[]]></code>
314-
<html><![CDATA[
313+
<html><![CDATA[<div data-role="header">
314+
<h1>jQuery Mobile Example</h1>
315+
</div>
316+
<div data-role="content">
315317
<ul data-role="listview">
316318
<li><a href="index.html">Acura</a></li>
317319
<li><a href="index.html">Audi</a></li>
318320
<li><a href="index.html">BMW</a></li>
319321
<li><a href="index.html">Cadillac</a></li>
320322
<li><a href="index.html">Chrysler</a></li>
321-
</ul> ]]></html>
323+
</ul>
324+
</div>]]></html>
322325
</example>
323326
<category slug="widgets"/>
324327
</entry>

entries/navbar.xml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,20 @@ $('div').navbar({
146146
</events>
147147
<example>
148148
<desc>A basic example of a navbar</desc>
149-
<code><![CDATA[]]></code>
150-
<html><![CDATA[
151-
<div data-role="navbar">
152-
<ul>
153-
<li><a href="#" class="ui-btn-active">One</a></li>
154-
<li><a href="#">Two</a></li>
155-
</ul>
156-
</div><!-- /navbar --> ]]></html>
149+
<html><![CDATA[<div data-role="header">
150+
<h1>jQuery Mobile Example</h1>
151+
</div>
152+
<div data-role="content">
153+
<p>Some Content here</p>
154+
</div>
155+
<div data-role="footer">
156+
<div data-role="navbar">
157+
<ul>
158+
<li><a href="#" class="ui-btn-active">One</a></li>
159+
<li><a href="#">Two</a></li>
160+
</ul>
161+
</div><!-- /navbar -->
162+
</div>]]></html>
157163
</example>
158164
<category slug="widgets"/>
159165
</entry>

entries/popup.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,12 +584,16 @@ $( ".selector" ).popup( "close" );
584584
</methods>
585585
<example>
586586
<desc>A basic example of a Popup.</desc>
587-
<html><![CDATA[
587+
<html><![CDATA[<div data-role="header">
588+
<h1>jQuery Mobile Example</h1>
589+
</div>
590+
<div data-role="content">
588591
<a href="#popupBasic" data-rel="popup">Open Popup</a>
589592
590593
<div data-role="popup" id="popupBasic">
591594
<p>This is a completely basic popup, no options set.<p>
592-
</div>]]></html>
595+
</div>
596+
</div>]]></html>
593597
</example>
594598
<category slug="widgets"/>
595599
</entry>

entries/radio-button.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ $("input[type='radio']:first").attr("checked",true).checkboxradio("refresh");
149149
<example>
150150
<desc>A basic example of vertically grouped radio buttons</desc>
151151
<code><![CDATA[]]></code>
152-
<html><![CDATA[
152+
<html><![CDATA[<div data-role="header">
153+
<h1>jQuery Mobile Example</h1>
154+
</div>
155+
<div data-role="content">
153156
<fieldset data-role="controlgroup">
154157
<legend>Choose a pet:</legend>
155158
<input type="radio" name="radio-choice" id="radio-choice-1" value="choice-1" checked="checked" />
@@ -163,7 +166,8 @@ $("input[type='radio']:first").attr("checked",true).checkboxradio("refresh");
163166
164167
<input type="radio" name="radio-choice" id="radio-choice-4" value="choice-4" />
165168
<label for="radio-choice-4">Lizard</label>
166-
</fieldset> ]]></html>
169+
</fieldset>
170+
</div>]]></html>
167171
</example>
168172
<category slug="widgets"/>
169173
</entry>

entries/search-input.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,13 @@ $('.selector').textinput('disable');
127127
</methods>
128128
<example>
129129
<desc>A basic example of a search input field</desc>
130-
<code><![CDATA[]]></code>
131-
<html><![CDATA[
130+
<html><![CDATA[<div data-role="header">
131+
<h1>jQuery Mobile Example</h1>
132+
</div>
133+
<div data-role="content">
132134
<label for="search-basic">Search Input:</label>
133-
<input type="search" name="search" id="search-basic" value="" /> ]]></html>
135+
<input type="search" name="search" id="search-basic" value="" />
136+
</div>]]></html>
134137
</example>
135138
<category slug="widgets"/>
136139
</entry>

entries/select.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,18 @@ $('select').selectmenu('refresh', true);
417417
</methods>
418418
<example>
419419
<desc>A basic example of a simple native select</desc>
420-
<code><![CDATA[]]></code>
421-
<html><![CDATA[
420+
<html><![CDATA[<div data-role="header">
421+
<h1>jQuery Mobile Example</h1>
422+
</div>
423+
<div data-role="content">
422424
<label for="select-choice-0" class="select">Shipping method:</label>
423425
<select name="select-choice-0" id="select-choice-0">
424426
<option value="standard">Standard: 7 day</option>
425427
<option value="rush">Rush: 3 days</option>
426428
<option value="express">Express: next day</option>
427429
<option value="overnight">Overnight</option>
428-
</select> ]]></html>
430+
</select>
431+
</div>]]></html>
429432
</example>
430433
<category slug="widgets"/>
431434
</entry>

entries/slider.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,13 @@ $('.selector').slider('refresh');
192192
</methods>
193193
<example>
194194
<desc>A basic example of a slider.</desc>
195-
<code><![CDATA[]]></code>
196-
<html><![CDATA[
195+
<html><![CDATA[<div data-role="header">
196+
<h1>jQuery Mobile Example</h1>
197+
</div>
198+
<div data-role="content">
197199
<label for="slider-0">Input slider:</label>
198-
<input type="range" name="slider-0" id="slider-0" value="60" min="0" max="100" /> ]]></html>
200+
<input type="range" name="slider-0" id="slider-0" value="60" min="0" max="100" />
201+
</div>]]></html>
199202
</example>
200203
<category slug="widgets"/>
201204
</entry>

entries/switch.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,16 @@ $('.selector').slider('refresh');
230230
</methods>
231231
<example>
232232
<desc>A basic example of a flip toggle switch.</desc>
233-
<code><![CDATA[]]></code>
234-
<html><![CDATA[
235-
<label for="flip-0">Select slider:</label>
233+
<html><![CDATA[<div data-role="header">
234+
<h1>jQuery Mobile Example</h1>
235+
</div>
236+
<div data-role="content">
237+
<label for="flip-0">Select slider:</label>
236238
<select name="flip-0" id="flip-0" data-role="slider">
237239
<option value="off">Off</option>
238240
<option value="on">On</option>
239-
</select> ]]></html>
241+
</select>
242+
</div> ]]></html>
240243
</example>
241244
<category slug="widgets"/>
242245
</entry>

entries/textinput.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,13 @@ $('.selector').textinput('disable');
166166
</methods>
167167
<example>
168168
<desc>A basic example of a search input field</desc>
169-
<code><![CDATA[]]></code>
170-
<html><![CDATA[
169+
<html><![CDATA[<div data-role="header">
170+
<h1>jQuery Mobile Example</h1>
171+
</div>
172+
<div data-role="content">
171173
<label for="basic">Text Input:</label>
172-
<input type="text" name="name" id="basic" value="" /> ]]></html>
174+
<input type="text" name="name" id="basic" value="" />
175+
</div>]]></html>
173176
</example>
174177
<category slug="widgets"/>
175178
</entry>

entries2html.xsl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717
&lt;body&gt;
1818

1919
&lt;div data-role="page"&gt;
20-
&lt;div data-role="header"&gt;
21-
&lt;h1&gt;jQuery Mobile Example&lt;/h1&gt;
22-
&lt;/div&gt;
23-
&lt;div data-role="content"&gt;<xsl:value-of select="html/text()"/>
24-
&lt;/div&gt;
20+
<xsl:value-of select="html/text()"/>
2521
&lt;/div&gt;<xsl:if test="code">
2622
&lt;script&gt;<xsl:value-of select="code/text()"/>&lt;/script&gt;</xsl:if>
2723

0 commit comments

Comments
 (0)