From d97849045fe3317bdfea45839867080a15838735 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Wed, 20 Feb 2013 14:43:45 -0800 Subject: [PATCH 01/38] Merge pull request #5626 from stforek/duplicated_buttonmarkup Duplicated code in butonMarkup --- js/jquery.mobile.buttonMarkup.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/js/jquery.mobile.buttonMarkup.js b/js/jquery.mobile.buttonMarkup.js index 36e4fa2a662..ec036bb5639 100644 --- a/js/jquery.mobile.buttonMarkup.js +++ b/js/jquery.mobile.buttonMarkup.js @@ -124,10 +124,6 @@ $.fn.buttonMarkup = function( options ) { } } - if ( o.iconpos && o.iconpos === "notext" && !el.attr( "title" ) ) { - el.attr( "title", el.getEncodedText() ); - } - if ( buttonElements ) { el.removeClass( buttonElements.bcls || "" ); } From 2bd6e92a72f20cb3834164a5142d915091095196 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Wed, 20 Feb 2013 23:23:48 +0100 Subject: [PATCH 02/38] Demos: removed superfluous vendor prefixes --- docs/_assets/css/jqm-demos.css | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/_assets/css/jqm-demos.css b/docs/_assets/css/jqm-demos.css index f8d143a06c9..dc85ba1f16e 100644 --- a/docs/_assets/css/jqm-demos.css +++ b/docs/_assets/css/jqm-demos.css @@ -523,15 +523,10 @@ h2.jqm-home-widget { } .jqm-list .ui-btn-up-d { background-color: #fff; + background-image: none; } .jqm-list .ui-btn-hover-d { background-color: #f8f8f8; -} -.jqm-list .ui-btn-up-d, -.jqm-list .ui-btn-hover-d { - -webkit-background-image: none; - -moz-background-image: none; - -o-background-image: none; background-image: none; } .jqm-list .ui-btn-up-d.ui-btn-active, @@ -542,9 +537,6 @@ h2.jqm-home-widget { .jqm-list .ui-btn-down-d.ui-focus { border-color: #34bae8; background-color: #34bae8; - -webkit-background-image: none; - -moz-background-image: none; - -o-background-image: none; background-image: none; color: #fff; text-shadow: 0 1px 0 #369; From 5b35e5e176ef9fafe6d9011210756664784ec66e Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Wed, 20 Feb 2013 14:08:57 -0800 Subject: [PATCH 03/38] Merge pull request #5594 from nschonni/remove-units-from-zero-values Remove "px" from zero values in CSS --- css/structure/jquery.mobile.collapsible.css | 4 +- css/structure/jquery.mobile.listview.css | 2 +- css/structure/jquery.mobile.panel.css | 12 +++--- css/structure/jquery.mobile.popup.css | 6 +-- css/themes/default/jquery.mobile.theme.css | 44 ++++++++++----------- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/css/structure/jquery.mobile.collapsible.css b/css/structure/jquery.mobile.collapsible.css index 2794e898624..e14b66205b5 100644 --- a/css/structure/jquery.mobile.collapsible.css +++ b/css/structure/jquery.mobile.collapsible.css @@ -13,10 +13,10 @@ .ui-collapsible-heading .ui-btn-icon-left.ui-mini .ui-btn-inner { padding-left: 30px; } .ui-collapsible-heading .ui-btn-icon-right.ui-mini .ui-btn-inner { padding-right: 30px; } -.ui-collapsible-heading .ui-btn span.ui-btn { position: absolute; left: 6px; top: 50%; margin: -12px 0 0 0; width: 20px; height: 20px; padding: 1px 0px 1px 2px; text-indent: -9999px; } +.ui-collapsible-heading .ui-btn span.ui-btn { position: absolute; left: 6px; top: 50%; margin: -12px 0 0 0; width: 20px; height: 20px; padding: 1px 0 1px 2px; text-indent: -9999px; } .ui-collapsible-heading .ui-btn span.ui-btn .ui-btn-inner { padding: 10px 0; } .ui-collapsible-heading .ui-btn span.ui-btn .ui-icon { left: 0; margin-top: -10px; } -.ui-collapsible-heading-status { position: absolute; top: -9999px; left:0px; } +.ui-collapsible-heading-status { position: absolute; top: -9999px; left: 0; } .ui-collapsible-content { display: block; margin: 0 -15px; diff --git a/css/structure/jquery.mobile.listview.css b/css/structure/jquery.mobile.listview.css index 521cf1934ff..474c633351f 100644 --- a/css/structure/jquery.mobile.listview.css +++ b/css/structure/jquery.mobile.listview.css @@ -78,7 +78,7 @@ ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid .ui-li-link-alt .ui-btn .ui-icon { right: 50%; margin-right: -9px; } .ui-li-link-alt .ui-btn-icon-notext .ui-btn-inner .ui-icon { position: absolute; top: 50%; margin-top: -9px; } -.ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner { border-top: 0px; } +.ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner { border-top: 0; } .ui-listview-filter { border-width: 0; overflow: hidden; margin: -15px -15px 15px -15px; } .ui-collapsible-content .ui-listview-filter { margin: -10px -15px 10px -15px; border-bottom: inherit; } diff --git a/css/structure/jquery.mobile.panel.css b/css/structure/jquery.mobile.panel.css index b5b0ddbaaa1..c4341f804dd 100644 --- a/css/structure/jquery.mobile.panel.css +++ b/css/structure/jquery.mobile.panel.css @@ -183,14 +183,14 @@ box-shadow: inset 5px 0 5px rgba(0,0,0,.15); } .ui-panel-position-right.ui-panel-display-overlay { - -webkit-box-shadow: -5px 0px 5px rgba(0,0,0,.15); - -moz-box-shadow: -5px 0px 5px rgba(0,0,0,.15); - box-shadow: -5px 0px 5px rgba(0,0,0,.15); + -webkit-box-shadow: -5px 0 5px rgba(0,0,0,.15); + -moz-box-shadow: -5px 0 5px rgba(0,0,0,.15); + box-shadow: -5px 0 5px rgba(0,0,0,.15); } .ui-panel-position-left.ui-panel-display-overlay { - -webkit-box-shadow: 5px 0px 5px rgba(0,0,0,.15); - -moz-box-shadow: 5px 0px 5px rgba(0,0,0,.15); - box-shadow: 5px 0px 5px rgba(0,0,0,.15); + -webkit-box-shadow: 5px 0 5px rgba(0,0,0,.15); + -moz-box-shadow: 5px 0 5px rgba(0,0,0,.15); + box-shadow: 5px 0 5px rgba(0,0,0,.15); } .ui-panel-display-push.ui-panel-open.ui-panel-position-left { border-right-width: 1px; diff --git a/css/structure/jquery.mobile.popup.css b/css/structure/jquery.mobile.popup.css index 46cfb459dd2..6ac4d0e7a8f 100644 --- a/css/structure/jquery.mobile.popup.css +++ b/css/structure/jquery.mobile.popup.css @@ -4,9 +4,9 @@ } .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. */ - top: 0px; - left: 0px; - right: 0px; + top: 0; + left: 0; + right: 0; bottom: 1px; position: absolute; filter: Alpha(Opacity=0); diff --git a/css/themes/default/jquery.mobile.theme.css b/css/themes/default/jquery.mobile.theme.css index 2f07aa83ad1..0aafadd8b6e 100644 --- a/css/themes/default/jquery.mobile.theme.css +++ b/css/themes/default/jquery.mobile.theme.css @@ -968,7 +968,7 @@ a.ui-link-inherit { } .ui-icon-plus { - background-position: 0px 50%; + background-position: 0 50%; } .ui-icon-minus { background-position: -36px 50%; @@ -1089,31 +1089,31 @@ a.ui-link-inherit { height: 100%; } .ui-overlay-shadow { - -moz-box-shadow: 0px 0px 12px rgba(0,0,0,.6); - -webkit-box-shadow: 0px 0px 12px rgba(0,0,0,.6); - box-shadow: 0px 0px 12px rgba(0,0,0,.6); + -moz-box-shadow: 0 0 12px rgba(0,0,0,.6); + -webkit-box-shadow: 0 0 12px rgba(0,0,0,.6); + box-shadow: 0 0 12px rgba(0,0,0,.6); } .ui-shadow { - -moz-box-shadow: 0px 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; - -webkit-box-shadow: 0px 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; - box-shadow: 0px 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; + -moz-box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; + -webkit-box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; + box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/ } .ui-bar-a .ui-shadow, .ui-bar-b .ui-shadow , .ui-bar-c .ui-shadow { - -moz-box-shadow: 0px 1px 0 rgba(255,255,255,.3); - -webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.3); - box-shadow: 0px 1px 0 rgba(255,255,255,.3); + -moz-box-shadow: 0 1px 0 rgba(255,255,255,.3); + -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.3); + box-shadow: 0 1px 0 rgba(255,255,255,.3); } .ui-shadow-inset { - -moz-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); - -webkit-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); - box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); + -moz-box-shadow: inset 0 1px 4px rgba(0,0,0,.2); + -webkit-box-shadow: inset 0 1px 4px rgba(0,0,0,.2); + box-shadow: inset 0 1px 4px rgba(0,0,0,.2); } .ui-icon-shadow { - -moz-box-shadow: 0px 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; - -webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; - box-shadow: 0px 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; + -moz-box-shadow: 0 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; + -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; + box-shadow: 0 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; } /* Focus state - set here for specificity (note: these classes are added by JavaScript) @@ -1127,15 +1127,15 @@ a.ui-link-inherit { } .ui-focus, .ui-btn:focus { - -moz-box-shadow: inset 0px 0px 3px #387bbe /*{global-active-background-color}*/, 0px 0px 9px #387bbe /*{global-active-background-color}*/; - -webkit-box-shadow: inset 0px 0px 3px #387bbe /*{global-active-background-color}*/, 0px 0px 9px #387bbe /*{global-active-background-color}*/; - box-shadow: inset 0px 0px 3px #387bbe /*{global-active-background-color}*/, 0px 0px 9px #387bbe /*{global-active-background-color}*/; + -moz-box-shadow: inset 0 0 3px #387bbe /*{global-active-background-color}*/, 0 0 9px #387bbe /*{global-active-background-color}*/; + -webkit-box-shadow: inset 0 0 3px #387bbe /*{global-active-background-color}*/, 0 0 9px #387bbe /*{global-active-background-color}*/; + box-shadow: inset 0 0 3px #387bbe /*{global-active-background-color}*/, 0 0 9px #387bbe /*{global-active-background-color}*/; } .ui-input-text.ui-focus, .ui-input-search.ui-focus { - -moz-box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/; - -webkit-box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/; - box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/; + -moz-box-shadow: 0 0 12px #387bbe /*{global-active-background-color}*/; + -webkit-box-shadow: 0 0 12px #387bbe /*{global-active-background-color}*/; + box-shadow: 0 0 12px #387bbe /*{global-active-background-color}*/; } /* unset box shadow in browsers that don't do it right From 85ad83cd0123941ca53de5f0233d7590a0a3970b Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Wed, 20 Feb 2013 23:13:12 +0100 Subject: [PATCH 04/38] Panel: corrected typo --- js/widgets/panel.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/js/widgets/panel.js b/js/widgets/panel.js index e537284edc3..f697d30d195 100644 --- a/js/widgets/panel.js +++ b/js/widgets/panel.js @@ -43,7 +43,7 @@ $.widget( "mobile.panel", $.mobile.widget, { _closeLink: null, _page: null, _modal: null, - _pannelInner: null, + _panelInner: null, _wrapper: null, _fixedToolbar: null, @@ -57,11 +57,11 @@ $.widget( "mobile.panel", $.mobile.widget, { return $pageThemeClass; }, _getPanelInner = function() { - var $pannelInner = $el.find( "." + self.options.classes.panelInner ); - if ( $pannelInner.length === 0 ) { - $pannelInner = $el.children().wrapAll( '
' ).parent(); + var $panelInner = $el.find( "." + self.options.classes.panelInner ); + if ( $panelInner.length === 0 ) { + $panelInner = $el.children().wrapAll( '
' ).parent(); } - return $pannelInner; + return $panelInner; }, _getWrapper = function() { var $wrapper = page.find( "." + self.options.classes.contentWrap ); @@ -90,7 +90,7 @@ $.widget( "mobile.panel", $.mobile.widget, { _closeLink: $el.find( ":jqmData(rel='close')" ), _page: $el.closest( ":jqmData(role='page')" ), _pageTheme: _getPageTheme(), - _pannelInner: _getPanelInner(), + _panelInner: _getPanelInner(), _wrapper: _getWrapper(), _fixedToolbar: _getFixedToolbar() }); @@ -165,22 +165,22 @@ $.widget( "mobile.panel", $.mobile.widget, { _positionPanel: function() { var self = this, - pannelInnerHeight = self._pannelInner.outerHeight(), - expand = pannelInnerHeight > $.mobile.getScreenHeight(); + panelInnerHeight = self._panelInner.outerHeight(), + expand = panelInnerHeight > $.mobile.getScreenHeight(); if ( expand || !self.options.positionFixed ) { if ( expand ) { self._unfixPanel(); - $.mobile.resetActivePageHeight( pannelInnerHeight ); + $.mobile.resetActivePageHeight( panelInnerHeight ); } - self._scrollIntoView( pannelInnerHeight ); + self._scrollIntoView( panelInnerHeight ); } else { self._fixPanel(); } }, - _scrollIntoView: function( pannelInnerHeight ) { - if ( pannelInnerHeight < $( window ).scrollTop() ) { + _scrollIntoView: function( panelInnerHeight ) { + if ( panelInnerHeight < $( window ).scrollTop() ) { window.scrollTo( 0, 0 ); } }, @@ -437,7 +437,7 @@ $.widget( "mobile.panel", $.mobile.widget, { } } - this._pannelInner.children().unwrap(); + this._panelInner.children().unwrap(); this.element.removeClass( [ this._getPanelClasses(), classes.panelAnimate ].join( " " ) ) .off( "swipeleft.panel swiperight.panel" ) From 9e73cd8c3f28b57b83af2fdd02c9905ff2a8ade8 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Wed, 20 Feb 2013 23:19:57 +0100 Subject: [PATCH 05/38] Panel: CSS for overlay shadow in logical order --- css/structure/jquery.mobile.panel.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/css/structure/jquery.mobile.panel.css b/css/structure/jquery.mobile.panel.css index c4341f804dd..7b55fef9df1 100644 --- a/css/structure/jquery.mobile.panel.css +++ b/css/structure/jquery.mobile.panel.css @@ -182,16 +182,16 @@ -moz-box-shadow: inset 5px 0 5px rgba(0,0,0,.15); box-shadow: inset 5px 0 5px rgba(0,0,0,.15); } +.ui-panel-display-overlay { + -webkit-box-shadow: 5px 0 5px rgba(0,0,0,.15); + -moz-box-shadow: 5px 0 5px rgba(0,0,0,.15); + box-shadow: 5px 0 5px rgba(0,0,0,.15); +} .ui-panel-position-right.ui-panel-display-overlay { -webkit-box-shadow: -5px 0 5px rgba(0,0,0,.15); -moz-box-shadow: -5px 0 5px rgba(0,0,0,.15); box-shadow: -5px 0 5px rgba(0,0,0,.15); } -.ui-panel-position-left.ui-panel-display-overlay { - -webkit-box-shadow: 5px 0 5px rgba(0,0,0,.15); - -moz-box-shadow: 5px 0 5px rgba(0,0,0,.15); - box-shadow: 5px 0 5px rgba(0,0,0,.15); -} .ui-panel-display-push.ui-panel-open.ui-panel-position-left { border-right-width: 1px; margin-right: -1px; From 53e968702685cfdfb0534a72b93c7df9eef063bf Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Tue, 19 Feb 2013 01:03:02 +0200 Subject: [PATCH 06/38] buttonMarkup: Do not allow a value of null to end up the value of an attribute, because it gets stringified as "null" --- js/jquery.mobile.buttonMarkup.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.buttonMarkup.js b/js/jquery.mobile.buttonMarkup.js index ec036bb5639..dcedb059e0e 100644 --- a/js/jquery.mobile.buttonMarkup.js +++ b/js/jquery.mobile.buttonMarkup.js @@ -52,7 +52,11 @@ $.fn.buttonMarkup = function( options ) { buttonElements; for ( key in o ) { - e.setAttribute( nsKey + key, o[ key ] ); + if ( o[ key ] === undefined || o[ key ] === null ) { + el.removeAttr( nsKey + key ); + } else { + e.setAttribute( nsKey + key, o[ key ] ); + } } if ( getAttrFixed( e, nsKey + "rel" ) === "popup" && el.attr( "href" ) ) { From 6e3dd698b5ea9fe86288b2864cde2590e5dd9eef Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Thu, 21 Feb 2013 00:20:34 +0200 Subject: [PATCH 07/38] Support: Turn off pushState inside FF iframes (cherry picked from commit 54a3d798ac612c75fd63b99f2135b5c1c245e1cc) --- js/jquery.mobile.support.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js index 83795a53bca..95e229b4bc8 100644 --- a/js/jquery.mobile.support.js +++ b/js/jquery.mobile.support.js @@ -193,6 +193,8 @@ $.extend( $.support, { // https://developers.google.com/chrome/mobile/docs/user-agent#chrome_for_ios_user-agent pushState: "pushState" in history && "replaceState" in history && + // When running inside a FF iframe, calling replaceState causes an error + !( window.navigator.userAgent.indexOf( "Firefox" ) >= 0 && window.top !== window ) && ( window.navigator.userAgent.search(/CriOS/) === -1 ), mediaquery: $.mobile.media( "only all" ), From 34026b02af2b187b101870114b3f995045a36b73 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Thu, 21 Feb 2013 11:47:09 +0100 Subject: [PATCH 08/38] Demos: fixed broken link to custom responsive grid example --- docs/widgets/grids/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/widgets/grids/index.php b/docs/widgets/grids/index.php index 66df18c4edf..9671996ad8a 100644 --- a/docs/widgets/grids/index.php +++ b/docs/widgets/grids/index.php @@ -137,7 +137,7 @@

