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

Commit 664f79d

Browse files
author
Gabriel Schulhof
committed
Demos: Use "document" referring to an HTML document and "page" otherwise
1 parent c0bd693 commit 664f79d

File tree

5 files changed

+44
-44
lines changed

5 files changed

+44
-44
lines changed

demos/external-widgets/info.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest' || isset( $_GET['source'])) { ?>
22
<!DOCTYPE html>
33
<html>
4-
<!-- This is an example of a page equipped to handle the startup of an application. It contains
5-
a <head> section common to all pages of the application, and its body contains the markup
6-
for all widgets that will be shared across pages. The body for each page of the application
7-
contains such markup. -->
4+
<!-- This is an example of an HTML document equipped to handle the startup of an application. It
5+
contains a <head> section common to all documents of the application, and its body contains
6+
the markup for all widgets that will be shared across pages. The body for each document of the
7+
application contains such markup. -->
88
<head>
99

1010
<!-- The various documents reachable from within your navigation system must all have the
@@ -42,9 +42,9 @@
4242
</ul>
4343
</div>
4444
<div id="shared-header" data-role="header" data-position="fixed" data-theme="a">
45-
<!-- Shared header markup must be added to all documents of the demo to ensure any of them
46-
can serve as the start page. The server can be instructed to omit sending this portion
47-
of the data whenever the request for the document is made via Ajax. -->
45+
<!-- Shared header markup must be added to all documents of the application to ensure any
46+
of them can serve as the start page. The server can be instructed to omit sending
47+
this portion of the data whenever the request for the document is made via Ajax. -->
4848
<a href="../toolbar/" data-rel="back" class="ui-btn ui-btn-left ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-notext ui-icon-carat-l">Back</a>
4949
<a href="#shared-panel" data-rel="panel" class="ui-btn ui-btn-right ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-right ui-icon-navigation">Navigation</a>
5050
<div data-role="popup" id="nav-menu" data-theme="a">
@@ -78,9 +78,9 @@
7878

7979
<?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest' || isset( $_GET['source'])) { ?>
8080
<div id="shared-navbar" data-role="footer" data-position="fixed" data-theme="a">
81-
<!-- Shared navbar markup must be added to all pages of the demo to ensure any of them can
82-
serve as the start page. The server can be instructed to omit sending this portion of
83-
the data whenever the request for the document is made via Ajax. -->
81+
<!-- Shared navbar markup must be added to all documents of the application to ensure any
82+
of them can serve as the start page. The server can be instructed to omit sending
83+
this portion of the data whenever the request for the document is made via Ajax. -->
8484
<div data-role="navbar">
8585
<ul>
8686
<li><a href="info.php" data-prefetch="true" data-transition="none">Info</a></li>

demos/external-widgets/page-b.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest' || isset( $_GET['source'])) { ?>
22
<!DOCTYPE html>
33
<html>
4-
<!-- This is an example of a page equipped to handle the startup of an application. It contains
5-
a <head> section common to all pages of the application, and its body contains the markup
6-
for all widgets that will be shared across pages. The body for each page of the application
7-
contains such markup. -->
4+
<!-- This is an example of an HTML document equipped to handle the startup of an application. It
5+
contains a <head> section common to all documents of the application, and its body contains
6+
the markup for all widgets that will be shared across pages. The body for each document of the
7+
application contains such markup. -->
88
<head>
99

1010
<!-- The various documents reachable from within your navigation system must all have the
@@ -42,9 +42,9 @@
4242
</ul>
4343
</div>
4444
<div id="shared-header" data-role="header" data-position="fixed" data-theme="a">
45-
<!-- Shared header markup must be added to all documents of the demo to ensure any of them
46-
can serve as the start page. The server can be instructed to omit sending this portion
47-
of the data whenever the request for the document is made via Ajax. -->
45+
<!-- Shared header markup must be added to all documents of the application to ensure any
46+
of them can serve as the start page. The server can be instructed to omit sending
47+
this portion of the data whenever the request for the document is made via Ajax. -->
4848
<a href="../toolbar/" data-rel="back" class="ui-btn ui-btn-left ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-notext ui-icon-carat-l">Back</a>
4949
<a href="#shared-panel" data-rel="panel" class="ui-btn ui-btn-right ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-right ui-icon-navigation">Navigation</a>
5050
<div data-role="popup" id="nav-menu" data-theme="a">
@@ -108,9 +108,9 @@
108108

109109
<?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest' || isset( $_GET['source'])) { ?>
110110
<div id="shared-navbar" data-role="footer" data-position="fixed" data-theme="a">
111-
<!-- Shared navbar markup must be added to all pages of the demo to ensure any of them can
112-
serve as the start page. The server can be instructed to omit sending this portion of
113-
the data whenever the request for the document is made via Ajax. -->
111+
<!-- Shared navbar markup must be added to all documents of the application to ensure any
112+
of them can serve as the start page. The server can be instructed to omit sending
113+
this portion of the data whenever the request for the document is made via Ajax. -->
114114
<div data-role="navbar">
115115
<ul>
116116
<li><a href="info.php" data-prefetch="true" data-transition="none">Info</a></li>

demos/external-widgets/page-c.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest' || isset( $_GET['source'])) { ?>
22
<!DOCTYPE html>
33
<html>
4-
<!-- This is an example of a page equipped to handle the startup of an application. It contains
5-
a <head> section common to all pages of the application, and its body contains the markup
6-
for all widgets that will be shared across pages. The body for each page of the application
7-
contains such markup. -->
4+
<!-- This is an example of an HTML document equipped to handle the startup of an application. It
5+
contains a <head> section common to all documents of the application, and its body contains
6+
the markup for all widgets that will be shared across pages. The body for each document of the
7+
application contains such markup. -->
88
<head>
99

