Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/jquery/jquery-mobile into…

… slide-panel-refactor
  • Loading branch information...
commit 65e838b15a7a8fc68bf268ad07d0e70894aabfc9 2 parents a8790bc + 495481c
Alexander Schmitz authored
Showing with 512 additions and 151 deletions.
  1. +1 −0  Makefile
  2. +1 −0  build/bin/config.sh
  3. +3 −1 build/bin/docs.sh
  4. +1 −1  css/structure/jquery.mobile.button.css
  5. +2 −0  css/structure/jquery.mobile.controlgroup.css
  6. +1 −2  css/structure/jquery.mobile.forms.checkboxradio.css
  7. +1 −1  css/structure/jquery.mobile.listview.css
  8. +6 −11 css/structure/jquery.mobile.popup.css
  9. BIN  docs/demos/_assets/img/album-bb.jpg
  10. BIN  docs/demos/_assets/img/bmw-thumb.jpg
  11. BIN  docs/demos/_assets/img/bmw.jpg
  12. BIN  docs/demos/_assets/img/landrover-thumb.jpg
  13. BIN  docs/demos/_assets/img/landrover.jpg
  14. BIN  docs/demos/_assets/img/tesla-thumb.jpg
  15. BIN  docs/demos/_assets/img/tesla.jpg
  16. +46 −12 docs/demos/_assets/js/view-source.js
  17. +10 −3 docs/demos/checkboxradio/checkboxradio.html
  18. +2 −0  docs/demos/index.html
  19. +119 −0 docs/demos/popups/dynamic-popup.html
  20. +12 −12 docs/demos/selects/custom-selects.html
  21. +6 −6 docs/demos/selects/selects.html
  22. +1 −1  docs/demos/sliders/rangeslider.html
  23. +1 −1  docs/demos/sliders/slider.html
  24. +1 −1  docs/demos/swipe/buenosaires.html
  25. +1 −1  docs/demos/swipe/capetown.html
  26. +1 −1  docs/demos/swipe/newyork.html
  27. +1 −1  docs/demos/swipe/paris.html
  28. +1 −1  docs/demos/swipe/seoul.html
  29. +167 −5 docs/demos/swipe/swipe-list.html
  30. +2 −2 docs/demos/swipe/swipe-page.html
  31. +1 −1  docs/demos/swipe/sydney.html
  32. +1 −1  docs/forms/docs-forms.html
  33. +1 −1  docs/forms/selects/index.html
  34. BIN  docs/lists/images/album-bb.jpg
  35. +12 −2 grunt.js
  36. +1 −1  js/events/navigate.js
  37. +3 −3 js/events/orientationchange.js
  38. +4 −2 js/events/touch.js
  39. +2 −2 js/jquery.mobile.buttonMarkup.js
  40. +6 −2 js/jquery.mobile.core.js
  41. +1 −1  js/jquery.mobile.degradeInputs.js
  42. +3 −3 js/jquery.mobile.init.js
  43. +7 −7 js/jquery.mobile.navigation.js
  44. +24 −3 js/jquery.mobile.support.js
  45. +4 −4 js/jquery.mobile.transition.js
  46. +2 −2 js/jquery.mobile.zoom.iosorientationfix.js
  47. +2 −2 js/navigation/navigator.js
  48. +1 −1  js/widgets/collapsible.js
  49. +1 −1  js/widgets/collapsibleSet.js
  50. +1 −1  js/widgets/controlgroup.js
  51. +1 −4 js/widgets/dialog.js
  52. +4 −4 js/widgets/fixedToolbar.js
  53. +3 −3 js/widgets/fixedToolbar.workarounds.js
  54. +2 −2 js/widgets/forms/button.js
  55. +1 −1  js/widgets/forms/checkboxradio.js
  56. +2 −2 js/widgets/forms/select.custom.js
  57. +6 −3 js/widgets/forms/select.js
  58. +1 −1  js/widgets/forms/slider.js
  59. +3 −3 js/widgets/forms/textinput.js
  60. +1 −1  js/widgets/listview.autodividers.js
  61. +1 −1  js/widgets/listview.filter.js
  62. +1 −1  js/widgets/listview.js
  63. +3 −3 js/widgets/loader.js
  64. +1 −1  js/widgets/navbar.js
  65. +1 −1  js/widgets/page.js
  66. +1 −1  js/widgets/page.sections.js
  67. +8 −8 js/widgets/popup.js
  68. +2 −2 js/widgets/table.columntoggle.js
  69. +1 −1  js/widgets/table.js
  70. +1 −1  js/widgets/table.reflow.js
  71. +4 −4 tests/unit/rangeslider/rangeslider_core.js