It's straightforward to take the standard grids and make them responsive by stacking the grid blocks at narrow widths. Since we just want to override the floats and widths of the standard grid styles below a single breakpoint, use a max-width breakpoint to only apply the stacked styling as an override.

-

We recommend adding a class (ex: my-breakpoint) to scope the styles for the media query so it can be applied selectively. From this basic start, you can customize the appearance further or even add additional breakpoints. See an example of a custom responsive grid.

+

We recommend adding a class (ex: my-breakpoint) to scope the styles for the media query so it can be applied selectively. From this basic start, you can customize the appearance further or even add additional breakpoints. See an example of a custom responsive grid.


 /* stack all grids below 40em (640px) */
@@ -148,7 +148,7 @@
 	.my-breakpoint .ui-block-d,
 	.my-breakpoint .ui-block-e {
 		width: 100%;
-		float:none;
+		float: none;
 	}
 }
 
From d1f42ca534e5335f2a2d3c2729fd3dddb762421c Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Thu, 21 Feb 2013 11:50:15 +0100 Subject: [PATCH 09/38] Demos: added collapsing border styling to custom responsive grid example --- docs/widgets/grids/grid-custom.php | 243 ++++++++++++++++------------- 1 file changed, 133 insertions(+), 110 deletions(-) diff --git a/docs/widgets/grids/grid-custom.php b/docs/widgets/grids/grid-custom.php index 0435c80bd8e..6bc33fcfc33 100644 --- a/docs/widgets/grids/grid-custom.php +++ b/docs/widgets/grids/grid-custom.php @@ -14,76 +14,96 @@ @@ -98,53 +118,56 @@
-

Custom responsive grid

- -

It's easy to extend the basic grid styles into a custom responsive layout by using CSS media queries to adjust the layout and design across various screen width breakpoints.

-

This example is a typical news feature block that changes its layout across screen widths and illustrates how to change the grid ratios and overall layout with simple CSS. It starts as a simple set of stacked stories on phones, that goes to a layout with the lead story full width stacked over a 50/50 layout of the secondary stories. At wider widths, these secondary stories float next to the lead story in a 50/25/25 layout. When the screen gets very wide, the font size is bumped up to keep line lengths short.

-

Use the view source button below to see how the media queries work for each of these breakpoints.

- - -
- -
- - -
-
-

Apple schedules 'iPad Mini' event for October 23

-

One of the worst-kept secrets in tech has been confirmed: Apple will hold an event October 23 in San Jose, California, at which the company is widely expected to unveil a smaller, cheaper version of its popular iPad called "Mini".

-
-
- - -
-
-

Microsoft Surface tablet goes on sale for $499

-

The Microsoft Surface tablet picture has come into focus. The Redmond giant filled in the blanks on the new tablet's availability and specs.

-
-
- - -
-
-

AOL unveils Alto, an email service that syncs 5 accounts

-

AOL, struggling to shed its outdated image, is reimagining one of the most visibly aging parts of its platform: Its email service.

-
-
- -
- -
- -
- - - - +

Custom responsive grid

+ +

It's easy to extend the basic grid styles into a custom responsive layout by using CSS media queries to adjust the layout and design across various screen width breakpoints.

+ +

This example is a typical news feature block that changes its layout across screen widths and illustrates how to change the grid ratios and overall layout with simple CSS. It starts as a simple set of stacked stories on phones, that goes to a layout with the lead story full width stacked over a 50/50 layout of the secondary stories. At wider widths, these secondary stories float next to the lead story in a 50/25/25 layout. When the screen gets very wide, the font size is bumped up to keep line lengths short.

+

Use the view source button below to see how the media queries work for each of these breakpoints.

+ + +
+ +
+ + +
+
+

Apple schedules 'iPad Mini' event for October 23

+

One of the worst-kept secrets in tech has been confirmed: Apple will hold an event October 23 in San Jose, California, at which the company is widely expected to unveil a smaller, cheaper version of its popular iPad called "Mini".

+
+
+ + +
+
+

Microsoft Surface tablet goes on sale for $499

+

The Microsoft Surface tablet picture has come into focus. The Redmond giant filled in the blanks on the new tablet's availability and specs.

+
+
+ + +
+
+

AOL unveils Alto, an email service that syncs 5 accounts

+

AOL, struggling to shed its outdated image, is reimagining one of the most visibly aging parts of its platform: Its email service.

