This commit is contained in:
jblas@adobe.com 2011-11-15 16:18:50 -08:00
commit 16aafad67e
5 changed files with 12 additions and 3 deletions

View file

@ -120,7 +120,8 @@ dd h4 { margin:15px 0 0 0; }
/* F bar theme - just for the docs overview headers */
.ui-bar-f {
border: 1px solid #56A00E;
border-top: 1px solid #56A00E;
border-bottom: 1px solid #56A00E;
background: #74b042;
color: #fff;
font-weight: bold;

View file

@ -88,12 +88,17 @@
<div data-role="fieldcontain">
<label for="flip-s">Server status:</label>
<select name="slider" id="flip-s" data-role="slider" disabled >
<select name="flip-s" id="flip-s" data-role="slider" disabled >
<option value="off">Off</option>
<option value="on">On</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="slider">Max bandwidth:</label>
<input type="range" name="slider" id="slider" value="0" min="0" max="100" disabled />
</div>
<div data-role="fieldcontain">
<label for="select-choice-x" class="select">Shipping:</label>
<select name="select-shipper" id="select-choice-x" disabled>

View file

@ -35,6 +35,8 @@
<p>If the Ajax request is successful, the new page content is added to the DOM, all mobile widgets are auto-initialized, then the new page is animated into view with a page transition.</p>
<p>If the Ajax request fails, the framework will display a small error message overlay (styled in the "e" swatch) that disappears after a brief time so this doesn't break the navigation flow. View an <a href="notapage.html">example of the error message</a>.</p>
<p><strong>Note:</strong> that you cannot link <strong>to</strong> multipage document with Ajax navigation active because the framework will only load the first page it finds, not the full set of internal pages. In these cases, you must link without Ajax (see next section) for a full page refresh to prevent potential hash collisions. There is currently a <a href="https://github.com/ToddThomson/jQuery-Mobile-Subpage-Widget" rel="external">subpage plugin</a> that makes it possible to load in multi-page documents.</p>
<h2>Linking without Ajax</h2>

View file

@ -129,6 +129,7 @@ $.ajaxPrefilter( function(options, originalOptions, jqXHR) {
<ul>
<li><p>When linking to directories, without a filename url, (such as <code>href="typesofcats/"</code> instead of <code>href="typesofcats/index.html"</code>), you must provide a trailing slash. This is because jQuery Mobile assumes the section after the last "/" character in a url is a filename, and it will remove that section when creating base urls from which future pages will be referenced.</p></li>
<li><p>Documents loaded via Ajax will select the first page in the DOM of that document to be loaded as a JQM page element. As a result the developer must make sure to manage the ID attributes of the loaded page and child elements to prevent confusion when manipulating the DOM.</p></li>
<li><p>If you link to multipage document, you must use a <code>data-ajax="false"</code> attribute on the link to cause a full page refresh due to the limitation above where we only load the first page node in an Ajax request due to potential hash collisions. There is currently a <a href="https://github.com/ToddThomson/jQuery-Mobile-Subpage-Widget" rel="external">subpage plugin</a> that makes it possible to load in multi-page documents. </p></li>
<li><p>Any unique assets referenced by pages in a jQuery Mobile-driven site should be placed inside the "page" element (the element with a <code>data-role</code> attribute of <code>"page"</code>). For example, links to styles and scripts that are specific to a particular page can be referenced inside that <code>div</code>. However, a better approach is to use jQuery Mobile's page events to trigger specific scripting when certain pages load. <strong>Note: </strong> you can return a page from the server with a <code>data-url</code> already specified in the markup, and jQuery Mobile will use that for the hash update. This allows you to ensure directory paths resolve with a trailing slash and will therefore be used in the base url path for future requests.</p></li>
<li><p>Conversely, any non-unique assets (those used site-wide) should be referenced in the <code>&lt;head&gt;</code> section of an HTML document, or at the very least, outside of the "page" element, to prevent running scripts more than once.</p></li>
<li><p>The <code>"ui-page"</code> key name used in sub-hash url references can be set to any value you'd like, so as to blend into your URL structure. This value is stored in <code>jQuery.mobile.subPageUrlKey</code>.</p></li>

View file

@ -74,7 +74,7 @@ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", functi
});
} else if ( role === "content" ) {
if ( contentTheme && pageRole === "dialog" ) {
if ( contentTheme ) {
$this.addClass( "ui-body-" + ( contentTheme ) );
}