1010
<!-- The various documents reachable from within your navigation system must all have the
@@ -42,9 +42,9 @@
4242
</ul>
4343
</div>
4444
<div id="shared-header" data-role="header" data-position="fixed" data-theme="a">
45-
<!-- Shared header markup must be added to all documents of the demo to ensure any of them
46-
can serve as the start page. The server can be instructed to omit sending this portion
47-
of the data whenever the request for the document is made via Ajax. -->
45+
<!-- Shared header markup must be added to all documents of the application to ensure any
46+
of them can serve as the start page. The server can be instructed to omit sending
47+
this portion of the data whenever the request for the document is made via Ajax. -->
4848
<a href="../toolbar/" data-rel="back" class="ui-btn ui-btn-left ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-notext ui-icon-carat-l">Back</a>
4949
<a href="#shared-panel" data-rel="panel" class="ui-btn ui-btn-right ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-right ui-icon-navigation">Navigation</a>
5050
<div data-role="popup" id="nav-menu" data-theme="a">
@@ -146,9 +146,9 @@
146146

147147
<?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest' || isset( $_GET['source'])) { ?>
148148
<div id="shared-navbar" data-role="footer" data-position="fixed" data-theme="a">
149-
<!-- Shared navbar markup must be added to all pages of the demo to ensure any of them can
150-
serve as the start page. The server can be instructed to omit sending this portion of
151-
the data whenever the request for the document is made via Ajax. -->
149+
<!-- Shared navbar markup must be added to all documents of the application to ensure any
150+
of them can serve as the start page. The server can be instructed to omit sending
151+
this portion of the data whenever the request for the document is made via Ajax. -->
152152
<div data-role="navbar">
153153
<ul>
154154
<li><a href="info.php" data-prefetch="true" data-transition="none">Info</a></li>

demos/external-widgets/page-d.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest' || isset( $_GET['source'])) { ?>
22
<!DOCTYPE html>
33
<html>
4-
<!-- This is an example of a page equipped to handle the startup of an application. It contains
5-
a <head> section common to all pages of the application, and its body contains the markup
6-
for all widgets that will be shared across pages. The body for each page of the application
7-
contains such markup. -->
4+
<!-- This is an example of an HTML document equipped to handle the startup of an application. It
5+
contains a <head> section common to all documents of the application, and its body contains
6+
the markup for all widgets that will be shared across pages. The body for each document of the
7+
application contains such markup. -->
88
<head>
99

1010
<!-- The various documents reachable from within your navigation system must all have the
@@ -42,9 +42,9 @@
4242
</ul>
4343
</div>
4444
<div id="shared-header" data-role="header" data-position="fixed" data-theme="a">
45-
<!-- Shared header markup must be added to all documents of the demo to ensure any of them
46-
can serve as the start page. The server can be instructed to omit sending this portion
47-
of the data whenever the request for the document is made via Ajax. -->
45+
<!-- Shared header markup must be added to all documents of the application to ensure any
46+
of them can serve as the start page. The server can be instructed to omit sending
47+
this portion of the data whenever the request for the document is made via Ajax. -->
4848
<a href="../toolbar/" data-rel="back" class="ui-btn ui-btn-left ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-notext ui-icon-carat-l">Back</a>
4949
<a href="#shared-panel" data-rel="panel" class="ui-btn ui-btn-right ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-right ui-icon-navigation">Navigation</a>
5050
<div data-role="popup" id="nav-menu" data-theme="a">
@@ -124,9 +124,9 @@
124124

125125
<?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest' || isset( $_GET['source'])) { ?>
126126
<div id="shared-navbar" data-role="footer" data-position="fixed" data-theme="a">
127-
<!-- Shared navbar markup must be added to all pages of the demo to ensure any of them can
128-
serve as the start page. The server can be instructed to omit sending this portion of
129-
the data whenever the request for the document is made via Ajax. -->
127+
<!-- Shared navbar markup must be added to all documents of the application to ensure any
128+
of them can serve as the start page. The server can be instructed to omit sending
129+
this portion of the data whenever the request for the document is made via Ajax. -->
130130
<div data-role="navbar">
131131
<ul>
132132
<li><a href="info.php" data-prefetch="true" data-transition="none">Info</a></li>

demos/external-widgets/shared-widget-init.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* You can place the code for initializing widgets that are shared by the various pages of your
22
application and which reside outside your application's jQuery Mobile pages into an external
3-
script which you can then reference from all your application's pages. This way, no matter which
4-
page ends up being your application's startup page, the shared widgets will always be functional
5-
and correctly enhanced. */
3+
script which you can then reference from all your application's documents. This way, no matter
4+
which document ends up being your application's startup page, the shared widgets will always be
5+
functional and correctly enhanced. */
66
$( function() {
77
function updateActivePage( href ) {
88
$( "a.ui-btn" )
@@ -15,7 +15,7 @@ $( function() {
1515
$( "[data-role='header'], [data-role='footer']" ).toolbar();
1616
$( "#nav-menu" ).popup();
1717
$( "#nav-menu-links" ).listview();
18-
$( "#shared-panel" ).enhanceWithin().panel();
18+
$( "#shared-panel" ).panel();
1919

2020
/* Since the navbar we use is outside the page, it does not update itself to indicate the currently
2121
active page. We manually update the navbar whenever the page changes. */

0 commit comments

Comments
 (0)