+
+
+ +
+ +
+ + Back to Grids + +
+ + + +
From e802f239e7db000bba86271e163349135be5ad8d Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Thu, 21 Feb 2013 15:04:49 +0100 Subject: [PATCH 10/38] Demos: improved dynamic controlgroup demo. --- .../controlgroups/dynamic-controlgroup.php | 135 ++++++++++-------- 1 file changed, 76 insertions(+), 59 deletions(-) diff --git a/docs/examples/controlgroups/dynamic-controlgroup.php b/docs/examples/controlgroups/dynamic-controlgroup.php index b988bd41064..40d1ea64256 100644 --- a/docs/examples/controlgroups/dynamic-controlgroup.php +++ b/docs/examples/controlgroups/dynamic-controlgroup.php @@ -19,31 +19,35 @@ counter++; var widgetType = $( "[name='radio-widget']:checked" ).attr( "id" ), - group = $( "#controlgroup" ), + group = $( "#my-controlgroup" ), $el, action = function() { - var option = $( "[name='radio-option']:checked" ).attr( "id" ); - $el[ option ](); group.controlgroup( "refresh" ); + var action = $( "[name='radio-action']:checked" ).attr( "id" ); + if ( $( $el[1] ).is( "select" ) && action === "hide" ) { + $el = $( $el[1] ).parents( ".ui-select" ); + } + $el[ action ](); + group.controlgroup( "refresh" ); }; if ( widgetType === "link" ) { $el = $( "Link " + counter + "" ).bind( "click", action ); - $( "#controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el ); + $( "#my-controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el ); $el.buttonMarkup(); } else if ( widgetType === "select" ) { - $el = $( "" ); + $el = $( "" ); $( $el[ 1 ] ).bind( "change", action); - $( "#controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el ); + $( "#my-controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el ); $( $el[ 1 ] ).selectmenu(); } else { $el = $( "" ); $( $el[ 1 ] ).bind( "change", action ); - $( "#controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el ); + $( "#my-controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el ); $( $el[ 1 ] ).checkboxradio(); } @@ -52,11 +56,14 @@ }); $( "[name='radio-orientation']" ).bind( "change", function( e ) { - $( "#controlgroup" ).controlgroup( "option", "type", ( $( "#isHorizontal" ).is( ":checked" ) ? "horizontal" : "vertical" ) ); + $( "#my-controlgroup" ).controlgroup( "option", "type", ( $( "#isHorizontal" ).is( ":checked" ) ? "horizontal" : "vertical" ) ); }); }); })( jQuery ); +
@@ -74,57 +81,67 @@

This demo shows how you can dynamically make changes to a controlgroup.

-
-
-
-
- Prepend - Append -
-
-
- Widget type - - - - - - - - - -
- -
- Operation
click on the controlgroup item to perform
- - - - - - - - - -
- -
- Orientation - - - - - - -
-
-
-
-
-
-
-
-
+
+ +
+
+

Controlgroup...

+
+
+
+ +
+ + + + +
+ +
+
+
+ Widget type + + + + + + + + + +
+
+ +
+
+ Action
on click/change
+ + + + + + + + + +
+
+ +
+
+ Switch orientation + + + + + + +
+
+ +
+
From 0578fa09d17363c3e1f4a67073c765a3f9454a80 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Thu, 21 Feb 2013 15:48:19 +0100 Subject: [PATCH 11/38] Demos: copy editing of panel styling demo. --- docs/examples/panels/panel-styling.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/examples/panels/panel-styling.php b/docs/examples/panels/panel-styling.php index 2c3ddc1a05b..092a846c77e 100644 --- a/docs/examples/panels/panel-styling.php +++ b/docs/examples/panels/panel-styling.php @@ -71,9 +71,9 @@ box-shadow: -5px 0px 5px rgba(0,0,0,.15); } - /* Use the ui-body class of your page theme to set a background image. - The page theme will be set for the content wrapper, - while the page get the panel them before opening the panel. */ + /* Use the ui-body class of your page theme (ui-body-d in this demo) to set a background image. + This class will be added to the content wrapper, while the page itself gets the same background + as the panel before opening the panel. */ #demo-page .ui-body-d { background-image: url(../../_assets/img/bg-pattern.png); background-repeat: repeat-x; @@ -148,6 +148,8 @@
  • Set a background image for a page that contains a panel.
  • Give the page a responsive layout with CSS columns.
  • + +

    Click the "view source" button to see the CSS and markup of this demo and open the demo to see the result.

    Open demo From 27095c3ce92c31b389d76088da9d6cc8f61a80e7 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Thu, 21 Feb 2013 17:28:44 +0100 Subject: [PATCH 12/38] Demos: made menu title match page title --- docs/nav-widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/nav-widgets.php b/docs/nav-widgets.php index 0adbe7a8bff..40c73cf8a73 100644 --- a/docs/nav-widgets.php +++ b/docs/nav-widgets.php @@ -26,7 +26,7 @@
  • Header toolbar
  • -
  • Icon
  • +
  • Icons
  • Links
  • From cbf1210243dbb3acacad548c82eb2817d0e5e9b5 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Thu, 21 Feb 2013 20:38:15 +0100 Subject: [PATCH 13/38] Demos: cleaned up buttons in grids page --- docs/widgets/buttons/buttons-grids.php | 166 ------------------------- docs/widgets/grids/grid-buttons.php | 147 ++++++++++++++++++++++ docs/widgets/grids/index.php | 133 +++++++++++--------- 3 files changed, 219 insertions(+), 227 deletions(-) delete mode 100644 docs/widgets/buttons/buttons-grids.php create mode 100644 docs/widgets/grids/grid-buttons.php diff --git a/docs/widgets/buttons/buttons-grids.php b/docs/widgets/buttons/buttons-grids.php deleted file mode 100644 index 1d16951acce..00000000000 --- a/docs/widgets/buttons/buttons-grids.php +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - Buttons in grids - jQuery Mobile Demos - - - - - - - - - -
    - -
    -

    jQuery Mobile Framework

    - Navigation - Search - -
    - -
    - -

    Grid D

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Grid C

    - -

    Inline, centered

    - -
    -
    -
    -
    -
    -
    -
    -
    - -

    Grid B

    - -

    Mini sized

    - -
    -
    - -
    -
    -
    -
    - -

    Grid A

    - -
    -
    -
    - - -
    - -
    -
    - -

    Mini sized

    - -
    -
    -
    - - -
    - -
    -
    - -

    Without ui-block

    - -
    -
    - - -
    -
    - -

    Grid Solo

    - -
    -
    -
    - Button -
    - -
    -
    - -

    Without ui-block

    - - - -

    Alignment

    - -
    -
    - - - -
    -
    - - -
    -
    - Grid Solo -
    - Without grid -
    - -
    - - - - - -
    - - diff --git a/docs/widgets/grids/grid-buttons.php b/docs/widgets/grids/grid-buttons.php new file mode 100644 index 00000000000..e05842edd56 --- /dev/null +++ b/docs/widgets/grids/grid-buttons.php @@ -0,0 +1,147 @@ + + + + + + Buttons in grids - jQuery Mobile Demos + + + + + + + + + + +
    + +
    +

    jQuery Mobile Framework

    + Navigation + Search + +
    + +
    + +

    Buttons in grids

    + +

    On this page you see examples of how you can use grids to layout buttons.

    + + +

    Basic

    + +

    Buttons in grids get a bit margin left and right.

    + +
    +
    +
    +
    +
    +
    + + +

    Icon only, centered

    + +

    Inline buttons can be centered by adding text-align: center; to your custom CSS.

    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +

    Mini sized

    + +
    +
    + +
    +
    +
    +
    + + +

    Select & Checkbox

    + +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +

    Responsive

    + +

    It's not recommended to have many buttons with text on one row at small screens, because the text might get truncated. You can use responsive grids to stack the buttons at small screens. Here we use the framework preset breakpoint by adding class ui-responsive to the container.

    + +
    +
    + +
    +
    +
    +
    + + +

    Alignment

    + +

    Use grid solo to align a single button with buttons in other grids.

    + +
    +
    + + + +
    +
    + + +
    +
    + Grid Solo +
    +
    + No grid class +
    + + + Back to Grids + +
    + + + + + +
    + + diff --git a/docs/widgets/grids/index.php b/docs/widgets/grids/index.php index 9671996ad8a..4aaf24a5673 100644 --- a/docs/widgets/grids/index.php +++ b/docs/widgets/grids/index.php @@ -52,7 +52,9 @@
    +

    Three-column grids

    +

    The other grid layout configuration uses class=ui-grid-b on the parent, and 3 child container elements, each with its respective ui-block-a/b/c class, to create a three-column layout (33/33/33%).

    @@ -72,6 +74,9 @@
    + +

    View more examples of buttons in grids.

    +

    Four-column grids

    @@ -86,39 +91,44 @@ +

    Five-column grids

    +

    A five-column, 20/20/20/20/20% grid is created by specifying class=ui-grid-d on the parent and adding a fifth block.

    -
    -
    A
    -
    B
    -
    C
    -
    D
    -
    E
    -
    +
    +
    A
    +
    B
    +
    C
    +
    D
    +
    E
    +
    +

    Multiple row grids

    Grids are designed to wrap to multiple rows of items. For example, if you specify a 3-column grid (ui-grid-b) on a container that has nine child blocks, it will wrap to 3 rows of 3 items each. There is a CSS rule to clear the floats and start a new line when the class=ui-block-a is seen so make sure to assign block classes in a repeating sequence (a, b, c, a, b, c, etc.) that maps to the grid type:

    -
    -
    A
    -
    B
    -
    C
    -
    A
    -
    B
    -
    C
    -
    A
    -
    B
    -
    C
    -
    +
    +
    A
    +
    B
    +
    C
    +
    A
    +
    B
    +
    C
    +
    A
    +
    B
    +
    C
    +
    +

    Grid solo class

    -

    Please note that the framework adds left and right margin to buttons in a grid. For a single button you can use a container with class ui-grid-solo and wrap the button in a div with class ui-block-a like the example below. This way the button will get the same margin.

    + +

    The framework adds left and right margin to buttons in a grid. For a single button you can use a container with class ui-grid-solo and wrap the button in a div with class ui-block-a like the example below. This way the button will get the same margin. View more examples of buttons in grids.

    @@ -130,8 +140,7 @@
    - - More buttons in grids examples +

    Responsive grids

    @@ -153,48 +162,50 @@ } -

    Breakpoint preset

    - -

    To apply a preset breakpoint to stack grids below 35em (560px), add the .ui-responsive class to the grid container.

    - - -
    - -

    Grid A (50/50)

    - -
    -
    Block A
    -
    Block B
    -
    - -

    Grid B (33/33/33)

    - -
    -
    Block A
    -
    Block B
    -
    Block C
    -
    - -

    Grid C (25/25/25/25)

    - -
    -
    A
    -
    B
    -
    C
    -
    D
    -
    - -

    Grid D (20/20/20/20/20)

    +

    Breakpoint preset

    + +

    To apply a preset breakpoint to stack grids below 35em (560px), add the .ui-responsive class to the grid container.

    + + +
    + +

    Grid A (50/50)

    + +
    +
    Block A
    +
    Block B
    +
    + +

    Grid B (33/33/33)

    + +
    +
    Block A
    +
    Block B
    +
    Block C
    +
    + +

    Grid C (25/25/25/25)

    + +
    +
    A
    +
    B
    +
    C
    +
    D
    +
    + +

    Grid D (20/20/20/20/20)

    + +
    +
    A
    +
    B
    +
    C
    +
    D
    +
    E
    +
    + +
    -
    -
    A
    -
    B
    -
    C
    -
    D
    -
    E
    -
    -
    From ec09ef375d85287f3c9479923c7ec3d873e90907 Mon Sep 17 00:00:00 2001 From: Mat Marquis Date: Thu, 21 Feb 2013 16:05:08 -0500 Subject: [PATCH 14/38] More contrast on the docs, including code samples. Closes #5676. --- docs/_assets/css/jqm-demos.css | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/_assets/css/jqm-demos.css b/docs/_assets/css/jqm-demos.css index dc85ba1f16e..44b0758cfde 100644 --- a/docs/_assets/css/jqm-demos.css +++ b/docs/_assets/css/jqm-demos.css @@ -5,6 +5,7 @@ /* Page */ body, .jqm-demos { background-color: #fefefe; + font-size: 1.05em; } /* Header */ @@ -271,7 +272,7 @@ body, .jqm-demos { font-family: 'Open Sans', sans-serif; font-weight: 300; font-size: 2.4em; - color: #555; + color: #333; clear:both; } .jqm-faq .jqm-content > h1 { @@ -285,7 +286,7 @@ body, .jqm-demos { font-family: 'Open Sans', sans-serif; font-weight: 300; font-size: 1.6em; - color: #74b042; + color: #60a725; padding-top: .6em; clear:both; } @@ -334,7 +335,7 @@ h2.jqm-home-widget { margin-top: -.5em; margin-bottom: .5em; padding-bottom: 2.6em; - color: #555; + color: #333; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e5e5e5; @@ -343,7 +344,7 @@ h2.jqm-home-widget { .jqm-demos-home .jqm-content .jqm-intro { font-family: 'Open Sans', sans-serif; font-weight: 300; - font-size: .9em; + line-height: 1.6; margin: .5em .8em 1em .8em; padding-bottom: .5em; border: none; @@ -383,6 +384,10 @@ h2.jqm-home-widget { .jqm-demos .jqm-content.jqm-fullwidth { padding: 15px; } + + .jqm-content p { + line-height: 1.5; + } .jqm-demos-home .jqm-content p.jqm-intro { font-size: 1.1em; } @@ -504,7 +509,7 @@ h2.jqm-home-widget { background-image: none; background-color: #f8f8f8; border-color: #e8e8e8; - color: #74b042; + color: #60a725; text-shadow: none; } /* List buttons */ @@ -845,7 +850,7 @@ h2.jqm-home-widget { float: none; left: auto; height: auto; - line-height: 16px; + line-height: 18px; margin: 0; outline: 0; overflow: visible; @@ -860,7 +865,7 @@ h2.jqm-home-widget { font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-weight: normal; font-style: normal; - font-size: 13px; + font-size: 14px; min-height: inherit; min-height: auto; } @@ -959,13 +964,13 @@ h2.jqm-home-widget { color: #5ba1cf; } .syntaxhighlighter .string { - color: #9a6; + color: #98da31; } .syntaxhighlighter .string a { color: #1dc116; } .syntaxhighlighter .keyword { - color: #c84; + color: #ffae00; } .syntaxhighlighter .preprocessor { color: #8aa6c1; From 259e70b22ef952c8343d10a461c3f62b8cbffe17 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Fri, 22 Feb 2013 01:36:05 +0100 Subject: [PATCH 15/38] Demos: copy editing of panel fixed positioning demo. --- docs/widgets/panels/index.php | 8 +-- docs/widgets/panels/panel-fixed.php | 92 +++++++++++++---------------- 2 files changed, 42 insertions(+), 58 deletions(-) diff --git a/docs/widgets/panels/index.php b/docs/widgets/panels/index.php index 8afa7e8b4c3..ff00c93a202 100644 --- a/docs/widgets/panels/index.php +++ b/docs/widgets/panels/index.php @@ -116,9 +116,7 @@

    The panel will be displayed with the position:absolute CSS property, meaning it will scroll with the page. When a panel is opened the framework checks to see if the bottom of the panel contents is in view. If not, it scrolls to the top of the page.

    -

    You can set a panel to position:fixed, so its contents will appear no matter how far down the page you're scrolled, by adding the data-position-fixed="true" attribute to the panel. The framework also checks to see if the panel contents will fit within the viewport before applying the fixed positioning because this property would prevent the panel contents from scrolling and using overflow is not well supported enough to use at this time. If the panel contents are too long to fit within the viewport, the framework will simply display the panel without absolute positioning.

    - - Panel fixed positioning example +

    You can set a panel to position:fixed, so its contents will appear no matter how far down the page you're scrolled, by adding the data-position-fixed="true" attribute to the panel. The framework also checks to see if the panel contents will fit within the viewport before applying the fixed positioning because this property would prevent the panel contents from scrolling and make it inaccessible. overflow is not well supported enough to use at this time. If the panel contents are too long to fit within the viewport, the framework will simply display the panel without fixed positioning. See an example of panels with fixed positioning.

    Styling panels

    @@ -168,9 +166,7 @@

    Applying a preset breakpoint

    -

    Included in the widget styles is a breakpoint preset for this behavior that kicks in at 55em (880px). This breakpoint is not applied by default to make it easier for you to write custom breakpoints that work best for your content and design. To apply the breakpoint preset, add the ui-responsive-panel class to the page wrapper (not the panel).

    - - Panel responsive example +

    Included in the widget styles is a breakpoint preset for this behavior that kicks in at 55em (880px). This breakpoint is not applied by default to make it easier for you to write custom breakpoints that work best for your content and design. To apply the breakpoint preset, add the ui-responsive-panel class to the page wrapper (not the panel). See an example of a responsive panel page.

    diff --git a/docs/widgets/panels/panel-fixed.php b/docs/widgets/panels/panel-fixed.php index d47a091903c..1cb0f25f763 100644 --- a/docs/widgets/panels/panel-fixed.php +++ b/docs/widgets/panels/panel-fixed.php @@ -13,8 +13,8 @@ .nav-search .ui-btn-up-a { - background-image:none; - background-color:#333333; + background-image: none; + background-color: #333; } .nav-search .ui-btn-inner { border-top: 1px solid #888; @@ -37,9 +37,6 @@ display: block; margin-top: 1.2em; } - .switch .ui-slider-switch { - width: 6.5em !important; - } .ui-grid-a { margin-top: 1em; padding-top: .8em; @@ -54,22 +51,22 @@

    Fixed header

    Menu - Add + Add
    -

    Panel

    +

    Panels

    Fixed positioning

    -

    This is a typical page that has two buttons in the header bar that open panels. The left button opens a left menu with the reveal display mode. The right button opens a form in a right overlay panel. We also set position fixed for the header and footer on this page.

    +

    This is a typical page that has two buttons in the header bar that open panels. The left panel has the reveal display mode. The right panel opens as overlay. For both panels we set data-position-fixed="true". We also set position fixed for the header and footer on this page.

    -

    The left panel contains a long menu to demonstrate that the framework will check the panel contents height and unfixes the panel so its content can be scrolled.

    +

    The left panel contains a long menu to demonstrate that the framework will check the panel contents height and unfixes the panel so its content can be scrolled. In the right panel there is a short form that shows the fixed positioning.

    Responsive

    -

    To make this responsive, the panel stays open and causes the page to re-flow at wider widths. This allows both the menu and page to be used together when more space is available. This behavior is controlled by CSS media queries. You can create a custom one for a specific breakpoint or use the breakpoint preset by adding the class="ui-responsive-panel" to the page container. We have added this class on this demo page.

    +

    To make this responsive, you can make the page re-flow at wider widths. This allows both the reveal panel menu and page to be used together when more space is available. This behavior is controlled by CSS media queries. You can create a custom one for a specific breakpoint or use the breakpoint preset by adding the class="ui-responsive-panel" to the page container. We have added this class on this demo page.

    Back to Panels @@ -85,35 +82,37 @@
    @@ -122,25 +121,14 @@
    -

    Create new user

    +

    Login

    - + - - - -
    - - -
    -
    From 9a6a5e03f0afcda4eb23c49c48e8f13a268d5bfe Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Fri, 22 Feb 2013 02:25:38 +0100 Subject: [PATCH 16/38] Demos: improvements to form pages. --- docs/widgets/forms/form-disabled.php | 1014 +++++++++++----------- docs/widgets/forms/form-fieldcontain.php | 993 ++++++++++----------- docs/widgets/forms/form-gallery.php | 438 ++++++++++ docs/widgets/forms/form-hide-label.php | 993 ++++++++++----------- docs/widgets/forms/form-label-hidden.php | 849 +++++++++--------- docs/widgets/forms/form.php | 432 --------- docs/widgets/forms/index.php | 8 +- 7 files changed, 2374 insertions(+), 2353 deletions(-) create mode 100644 docs/widgets/forms/form-gallery.php delete mode 100644 docs/widgets/forms/form.php diff --git a/docs/widgets/forms/form-disabled.php b/docs/widgets/forms/form-disabled.php index 8acde75918e..45b5f00b85e 100644 --- a/docs/widgets/forms/form-disabled.php +++ b/docs/widgets/forms/form-disabled.php @@ -1,508 +1,512 @@ - - - Form disabled - jQuery Mobile Demos - - - - - - - - - -
    - -
    -

    jQuery Mobile Framework

    - Navigation - Search - -
    - -
    - -

    Disabled form elements

    - - - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Single checkbox: - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    - - -
    -
    - - - -

    Mini sized

    - -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Single checkbox: - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    - -

    Class ui-disabled

    - - - - - -
    - - - - - -
    - - + + + Form disabled - jQuery Mobile Demos + + + + + + + + + +
    + +
    +

    jQuery Mobile Framework

    + Navigation + Search + +
    + +
    + +

    Disabled form elements

    + +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Single checkbox: + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    + +

    Mini sized

    + +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Single checkbox: + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    + +

    Class ui-disabled

    + + + + + + + Back to Forms + + +
    + + + + + +
    + + diff --git a/docs/widgets/forms/form-fieldcontain.php b/docs/widgets/forms/form-fieldcontain.php index 262eb6b3ecd..7c7b207c6c3 100644 --- a/docs/widgets/forms/form-fieldcontain.php +++ b/docs/widgets/forms/form-fieldcontain.php @@ -1,498 +1,501 @@ - - - Form field containers - jQuery Mobile Demos - - - - - - - - - -
    - -
    -

    jQuery Mobile Framework

    - Navigation - Search - -
    - -
    - -

    Field containers

    - -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Single checkbox: - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    - -

    Mini sized

    - -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Single checkbox: - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    - -
    - - - - - -
    - - + + + Form field containers - jQuery Mobile Demos + + + + + + + + + +
    + +
    +

    jQuery Mobile Framework

    + Navigation + Search + +
    + +
    + +

    Field containers

    + +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Single checkbox: + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    + +

    Mini sized

    + +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Single checkbox: + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    + + Back to Forms + + +
    + + + + + +
    + + diff --git a/docs/widgets/forms/form-gallery.php b/docs/widgets/forms/form-gallery.php new file mode 100644 index 00000000000..b864de3858f --- /dev/null +++ b/docs/widgets/forms/form-gallery.php @@ -0,0 +1,438 @@ + + + + + + Form gallery - jQuery Mobile Demos + + + + + + + + + +
    + +
    +

    jQuery Mobile Framework

    + Navigation + Search + +
    + +
    + +

    Form gallery

    + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    + +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    + +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    + +
    + + +
    + +
    +
    + + + + +
    +
    + +
    + + +
    + +
    +
    + Single checkbox: + + +
    +
    + +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    + +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    + +
    + + +
    + +
    + +

    Mini sized

    + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    + +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    + +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    + +
    + + +
    + +
    + + +
    + +
    +
    + Single checkbox: + + +
    +
    + +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    + +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    + +
    + + +
    + +
    + + Back to Forms + + +
    + + + + + +
    + + diff --git a/docs/widgets/forms/form-hide-label.php b/docs/widgets/forms/form-hide-label.php index 4252b53cab0..06c5f3dadad 100644 --- a/docs/widgets/forms/form-hide-label.php +++ b/docs/widgets/forms/form-hide-label.php @@ -1,498 +1,501 @@ - - - Form field containers ui-hide-label - jQuery Mobile Demos - - - - - - - - - -
    - -
    -

    jQuery Mobile Framework

    - Navigation - Search - -
    - -
    - -

    Field containers, hide label/legend

    - -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Single checkbox: - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    - -

    Mini sized

    - -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    - Single checkbox: - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    -
    - -
    -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    -
    - -
    -
    - - -
    -
    - -
    - -
    - - - - - -
    - - + + + Form ui-hide-label - jQuery Mobile Demos + + + + + + + + + +
    + +
    +

    jQuery Mobile Framework

    + Navigation + Search + +
    + +
    + +

    Field containers, hide label/legend

    + +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Single checkbox: + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    + +

    Mini sized

    + +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    + Single checkbox: + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    +
    + +
    +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    +
    + +
    +
    + + +
    +
    + +
    + + Back to Forms + + +
    + + + + + +
    + + diff --git a/docs/widgets/forms/form-label-hidden.php b/docs/widgets/forms/form-label-hidden.php index b62206cfffb..3e36619aa5f 100644 --- a/docs/widgets/forms/form-label-hidden.php +++ b/docs/widgets/forms/form-label-hidden.php @@ -1,426 +1,429 @@ - - - Form label/legend ui-hidden-accessible - jQuery Mobile Demos - - - - - - - - - -
    - -
    -

    jQuery Mobile Framework

    - Navigation - Search - -
    - -
    - -

    Hide label/legend

    - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    - -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    - -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    - -
    - - -
    - -
    - - -
    - -
    -
    - Single checkbox: - - -
    -
    - -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    - -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    - -
    - - -
    - -
    - -

    Mini sized

    - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    - -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    - -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    - -
    - - -
    - -
    - - -
    - -
    -
    - Single checkbox: - - -
    -
    - -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    - -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    - -
    - - -
    - -
    - -
    - - - - - -
    - - + + + Form ui-hidden-accessible - jQuery Mobile Demos + + + + + + + + + +
    + +
    +

    jQuery Mobile Framework

    + Navigation + Search + +
    + +
    + +

    Hide label/legend

    + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    + +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    + +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    + +
    + + +
    + +
    + + +
    + +
    +
    + Single checkbox: + + +
    +
    + +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    + +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    + +
    + + +
    + +
    + +

    Mini sized

    + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + Vertical controlgroup, buttons: + + + Three +
    +
    + +
    +
    + Horizontal controlgroup, buttons: + + + Three +
    +
    + +
    +
    + Vertical controlgroup, select: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, select: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, mixed: + Link + + + +
    +
    + +
    + + +
    + +
    + + +
    + +
    +
    + Single checkbox: + + +
    +
    + +
    +
    + Vertical controlgroup, checkbox: + + + + + + +
    +
    + +
    +
    + Vertical controlgroup, radio: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, checkbox: + + + + + + +
    +
    + +
    +
    + Horizontal controlgroup, radio: + + + + + + +
    +
    + +
    + + +
    + +
    + + Back to Forms + + +
    + + + + + +
    + + diff --git a/docs/widgets/forms/form.php b/docs/widgets/forms/form.php deleted file mode 100644 index 650d78bbad3..00000000000 --- a/docs/widgets/forms/form.php +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - Form - jQuery Mobile Demos - - - - - - - - - -
    - -
    -

    Form

    - Search - -
    - -
    - -

    Basic form

    - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    - -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    - -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    - -
    - - -
    - -
    -
    - - - - -
    -
    - -
    - - -
    - -
    -
    - Single checkbox: - - -
    -
    - -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    - -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    - -
    - - -
    - -
    - -

    Mini sized

    - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    -
    - Vertical controlgroup, buttons: - - - Three -
    -
    - -
    -
    - Horizontal controlgroup, buttons: - - - Three -
    -
    - -
    -
    - Vertical controlgroup, select: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, select: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, mixed: - Link - - - -
    -
    - -
    - - -
    - -
    - - -
    - -
    -
    - Single checkbox: - - -
    -
    - -
    -
    - Vertical controlgroup, checkbox: - - - - - - -
    -
    - -
    -
    - Vertical controlgroup, radio: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, checkbox: - - - - - - -
    -
    - -
    -
    - Horizontal controlgroup, radio: - - - - - - -
    -
    - -
    - - -
    - -
    - -
    - - - -
    - - diff --git a/docs/widgets/forms/index.php b/docs/widgets/forms/index.php index c9c1847b49c..150001a2ecc 100644 --- a/docs/widgets/forms/index.php +++ b/docs/widgets/forms/index.php @@ -3,7 +3,7 @@ - Form reference - jQuery Mobile Demos + Forms - jQuery Mobile Demos @@ -291,9 +291,11 @@
    +

    See the form gallery for more form element examples.

    +

    Accessibly hidden labels

    -

    For the sake of accessibility, jQuery Mobile requires that all form elements be paired with a meaningful label. To hide labels in a way that leaves them visible to assistive technologies — for example, when letting an element's placeholder attribute serve as a label — apply the helper class ui-hidden-accessible to the label. View more examples of accessibly hidden labels.

    +

    For the sake of accessibility, jQuery Mobile requires that all form elements be paired with a meaningful label. To hide labels in a way that leaves them visible to assistive technologies — for example, when letting an element's placeholder attribute serve as a label — apply the helper class ui-hidden-accessible to the label. View more examples of accessibly hidden labels. In case you use a field container you can use class ui-hide-label on the element with data-role="fieldcontain" to hide the label or legend.

    @@ -315,7 +317,7 @@

    Fieldcontainer groupings

    -

    To improve the styling of labels and form elements on wider screens, wrap a div or fieldset with the data-role="fieldcontain" 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. See more examples of fieldcontainer groupings.

    +

    To improve the styling of labels and form elements on wider screens, wrap a div or fieldset with the data-role="fieldcontain" 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 ~448px. The framework will also add a thin bottom border to act as a field separator. See more examples of fieldcontainer groupings.

    From cdfd191cf8eabfe0e0176486250c4f36ad1ba8c4 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Fri, 22 Feb 2013 18:48:43 +0100 Subject: [PATCH 17/38] Demos: updates title of form element page and corrected markup for code blocks. --- docs/widgets/forms/index.php | 76 ++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/docs/widgets/forms/index.php b/docs/widgets/forms/index.php index 150001a2ecc..3f0b521a518 100644 --- a/docs/widgets/forms/index.php +++ b/docs/widgets/forms/index.php @@ -3,7 +3,7 @@ - Forms - jQuery Mobile Demos + Form elements - jQuery Mobile Demos @@ -24,7 +24,7 @@
    -

    Forms

    +

    Form elements

    All form widgets begin with native form elements with rich HTML semantics that are enhanced to make them more attractive and finger-friendly.

    @@ -345,60 +345,70 @@

    For example, if a block of HTML markup (say a login form) was loaded in through AJAX, trigger the create event to automatically transform all the widgets it contains (inputs and buttons in this case) into the enhanced versions. The code for this scenario would be:

    - - $( ...new markup that contains widgets... ).appendTo( ".ui-page" ).trigger( "create" ); - +
    
    +$( ...new markup that contains widgets... ).appendTo( ".ui-page" ).trigger( "create" );
    +

    Refreshing form elements

    In jQuery Mobile, some enhanced form controls are simply styled (inputs), but others are custom controls (selects, sliders) built from, and kept in sync with, the native control. To programmatically update a form control with JavaScript, first manipulate the native control, then use the refresh method to tell the enhanced control to update itself to match the new state. Here are some examples of how to update common form controls, then call the refresh method:

    +

    Checkboxes:

    - - $("input[type='checkbox']").prop("checked",true).checkboxradio("refresh"); - +
    
    +$( "input[type='checkbox']" ).prop( "checked", true ).checkboxradio( "refresh" );
    +
    -

    Radios:

    - - $("input[type='radio']").prop("checked",true).checkboxradio("refresh"); - +

    Radios:

    + +
    
    +$( "input[type='radio']" ).prop( "checked", true ).checkboxradio( "refresh" );
    +
    -

    Selects:

    -
    -
    -var myselect = $("#selectfoo");
    +		

    Selects:

    + +
    
    +var myselect = $( "#selectfoo" );
     myselect[0].selectedIndex = 3;
    -myselect.selectmenu("refresh");
    - -

    Sliders:

    - - $("input[type='range']").val(60).slider("refresh"); - +myselect.selectmenu( "refresh" ); +
    -

    Flip switches (they use slider):

    +

    Sliders:

    + +
    
    +$( "input[type='range']" ).val( 60 ).slider( "refresh" );
    +
    -
    +		

    Flip switches:

    + +

    They use the slider widget.

    -var myswitch = $("#selectbar"); -myswitch[0].selectedIndex = 1; -myswitch.slider("refresh"); -
    +
    
    +var myswitch = $( "#selectbar" );
    +myswitch[ 0 ].selectedIndex = 1;
    +myswitch.slider( "refresh" );
    +

    Preventing auto-initialization of form elements

    +

    If you'd prefer that a particular form control be left untouched by jQuery Mobile, simply give that element the attribute data-role="none". For example:

    -
    <label for="foo">
    +            
    +
    
    +<label for="foo">
     <select name="foo" id="foo" data-role="none">
     	<option value="a">A</option>
     	<option value="b">B</option>
     	<option value="c">C</option>
    -</select>
    +</select> +

    If you'd like to prevent auto-initialization without adding attributes to your markup, you can customize the selector that is used for preventing auto-initialization by setting the page plugin's keepNative option (which defaults to [data-role="none"]). Be sure to configure this option inside an event handler bound to the mobileinit event, so that it applies to the first page as well as subsequent pages that are loaded.

    -
    
    -$(document).bind('mobileinit',function(){
    +            
    +
    
    +$( document ).bind( "mobileinit", function() {
     	$.mobile.page.prototype.options.keepNative = "select, input.foo, textarea.bar";
     });
    -				
    +

    Alternately you can use the data-enhance="false" data attribute on a parent element with $.mobile.ignoreContentEnabled set to true. Beware though, this will incur a performance penalty for each and every element in the page that would otherwise be enhanced as jQuery Mobile must traverse the set of parents to look for those elements.

    From 37445f66a2fb21af9a1f70dd3e6929148975b444 Mon Sep 17 00:00:00 2001 From: Jasper de Groot Date: Sat, 23 Feb 2013 16:52:39 +0100 Subject: [PATCH 18/38] Demos: fixed broken links --- docs/widgets/links/index.php | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/widgets/links/index.php b/docs/widgets/links/index.php index 7ebf8aea96a..dd94fe006be 100644 --- a/docs/widgets/links/index.php +++ b/docs/widgets/links/index.php @@ -24,38 +24,40 @@
    -

    Links API

    +

    Links API

    -

    jQuery Mobile is designed to work with standard page link conventions and layers the AJAX navigation on top for maximum compatibility. -

    +

    jQuery Mobile is designed to work with standard page link conventions and layers the AJAX navigation on top for maximum compatibility. +

    -

    Linking pages

    +

    Linking pages

    -

    You can link pages and assets as you normally would, and jQuery Mobile will automatically handle page requests in a single-page model, using AJAX when possible. When AJAX isn't possible (such as a non-same-domain url, or if specified using certain attributes on the link), a normal http request is used instead.

    +

    You can link pages and assets as you normally would, and jQuery Mobile will automatically handle page requests in a single-page model, using AJAX when possible. When AJAX isn't possible (such as a non-same-domain url, or if specified using certain attributes on the link), a normal http request is used instead.

    -

    The goal of this nav model is to allow developers to create websites using best practices — where ordinary links will "just work" without any special configuration — while creating a rich, native-like experience that can't be achieved with standard HTTP requests.

    +

    The goal of this nav model is to allow developers to create websites using best practices — where ordinary links will "just work" without any special configuration — while creating a rich, native-like experience that can't be achieved with standard HTTP requests.

    -

    Default link behavior: AJAX

    +

    Default link behavior: AJAX

    -

    To enable animated page transitions, all links that point to an external page (ex. products.html) will be loaded via AJAX. To do this unobtrusively, the framework parses the link's href to formulate an AJAX request (Hijax) and displays the loading spinner. All this is done automatically by jQuery Mobile.

    +

    To enable animated page transitions, all links that point to an external page (ex. products.html) will be loaded via AJAX. To do this unobtrusively, the framework parses the link's href to formulate an AJAX request (Hijax) and displays the loading spinner. All this is done automatically by jQuery Mobile.

    -

    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.

    +

    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.

    -

    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 example of the error message.

    +

    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 example of the error message.

    -

    Note: You cannot link to a 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 subpage plugin that makes it possible to load in multi-page documents.

    +

    Note: You cannot link to a 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 subpage plugin that makes it possible to load in multi-page documents.

    -
    - Demo home -
    + -

    Linking without AJAX

    +

    Linking without AJAX

    Links that point to other domains or that have rel="external", data-ajax="false" or target attributes will not be loaded with AJAX. Instead, these links will cause a full page refresh with no animated transition. Both attributes (rel="external" and data-ajax="false") have the same effect, but a different semantic meaning: rel="external" should be used when linking to another site or domain, while data-ajax="false" is useful for simply opting a page within your domain from being loaded via AJAX. Because of security restrictions, the framework always opts links to external domains out of the AJAX behavior.

    In version 1.1, we added support for using data-ajax="false" on a parent container which allows you to exclude a large number of links from the AJAX navigation system. This avoids the need to add this attribute to every link in a container. To activate this functionality, $.mobile.ignoreContentEnabled must be set to true because this feature adds overhead we don't want to enable by default.

    From 4bbad467b8197fefb9f550007889ad01b0347b2f Mon Sep 17 00:00:00 2001 From: intai Date: Thu, 14 Jun 2012 12:29:42 +1200 Subject: [PATCH 19/38] GrabOne --- css/themes/default/jquery.mobile.theme.css | 6 +- js/jquery.mobile.buttonMarkup.js | 18 ++- js/jquery.mobile.navigation.js | 161 ++++++++++++++++++--- js/jquery.mobile.support.js | 4 +- js/jquery.mobile.vmouse.js | 36 ++++- 5 files changed, 191 insertions(+), 34 deletions(-) diff --git a/css/themes/default/jquery.mobile.theme.css b/css/themes/default/jquery.mobile.theme.css index 0aafadd8b6e..f3226aae95d 100644 --- a/css/themes/default/jquery.mobile.theme.css +++ b/css/themes/default/jquery.mobile.theme.css @@ -555,7 +555,7 @@ } .ui-btn-up-d:visited, .ui-btn-up-d a.ui-link-inherit { - color: #333 /*{d-bup-color}*/; + color: #2f3e46 /*{d-bup-color}*/; } .ui-btn-hover-d { border: 1px solid #aaa /*{d-bhover-border}*/; @@ -767,7 +767,7 @@ a.ui-link-inherit { border: 1px solid #2373a5 /*{global-active-border}*/; background: #5393c5 /*{global-active-background-color}*/; font-weight: bold; - color: #fff /*{global-active-color}*/; + color: #754300 /*{global-active-color}*/; cursor: pointer; text-shadow: 0 /*{global-active-shadow-x}*/ 1px /*{global-active-shadow-y}*/ 0 /*{global-active-shadow-radius}*/ #3373a5 /*{global-active-shadow-color}*/; text-decoration: none; @@ -1054,7 +1054,7 @@ a.ui-link-inherit { } .ui-checkbox-on .ui-icon, .ui-radio-on .ui-icon { - background-color: #4596ce /*{global-active-background-color}*/; /* NOTE: this hex should match the active state color. It's repeated here for cascade */ + background-color: #e49200 /*{global-active-background-color}*/; /* NOTE: this hex should match the active state color. It's repeated here for cascade */ } /* loading icon */ diff --git a/js/jquery.mobile.buttonMarkup.js b/js/jquery.mobile.buttonMarkup.js index dcedb059e0e..72b87123c4d 100644 --- a/js/jquery.mobile.buttonMarkup.js +++ b/js/jquery.mobile.buttonMarkup.js @@ -233,10 +233,12 @@ var attachEvents = function() { if ( evt === "vmousedown" ) { if ( isTouchEvent ) { + // Grabone Modified + // to disable touch highlight. // Use a short delay to determine if the user is scrolling before highlighting - hov = setTimeout( function() { + /*hov = setTimeout( function() { updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-down-" + theme, undefined, "down" ); - }, hoverDelay ); + }, hoverDelay );*/ } else { updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-down-" + theme, undefined, "down" ); } @@ -244,21 +246,25 @@ var attachEvents = function() { updateButtonClass( $btn, "ui-btn-down-" + theme, "ui-btn-up-" + theme, undefined, "up" ); } else if ( evt === "vmouseover" || evt === "focus" ) { if ( isTouchEvent ) { + // Grabone Modified + // to disable touch highlight. // Use a short delay to determine if the user is scrolling before highlighting - foc = setTimeout( function() { + /*foc = setTimeout( function() { updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-hover-" + theme, true, "" ); - }, hoverDelay ); + }, hoverDelay );*/ } else { updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-hover-" + theme, true, "" ); } } else if ( evt === "vmouseout" || evt === "blur" || evt === "scrollstart" ) { updateButtonClass( $btn, "ui-btn-hover-" + theme + " ui-btn-down-" + theme, "ui-btn-up-" + theme, false, "up" ); - if ( hov ) { + // Grabone Modified + // to disable touch highlight. + /*if ( hov ) { clearTimeout( hov ); } if ( foc ) { clearTimeout( foc ); - } + }*/ } } }, diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 532a9077029..d7de805f95a 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -78,6 +78,11 @@ define( [ //urlHistory is purely here to make guesses at whether the back or forward button was clicked //and provide an appropriate transition urlHistory = $.mobile.navigate.history, + + // Grabone Modified + // to detect ios and android app. + isiOSApp = (/scroller/i).test(navigator.userAgent), + isAndroidApp = (/grabone.*android/i).test(navigator.userAgent), //define first selector to receive focus when a page is shown focusable = "[tabindex],a,button:visible,select:visible,input", @@ -106,6 +111,14 @@ define( [ getScreenHeight = $.mobile.getScreenHeight; + // Grabone Modified + // to get ios app version. + var iOSAppVersion = 0; + var match = navigator.userAgent.match(/scroller\/(\d+)$/i); + if (match && match.length > 1) { + iOSAppVersion = match[1]; + } + //base element management, defined depending on dynamic base tag support var base = $.support.dynamicBaseTag ? { @@ -340,9 +353,24 @@ define( [ //history stack $.mobile.urlHistory = urlHistory; + + // Grabone Modified + // to detect ios and android app. + $.mobile.isiOSApp = isiOSApp; + $.mobile.isAndroidApp = isAndroidApp; + + // Grabone Modified + // to get ios app version. + $.mobile.iOSAppVersion = iOSAppVersion; $.mobile.dialogHashKey = dialogHashKey; + // Grabone Modified + // to get whether pages are transitioning. + $.mobile.isPageTransitionLocked = function(){ + return isPageTransitioning; + }; + //enable cross-domain page support $.mobile.allowCrossDomainPages = false; @@ -504,12 +532,33 @@ define( [ deferred.reject( absUrl, options ); } else { // Load the new page. - $.ajax({ + // GrabOne Modified + // to be able to abort the ajax request. + var xhr = $.ajax({ url: fileUrl, type: settings.type, data: settings.data, dataType: "html", + // GrabOne Modified + // to distinguish between requesting a full-page and a partial. + entirePage: true, + // GrabOne Modified + // to ensure a fresh response from server. + headers: (settings.reloadPageServer) + ? {'If-None-Match':''} + : {}, //{'X-Requested-With':'XMLHttpRequest'} success: function( html, textStatus, xhr ) { + // Grabone Modified + // to workaround the limitation on redirection with cross-domain ajax. + var matches = html.match(/^Location: (.*)/) + if (matches) { + delete options.type; + delete options.data; + releasePageTransitionLock(); + $.mobile.changePage(matches[1], options); + return; + } + //pre-parse html to check for a data-url, //use it as the new fileUrl, base path, etc var all = $( "
    " ), @@ -646,6 +695,10 @@ define( [ deferred.reject( absUrl, options ); } }); + + if (settings.xhr) { + $.mobile.xhr = xhr; + } } return deferred.promise(); @@ -753,6 +806,13 @@ define( [ }); return; } + + // Grabone Modified + // to skip intermediate pages and transition only to the last. + if (pageTransitionQueue.length > 0) { + releasePageTransitionLock(); + return; + } // If we are going to the first-page of the application, we need to make // sure settings.dataUrl is set to the application document url. This allows @@ -808,6 +868,9 @@ define( [ historyDir = options.direction === "back" ? -1 : 1; } + // Grabone Modified + // to reduce response time. + if (!isiOSApp) { // Kill the keyboard. // XXX_jblas: We need to stop crawling the entire document to kill focus. Instead, // we should be tracking focus with a delegate() handler so we already have @@ -821,6 +884,7 @@ define( [ $( "input:focus, textarea:focus, select:focus" ).blur(); } } catch( e ) {} + } // Record whether we are at a place in history where a dialog used to be - if so, do not add a new history entry and do not change the hash either var alreadyThere = false; @@ -996,6 +1060,10 @@ define( [ var getAjaxFormData = function( $form, calculateOnly ) { var type, target, url, ret = true, formData, vclickedName; if ( !$.mobile.ajaxEnabled || + // Grabone Modified + // to enable cross-domain ajax. + // (!$.mobile.allowCrossDomainPages && $this.is( "[rel='external']" )) || + $this.is( "[rel='external']" ) || // test that the form is, itself, ajax false $form.is( ":jqmData(ajax='false')" ) || // test that $.mobile.ignoreContentEnabled is set and @@ -1026,9 +1094,21 @@ define( [ url = path.makeUrlAbsolute( url, getClosestBaseUrl( $form ) ); - if ( ( path.isExternal( url ) && !path.isPermittedCrossDomainRequest( documentUrl, url ) ) || target ) { + //external submits use regular HTTP + if( path.isExternal( url ) || target ) { + // GrabOne Modified + // to show loading message when submitting to a cross-domain url. + $.mobile.showPageLoadingMsg(); + $(window).one('pagehide unload', function(){ + $.mobile.hidePageLoadingMsg(); + }); + return false; } + + // GrabOne Modified + // to enable reverse direction. + var direction = $this.jqmData('direction'); if ( !calculateOnly ) { type = $form.attr( "method" ); @@ -1071,6 +1151,13 @@ define( [ var formData = getAjaxFormData( $( this ) ); if ( formData ) { + // GrabOne Modified + // to show loading message when submitting to a cross-domain url. + $.mobile.showPageLoadingMsg(); + $(window).one('pagehide unload', function(){ + $.mobile.hidePageLoadingMsg(); + }); + $.mobile.changePage( formData.url, formData.options ); event.preventDefault(); } @@ -1144,18 +1231,18 @@ define( [ }); // click routing - direct to HTTP or Ajax, accordingly - $.mobile.document.bind( "click", function( event ) { - if ( !$.mobile.linkBindingEnabled || event.isDefaultPrevented() ) { - return; - } + $( document ).bind( (!isiOSApp) ? "click" : "click vclick", function( event ) { + if( !$.mobile.linkBindingEnabled ){ + return; + } var link = findClosestLink( event.target ), $link = $( link ), httpCleanup; - // If there is no link associated with the click or its not a left - // click we want to ignore the click - // TODO teach $.mobile.hijackable to operate on raw dom elements so the link wrapping - // can be avoided - if ( !link || event.which > 1 || !$link.jqmHijackable().length ) { + // If there is no link associated with the click or its not a left + // click we want to ignore the click + // Grabone Modified + // to include middle click. + if ( !link || event.which > 2) { return; } @@ -1166,11 +1253,33 @@ define( [ //if there's a data-rel=back attr, go back in history if ( $link.is( ":jqmData(rel='back')" ) ) { - $.mobile.back(); + // Grabone Modified + // to avoid going back in history twice becuase of enabling vclick. + if (isiOSApp) { + if (event.type == 'vclick') { + $link.data('triggered', true); + $.mobile.back(); + } + else { + if ($link.data('triggered')) { + $link.removeData('triggered'); + } + else { + $.mobile.back(); + } + } + } + else { + $.mobile.back(); + } return false; } - var baseUrl = getClosestBaseUrl( $link ), + // Grabone Modified + // to reduce response time + // assuming we always use absolute path not relative path. + // var baseUrl = getClosestBaseUrl( $link ), + var baseUrl = documentBase.hrefNoHash, //get href, if defined, otherwise default to empty hash href = path.makeUrlAbsolute( $link.attr( "href" ) || "#", baseUrl ); @@ -1223,6 +1332,19 @@ define( [ isExternal = useDefaultUrlHandling || ( path.isExternal( href ) && !path.isPermittedCrossDomainRequest( documentUrl, href ) ); if ( isExternal ) { + // GrabOne Modified + // to show loading message when opening a grabone cross-domain page. + var u = path.parseUrl(href); + if ((!u.protocol || u.protocol.indexOf('http') >= 0) + && (!u.hostname || u.hostname.indexOf('grabone') >= 0) + && (!u.search || u.search.indexOf('target_blank=') < 0)) { + + $.mobile.showPageLoadingMsg(); + $(window).one('pagehide unload', function(){ + $.mobile.hidePageLoadingMsg(); + }); + } + httpCleanup(); //use default click handling return; @@ -1233,16 +1355,21 @@ define( [ reverse = $link.jqmData( "direction" ) === "reverse" || // deprecated - remove by 1.0 $link.jqmData( "back" ), - + // Grabone Modified + // to be able to explicitly reload a page. + reloadPage = ($link.jqmData( "cache" ) === 'reload'), + //this may need to be more specific as we use data-rel more role = $link.attr( "data-" + $.mobile.ns + "rel" ) || undefined; - $.mobile.changePage( href, { transition: transition, reverse: reverse, role: role, link: $link } ); + $.mobile.changePage( href, { transition: transition, reverse: reverse, role: role, link: $link, reloadPage: reloadPage } ); event.preventDefault(); }); + // Grabone Modified + // to disable default prefetch mechanism. //prefetch pages when anchors with data-prefetch are encountered - $.mobile.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 ), @@ -1254,7 +1381,7 @@ define( [ $.mobile.loadPage( url, { role: $link.attr( "data-" + $.mobile.ns + "rel" ) } ); } }); - }); + });*/ $.mobile._handleHashChange = function( url, data ) { //find first page via hash diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js index 95e229b4bc8..301f5608c9f 100644 --- a/js/jquery.mobile.support.js +++ b/js/jquery.mobile.support.js @@ -18,7 +18,9 @@ function propExists( prop ) { } } -var fakeBody = $( "" ).prependTo( "html" ), +// GrabOne Modified +// to avoid a flash of blank screen. +var fakeBody = $( "" ),//.prependTo( "html" ), fbCSS = fakeBody[ 0 ].style, vendors = [ "Webkit", "Moz", "O" ], webos = "palmGetResource" in window, //only used to rule out scrollTop diff --git a/js/jquery.mobile.vmouse.js b/js/jquery.mobile.vmouse.js index 3760c053860..c92d0d2c54e 100644 --- a/js/jquery.mobile.vmouse.js +++ b/js/jquery.mobile.vmouse.js @@ -42,7 +42,9 @@ var dataPropertyName = "virtualMouseBindings", lastTouchID = 0, threshold; $.vmouse = { - moveDistanceThreshold: 10, + // GrabOne Modified + // to reduce accidental hit. + moveDistanceThreshold: 5, clickDistanceThreshold: 10, resetTimerDuration: 1500 }; @@ -192,9 +194,19 @@ function triggerVirtualEvent( eventType, event, flags ) { } function mouseEventCallback( event ) { - var touchID = $.data( event.target, touchTargetPropertyName ); + // GrabOne Modified + // to avoid random clicks triggered by drag-and-hold on ios. + if (didScroll && $.mobile.isiOSApp && event.type == 'click') { + event.preventDefault(); + event.stopPropagation(); + event.stopImmediatePropagation(); + return; + } + + var touchID = $.data(event.target, touchTargetPropertyName); + + if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ){ - if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ) { var ve = triggerVirtualEvent( "v" + event.type, event ); if ( ve ) { if ( ve.isDefaultPrevented() ) { @@ -307,7 +319,10 @@ function handleTouchEnd( event ) { } } triggerVirtualEvent( "vmouseout", event, flags); - didScroll = false; + + // GrabOne Modified + // to avoid random clicks triggered by drag-and-hold on ios. + // didScroll = false; startResetTimer(); } @@ -367,8 +382,8 @@ function getSpecialEventObject( eventType ) { activeDocHandlers[ "touchstart" ] = ( activeDocHandlers[ "touchstart" ] || 0) + 1; - if ( activeDocHandlers[ "touchstart" ] === 1 ) { - $document.bind( "touchstart", handleTouchStart ) + if (activeDocHandlers[ "touchstart" ] === 1) { + /*$document.bind( "touchstart", handleTouchStart ) .bind( "touchend", handleTouchEnd ) // On touch platforms, touching the screen and then dragging your finger @@ -382,7 +397,14 @@ function getSpecialEventObject( eventType ) { // or not a scroll happenens before the touchend event is fired. .bind( "touchmove", handleTouchMove ) - .bind( "scroll", handleScroll ); + .bind( "scroll", handleScroll );*/ + + // GrabOne Modified + // to improve response time. + document.addEventListener('touchstart', handleTouchStart, false); + document.addEventListener('touchend', handleTouchEnd, false); + document.addEventListener('touchmove', handleTouchMove, false); + document.addEventListener('scroll', handleScroll, false); } } }, From 1a1fd0e8e55371b9afca1f3b4d7f277be47568af Mon Sep 17 00:00:00 2001 From: intai Date: Thu, 21 Jun 2012 14:25:25 +1200 Subject: [PATCH 20/38] GrabOne - Use jquery mobile to handle target links --- js/jquery.mobile.navigation.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index d7de805f95a..56d957e40f3 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -1316,8 +1316,10 @@ define( [ } } + // GrabOne Modified + // to use jquery mobile to handle target links as there is no tab in our apps. // Should we handle this link, or let the browser deal with it? - var useDefaultUrlHandling = $link.is( "[rel='external']" ) || $link.is( ":jqmData(ajax='false')" ) || $link.is( "[target]" ), + var useDefaultUrlHandling = $link.is( "[rel='external']" ) || $link.is( ":jqmData(ajax='false')" ),// || $link.is( "[target]" ), // Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR // requests if the document doing the request was loaded via the file:// protocol. From 215c544f353a9f02d750c46be75833bf7d3be538 Mon Sep 17 00:00:00 2001 From: intai Date: Thu, 19 Jul 2012 15:59:37 +1200 Subject: [PATCH 21/38] GrabeOne - Workaround 304 with undefined html in mobile safari on ios 4.3 --- js/jquery.mobile.navigation.js | 88 +++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 39 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 56d957e40f3..0d00ee2966c 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -531,6 +531,48 @@ define( [ if ( !( $.mobile.allowCrossDomainPages || path.isSameDomain( documentUrl, absUrl ) ) ) { deferred.reject( absUrl, options ); } else { + // GrabOne Modified + // to be able to trigger fail form ajax success. + var errorCallback = function( xhr, textStatus, errorThrown ) { + //set base back to current path + if( base ) { + base.set( path.get() ); + } + + // Add error info to our triggerData. + triggerData.xhr = xhr; + triggerData.textStatus = textStatus; + triggerData.errorThrown = errorThrown; + + var plfEvent = new $.Event( "pageloadfailed" ); + + // Let listeners know the page load failed. + settings.pageContainer.trigger( plfEvent, triggerData ); + + // If the default behavior is prevented, stop here! + // Note that it is the responsibility of the listener/handler + // that called preventDefault(), to resolve/reject the + // deferred object within the triggerData. + if( plfEvent.isDefaultPrevented() ){ + return; + } + + // Remove loading message. + if ( settings.showLoadMsg ) { + + // Remove loading message. + hideMsg(); + + // show error message + $.mobile.showPageLoadingMsg( $.mobile.pageLoadErrorMessageTheme, $.mobile.pageLoadErrorMessage, true ); + + // hide after delay + setTimeout( $.mobile.hidePageLoadingMsg, 1500 ); + } + + deferred.reject( absUrl, options ); + }; + // Load the new page. // GrabOne Modified // to be able to abort the ajax request. @@ -548,6 +590,12 @@ define( [ ? {'If-None-Match':''} : {}, //{'X-Requested-With':'XMLHttpRequest'} success: function( html, textStatus, xhr ) { + // GrabOne Modified + // to workaround 304 with undefined html in mobile safari on ios 4.3. + if (!html) { + return errorCallback(xhr, 'error', 'Not Found'); + } + // Grabone Modified // to workaround the limitation on redirection with cross-domain ajax. var matches = html.match(/^Location: (.*)/) @@ -655,45 +703,7 @@ define( [ deferred.resolve( absUrl, options, page, dupCachedPage ); }, - error: function( xhr, textStatus, errorThrown ) { - //set base back to current path - if ( base ) { - base.set( path.get() ); - } - - // Add error info to our triggerData. - triggerData.xhr = xhr; - triggerData.textStatus = textStatus; - triggerData.errorThrown = errorThrown; - - var plfEvent = new $.Event( "pageloadfailed" ); - - // Let listeners know the page load failed. - settings.pageContainer.trigger( plfEvent, triggerData ); - - // If the default behavior is prevented, stop here! - // Note that it is the responsibility of the listener/handler - // that called preventDefault(), to resolve/reject the - // deferred object within the triggerData. - if ( plfEvent.isDefaultPrevented() ) { - return; - } - - // Remove loading message. - if ( settings.showLoadMsg ) { - - // Remove loading message. - hideMsg(); - - // show error message - $.mobile.showPageLoadingMsg( $.mobile.pageLoadErrorMessageTheme, $.mobile.pageLoadErrorMessage, true ); - - // hide after delay - setTimeout( $.mobile.hidePageLoadingMsg, 1500 ); - } - - deferred.reject( absUrl, options ); - } + error: errorCallback }); if (settings.xhr) { From e68ee864bad9604063f1a0239b30a62e1440dd8e Mon Sep 17 00:00:00 2001 From: intai Date: Tue, 31 Jul 2012 11:14:31 +1200 Subject: [PATCH 22/38] GrabOne - Fix collapsible with vclick --- js/jquery.mobile.navigation.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 0d00ee2966c..25ccea04a08 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -84,6 +84,10 @@ define( [ isiOSApp = (/scroller/i).test(navigator.userAgent), isAndroidApp = (/grabone.*android/i).test(navigator.userAgent), + // Grabone Modified + // to setup vclick event. + clickEvent = (isiOSApp) ? "click vclick" : "click", + //define first selector to receive focus when a page is shown focusable = "[tabindex],a,button:visible,select:visible,input", @@ -363,6 +367,10 @@ define( [ // to get ios app version. $.mobile.iOSAppVersion = iOSAppVersion; + // Grabone Modified + // to setup vclick event. + $.mobile.clickEvent = clickEvent; + $.mobile.dialogHashKey = dialogHashKey; // Grabone Modified @@ -1241,7 +1249,7 @@ define( [ }); // click routing - direct to HTTP or Ajax, accordingly - $( document ).bind( (!isiOSApp) ? "click" : "click vclick", function( event ) { + $( document ).bind( clickEvent, function( event ) { if( !$.mobile.linkBindingEnabled ){ return; } From 945ba6f2fa2ea675da6662c0fd85b5470565d3c3 Mon Sep 17 00:00:00 2001 From: intai Date: Fri, 3 Aug 2012 16:01:51 +1200 Subject: [PATCH 23/38] GrabOne - Work with offline cacher --- js/jquery.mobile.navigation.js | 268 +++++++++++++++++---------------- 1 file changed, 141 insertions(+), 127 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 25ccea04a08..9fe3d6b9c73 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -542,6 +542,12 @@ define( [ // GrabOne Modified // to be able to trigger fail form ajax success. var errorCallback = function( xhr, textStatus, errorThrown ) { + // GrabOne Modified + // to workaround error triggered when accessing offline content. + if (xhr.status == 0 && xhr.responseText) { + return successCallback(xhr.responseText, 'success', xhr); + } + //set base back to current path if( base ) { base.set( path.get() ); @@ -580,6 +586,118 @@ define( [ deferred.reject( absUrl, options ); }; + + // GrabOne Modified + // to be able to trigger success form ajax error. + var successCallback = function( html, textStatus, xhr ) { + // GrabOne Modified + // to workaround 304 with undefined html in mobile safari on ios 4.3. + if (!html) { + return errorCallback(xhr, 'error', 'Not Found'); + } + + // Grabone Modified + // to workaround the limitation on redirection with cross-domain ajax. + var matches = html.match(/^Location: (.*)/) + if (matches) { + delete options.type; + delete options.data; + releasePageTransitionLock(); + $.mobile.changePage(matches[1], options); + return; + } + + //pre-parse html to check for a data-url, + //use it as the new fileUrl, base path, etc + var all = $( "
    " ), + + //page title regexp + newPageTitle = html.match( /]*>([^<]*)/ ) && RegExp.$1, + + // TODO handle dialogs again + pageElemRegex = new RegExp( "(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>)" ), + dataUrlRegex = new RegExp( "\\bdata-" + $.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?" ); + + // data-url must be provided for the base tag so resource requests can be directed to the + // correct url. loading into a temprorary element makes these requests immediately + if( pageElemRegex.test( html ) + && RegExp.$1 + && dataUrlRegex.test( RegExp.$1 ) + && RegExp.$1 ) { + url = fileUrl = path.getFilePath( $( "
    " + RegExp.$1 + "
    " ).text() ); + } + + //workaround to allow scripts to execute when included in page divs + all.get( 0 ).innerHTML = html; + page = all.find( ":jqmData(role='page'), :jqmData(role='dialog')" ).first(); + + //if page elem couldn't be found, create one and insert the body element's contents + if( !page.length ){ + page = $( "
    " + ( html.split( /<\/?body[^>]*>/gmi )[1] || "" ) + "
    " ); + } + + if ( newPageTitle && !page.jqmData( "title" ) ) { + if ( ~newPageTitle.indexOf( "&" ) ) { + newPageTitle = $( "
    " + newPageTitle + "
    " ).text(); + } + page.jqmData( "title", newPageTitle ); + } + + //rewrite src and href attrs to use a base url + if( !$.support.dynamicBaseTag ) { + var newPath = path.get( fileUrl ); + page.find( "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]" ).each(function() { + var thisAttr = $( this ).is( '[href]' ) ? 'href' : + $(this).is('[src]') ? 'src' : 'action', + thisUrl = $( this ).attr( thisAttr ); + + // XXX_jblas: We need to fix this so that it removes the document + // base URL, and then prepends with the new page URL. + //if full path exists and is same, chop it - helps IE out + thisUrl = thisUrl.replace( location.protocol + '//' + location.host + location.pathname, '' ); + + if( !/^(\w+:|#|\/)/.test( thisUrl ) ) { + $( this ).attr( thisAttr, newPath + thisUrl ); + } + }); + } + + //append to page and enhance + // TODO taging a page with external to make sure that embedded pages aren't removed + // by the various page handling code is bad. Having page handling code in many + // places is bad. Solutions post 1.0 + page + .attr( "data-" + $.mobile.ns + "url", path.convertUrlToDataUrl( fileUrl ) ) + .attr( "data-" + $.mobile.ns + "external-page", true ) + .appendTo( settings.pageContainer ); + + // wait for page creation to leverage options defined on widget + page.one( 'pagecreate', $.mobile._bindPageRemove ); + + enhancePage( page, settings.role ); + + // Enhancing the page may result in new dialogs/sub pages being inserted + // into the DOM. If the original absUrl refers to a sub-page, that is the + // real page we are interested in. + if ( absUrl.indexOf( "&" + $.mobile.subPageUrlKey ) > -1 ) { + page = settings.pageContainer.children( "[data-" + $.mobile.ns +"url='" + dataUrl + "']" ); + } + + // Remove loading message. + if ( settings.showLoadMsg ) { + hideMsg(); + } + + // Add the page reference and xhr to our triggerData. + triggerData.xhr = xhr; + triggerData.textStatus = textStatus; + triggerData.page = page; + + // Let listeners know the page loaded successfully. + settings.pageContainer.trigger( "pageload", triggerData ); + + deferred.resolve( absUrl, options, page, dupCachedPage ); + }; // Load the new page. // GrabOne Modified @@ -597,120 +715,7 @@ define( [ headers: (settings.reloadPageServer) ? {'If-None-Match':''} : {}, //{'X-Requested-With':'XMLHttpRequest'} - success: function( html, textStatus, xhr ) { - // GrabOne Modified - // to workaround 304 with undefined html in mobile safari on ios 4.3. - if (!html) { - return errorCallback(xhr, 'error', 'Not Found'); - } - - // Grabone Modified - // to workaround the limitation on redirection with cross-domain ajax. - var matches = html.match(/^Location: (.*)/) - if (matches) { - delete options.type; - delete options.data; - releasePageTransitionLock(); - $.mobile.changePage(matches[1], options); - return; - } - - //pre-parse html to check for a data-url, - //use it as the new fileUrl, base path, etc - var all = $( "
    " ), - - //page title regexp - newPageTitle = html.match( /]*>([^<]*)/ ) && RegExp.$1, - - // TODO handle dialogs again - pageElemRegex = new RegExp( "(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>)" ), - dataUrlRegex = new RegExp( "\\bdata-" + $.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?" ); - - - // data-url must be provided for the base tag so resource requests can be directed to the - // correct url. loading into a temprorary element makes these requests immediately - if ( pageElemRegex.test( html ) && - RegExp.$1 && - dataUrlRegex.test( RegExp.$1 ) && - RegExp.$1 ) { - url = fileUrl = path.getFilePath( $( "
    " + RegExp.$1 + "
    " ).text() ); - } - - if ( base ) { - base.set( fileUrl ); - } - - //workaround to allow scripts to execute when included in page divs - all.get( 0 ).innerHTML = html; - page = all.find( ":jqmData(role='page'), :jqmData(role='dialog')" ).first(); - - //if page elem couldn't be found, create one and insert the body element's contents - if ( !page.length ) { - page = $( "
    " + ( html.split( /<\/?body[^>]*>/gmi )[1] || "" ) + "
    " ); - } - - if ( newPageTitle && !page.jqmData( "title" ) ) { - if ( ~newPageTitle.indexOf( "&" ) ) { - newPageTitle = $( "
    " + newPageTitle + "
    " ).text(); - } - page.jqmData( "title", newPageTitle ); - } - - //rewrite src and href attrs to use a base url - if ( !$.support.dynamicBaseTag ) { - var newPath = path.get( fileUrl ); - page.find( "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]" ).each(function() { - var thisAttr = $( this ).is( '[href]' ) ? 'href' : - $( this ).is( '[src]' ) ? 'src' : 'action', - thisUrl = $( this ).attr( thisAttr ); - - // XXX_jblas: We need to fix this so that it removes the document - // base URL, and then prepends with the new page URL. - //if full path exists and is same, chop it - helps IE out - thisUrl = thisUrl.replace( location.protocol + '//' + location.host + location.pathname, '' ); - - if ( !/^(\w+:|#|\/)/.test( thisUrl ) ) { - $( this ).attr( thisAttr, newPath + thisUrl ); - } - }); - } - - //append to page and enhance - // TODO taging a page with external to make sure that embedded pages aren't removed - // by the various page handling code is bad. Having page handling code in many - // places is bad. Solutions post 1.0 - page - .attr( "data-" + $.mobile.ns + "url", path.convertUrlToDataUrl( fileUrl ) ) - .attr( "data-" + $.mobile.ns + "external-page", true ) - .appendTo( settings.pageContainer ); - - // wait for page creation to leverage options defined on widget - page.one( 'pagecreate', $.mobile._bindPageRemove ); - - enhancePage( page, settings.role ); - - // Enhancing the page may result in new dialogs/sub pages being inserted - // into the DOM. If the original absUrl refers to a sub-page, that is the - // real page we are interested in. - if ( absUrl.indexOf( "&" + $.mobile.subPageUrlKey ) > -1 ) { - page = settings.pageContainer.children( "[data-" + $.mobile.ns +"url='" + dataUrl + "']" ); - } - - // Remove loading message. - if ( settings.showLoadMsg ) { - hideMsg(); - } - - // Add the page reference and xhr to our triggerData. - triggerData.xhr = xhr; - triggerData.textStatus = textStatus; - triggerData.page = page; - - // Let listeners know the page loaded successfully. - settings.pageContainer.trigger( "pageload", triggerData ); - - deferred.resolve( absUrl, options, page, dupCachedPage ); - }, + success: successCallback, error: errorCallback }); @@ -1116,10 +1121,12 @@ define( [ if( path.isExternal( url ) || target ) { // GrabOne Modified // to show loading message when submitting to a cross-domain url. - $.mobile.showPageLoadingMsg(); - $(window).one('pagehide unload', function(){ - $.mobile.hidePageLoadingMsg(); - }); + if (navigator.onLine) { + $.mobile.showPageLoadingMsg(); + $(window).one('pagehide unload', function(){ + $.mobile.hidePageLoadingMsg(); + }); + } return false; } @@ -1169,12 +1176,14 @@ define( [ var formData = getAjaxFormData( $( this ) ); if ( formData ) { - // GrabOne Modified - // to show loading message when submitting to a cross-domain url. - $.mobile.showPageLoadingMsg(); - $(window).one('pagehide unload', function(){ - $.mobile.hidePageLoadingMsg(); - }); + // GrabOne Modified + // to show loading message when submitting to a cross-domain url. + if (navigator.onLine) { + $.mobile.showPageLoadingMsg(); + $(window).one('pagehide unload', function(){ + $.mobile.hidePageLoadingMsg(); + }); + } $.mobile.changePage( formData.url, formData.options ); event.preventDefault(); @@ -1309,6 +1318,8 @@ define( [ return; } + // GrabOne Modified + // to fix when there is hash in an external url. // XXX_jblas: Ideally links to application pages should be specified as // an url to the application document with a hash that is either // the site relative path or id to the page. But some of the @@ -1318,7 +1329,7 @@ define( [ // the current value of the base tag is at the time this code // is called. For now we are just assuming that any url with a // hash in it is an application page reference. - if ( href.search( "#" ) !== -1 ) { + if ( !path.isExternal(href) && href.search( "#" ) != -1 ) { href = href.replace( /[^#]*#/, "" ); if ( !href ) { //link was an empty hash meant purely @@ -1336,8 +1347,10 @@ define( [ // GrabOne Modified // to use jquery mobile to handle target links as there is no tab in our apps. + // to workaround navigation for example from /cacher#/ to /cacher#/auckland. // Should we handle this link, or let the browser deal with it? - var useDefaultUrlHandling = $link.is( "[rel='external']" ) || $link.is( ":jqmData(ajax='false')" ),// || $link.is( "[target]" ), + var u = path.parseUrl($link.attr('href')), + useDefaultUrlHandling = ($link.is( "[rel='external']" ) || $link.is( ":jqmData(ajax='false')" )) && (u.hash == '' || location.pathname != u.pathname),// || $link.is( "[target]" ), // Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR // requests if the document doing the request was loaded via the file:// protocol. @@ -1355,7 +1368,8 @@ define( [ // GrabOne Modified // to show loading message when opening a grabone cross-domain page. var u = path.parseUrl(href); - if ((!u.protocol || u.protocol.indexOf('http') >= 0) + if (navigator.onLine + && (!u.protocol || u.protocol.indexOf('http') >= 0) && (!u.hostname || u.hostname.indexOf('grabone') >= 0) && (!u.search || u.search.indexOf('target_blank=') < 0)) { From fc3156533afd003aebc093f606a403bfb0c455f5 Mon Sep 17 00:00:00 2001 From: intai Date: Wed, 8 Aug 2012 12:26:37 +1200 Subject: [PATCH 24/38] GrabOne - Optimise for android app --- js/jquery.mobile.navigation.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 9fe3d6b9c73..7c55d1aceec 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -1509,8 +1509,12 @@ define( [ }); //set page min-heights to be device specific + // Grabone modified + // to speed up response time. + if (!isiOSApp && !isAndroidApp) { $.mobile.document.bind( "pageshow", $.mobile.resetActivePageHeight ); $.mobile.window.bind( "throttledresize", $.mobile.resetActivePageHeight ); + } };//navreadyDeferred done callback From d26ef008ef754be6ac1d54f4db3bfda21cec2455 Mon Sep 17 00:00:00 2001 From: intai Date: Tue, 14 Aug 2012 13:33:51 +1200 Subject: [PATCH 25/38] GrabOne - Loading dialogue for jelly bean --- js/jquery.mobile.navigation.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 7c55d1aceec..12b1fd5d5c7 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -123,6 +123,10 @@ define( [ iOSAppVersion = match[1]; } + // Grabone Modified + // to show loading dialogue on jelly bean. + var isExternalDelayed = (isAndroidApp && (/android 4\.1/i).test(navigator.userAgent)); + //base element management, defined depending on dynamic base tag support var base = $.support.dynamicBaseTag ? { @@ -1377,6 +1381,16 @@ define( [ $(window).one('pagehide unload', function(){ $.mobile.hidePageLoadingMsg(); }); + + // Grabone Modified + // to show loading dialogue on jelly bean. + if (isExternalDelayed) { + href = $link.attr('href'); + if (href) { + setTimeout(function() { window.location = href; }, 100); + event.preventDefault(); + } + } } httpCleanup(); From 4d503e7a188f2a455d4d06d233e9eb0f687ae353 Mon Sep 17 00:00:00 2001 From: intai Date: Tue, 28 Aug 2012 11:45:45 +1200 Subject: [PATCH 26/38] GrabOne - Avoid retrying a failed page --- js/jquery.mobile.navigation.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 12b1fd5d5c7..83e3f50ee36 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -826,6 +826,12 @@ define( [ //clear out the active button state removeActiveLinkClass( true ); + + // Grabone Modified + // to avoid retrying a failed page. + if (pageTransitionQueue.length > 0 && toPage == pageTransitionQueue[0][0]) { + pageTransitionQueue.pop(); + } //release transition lock so navigation is free again releasePageTransitionLock(); From 357495e9ca6066acd7f34389cb9304ec60b0219c Mon Sep 17 00:00:00 2001 From: intai Date: Wed, 5 Sep 2012 12:21:20 +1200 Subject: [PATCH 27/38] GrabOne - Extract android app version --- js/jquery.mobile.navigation.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 83e3f50ee36..5cf872d627c 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -123,6 +123,14 @@ define( [ iOSAppVersion = match[1]; } + // Grabone Modified + // to get android app version. + var androidAppVersion = 0; + match = navigator.userAgent.match(/^grabone mobile (\d+) .*android/i); + if (match && match.length > 1) { + androidAppVersion = match[1]; + } + // Grabone Modified // to show loading dialogue on jelly bean. var isExternalDelayed = (isAndroidApp && (/android 4\.1/i).test(navigator.userAgent)); @@ -370,6 +378,10 @@ define( [ // Grabone Modified // to get ios app version. $.mobile.iOSAppVersion = iOSAppVersion; + + // Grabone Modified + // to get android app version. + $.mobile.androidAppVersion = androidAppVersion; // Grabone Modified // to setup vclick event. From 621ec533cc7fbf114c21458b5e4a46fc8230dfc8 Mon Sep 17 00:00:00 2001 From: intai Date: Thu, 20 Sep 2012 10:51:26 +1200 Subject: [PATCH 28/38] GrabOne - Invalidate full-page cache --- js/jquery.mobile.navigation.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 5cf872d627c..72387e6bfe6 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -715,6 +715,16 @@ define( [ deferred.resolve( absUrl, options, page, dupCachedPage ); }; + // GrabOne Modified + // to ensure a fresh response from server. + var headers = {}; + if (settings.reloadPageServer) { + headers['If-None-Match'] = ''; + } + if (settings.reloadPageServerAt) { + headers['Invalidate-Before'] = settings.reloadPageServerAt; + } + // Load the new page. // GrabOne Modified // to be able to abort the ajax request. @@ -728,9 +738,7 @@ define( [ entirePage: true, // GrabOne Modified // to ensure a fresh response from server. - headers: (settings.reloadPageServer) - ? {'If-None-Match':''} - : {}, //{'X-Requested-With':'XMLHttpRequest'} + headers: headers, //{'X-Requested-With':'XMLHttpRequest'} success: successCallback, error: errorCallback }); From 57c901eeb5414f4f7a4b11ae47dcf411af50c57a Mon Sep 17 00:00:00 2001 From: intai Date: Thu, 20 Sep 2012 10:56:34 +1200 Subject: [PATCH 29/38] GrabOne - Passbook integration --- js/jquery.mobile.navigation.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 72387e6bfe6..c2f58c63a97 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -123,6 +123,14 @@ define( [ iOSAppVersion = match[1]; } + // Grabone Modified + // to get iphone os version. + var iPhoneOSVersion = 0; + match = navigator.userAgent.match(/iphone.*version\/(\d[^\s]+)/i); + if (match && match.length > 1) { + iPhoneOSVersion = match[1]; + } + // Grabone Modified // to get android app version. var androidAppVersion = 0; @@ -379,6 +387,10 @@ define( [ // to get ios app version. $.mobile.iOSAppVersion = iOSAppVersion; + // Grabone Modified + // to get iphone os version. + $.mobile.iPhoneOSVersion = iPhoneOSVersion; + // Grabone Modified // to get android app version. $.mobile.androidAppVersion = androidAppVersion; @@ -1404,7 +1416,7 @@ define( [ && (!u.search || u.search.indexOf('target_blank=') < 0)) { $.mobile.showPageLoadingMsg(); - $(window).one('pagehide unload', function(){ + $(window).one('pagehide focusout unload', function(){ $.mobile.hidePageLoadingMsg(); }); From 04ccde3f3d1671cb4f065059cb13ae133e3039bd Mon Sep 17 00:00:00 2001 From: intai Date: Fri, 26 Oct 2012 16:23:20 +1300 Subject: [PATCH 30/38] Get iphone os version from user agent --- js/jquery.mobile.navigation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index c2f58c63a97..959a3dc6c33 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -126,7 +126,7 @@ define( [ // Grabone Modified // to get iphone os version. var iPhoneOSVersion = 0; - match = navigator.userAgent.match(/iphone.*version\/(\d[^\s]+)/i); + match = navigator.userAgent.match(/iphone os (\d+)/i); if (match && match.length > 1) { iPhoneOSVersion = match[1]; } @@ -1416,7 +1416,7 @@ define( [ && (!u.search || u.search.indexOf('target_blank=') < 0)) { $.mobile.showPageLoadingMsg(); - $(window).one('pagehide focusout unload', function(){ + $(window).one('pagehide unload', function(){ $.mobile.hidePageLoadingMsg(); }); From ff7858188930fec30fc77940968e34891b72011a Mon Sep 17 00:00:00 2001 From: intai Date: Wed, 21 Nov 2012 09:55:34 +1300 Subject: [PATCH 31/38] GrabOne - Loading dialogue on jelly bean --- js/jquery.mobile.navigation.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 959a3dc6c33..6124b99353f 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -1218,13 +1218,20 @@ define( [ var formData = getAjaxFormData( $( this ) ); if ( formData ) { - // GrabOne Modified + // GrabOne Modified // to show loading message when submitting to a cross-domain url. if (navigator.onLine) { $.mobile.showPageLoadingMsg(); $(window).one('pagehide unload', function(){ $.mobile.hidePageLoadingMsg(); }); + + // Grabone Modified + // to show loading dialogue on jelly bean. + if (isExternalDelayed && event.originalEvent) { + setTimeout(function() { $this.submit(); }, 100); + event.preventDefault(); + } } $.mobile.changePage( formData.url, formData.options ); @@ -1322,6 +1329,15 @@ define( [ //if there's a data-rel=back attr, go back in history if ( $link.is( ":jqmData(rel='back')" ) ) { + // GrabOne Modified + // to show loading message when going back in history. + if (navigator.onLine) { + $.mobile.showPageLoadingMsg(); + $(window).one('pagehide unload', function(){ + $.mobile.hidePageLoadingMsg(); + }); + } + // Grabone Modified // to avoid going back in history twice becuase of enabling vclick. if (isiOSApp) { From af43b153f613a2fca5522a9c2486d66ba42a26da Mon Sep 17 00:00:00 2001 From: intai Date: Fri, 18 Jan 2013 10:20:11 +1300 Subject: [PATCH 32/38] GrabOne - Mark page after reloaded --- js/jquery.mobile.navigation.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 6124b99353f..53f19680b43 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -689,6 +689,12 @@ define( [ } }); } + + // GrabOne Modified + // to mark the page after reloaded. + if (settings.reloadPageServer) { + page.attr('data-reloaded', true); + } //append to page and enhance // TODO taging a page with external to make sure that embedded pages aren't removed From 7310de767e112658d6a83fd0665043fd82f81b9b Mon Sep 17 00:00:00 2001 From: intai Date: Mon, 25 Feb 2013 09:51:56 +1300 Subject: [PATCH 33/38] GrabOne - Get ipad os version --- js/jquery.mobile.navigation.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 53f19680b43..d241fdcc4bd 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -131,6 +131,14 @@ define( [ iPhoneOSVersion = match[1]; } + // Grabone Modified + // to get ipad os version. + var iPadOSVersion = 0; + match = navigator.userAgent.match(/ipad; cpu os (\d+)/i); + if (match && match.length > 1) { + iPadOSVersion = match[1]; + } + // Grabone Modified // to get android app version. var androidAppVersion = 0; @@ -391,6 +399,14 @@ define( [ // to get iphone os version. $.mobile.iPhoneOSVersion = iPhoneOSVersion; + // Grabone Modified + // to get ipad os version. + $.mobile.iPadOSVersion = iPadOSVersion; + + // Grabone Modified + // to get ios version. + $.mobile.iOSVersion = iPhoneOSVersion || iPadOSVersion; + // Grabone Modified // to get android app version. $.mobile.androidAppVersion = androidAppVersion; From 5c9234fcfabad75a2c98bf33f158dc36edab84cf Mon Sep 17 00:00:00 2001 From: intai Date: Tue, 5 Mar 2013 11:03:37 +1300 Subject: [PATCH 34/38] GrabOne - Modify 1.3 to work with us --- js/events/navigate.js | 6 ++-- js/jquery.mobile.buttonMarkup.js | 16 ++++++--- js/jquery.mobile.core.js | 4 +-- js/jquery.mobile.navigation.js | 49 ++++++++++++++++------------ js/jquery.mobile.transition.js | 56 ++++++++++++++++++++++---------- js/navigation/navigator.js | 6 ++-- 6 files changed, 87 insertions(+), 50 deletions(-) diff --git a/js/events/navigate.js b/js/events/navigate.js index 0edf414c42a..a4c5b7508d9 100644 --- a/js/events/navigate.js +++ b/js/events/navigate.js @@ -47,9 +47,11 @@ define([ return; } - if( event.historyState ){ + // GrabOne Modified + // to avoid automatic navigation when page is loaded. + /*if( event.historyState ){ $.extend(state, event.historyState); - } + }*/ // Make sure the original event is tracked for the end // user to inspect incase they want to do something special diff --git a/js/jquery.mobile.buttonMarkup.js b/js/jquery.mobile.buttonMarkup.js index 72b87123c4d..a6195d40dc3 100644 --- a/js/jquery.mobile.buttonMarkup.js +++ b/js/jquery.mobile.buttonMarkup.js @@ -228,7 +228,9 @@ var attachEvents = function() { isTouchEvent = event.originalEvent && /^touch/.test( event.originalEvent.type ), evt = event.type; - if ( $btn.length ) { + // Grabone Modified + // to reduce response time. + if ( !isTouchEvent && $btn.length ) { theme = $btn.attr( "data-" + $.mobile.ns + "theme" ); if ( evt === "vmousedown" ) { @@ -246,8 +248,8 @@ var attachEvents = function() { updateButtonClass( $btn, "ui-btn-down-" + theme, "ui-btn-up-" + theme, undefined, "up" ); } else if ( evt === "vmouseover" || evt === "focus" ) { if ( isTouchEvent ) { - // Grabone Modified - // to disable touch highlight. + // Grabone Modified + // to disable touch highlight. // Use a short delay to determine if the user is scrolling before highlighting /*foc = setTimeout( function() { updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-hover-" + theme, true, "" ); @@ -257,6 +259,7 @@ var attachEvents = function() { } } else if ( evt === "vmouseout" || evt === "blur" || evt === "scrollstart" ) { updateButtonClass( $btn, "ui-btn-hover-" + theme + " ui-btn-down-" + theme, "ui-btn-up-" + theme, false, "up" ); + // Grabone Modified // to disable touch highlight. /*if ( hov ) { @@ -267,13 +270,16 @@ var attachEvents = function() { }*/ } } - }, + } + // Grabone Modified + // to reduce response time. + /*, "focusin focus": function( event ) { $( closestEnabledButton( event.target ) ).addClass( $.mobile.focusClass ); }, "focusout blur": function( event ) { $( closestEnabledButton( event.target ) ).removeClass( $.mobile.focusClass ); - } + }*/ }); attachEvents = null; diff --git a/js/jquery.mobile.core.js b/js/jquery.mobile.core.js index 58554303802..0140f4f85d4 100644 --- a/js/jquery.mobile.core.js +++ b/js/jquery.mobile.core.js @@ -32,7 +32,7 @@ define( [ "jquery", "./jquery.mobile.ns", "text!../version.txt" ], function( jQu activeBtnClass: "ui-btn-active", // Class used for "focus" form element state, from CSS framework - focusClass: "ui-focus", + focusClass: "", // Automatically handle clicks and form submissions through Ajax, when same-domain ajaxEnabled: true, @@ -44,7 +44,7 @@ define( [ "jquery", "./jquery.mobile.ns", "text!../version.txt" ], function( jQu linkBindingEnabled: true, // Set default page transition - 'none' for no transitions - defaultPageTransition: "fade", + defaultPageTransition: "slide", // Set maximum window width for transitions to apply - 'false' for no limit maxTransitionWidth: false, diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index d241fdcc4bd..35fe88b10ad 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -1149,8 +1149,8 @@ define( [ if ( !$.mobile.ajaxEnabled || // Grabone Modified // to enable cross-domain ajax. - // (!$.mobile.allowCrossDomainPages && $this.is( "[rel='external']" )) || - $this.is( "[rel='external']" ) || + // (!$.mobile.allowCrossDomainPages && $form.is( "[rel='external']" )) || + $form.is( "[rel='external']" ) || // test that the form is, itself, ajax false $form.is( ":jqmData(ajax='false')" ) || // test that $.mobile.ignoreContentEnabled is set and @@ -1240,25 +1240,27 @@ define( [ var formData = getAjaxFormData( $( this ) ); if ( formData ) { - // GrabOne Modified - // to show loading message when submitting to a cross-domain url. - if (navigator.onLine) { - $.mobile.showPageLoadingMsg(); - $(window).one('pagehide unload', function(){ - $.mobile.hidePageLoadingMsg(); - }); - - // Grabone Modified - // to show loading dialogue on jelly bean. - if (isExternalDelayed && event.originalEvent) { - setTimeout(function() { $this.submit(); }, 100); - event.preventDefault(); - } - } - $.mobile.changePage( formData.url, formData.options ); event.preventDefault(); } + else { + // GrabOne Modified + // to show loading message when submitting to a cross-domain url. + if (navigator.onLine) { + $.mobile.showPageLoadingMsg(); + $(window).one('pagehide unload', function(){ + $.mobile.hidePageLoadingMsg(); + }); + + // Grabone Modified + // to show loading dialogue on jelly bean. + if (isExternalDelayed && event.originalEvent) { + var $this = $(this); + setTimeout(function() { $this.submit(); }, 100); + event.preventDefault(); + } + } + } }); //add active state on vclick @@ -1601,9 +1603,14 @@ define( [ //set page min-heights to be device specific // Grabone modified // to speed up response time. - if (!isiOSApp && !isAndroidApp) { - $.mobile.document.bind( "pageshow", $.mobile.resetActivePageHeight ); - $.mobile.window.bind( "throttledresize", $.mobile.resetActivePageHeight ); + if (!isiOSApp || iPadOSVersion) { + $.mobile.document.bind( "pageshow", $.mobile.resetActivePageHeight ); + $.mobile.window.bind( "throttledresize", $.mobile.resetActivePageHeight ); + } + else { + $.mobile.document.bind( "pagecreate", function(e) { + $(e.target).css( "min-height", getScreenHeight()); + }); } };//navreadyDeferred done callback diff --git a/js/jquery.mobile.transition.js b/js/jquery.mobile.transition.js index a7411e5e683..40975a5c168 100644 --- a/js/jquery.mobile.transition.js +++ b/js/jquery.mobile.transition.js @@ -23,9 +23,11 @@ var createHandler = function( sequential ) { active = $.mobile.urlHistory.getActive(), toScroll = active.lastScroll || $.mobile.defaultHomeScroll, screenHeight = $.mobile.getScreenHeight(), - 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", + // Grabone Modified + // to reduce response time. + //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 ); }, @@ -44,7 +46,9 @@ var createHandler = function( sequential ) { cleanFrom = function() { $from .removeClass( $.mobile.activePageClass + " out in reverse " + name ) - .height( "" ); + // Grabone Modified + // to reduce response time. + ;//.height( "" ); }, startOut = function() { // if it's not sequential, call the doneOut transition to start the TO page animating in simultaneously @@ -57,8 +61,9 @@ 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 + $.mobile.window.scrollTop() ) + // Grabone Modified + // to reduce response time. + $from//.height( screenHeight + $.mobile.window.scrollTop() ) .addClass( name + " out" + reverseClass ); }, @@ -74,27 +79,40 @@ var createHandler = function( sequential ) { startIn = function() { // Prevent flickering in phonegap container: see comments at #4024 regarding iOS - $to.css( "z-index", -10 ); + // Grabone Modified + // to reduce response time. + //$to.css( "z-index", -10 ); - $to.addClass( $.mobile.activePageClass + toPreClass ); + // Set to page height + $to.height( screenHeight + toScroll ); + + // Grabone Modified + // to reduce response time. + $to.addClass( $.mobile.activePageClass /*+ toPreClass*/ ); // Send focus to page as it is now display: block - $.mobile.focusPage( $to ); + // Grabone Modified + // to reduce response time. + //$.mobile.focusPage( $to ); - // Set to page height - $to.height( screenHeight + toScroll ); - - scrollPage(); + // Grabone Modified + // to reduce response time. + if (!$.mobile.isiOSApp) { + scrollPage(); + } // Restores visibility of the new page: added together with $to.css( "z-index", -10 ); - $to.css( "z-index", "" ); + // Grabone Modified + // to reduce response time. + //$to.css( "z-index", "" ); if ( !none ) { $to.animationComplete( doneIn ); } - $to - .removeClass( toPreClass ) + // Grabone Modified + // to reduce response time. + $to//.removeClass( toPreClass ) .addClass( name + " in" + reverseClass ); if ( none ) { @@ -120,9 +138,11 @@ 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 ( $.mobile.window.scrollTop() !== toScroll ) { + // Grabone Modified + // to reduce response time. + /*if ( $.mobile.window.scrollTop() !== toScroll ) { scrollPage(); - } + }*/ deferred.resolve( name, reverse, $to, $from, true ); }; diff --git a/js/navigation/navigator.js b/js/navigation/navigator.js index 2ce7d406073..31961c91fa7 100644 --- a/js/navigation/navigator.js +++ b/js/navigation/navigator.js @@ -158,7 +158,9 @@ define(["jquery", // // TODO grab the original event here and use it for the synthetic event in the // second half of the navigate execution that will follow this binding - popstate: function( event ) { + // GrabOne Modified + // to avoid automatic navigation when page is loaded. + /*popstate: function( event ) { var active, hash, state, closestIndex; // Partly to support our test suite which manually alters the support @@ -231,7 +233,7 @@ define(["jquery", event.historyState.direction = direction; } }); - }, + },*/ // NOTE must bind before `navigate` special event hashchange binding otherwise the // navigation data won't be attached to the hashchange event in time for those From ceca9f97642ba49d2a6c949bbe4bedf02b67e1f9 Mon Sep 17 00:00:00 2001 From: intai Date: Fri, 8 Mar 2013 14:48:30 +1300 Subject: [PATCH 35/38] GrabOne - Remove an unused variable --- js/jquery.mobile.navigation.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 35fe88b10ad..546595ef4e9 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -1194,10 +1194,6 @@ define( [ return false; } - - // GrabOne Modified - // to enable reverse direction. - var direction = $this.jqmData('direction'); if ( !calculateOnly ) { type = $form.attr( "method" ); From d3c43ef76bac664870836ddf0f79d9e2b87d382a Mon Sep 17 00:00:00 2001 From: intai Date: Tue, 2 Apr 2013 12:16:47 +1300 Subject: [PATCH 36/38] GrabOne - Fix loading spinner on android 4.2 --- js/jquery.mobile.navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 546595ef4e9..672358f1d4f 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -149,7 +149,7 @@ define( [ // Grabone Modified // to show loading dialogue on jelly bean. - var isExternalDelayed = (isAndroidApp && (/android 4\.1/i).test(navigator.userAgent)); + var isExternalDelayed = (isAndroidApp && (/android 4\./i).test(navigator.userAgent)); //base element management, defined depending on dynamic base tag support var base = $.support.dynamicBaseTag ? { From d428a31fa3341ca84c043d44c18c83b0b37ba9c5 Mon Sep 17 00:00:00 2001 From: intai Date: Wed, 10 Apr 2013 11:03:32 +1200 Subject: [PATCH 37/38] GrabOne - Remember scroll position on android --- js/events/touch.js | 5 ++++- js/jquery.mobile.navigation.js | 11 ++++++++++- js/jquery.mobile.transition.js | 4 +++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/js/events/touch.js b/js/events/touch.js index 512a492f186..75cf1369642 100644 --- a/js/events/touch.js +++ b/js/events/touch.js @@ -44,7 +44,9 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch" enabled: true, setup: function() { - + // Grabone Modified + // to reduce response time. + if (!$.mobile.isiOSApp) { var thisObject = this, $this = $( thisObject ), scrolling, @@ -71,6 +73,7 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch" trigger( event, false ); }, 50 ); }); + } } }; diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 672358f1d4f..88b33dc1c9e 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -231,6 +231,9 @@ define( [ } } + // Grabone Modified + // to reduce response time. + if (!$.mobile.isiOSApp) { // Save the last scroll distance per page, before it is hidden var setLastScrollEnabled = true, setLastScroll, delayedSetLastScroll; @@ -250,6 +253,11 @@ define( [ // Set active page's lastScroll prop. // If the location we're scrolling to is less than minScrollBack, let it go. active.lastScroll = lastScroll < $.mobile.minScrollBack ? $.mobile.defaultHomeScroll : lastScroll; + // Grabone Modified + // to remember the scroll position + if ($.mobile.activePage) { + $.mobile.activePage.data('lastScroll', lastScroll); + } } }; @@ -293,7 +301,8 @@ define( [ // bind to scrollstop for the first page as "pagechange" won't be fired in that case $window.bind( "scrollstop", delayedSetLastScroll ); - + } + // No-op implementation of transition degradation $.mobile._maybeDegradeTransition = $.mobile._maybeDegradeTransition || function( transition ) { return transition; diff --git a/js/jquery.mobile.transition.js b/js/jquery.mobile.transition.js index 40975a5c168..7eecee191f8 100644 --- a/js/jquery.mobile.transition.js +++ b/js/jquery.mobile.transition.js @@ -21,7 +21,9 @@ var createHandler = function( sequential ) { var deferred = new $.Deferred(), reverseClass = reverse ? " reverse" : "", active = $.mobile.urlHistory.getActive(), - toScroll = active.lastScroll || $.mobile.defaultHomeScroll, + // Grabone Modified + // to remember the scroll position + toScroll = $to.data('lastScroll') || $.mobile.defaultHomeScroll, screenHeight = $.mobile.getScreenHeight(), // Grabone Modified // to reduce response time. From de9e4606f605849ed71d30ee5c557f248a9f50cb Mon Sep 17 00:00:00 2001 From: intai Date: Mon, 2 Sep 2013 09:30:36 +1200 Subject: [PATCH 38/38] GrabOne - Disable transition on hash change --- js/jquery.mobile.navigation.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 88b33dc1c9e..cf8329f0ea4 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -1530,7 +1530,10 @@ define( [ }; $.extend( changePageOptions, data, { - transition: (urlHistory.getLast() || {}).transition || transition + // GrabOne Modified + // to disable transition when navigating back and forth in history. + // transition: (urlHistory.getLast() || {}).transition || transition + transition: 'none' }); // special case for dialogs