View
1  Makefile
@@ -35,6 +35,7 @@ js: init
# -------------------------------------------------
docs: init js css
@@${ARGS} bash build/bin/docs.sh
+ @@${ARGS} node node_modules/.bin/grunt concat:demosjs
# Output a message saying the process is complete
notify: init
View
1  build/bin/config.sh
@@ -27,6 +27,7 @@ OUTPUT="compiled"
# The name of the files
NAME="jquery.mobile"
+DEMOSNAME="jquery.mobile.demos"
BASE_NAME="jquery.mobile"
THEME_FILENAME="jquery.mobile.theme"
STRUCTURE="jquery.mobile.structure"
View
4 build/bin/docs.sh
@@ -13,6 +13,8 @@ cp compiled/*.css tmp/demos/css/themes/$THEME
cp -r compiled/images tmp/demos/css/themes/$THEME
# ... replace "js/" with "js/jquery.mobile.js"
# NOTE the deletion here is required by gnu/bsd sed differences
+find tmp/demos/docs/demos \( -name '*.html' -o -name '*.php' \) -exec sed -i${SED_INPLACE_EXT} -e "s@_assets/js/\"@_assets/js/$DEMOSNAME.js\"@" {} \;
+find tmp/demos/docs/demos -name "*$SED_INPLACE_EXT" -exec rm {} \;
find tmp/demos \( -name '*.html' -o -name '*.php' \) -exec sed -i${SED_INPLACE_EXT} -e "s@js/\"@js/$NAME.js\"@" {} \;
find tmp/demos -name "*$SED_INPLACE_EXT" -exec rm {} \;
# make sure the docs reference the right css file names (for deploy)
@@ -29,4 +31,4 @@ cd tmp/demos && zip -rq ../../$OUTPUT/$NAME.docs.zip * && cd -
rm -rf $OUTPUT/demos && mv -f tmp/demos $OUTPUT
# Finish by removing the temporary files
-rm -rf tmp
+rm -rf tmp
View
2  css/structure/jquery.mobile.button.css
@@ -5,7 +5,7 @@
.ui-btn-inner { font-size: 16px; padding: .6em 20px; min-width: .75em; display: block; position: relative; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; zoom: 1; }
.ui-btn input, .ui-btn button { z-index: 2; }
.ui-btn-left, .ui-btn-right, .ui-btn-inline { display: inline-block; vertical-align: middle; }
-.ui-mobile .ui-btn-left, .ui-mobile .ui-btn-right { margin: 0; } /* .ui-mobile to increase specificity level */
+.ui-mobile .ui-btn-left, .ui-mobile .ui-btn-right, .ui-btn-left > .ui-btn, .ui-btn-right > .ui-btn { margin: 0; } /* .ui-mobile to increase specificity level */
.ui-btn-block { display: block; }
.ui-header > .ui-btn,
View
2  css/structure/jquery.mobile.controlgroup.css
@@ -27,6 +27,8 @@
.ui-controlgroup-horizontal .ui-controlgroup-controls > .ui-btn, .ui-controlgroup-horizontal .ui-controlgroup-controls li > .ui-btn,
.ui-controlgroup-horizontal .ui-checkbox, .ui-controlgroup-horizontal .ui-radio,
.ui-controlgroup-horizontal .ui-select { float: left; clear: none; margin: 0; }
+/* On IE7 the floating selects will be displayed as block if .ui-btn-text has width 100% */
+.ui-controlgroup-horizontal .ui-select .ui-btn-text { width: auto; }
.ui-controlgroup-vertical .ui-btn { border-bottom-width: 0; }
.ui-controlgroup-vertical .ui-btn.ui-last-child { border-bottom-width: 1px; }
View
3  css/structure/jquery.mobile.forms.checkboxradio.css
@@ -1,6 +1,5 @@
.ui-checkbox, .ui-radio { position: relative; clear: both; margin: 0; z-index: 1; }
-.ui-checkbox .ui-btn, .ui-radio .ui-btn { margin-top: .5em; margin-bottom: .5em; text-align: left; z-index: 2; }
-.ui-checkbox .ui-btn.ui-mini, .ui-radio .ui-btn.ui-mini { margin: .25em 0; }
+.ui-checkbox .ui-btn, .ui-radio .ui-btn { text-align: left; z-index: 2; }
.ui-controlgroup .ui-checkbox .ui-btn, .ui-controlgroup .ui-radio .ui-btn { margin: 0; }
.ui-checkbox .ui-btn-inner, .ui-radio .ui-btn-inner { white-space: normal; }
View
2  css/structure/jquery.mobile.listview.css
@@ -51,7 +51,7 @@ ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid
}
.ui-li>.ui-btn-inner { display: block; position: relative; padding: 0; }
.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { padding: .7em 15px; display: block; }
-.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-thumb { min-height: 60px; padding-left: 100px; }
+.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-thumb { min-height: 59px; padding-left: 100px; }
.ui-li-has-icon .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-icon { min-height: 20px; padding-left: 40px; }
.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-count, .ui-li-divider.ui-li-has-count { padding-right: 45px; }
.ui-li-has-arrow .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-arrow { padding-right: 40px; }
View
17 css/structure/jquery.mobile.popup.css
@@ -1,7 +1,6 @@
.ui-popup-open .ui-header-fixed,
.ui-popup-open .ui-footer-fixed {
position: absolute !important; /* See line #553 of popup.js */
-
}
.ui-popup-screen {
background-image: url(data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==); /* Necessary to set some form of background to ensure element is clickable in IE6/7. While legacy IE won't understand the data-URI'd image, it ensures no additional requests occur in all other browsers with little overhead. */
@@ -14,17 +13,14 @@
opacity: 0;
z-index: 1099;
}
-
.ui-popup-screen.in {
opacity: 0.5;
filter: Alpha(Opacity=50);
}
-
.ui-popup-screen.out {
opacity: 0;
filter: Alpha(Opacity=0);
}
-
.ui-popup-container {
z-index: 1100;
display: inline-block;
@@ -32,16 +28,13 @@
padding: 0;
outline: 0;
}
-
.ui-popup {
position: relative;
}
-
.ui-popup.ui-content,
.ui-popup .ui-content {
overflow: visible;
}
-
.ui-popup > p,
.ui-popup > h1,
.ui-popup > h2,
@@ -91,7 +84,6 @@
.ui-popup-container .ui-content > h6:last-child {
margin-bottom: 0;
}
-
.ui-popup > img {
width: auto;
height: auto;
@@ -99,6 +91,12 @@
max-height: 100%;
vertical-align: middle;
}
+.ui-popup:not(.ui-content) > img:only-child,
+.ui-popup:not(.ui-content) > .ui-btn-left:first-child + img:last-child,
+.ui-popup:not(.ui-content) > .ui-btn-right:first-child + img:last-child {
+ -webkit-border-radius: inherit;
+ border-radius: inherit;
+}
.ui-popup iframe {
vertical-align: middle;
}
@@ -119,7 +117,6 @@
width: 100%; display: block;
}
}
-
.ui-popup > .ui-btn-left,
.ui-popup > .ui-btn-right {
position: absolute;
@@ -127,8 +124,6 @@
margin: 0;
z-index: 1101;
}
-
.ui-popup > .ui-btn-left { left: -9px; }
.ui-popup > .ui-btn-right { right: -9px; }
-
.ui-popup-hidden { top: -99999px; left: -9999px; }
View
BIN  docs/demos/_assets/img/album-bb.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  docs/demos/_assets/img/bmw-thumb.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  docs/demos/_assets/img/bmw.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  docs/demos/_assets/img/landrover-thumb.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  docs/demos/_assets/img/landrover.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  docs/demos/_assets/img/tesla-thumb.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  docs/demos/_assets/img/tesla.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
58 docs/demos/_assets/js/view-source.js
@@ -22,8 +22,6 @@ function attachPopupHandler( popup, sources ) {
});
}
-var demoId = 0;
-
function getHeadSnippet( type, selector ) {
if ( selector === "true" ) {
selector = "";
@@ -31,14 +29,52 @@ function getHeadSnippet( type, selector ) {
return $( "<div></div>" ).append( $( "head" ).find( type + selector ).contents().clone() ).html();
}
-$.fn.viewSourceCode = function() {
+$( document ).bind( "pagebeforechange", function( e, data ) {
+ var popup, sources;
+ if ( data.options && data.options.role === "popup" && data.options.link ) {
+ sources = data.options.link.jqmData( "sources" );
+ if ( sources ) {
+ popup = $( "<div class='jqm-demo' data-role='popup' data-theme='none' data-position-to='window'>" +
+ "<div data-role='collapsible-set' data-inset='true'></div>" +
+ "</div>" );
+
+ attachPopupHandler( popup, sources );
+ popup
+ .appendTo( $.mobile.activePage )
+ .popup()
+ .bind( "popupafterclose", function() {
+ popup.remove();
+ })
+ .popup( "open" );
+
+ e.preventDefault();
+ }
+ }
+});
+
+function makeButton() {
+ var d = document.createElement( "div" )
+ a = document.createElement( "a" );
+ d.className = "jqm-demo-link";
+
+ a.setAttribute( "href", "./" );
+ a.setAttribute( "data-rel", "popup" );
+ a.setAttribute( "data-role", "button" );
+ a.setAttribute( "data-icon", "arrow-u" );
+ a.setAttribute( "data-mini", "true" );
+ a.setAttribute( "data-inline", "true" );
+ a.setAttribute( "data-shadow", "false" );
+ a.innerHTML = "View Source";
+
+ d.appendChild( a );
+
+ return $( d );
+}
+
+$.fn.viewSourceCode = function() {
return $( this ).each( function() {
- demoId++
- var button = $( "<div class='jqm-demo-link'><a href='#jqm-demo-" + demoId + "' data-rel='popup' data-role='button' data-icon='arrow-u' data-mini='true' data-inline='true' data-shadow='false'>View Source</a></div>" ),
- popup = $( "<div id='jqm-demo-" + demoId + "' class='jqm-demo' data-role='popup' data-theme='none' data-position-to='window'>" +
- "<div data-role='collapsible-set' data-inset='true'></div>" +
- "</div>" ),
+ var button = makeButton(),
self = $( this ),
page = self.closest( "[data-role='page']" ),
fixData = function( data ) {
@@ -80,10 +116,8 @@ $.fn.viewSourceCode = function() {
sources.push( { title: "CSS", theme: "e", brush: "css", data: fixData( data ) } );
}
- attachPopupHandler( popup, sources );
button.insertAfter( this );
- popup.appendTo( page );
-
+ button.children().jqmData( "sources", sources );
});
};
@@ -108,7 +142,7 @@ $( document ).on( "pageinit", function( e ) {
$( this ).parents( ":mobile-popup" ).popup( "reposition", { positionTo: "window" } );
});
- $( ".jqm-demo" ).on( "popupbeforeposition", function() {
+ $( e.target ).delegate( ".jqm-demo", "popupbeforeposition", function() {
// max height: screen height - tolerance (2*30px) - 42px for each collapsible heading
var x = $( this ).find( ".ui-collapsible" ).length,
maxHeight = $.mobile.getScreenHeight() - 60 - ( x * 42 );
View
13 docs/demos/checkboxradio/checkboxradio.html
@@ -25,7 +25,14 @@
<form>
<h2>Radio button</h2>
-
+
+ <div data-demo-html="true">
+ <label><input type="radio" name="radio-choice-0" id="radio-choice-0a"/>One</label>
+
+ <label for="radio-choice-0b">Two</label>
+ <input type="radio" name="radio-choice-0" id="radio-choice-0b" class="custom" />
+ </div><!--/demo-html -->
+
<div data-demo-html="true">
<fieldset data-role="controlgroup">
<legend>Vertical:</legend>
@@ -77,10 +84,10 @@
<h2>Checkbox</h2>
<div data-demo-html="true">
- <label> <input type="checkbox" name="checkbox-0 "/>Single</label>
+ <label><input type="checkbox" name="checkbox-0 "/>One</label>
+ <label for="checkbox-1">Two</label>
<input type="checkbox" name="checkbox-1" id="checkbox-1" class="custom" />
- <label for="checkbox-1">Single</label>
</div><!--/demo-html -->
<div data-demo-html="true">
View
2  docs/demos/index.html
@@ -59,6 +59,8 @@ <h1 id="jqm-logo"><img src="_assets/img/jquery-logo.png" alt="jQuery Mobile Fram
<li><a href="grids/rwd-basics.html" data-ajax="false">Responsive (RWD) basics</a></li>
<li><a href="grids/grid-stack.html" data-ajax="false">Responsive grids, stack at mobile</a></li>
<li><a href="grids/grid-custom.html" data-ajax="false">Custom responsive grid</a></li>
+ <li data-role="list-divider">Popups</li>
+ <li><a href="popups/dynamic-popup.html" data-ajax="false">Dynamic popup</a></li>
<li data-role="list-divider">Responsive Tables</li>
<li><a href="tables/reflow-basic.html" data-ajax="false">Reflow: Basic</a></li>
<li><a href="tables/movie-list.html" data-ajax="false">Reflow: Movie</a></li>
View
119 docs/demos/popups/dynamic-popup.html
@@ -0,0 +1,119 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Dynamic popup - jQuery Mobile Demos</title>
+ <link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css">
+ <link rel="stylesheet" href="../_assets/css/jqm-demos.css">
+ <script src="../../../js/jquery.js"></script>
+ <script src="../_assets/js/"></script>
+ <script src="../../../js/"></script>
+ <script>
+ $( document ).on( "pageinit", "#demo-page", function() {
+
+ $( ".cars" ).on( "click", function() {
+ var target = $( this ),
+ brand = target.find( "h2" ).html(),
+ model = target.find( "p" ).html(),
+ short = target.attr( "id" ),
+ closebtn = '<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" data-shadow="false" data-iconshadow="false" class="ui-btn-right">Close</a>',
+ header = '<div data-role="header"><h2>' + brand + ' ' + model + '</h2></div>',
+ img = '<img src="../_assets/img/' + short + '.jpg" alt="' + brand + '" class="photo">',
+ popup = '<div data-role="popup" id="popup-' + short + '" data-short="' + short +'" data-theme="none" data-overlay-theme="a" data-corners="false" data-tolerance="15">' + closebtn + header + img + '</div>';
+
+ // Create the popup. Trigger "pagecreate" instead of "create" because currently the framework doesn't bind the enhancement of toolbars to the "create" event (js/widgets/page.sections.js).
+ $.mobile.activePage.append( popup ).trigger( "pagecreate" );
+ // Wait with opening the popup until the popup image has been loaded in the DOM.
+ // This ensures the popup gets the correct size and position
+ $( ".photo", "#popup-" + short ).load(function() {
+ var height = $( this ).height(),
+ width = $( this ).width();
+ // Set height and width attribute of the image
+ $( this ).attr({ "height": height, "width": width });
+ // Open the popup
+ $( "#popup-" + short ).popup( "open" );
+ // Clear the fallback
+ clearTimeout( fallback );
+ });
+ // Fallback in case the browser doesn't fire a load event
+ var fallback = setTimeout(function() {
+ $( "#popup-" + short ).popup( "open" );
+ }, 2000);
+ });
+
+ // Set a max-height to make large images shrink to fit the screen.
+ $( document ).on( "popupbeforeposition", ".ui-popup", function() {
+ // 68px: 2 * 15px for top/bottom tolerance, 38px for the header.
+ var maxHeight = $( window ).height() - 68 + "px";
+
+ $( "img.photo", this ).css( "max-height", maxHeight );
+ });
+
+ // Remove the popup after it has been closed to manage DOM size
+ $( document ).on( "popupafterclose", ".ui-popup", function() {
+ $( this ).remove();
+ });
+ });
+ </script>
+ <style>
+ /* Reduce the height of the header on smaller screens. */
+ @media all and (max-width: 48em){
+ .ui-popup .ui-title {
+ font-size: .75em;
+ }
+ }
+ </style>
+</head>
+<body>
+<div data-role="page" id="demo-intro">
+
+ <div data-role="header" data-theme="f">
+ <h1>Dynamic popup</h1>
+ <a href="../" data-icon="home" data-iconpos="notext" data-ajax="false">Home</a>
+ </div><!-- /header -->
+
+ <div data-role="content">
+
+ <div class="content-primary">
+
+ <h2>Dynamically creating a popup</h2>
+
+ <div data-demo-html="#demo-page" data-demo-js="true">
+ <p>This demo shows how you can dynamically create a popup. The popup contains images which means we have to set the image width and height to make sure the popup gets the right size and position. At client side we can only get the size when the image has been loaded in the DOM. In this demo we use the <code>load</code> event, but with a fallback because it has some caveats (see <a href="http://api.jquery.com/load-event/" rel="external">.load() - jQuery API</a>).</p>
+
+ <p><a href="#demo-page" data-transition="fade" data-role="button" data-inline="true" data-theme="c">Open dynamic popup demo</a></p>
+ </div><!--/demo-html -->
+
+ </div><!--/content-primary -->
+
+ </div><!-- /content -->
+
+ <div class="jqm-footer">
+ <p class="jqm-version"></p>
+ <p>&copy; 2012 jQuery Foundation and other contributors</p>
+ </div><!-- /jqm-footer -->
+
+</div><!-- /page -->
+
+<div data-role="page" id="demo-page" data-title="Cars">
+
+ <div data-role="header" data-theme="b">
+ <a href="#demo-intro" data-rel="back" data-icon="arrow-l" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
+ <h1>Cars</h1>
+ </div><!-- /header -->
+
+ <div data-role="content">
+
+ <ul data-role="listview">
+ <li><a href="#" class="cars" id="bmw"><img src="../_assets/img/bmw-thumb.jpg" alt="BMW"><h2>BMW</h2><p>5 series</p></a></li>
+ <li><a href="#" class="cars" id="landrover"><img src="../_assets/img/landrover-thumb.jpg" alt="Land Rover"><h2>Land Rover</h2><p>Discovery 4</p></a></li>
+ <li><a href="#" class="cars" id="tesla"><img src="../_assets/img/tesla-thumb.jpg" alt="Tesla"><h2>Tesla</h2><p>Model S</p></a></li>
+ </ul>
+
+ </div><!-- /content -->
+
+</div><!-- /page -->
+
+</body>
+</html>
View
24 docs/demos/selects/custom-selects.html
@@ -26,7 +26,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-1" class="select">Basic:</label>
+ <label for="select-custom-1">Basic:</label>
<select name="select-custom-1" id="select-custom-1" data-native-menu="false">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -38,7 +38,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-20" class="select">Long list:</label>
+ <label for="select-custom-20">Long list:</label>
<select name="select-custom-20" id="select-custom-20" data-native-menu="false">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
@@ -96,7 +96,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-2" class="select">Mini sized:</label>
+ <label for="select-custom-2">Mini sized:</label>
<select name="select-custom-2" id="select-custom-2" data-native-menu="false" data-mini="true">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -108,7 +108,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-3" class="select">Icon left:</label>
+ <label for="select-custom-3">Icon left:</label>
<select name="select-custom-3" id="select-custom-3" data-native-menu="false" data-iconpos="left">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -120,7 +120,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-21" class="select">Data-placeholder:</label>
+ <label for="select-custom-21">Data-placeholder:</label>
<select name="select-custom-21" id="select-custom-21" data-native-menu="false">
<option value="choose-one" data-placeholder="true">Choose one...</option>
<option value="1">The 1st Option</option>
@@ -133,7 +133,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-22" class="select">Option w/o value:</label>
+ <label for="select-custom-22">Option w/o value:</label>
<select name="select-custom-22" id="select-custom-22" data-native-menu="false">
<option>Choose one...</option>
<option value="1">The 1st Option</option>
@@ -146,7 +146,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-23" class="select">Empty option w/o value:</label>
+ <label for="select-custom-23">Empty option w/o value:</label>
<select name="select-custom-23" id="select-custom-23" data-native-menu="false">
<option></option>
<option value="1">The 1st Option</option>
@@ -159,7 +159,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-17" class="select">1 option selected:</label>
+ <label for="select-custom-17">1 option selected:</label>
<select name="select-custom-17" id="select-custom-17" data-native-menu="false">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -171,7 +171,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-18" class="select">1 option disabled:</label>
+ <label for="select-custom-18">1 option disabled:</label>
<select name="select-custom-18" id="select-custom-18" data-native-menu="false">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -183,7 +183,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-19" class="select">Multiple:</label>
+ <label for="select-custom-19">Multiple:</label>
<select name="select-custom-19" id="select-custom-19" multiple="multiple" data-native-menu="false">
<option>Choose options</option>
<option value="1">The 1st Option</option>
@@ -197,7 +197,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-24" class="select">Multiple, icon left, long list:</label>
+ <label for="select-custom-24">Multiple, icon left, long list:</label>
<select name="select-custom-24" id="select-custom-24" data-native-menu="false" multiple="multiple" data-iconpos="left">
<option>Choose options</option>
<option value="AL">Alabama</option>
@@ -256,7 +256,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-custom-4" class="select">Optgroup:</label>
+ <label for="select-custom-4">Optgroup:</label>
<select name="select-custom-4" id="select-custom-4" data-native-menu="false">
<option>Choose...</option>
<optgroup label="Group 1">
View
12 docs/demos/selects/selects.html
@@ -26,7 +26,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-native-1" class="select">Basic:</label>
+ <label for="select-native-1">Basic:</label>
<select name="select-native-1" id="select-native-1">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -38,7 +38,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-native-2" class="select">Mini sized:</label>
+ <label for="select-native-2">Mini sized:</label>
<select name="select-native-2" id="select-native-2" data-mini="true">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -50,7 +50,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-native-3" class="select">Icon left:</label>
+ <label for="select-native-3">Icon left:</label>
<select name="select-native-3" id="select-native-3" data-iconpos="left">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -62,7 +62,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-native-17" class="select">1 option selected:</label>
+ <label for="select-native-17">1 option selected:</label>
<select name="select-native-17" id="select-native-17">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -74,7 +74,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-native-18" class="select">1 option disabled:</label>
+ <label for="select-native-18">1 option disabled:</label>
<select name="select-native-18" id="select-native-18">
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
@@ -86,7 +86,7 @@
<div data-demo-html="true">
<div data-role="fieldcontain">
- <label for="select-native-4" class="select">Optgroup (if supported):</label>
+ <label for="select-native-4">Optgroup (if supported):</label>
<select name="select-native-4" id="select-native-4">
<option>Choose...</option>
<optgroup label="Group 1">
View
2  docs/demos/sliders/rangeslider.html
@@ -7,7 +7,7 @@
<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css">
<link rel="stylesheet" href="../_assets/css/jqm-demos.css">
<script src="../../../js/jquery.js"></script>
- <script src="../_assets/js/jqm-demos.js"></script>
+ <script src="../_assets/js/"></script>
<script src="../../../js/"></script>
<style id="grid-style">
@media all and (max-width: 28em){
View
2  docs/demos/sliders/slider.html
@@ -7,7 +7,7 @@
<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css">
<link rel="stylesheet" href="../_assets/css/jqm-demos.css">
<script src="../../../js/jquery.js"></script>
- <script src="../_assets/js/jqm-demos.js"></script>
+ <script src="../_assets/js/"></script>
<script src="../../../js/"></script>
<style id="grid-style">
@media all and (max-width: 28em){
View
2  docs/demos/swipe/buenosaires.html
@@ -102,7 +102,7 @@
<div data-role="header" data-position="fixed" data-fullscreen="true" data-id="hdr" data-tap-toggle="false">
<h1>Buenos Aires</h1>
- <a href="swipe-page.html" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
+ <a href="swipe-page.html" data-ajax="false" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
</div><!-- /header -->
<div data-role="content">
View
2  docs/demos/swipe/capetown.html
@@ -102,7 +102,7 @@
<div data-role="header" data-position="fixed" data-fullscreen="true" data-id="hdr" data-tap-toggle="false">
<h1>Cape Town</h1>
- <a href="swipe-page.html" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
+ <a href="swipe-page.html" data-ajax="false" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
</div><!-- /header -->
<div data-role="content">
View
2  docs/demos/swipe/newyork.html
@@ -102,7 +102,7 @@
<div data-role="header" data-position="fixed" data-fullscreen="true" data-id="hdr" data-tap-toggle="false">
<h1>New York</h1>
- <a href="swipe-page.html" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
+ <a href="swipe-page.html" data-ajax="false" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
</div><!-- /header -->
<div data-role="content">
View
2  docs/demos/swipe/paris.html
@@ -102,7 +102,7 @@
<div data-role="header" data-position="fixed" data-fullscreen="true" data-id="hdr" data-tap-toggle="false">
<h1>Paris</h1>
- <a href="swipe-page.html" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
+ <a href="swipe-page.html" data-ajax="false" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
</div><!-- /header -->
<div data-role="content">
View
2  docs/demos/swipe/seoul.html
@@ -102,7 +102,7 @@
<div data-role="header" data-position="fixed" data-fullscreen="true" data-id="hdr" data-tap-toggle="false">
<h1>Seoul</h1>
- <a href="swipe-page.html" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
+ <a href="swipe-page.html" data-ajax="false" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
</div><!-- /header -->
<div data-role="content">
View
172 docs/demos/swipe/swipe-list.html
@@ -154,7 +154,7 @@
<div data-role="header" data-theme="f">
<h1>Swipe list demo</h1>
- <a href="../" data-icon="home" data-iconpos="notext" data-shadow="false" data-icon-shadow="false" data-ajax="false">Home</a>
+ <a href="../" data-icon="home" data-iconpos="notext" data-ajax="false">Home</a>
</div><!-- /header -->
<div data-role="content">
@@ -163,7 +163,7 @@
<h2>Swipe to remove a list item</h2>
- <div data-demo-html="#demo-page" data-demo-js="true" data-demo-css="true">
+ <div data-demo-html="#sample-page" data-demo-js="true" data-demo-css="true">
<p>This demo shows how you can remove list items by swiping left or right. For devices without touchscreen there is a delete button. This demo also contains a custom styled confirmation popup.</p>
<p><a href="#demo-page" data-transition="fade" data-role="button" data-inline="true" data-theme="c">Open swipe list demo</a></p>
@@ -177,11 +177,173 @@
<div data-role="page" id="demo-page" data-title="Inbox" data-theme="d">
+<!--
+NOTE: If you modify this page make sure you copy your modifications over to
+#sample-page below so that your modifications will be reflected in the source
+code view
+-->
+ <div data-role="header" data-position="fixed" data-theme="b">
+ <h1>Inbox</h1>
+ <a href="#demo-intro" data-rel="back" data-icon="arrow-l" data-iconpos="notext">Back</a>
+ <a href="#" onclick="window.location.reload()" data-icon="back" data-iconpos="notext">Refresh</a>
+ </div><!-- /header -->
+
+ <div data-role="content">
+
+ <ul id="list" class="touch" data-role="listview" data-icon="false" data-split-icon="delete" data-split-theme="d">
+ <li>
+ <a href="#demo-mail">
+ <h3>Avery Walker</h3>
+ <p class="topic"><strong>Re: Dinner Tonight</strong></p>
+ <p>Sure, let's plan on meeting at Highland Kitchen at 8:00 tonight. Can't wait! </p>
+ <p class="ui-li-aside"><strong>4:48</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Amazon.com</h3>
+ <p class="topic"><strong>4-for-3 Books for Kids</strong></p>
+ <p>As someone who has purchased children's books from our 4-for-3 Store, you may be interested in these featured books.</p>
+ <p class="ui-li-aside"><strong>4:37</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Mike Taylor</h3>
+ <p class="topic"><strong>Re: This weekend in Maine</strong></p>
+ <p>Hey little buddy, sorry but I can't make it up to vacationland this weekend. Maybe next weekend?</p>
+ <p class="ui-li-aside"><strong>3:24</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Redfin</h3>
+ <p class="topic"><strong>Redfin listing updates for today</strong></p>
+ <p>There are 3 updates for the home on your watchlist: 1 updated MLS listing and 2 homes under contract.</p>
+ <p class="ui-li-aside"><strong>2:52</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Angela Smith</h3>
+ <p class="topic"><strong>Link Request</strong></p>
+ <p>My name is Angela Smith, SEO Consultant. I've greatly enjoyed looking through your site and I was wondering if you'd be interested in providing a link</p>
+ <p class="ui-li-aside"><strong>1:24</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Stephen Weber</h3>
+ <p class="topic"><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
+ <p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
+ <p class="ui-li-aside"><strong>11:24</strong>AM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>jQuery Team</h3>
+ <p class="topic"><strong>Boston Conference Planning</strong></p>
+ <p>In preparation for the upcoming conference in Boston, we need to start gathering a list of sponsors and speakers.</p>
+ <p class="ui-li-aside"><strong>9:18</strong>AM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Avery Walker</h3>
+ <p class="topic"><strong>Re: Dinner Tonight</strong></p>
+ <p>Sure, let's plan on meeting at Highland Kitchen at 8:00 tonight. Can't wait! </p>
+ <p class="ui-li-aside"><strong>4:48</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Amazon.com</h3>
+ <p class="topic"><strong>4-for-3 Books for Kids</strong></p>
+ <p>As someone who has purchased children's books from our 4-for-3 Store, you may be interested in these featured books.</p>
+ <p class="ui-li-aside"><strong>4:37</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Mike Taylor</h3>
+ <p class="topic"><strong>Re: This weekend in Maine</strong></p>
+ <p>Hey little buddy, sorry but I can't make it up to vacationland this weekend. Maybe next weekend?</p>
+ <p class="ui-li-aside"><strong>3:24</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Redfin</h3>
+ <p class="topic"><strong>Redfin listing updates for today</strong></p>
+ <p>There are 3 updates for the home on your watchlist: 1 updated MLS listing and 2 homes under contract.</p>
+ <p class="ui-li-aside"><strong>2:52</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Angela Smith</h3>
+ <p class="topic"><strong>Link Request</strong></p>
+ <p>My name is Angela Smith, SEO Consultant. I've greatly enjoyed looking through your site and I was wondering if you'd be interested in providing a link</p>
+ <p class="ui-li-aside"><strong>1:24</strong>PM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>Stephen Weber</h3>
+ <p class="topic"><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
+ <p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
+ <p class="ui-li-aside"><strong>11:24</strong>AM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ <li>
+ <a href="#demo-mail">
+ <h3>jQuery Team</h3>
+ <p class="topic"><strong>Boston Conference Planning</strong></p>
+ <p>In preparation for the upcoming conference in Boston, we need to start gathering a list of sponsors and speakers.</p>
+ <p class="ui-li-aside"><strong>9:18</strong>AM</p>
+ </a>
+ <a href="#" class="delete">Delete</a>
+ </li>
+ </ul>
+
+ </div><!-- /content -->
+
+ <div id="confirm" class="ui-content" data-role="popup" data-theme="none">
+
+ <p id="question">Are you sure you want to delete</p>
+
+ <div class="ui-grid-a">
+ <div class="ui-block-a">
+ <a id="yes" data-role="button" data-mini="true" data-shadow="false" data-theme="b" data-rel="back">Yes</a>
+ </div>
+ <div class="ui-block-b">
+ <a id="cancel" data-role="button" data-mini="true" data-shadow="false" data-theme="b" data-rel="back">Cancel</a>
+ </div>
+ </div>
+
+ </div><!-- /popup -->
+
+</div><!-- /page -->
+
+<div data-role="page" id="sample-page" data-title="Inbox" data-theme="d">
<div data-role="header" data-position="fixed" data-theme="b">
<h1>Inbox</h1>
- <a href="#demo-intro" data-rel="back" data-icon="arrow-l" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
- <a href="#" onclick="window.location.reload()" data-icon="back" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Refresh</a>
+ <a href="#demo-intro" data-rel="back" data-icon="arrow-l" data-iconpos="notext">Back</a>
+ <a href="#" onclick="window.location.reload()" data-icon="back" data-iconpos="notext">Refresh</a>
</div><!-- /header -->
<div data-role="content">
@@ -339,7 +501,7 @@
<div data-role="header" data-position="fixed" data-theme="b">
<h1>Demo</h1>
- <a href="#demo-page" data-rel="back" data-icon="arrow-l" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
+ <a href="#demo-page" data-rel="back" data-icon="arrow-l" data-iconpos="notext">Back</a>
</div><!-- /header -->
<div data-role="content">
View
4 docs/demos/swipe/swipe-page.html
@@ -102,7 +102,7 @@
<div data-role="header" data-theme="f">
<h1>Swipe page demo</h1>
- <a href="../" data-icon="home" data-iconpos="notext" data-shadow="false" data-icon-shadow="false" data-ajax="false">Home</a>
+ <a href="../" data-icon="home" data-iconpos="notext" data-ajax="false">Home</a>
</div><!-- /header -->
<div data-role="content">
@@ -112,7 +112,7 @@
<h2>Swipe to navigate</h2>
<div data-demo-html="#city" data-demo-js="true" data-demo-css="true">
- <p>This demo shows how you can use the swipe event to navigate between pages. We using single HTML files for each page. Here you can see the JavaScript and CSS source. On each of the demo pages you can see the page markup as well.</p>
+ <p>This demo shows how you can use the swipe event to navigate between pages. We are using single HTML files for each page. Here you can see the JavaScript and CSS source. On each of the demo pages you can see the page markup as well.</p>
<p><a href="newyork.html" data-transition="fade" data-role="button" data-inline="true" data-theme="c">Open swipe page demo</a></p>
</div>
View
2  docs/demos/swipe/sydney.html
@@ -102,7 +102,7 @@
<div data-role="header" data-position="fixed" data-fullscreen="true" data-id="hdr" data-tap-toggle="false">
<h1>Sydney</h1>
- <a href="swipe-page.html" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
+ <a href="swipe-page.html" data-ajax="false" data-direction="reverse" data-icon="delete" data-iconpos="notext" data-shadow="false" data-icon-shadow="false">Back</a>
</div><!-- /header -->
<div data-role="content">
View
2  docs/forms/docs-forms.html
@@ -148,7 +148,7 @@
<p>Note that you can disable buttons created from <code>button</code> or <code>input</code>-based markup, but not links with a role of button. Links don't have a parallel disabled feature in HTML, but if you need to disable a link-based button (or any element), it's possible to apply the disabled class <code>ui-disabled</code> yourself with JavaScript to achieve the same effect. </p>
<h2>Field containers</h2>
- <p>To improve the styling of labels and form elements on wider screens, wrap a <code>div</code> or <code>fieldset </code>with the <code> data-role="fieldcontain"</code> attribute around each label/form element. This framework aligns the input and associated label side-by-side, and breaks to stacked block-level elements below ~480px. The framework will also add a thin bottom border to act as a field separator.</p>
+ <p>To improve the styling of labels and form elements on wider screens, wrap a <code>div</code> or <code>fieldset </code>with the <code> data-role="fieldcontain"</code> attribute around each label/form element. This framework aligns the input and associated label side-by-side, and breaks to stacked block-level elements below 28em (~448px). The framework will also add a thin bottom border to act as a field separator.</p>
<p>For example:</p>
<pre><code>
View
2  docs/forms/selects/index.html
@@ -286,7 +286,7 @@
</div>
<h2>Horizontally grouped select inputs</h2>
-<p>Select inputs can also be used for grouped sets with more than one related selection. To make a horizontal button set, add the <code>data-type="horizontal"</code> to the fieldset. Note that the buttons which trigger the select will resize depending on the currently selected option's value. Note that browsers without support for <code>display: inline-block;</code> will group the selects vertically, as above.</p>
+<p>Select inputs can also be used for grouped sets with more than one related selection. To make a horizontal button set, add the <code>data-type="horizontal"</code> to the fieldset. Note that the buttons which trigger the select will resize depending on the currently selected option's value.</p>
<code>
&lt;fieldset data-role="controlgroup" <strong>data-type="horizontal"</strong>&gt;
View
BIN  docs/lists/images/album-bb.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
14 grunt.js
@@ -2,7 +2,7 @@ var path = require( 'path' ), fs = require( 'fs' );
module.exports = function( grunt ) {
var dirs, names, min = {}, cssmin = {},
- theme, rootFile, structureFile, themeFile,
+ theme, rootFile, structureFile, themeFile, demosjsFile,
verOfficial, suffix;
dirs = {
@@ -18,6 +18,7 @@ module.exports = function( grunt ) {
base: 'jquery.mobile' + suffix,
// this will change for the deploy target to include version information
root: 'jquery.mobile' + suffix,
+ demosjs: 'jquery.mobile.demos' + suffix,
structure: 'jquery.mobile.structure' + suffix,
theme: 'jquery.mobile.theme' + suffix
};
@@ -26,6 +27,7 @@ module.exports = function( grunt ) {
return path.join( dirs.output, name );
}
+ demosjsFile = path.join( dirs.output, "demos", "docs", "demos", "_assets", "js", names.demosjs );
rootFile = outputPath( names.root );
structureFile = outputPath( names.structure );
themeFile = outputPath( names.theme );
@@ -88,6 +90,14 @@ module.exports = function( grunt ) {
dest: rootFile + '.js'
},
+ demosjs: {
+ src: [
+ path.join( 'docs', 'demos', '_assets', 'js', 'jqm-demos.js' ),
+ path.join( 'docs', 'demos', '_assets', 'js', 'view-source.js' )
+ ],
+ dest: demosjsFile + '.js'
+ },
+
structure: {
src: [ '<banner:global.ver.header>', structureFile + '.compiled.css' ],
dest: structureFile + '.css'
@@ -200,7 +210,7 @@ module.exports = function( grunt ) {
grunt.registerTask('test', 'config:test:pages config:test junit');
// Ease of use aliases for users who want the zip and docs
- grunt.registerTask('docs', 'js css legacy_tasks:docs');
+ grunt.registerTask('docs', 'js css legacy_tasks:docs concat:demosjs');
grunt.registerTask('zip', 'js css legacy_tasks:zip');
// load the project's default tasks
View
2  js/events/navigate.js
@@ -8,7 +8,7 @@ define([ "jquery", "./../jquery.mobile.support" ], function( $ ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {
- var $win = $( window ), self, history;
+ var $win = $.mobile.window, self, history;
$.event.special.navigate = self = {
bound: false,
View
6 js/events/orientationchange.js
@@ -44,8 +44,8 @@ define( [ "jquery", "../jquery.mobile.support.orientation", "./throttledresize"
// developer console. The actual threshold value is somewhat arbitrary, we just
// need to make sure it is large enough to exclude the developer console case.
- var ww = window.innerWidth || $( window ).width(),
- wh = window.innerHeight || $( window ).height(),
+ var ww = window.innerWidth || win.width(),
+ wh = window.innerHeight || win.height(),
landscape_threshold = 50;
initial_orientation_is_landscape = ww > wh && ( ww - wh ) > landscape_threshold;
@@ -151,4 +151,4 @@ define( [ "jquery", "../jquery.mobile.support.orientation", "./throttledresize"
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
-//>>excludeEnd("jqmBuildExclude");
+//>>excludeEnd("jqmBuildExclude");
View
6 js/events/touch.js
@@ -7,6 +7,8 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {
+ var $document = $( document );
+
// add new event shortcuts
$.each( ( "touchstart touchmove touchend " +
"tap taphold " +
@@ -99,7 +101,7 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"
$this.unbind( "vclick", clickHandler )
.unbind( "vmouseup", clearTapTimer );
- $( document ).unbind( "vmousecancel", clearTapHandlers );
+ $document.unbind( "vmousecancel", clearTapHandlers );
}
function clickHandler( event ) {
@@ -114,7 +116,7 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"
$this.bind( "vmouseup", clearTapTimer )
.bind( "vclick", clickHandler );
- $( document ).bind( "vmousecancel", clearTapHandlers );
+ $document.bind( "vmousecancel", clearTapHandlers );
timer = setTimeout( function() {
triggerCustomEvent( thisObject, "taphold", $.Event( "taphold", { target: origTarget } ) );
View
4 js/jquery.mobile.buttonMarkup.js
@@ -212,7 +212,7 @@ function updateButtonClass( $btn, classToRemove, classToAdd, hover, state ) {
var attachEvents = function() {
var hoverDelay = $.mobile.buttonMarkup.hoverDelay, hov, foc;
- $( document ).bind( {
+ $.mobile.document.bind( {
"vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart": function( event ) {
var theme,
$btn = $( closestEnabledButton( event.target ) ),
@@ -266,7 +266,7 @@ var attachEvents = function() {
//links in bars, or those with data-role become buttons
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
$( ":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a", e.target )
.jqmEnhanceable()
View
8 js/jquery.mobile.core.js
@@ -84,6 +84,10 @@ define( [ "jquery", "text!../version.txt" ], function( $, __version__ ) {
hoverDelay: 200
},
+ // define the window and the document objects
+ window: $( window ),
+ document: $( document ),
+
// TODO might be useful upstream in jquery itself ?
keyCode: {
ALT: 18,
@@ -134,7 +138,7 @@ define( [ "jquery", "text!../version.txt" ], function( $, __version__ ) {
setTimeout( function() {
window.scrollTo( 0, ypos );
- $( document ).trigger( "silentscroll", { x: 0, y: ypos });
+ $.mobile.document.trigger( "silentscroll", { x: 0, y: ypos });
}, 20 );
setTimeout( function() {
@@ -240,7 +244,7 @@ define( [ "jquery", "text!../version.txt" ], function( $, __version__ ) {
getScreenHeight: function() {
// Native innerHeight returns more accurate value for this across platforms,
// jQuery version is here as a normalized fallback for platforms like Symbian
- return window.innerHeight || $( window ).height();
+ return window.innerHeight || $.mobile.window.height();
}
}, $.mobile );
View
2  js/jquery.mobile.degradeInputs.js
@@ -26,7 +26,7 @@ $.mobile.page.prototype.options.degradeInputs = {
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
var page = $.mobile.closestPageData( $( e.target ) ), options;
View
6 js/jquery.mobile.init.js
@@ -19,7 +19,7 @@ define([
(function( $, window, undefined ) {
var $html = $( "html" ),
$head = $( "head" ),
- $window = $( window );
+ $window = $.mobile.window;
//remove initial build class (only present on first pageshow)
function hideRenderingClass() {
@@ -143,7 +143,7 @@ define([
// if defaultHomeScroll hasn't been set yet, see if scrollTop is 1
// it should be 1 in most browsers, but android treats 1 as 0 (for hiding addr bar)
// so if it's 1, use 0 from now on
- $.mobile.defaultHomeScroll = ( !$.support.scrollTop || $( window ).scrollTop() === 1 ) ? 0 : 1;
+ $.mobile.defaultHomeScroll = ( !$.support.scrollTop || $.mobile.window.scrollTop() === 1 ) ? 0 : 1;
//dom-ready inits
if ( $.mobile.autoInitializePage ) {
@@ -159,7 +159,7 @@ define([
// by adding the 'ui-disabled' class to them. Using a JavaScript workaround for those browser.
// https://github.com/jquery/jquery-mobile/issues/3558
- $( document ).delegate( ".ui-disabled", "vclick",
+ $.mobile.document.delegate( ".ui-disabled", "vclick",
function( e ) {
e.preventDefault();
e.stopImmediatePropagation();
View
14 js/jquery.mobile.navigation.js
@@ -20,7 +20,7 @@ define( [
(function( $, undefined ) {
//define vars for interal use
- var $window = $( window ),
+ var $window = $.mobile.window,
$html = $( 'html' ),
$head = $( 'head' ),
@@ -998,7 +998,7 @@ define( [
};
//bind to form submit events, handle with Ajax
- $( document ).delegate( "form", "submit", function( event ) {
+ $.mobile.document.delegate( "form", "submit", function( event ) {
var formData = getAjaxFormData( $( this ) );
if ( formData ) {
@@ -1008,7 +1008,7 @@ define( [
});
//add active state on vclick
- $( document ).bind( "vclick", function( event ) {
+ $.mobile.document.bind( "vclick", function( event ) {
var $btn, btnEls, target = event.target, needClosest = false;
// if this isn't a left click we don't care. Its important to note
// that when the virtual event is generated it will create the which attr
@@ -1071,7 +1071,7 @@ define( [
});
// click routing - direct to HTTP or Ajax, accordingly
- $( document ).bind( "click", function( event ) {
+ $.mobile.document.bind( "click", function( event ) {
if ( !$.mobile.linkBindingEnabled ) {
return;
}
@@ -1169,7 +1169,7 @@ define( [
});
//prefetch pages when anchors with data-prefetch are encountered
- $( document ).delegate( ".ui-page", "pageshow.prefetch", function() {
+ $.mobile.document.delegate( ".ui-page", "pageshow.prefetch", function() {
var urls = [];
$( this ).find( "a:jqmData(prefetch)" ).each(function() {
var $link = $( this ),
@@ -1276,8 +1276,8 @@ define( [
});
//set page min-heights to be device specific
- $( document ).bind( "pageshow", resetActivePageHeight );
- $( window ).bind( "throttledresize", resetActivePageHeight );
+ $.mobile.document.bind( "pageshow", resetActivePageHeight );
+ $.mobile.window.bind( "throttledresize", resetActivePageHeight );
};//navreadyDeferred done callback
View
27 js/jquery.mobile.support.js
@@ -59,10 +59,31 @@ function validStyle( prop, value, check_vend ) {
return !!ret;
}
-// Thanks to Modernizr src for this test idea. `perspective` check is limited to Moz/unprefixed to prevent a false positive for 3D transforms on Android.
function transform3dTest() {
- var prop = "transform-3d";
- return validStyle( 'perspective', '10px', ['moz', ''] ) || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" );
+ var mqProp = "transform-3d",
+ ret = $.mobile.media( "(-" + vendors.join( "-" + mqProp + "),(-" ) + "-" + mqProp + "),(" + mqProp + ")" );
+
+ if( ret ) {
+ return !!ret;
+ }
+
+ var el = document.createElement( "div" ),
+ transforms = {
+ 'OTransform':'-o-transform',
+ 'msTransform':'-ms-transform',
+ 'MozTransform':'-moz-transform',
+ 'transform':'transform'
+ };
+
+ fakeBody.append( el );
+
+ for ( var t in transforms ) {
+ if( el.style[ t ] !== undefined ){
+ el.style[ t ] = 'translate3d( 100px, 1px, 1px )';
+ ret = window.getComputedStyle( el ).getPropertyValue( transforms[ t ] );
+ }
+ }
+ return ( !!ret && ret !== "none" );
}
// Test for dynamic-updating base tag support ( allows us to avoid href,src attr rewriting )
View
8 js/jquery.mobile.transition.js
@@ -24,8 +24,8 @@ var createHandler = function( sequential ) {
active = $.mobile.urlHistory.getActive(),
toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
screenHeight = $.mobile.getScreenHeight(),
- maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
- none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none" || Math.max( $( window ).scrollTop(), toScroll ) > $.mobile.getMaxScrollForTransition(),
+ maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $.mobile.window.width() > $.mobile.maxTransitionWidth,
+ none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none" || Math.max( $.mobile.window.scrollTop(), toScroll ) > $.mobile.getMaxScrollForTransition(),
toPreClass = " ui-page-pre-in",
toggleViewportClass = function() {
$.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
@@ -59,7 +59,7 @@ var createHandler = function( sequential ) {
// Set the from page's height and start it transitioning out
// Note: setting an explicit height helps eliminate tiling in the transitions
$from
- .height( screenHeight + $( window ).scrollTop() )
+ .height( screenHeight + $.mobile.window.scrollTop() )
.addClass( name + " out" + reverseClass );
},
@@ -121,7 +121,7 @@ var createHandler = function( sequential ) {
// In some browsers (iOS5), 3D transitions block the ability to scroll to the desired location during transition
// This ensures we jump to that spot after the fact, if we aren't there already.
- if ( $( window ).scrollTop() !== toScroll ) {
+ if ( $.mobile.window.scrollTop() !== toScroll ) {
scrollPage();
}
View
4 js/jquery.mobile.zoom.iosorientationfix.js
@@ -37,9 +37,9 @@ define( [ "jquery", "./jquery.mobile.core", "./jquery.mobile.zoom" ], function(
}
}
- $( document ).on( "mobileinit", function(){
+ $.mobile.document.on( "mobileinit", function(){
if( $.mobile.iosorientationfixEnabled ){
- $( window )
+ $.mobile.window
.bind( "orientationchange.iosorientationfix", zoom.enable )
.bind( "devicemotion.iosorientationfix", checkTilt );
}
View
4 js/navigation/navigator.js
@@ -10,7 +10,7 @@ define([ "jquery", "../events/navigate", "./path", "./history" ], function( $ )
$.Navigator = function( history ) {
this.history = history;
- $( window ).bind({
+ $.mobile.window.bind({
"popstate.history": $.proxy( this.popstate, this ),
"hashchange.history": $.proxy( this.hashchange, this )
});
@@ -121,7 +121,7 @@ define([ "jquery", "../events/navigate", "./path", "./history" ], function( $ )
// caught that was triggered by the hash setting above.
if( !noEvents ) {
this.ignoreNextPopState = true;
- $( window ).trigger( popstateEvent );
+ $.mobile.window.trigger( popstateEvent );
}
}
View
2  js/widgets/collapsible.js
@@ -158,7 +158,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
});
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
$.mobile.collapsible.prototype.enhanceWithin( e.target );
});
View
2  js/widgets/collapsibleSet.js
@@ -83,7 +83,7 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
$.widget( "mobile.collapsibleset", $.mobile.collapsibleset, $.mobile.behaviors.addFirstLastClasses );
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
$.mobile.collapsibleset.prototype.enhanceWithin( e.target );
});
View
2  js/widgets/controlgroup.js
@@ -110,7 +110,7 @@ define( [ "jquery",
// already be in place, ensuring that all widgets that need to be grouped will
// already have been enhanced by the time the controlgroup is created.
$( function() {
- $( document ).bind( "pagecreate create", function( e ) {
+ $.mobile.document.bind( "pagecreate create", function( e ) {
$.mobile.controlgroup.prototype.enhanceWithin( e.target, true );
});
});
View
5 js/widgets/dialog.js
@@ -59,9 +59,6 @@ $.widget( "mobile.dialog", $.mobile.widget, {
$target.attr( "data-" + $.mobile.ns + "transition", ( active.transition || $.mobile.defaultDialogTransition ) )
.attr( "data-" + $.mobile.ns + "direction", "reverse" );
}
- })
- .bind( "pagehide", function( e, ui ) {
- $( this ).find( "." + $.mobile.activeBtnClass ).not( ".ui-slider-bg" ).removeClass( $.mobile.activeBtnClass );
});
this._on( $el, {
@@ -138,7 +135,7 @@ $.widget( "mobile.dialog", $.mobile.widget, {
});
//auto self-init widgets
-$( document ).delegate( $.mobile.dialog.prototype.options.initSelector, "pagecreate", function() {
+$.mobile.document.delegate( $.mobile.dialog.prototype.options.initSelector, "pagecreate", function() {
$.mobile.dialog.prototype.enhance( this );
});
View
8 js/widgets/fixedToolbar.js
@@ -142,7 +142,7 @@ define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../jque
_handlePageShow: function() {
this.updatePagePadding( this._thisPage );
if ( this.options.updatePagePadding ) {
- this._on( $( window ), { "throttledresize": "updatePagePadding" } );
+ this._on( $.mobile.window, { "throttledresize": "updatePagePadding" } );
}
},
@@ -153,7 +153,7 @@ define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../jque
$.mobile.zoom.enable( true );
}
if ( o.updatePagePadding ) {
- this._off( $( window ), "throttledresize" );
+ this._off( $.mobile.window, "throttledresize" );
}
if ( o.trackPersistentToolbars ) {
@@ -190,7 +190,7 @@ define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../jque
},
_useTransition: function( notransition ) {
- var $win = $( window ),
+ var $win = $.mobile.window,
$el = this.element,
scroll = $win.scrollTop(),
elHeight = $el.height(),
@@ -296,7 +296,7 @@ define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../jque
});
//auto self-init widgets
- $( document )
+ $.mobile.document
.bind( "pagecreate create", function( e ) {
// DEPRECATED in 1.1: support for data-fullscreen=true|false on the page element.
View
6 js/widgets/fixedToolbar.workarounds.js
@@ -47,9 +47,9 @@ define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../jque
_viewportOffset: function() {
var $el = this.element,
header = $el.is( ".ui-header" ),
- offset = Math.abs($el.offset().top - $( window ).scrollTop());
+ offset = Math.abs($el.offset().top - $.mobile.window.scrollTop());
if( !header ) {
- offset = Math.round(offset - $( window ).height() + $el.outerHeight())-60;
+ offset = Math.round(offset - $.mobile.window.height() + $el.outerHeight())-60;
}
return offset;
},
@@ -58,7 +58,7 @@ define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../jque
_bindScrollWorkaround: function() {
var self = this;
//bind to scrollstop and check if the toolbars are correctly positioned
- this._on( $( window ), { scrollstop: function() {
+ this._on( $.mobile.window, { scrollstop: function() {
var viewportOffset = self._viewportOffset();
//check if the header is visible and if its in the right place
if( viewportOffset > 2 && self._visible) {
View
4 js/widgets/forms/button.js
@@ -95,7 +95,7 @@ $.widget( "mobile.button", $.mobile.widget, {
}).insertBefore( $el );
// Bind to doc to remove after submit handling
- $( document ).one( "submit", function() {
+ $.mobile.document.one( "submit", function() {
$buttonPlaceholder.remove();
// reset the local var so that the hidden input
@@ -158,7 +158,7 @@ $.widget( "mobile.button", $.mobile.widget, {
});
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
$.mobile.button.prototype.enhanceWithin( e.target, true );
});
View
2  js/widgets/forms/checkboxradio.js
@@ -206,7 +206,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
$.widget( "mobile.checkboxradio", $.mobile.checkboxradio, $.mobile.behaviors.formReset );
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
$.mobile.checkboxradio.prototype.enhanceWithin( e.target, true );
});
View
4 js/widgets/forms/select.custom.js
@@ -357,7 +357,7 @@ define( [
_decideFormat: function() {
var self = this,
- $window = $( window ),
+ $window = $.mobile.window,
selfListParent = self.list.parent(),
menuHeight = selfListParent.outerHeight(),
menuWidth = selfListParent.outerWidth(),
@@ -548,7 +548,7 @@ define( [
};
// issue #3894 - core doesn't trigger events on disabled delegates
- $( document ).bind( "selectmenubeforecreate", function( event ) {
+ $.mobile.document.bind( "selectmenubeforecreate", function( event ) {
var selectmenuWidget = $( event.target ).data( "mobile-selectmenu" );
if ( !selectmenuWidget.options.nativeMenu &&
View
9 js/widgets/forms/select.js
@@ -60,14 +60,14 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
classes = $el[0].className;
} */
if ( !!~this.element[0].className.indexOf( "ui-btn-left" ) ) {
- classes = " ui-btn-left";
+ classes = " ui-btn-left";
}
if ( !!~this.element[0].className.indexOf( "ui-btn-right" ) ) {
classes = " ui-btn-right";
}
- this.select = this.element.wrap( "<div class='ui-select" + classes + "'>" );
+ this.select = this.element.removeClass( "ui-btn-left ui-btn-right" ).wrap( "<div class='ui-select" + classes + "'>" );
this.selectID = this.select.attr( "id" );
this.label = $( "label[for='"+ this.selectID +"']" ).addClass( "ui-select" );
this.isMultiple = this.select[ 0 ].multiple;
@@ -79,6 +79,9 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
_destroy: function() {
var wrapper = this.element.parents( ".ui-select" );
if ( wrapper.length > 0 ) {
+ if ( wrapper.is( ".ui-btn-left, .ui-btn-right" ) ) {
+ this.element.addClass( wrapper.is( ".ui-btn-left" ) ? "ui-btn-left" : "ui-btn-right" );
+ }
this.element.insertAfter( wrapper );
wrapper.remove();
}
@@ -287,7 +290,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
$.widget( "mobile.selectmenu", $.mobile.selectmenu, $.mobile.behaviors.formReset );
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
$.mobile.selectmenu.prototype.enhanceWithin( e.target, true );
});
})( jQuery );
View
2  js/widgets/forms/slider.js
@@ -508,7 +508,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
$.widget( "mobile.slider", $.mobile.slider, $.mobile.behaviors.formReset );
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
$.mobile.slider.prototype.enhanceWithin( e.target, true );
});
View
6 js/widgets/forms/textinput.js
@@ -132,13 +132,13 @@ $.widget( "mobile.textinput", $.mobile.widget, {
// binding to pagechange here ensures that for pages loaded via
// ajax the height is recalculated without user input
- this._on( $( document ), { "pagechange": "_keyup" });
+ this._on( $.mobile.document, { "pagechange": "_keyup" });
// Issue 509: the browser is not providing scrollHeight properly until the styles load
if ( $.trim( input.val() ) ) {
// bind to the window load to make sure the height is calculated based on BOTH
// the DOM and CSS
- this._on( $( window ), {"load": "_keyup"});
+ this._on( $.mobile.window, {"load": "_keyup"});
}
}
if ( input.attr( "disabled" ) ) {
@@ -178,7 +178,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
});
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
$.mobile.textinput.prototype.enhanceWithin( e.target, true );
});
View
2  js/widgets/listview.autodividers.js
@@ -21,7 +21,7 @@ $.mobile.listview.prototype.options.autodividersSelector = function( elt ) {
return text;
};
-$( document ).delegate( "ul,ol", "listviewcreate", function() {
+$.mobile.document.delegate( "ul,ol", "listviewcreate", function() {
var list = $( this ),
listview = list.data( "mobile-listview" );
View
2  js/widgets/listview.filter.js
@@ -19,7 +19,7 @@ var defaultFilterCallback = function( text, searchValue, item ) {
$.mobile.listview.prototype.options.filterCallback = defaultFilterCallback;
-$( document ).delegate( "ul, ol", "listviewcreate", function() {
+$.mobile.document.delegate( "ul, ol", "listviewcreate", function() {
var list = $( this ),
listview = list.data( "mobile-listview" );
View
2  js/widgets/listview.js
@@ -383,7 +383,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
$.widget( "mobile.listview", $.mobile.listview, $.mobile.behaviors.addFirstLastClasses );
//auto self-init widgets
-$( document ).bind( "pagecreate create", function( e ) {
+$.mobile.document.bind( "pagecreate create", function( e ) {
$.mobile.listview.prototype.enhanceWithin( e.target );
});
View
6 js/widgets/loader.js
@@ -38,7 +38,7 @@ define( [ "jquery", "../jquery.mobile.core", "../jquery.mobile.widget" ], functi
});
// TODO move loader class down into the widget settings
- var loaderClass = "ui-loader", $html = $( "html" ), $window = $( window );
+ var loaderClass = "ui-loader", $html = $( "html" ), $window = $.mobile.window;
$.widget( "mobile.loader", {
// NOTE if the global config settings are defined they will override these
@@ -170,8 +170,8 @@ define( [ "jquery", "../jquery.mobile.core", "../jquery.mobile.widget" ], functi
this.element.removeClass( "ui-loader-fakefix" );