From 26dc452dc9efcae484344a2daebe44790594bb82 Mon Sep 17 00:00:00 2001
From: Eddie Monge
Date: Sat, 26 Nov 2011 12:21:18 -0800
Subject: [PATCH 01/13] Update IE checker code for compiler
---
js/jquery.mobile.support.js | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js
index 393eea81..d4192565 100644
--- a/js/jquery.mobile.support.js
+++ b/js/jquery.mobile.support.js
@@ -52,13 +52,17 @@ function baseTagTest() {
// allows for inclusion of IE 6+, including Windows Mobile 7
$.mobile.browser = {};
$.mobile.browser.ie = (function() {
- var v = 3,
- div = document.createElement( "div" ),
- a = div.all || [];
-
- while ( div.innerHTML = "", a[ 0 ] );
-
- return v > 4 ? v : !v;
+ var undef,
+ v = 3,
+ div = document.createElement('div'),
+ all = div.getElementsByTagName('i');
+
+ while (
+ div.innerHTML = '',
+ all[0]
+ );
+
+ return v > 4 ? v : undef;
})();
From 27f49f0dcf3a6586f849cab65d99d74b449503b8 Mon Sep 17 00:00:00 2001
From: Eugen Bolz
Date: Tue, 29 Nov 2011 08:35:18 +0100
Subject: [PATCH 02/13] Slider: use also option text as title
---
js/jquery.mobile.forms.slider.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/jquery.mobile.forms.slider.js b/js/jquery.mobile.forms.slider.js
index 41bff807..43173f33 100644
--- a/js/jquery.mobile.forms.slider.js
+++ b/js/jquery.mobile.forms.slider.js
@@ -315,7 +315,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
this.handle.attr( {
"aria-valuenow": cType === "input" ? newval : control.find( "option" ).eq( newval ).attr( "value" ),
"aria-valuetext": cType === "input" ? newval : control.find( "option" ).eq( newval ).getEncodedText(),
- title: newval
+ title: cType === "input" ? newval : control.find( "option" ).eq( newval ).getEncodedText()
});
// add/remove classes for flip toggle switch
From 435fc61a8dc300a0543e356a72c1ffb9326e56b4 Mon Sep 17 00:00:00 2001
From: Anne-Gaelle Colom
Date: Fri, 2 Dec 2011 07:54:25 +0000
Subject: [PATCH 03/13] Update docs/forms/selects/index.html
---
docs/forms/selects/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/forms/selects/index.html b/docs/forms/selects/index.html
index 446c3944..5c0ff755 100644
--- a/docs/forms/selects/index.html
+++ b/docs/forms/selects/index.html
@@ -36,7 +36,7 @@
The select menu is based on a native select element, which is hidden from view and replaced with a custom-styled select button that matches the look and feel of the jQuery Mobile framework. The select menu is ARIA-enabled and keyboard accessible on the desktop as well. View the data- attribute reference to see all the possible attributes you can add to selects.
-
By default, the framework leverages the native OS options menu to use with the custom button. When the button is clicked, the native OS menu will open. When a value is selected and the menu closes, the custom button's text is updated to match the selected value.
+
By default, the framework leverages the native OS options menu to use with the custom button. When the button is clicked, the native OS menu will open. When a value is selected and the menu closes, the custom button's text is updated to match the selected value. Please note that the framework also offers the possibility of having custom (non-native) select menus, see details at the bottom of this page and on the custom select menu page.
To add a select menu to your page, start with a standard select element populated with a set of option elements. Set the for attribute of the label to match the ID of the select so they are semantically associated. It's possible to accessibly hide the label if it's not desired in the page layout, but we require that it is present in the markup for semantic and accessibility reasons.
For the sake of advanced styling, the framework also offers a method of generating custom menus from existing select menu markup instead of the native OS menu. The custom menu supports disabled options and multiple selection (whereas native mobile OS support for both is inconsistent), adds an elegant way to handle placeholder values, and restores missing functionality on certain platforms such as optgroup support on Android.
- Custom select menu docs
+
Built on jQuery core for familiar and consistent jQuery syntax and minimal learning curve and leverages jQuery UI code and patterns.
Compatible with all major mobile, tablet, e-reader & desktop platforms - iOS, Android, Blackberry, Palm WebOS, Nokia/Symbian, Windows Phone 7, MeeGo, Opera Mobile/Mini, Firefox Mobile, Kindle, Nook, and all modern browsers with graded levels of support.
Lightweight size and minimal image dependencies for speed.
-
Modular architecture for creating custom builds that are optimized to only the features needed for a particular application
+
Modular architecture for creating custom builds that are optimized to only include the features needed for a particular application
HTML5 Markup-driven configuration of pages and behavior for fast development and minimal required scripting.
Progressive enhancement approach brings core content and functionality to all mobile, tablet and desktop platforms and a rich, installed application-like experience on newer mobile platforms.
Responsive design techniques and tools allow the same underlying codebase to automatically scale from smartphone to desktop-sized screens
@@ -37,7 +37,7 @@
Accessibility features such as WAI-ARIA are also included to ensure that the pages work for screen readers (e.g. VoiceOver in iOS) and other assistive technologies.
Touch and mouse event support streamline the process of supporting touch, mouse, and cursor focus-based user input methods with a simple API.
Unified UI widgets for common controls enhance native controls with touch-optimized, themable controls that are platform-agnostic and easy to use.
-
Powerful theming framework and ThemeRoller application make highly-branded experiences easy to build.
+
Powerful theming framework and the ThemeRoller application make highly-branded experiences easy to build.
From 5f6ce0d651cd77ef6f1c368780b9119d1ac71180 Mon Sep 17 00:00:00 2001
From: John Bender
Date: Mon, 5 Dec 2011 15:36:58 -0800
Subject: [PATCH 07/13] test that an empty string val results in the min attr
value on refresh
---
tests/unit/slider/index.html | 5 +++++
tests/unit/slider/slider_core.js | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/tests/unit/slider/index.html b/tests/unit/slider/index.html
index 832a10cd..d504f5a2 100644
--- a/tests/unit/slider/index.html
+++ b/tests/unit/slider/index.html
@@ -70,6 +70,11 @@
+
+
+
+
+
diff --git a/tests/unit/slider/slider_core.js b/tests/unit/slider/slider_core.js
index 263652b7..0c0e351b 100644
--- a/tests/unit/slider/slider_core.js
+++ b/tests/unit/slider/slider_core.js
@@ -21,4 +21,10 @@
ok( slider.val() > 0, "the value has been altered" );
same( slider.val() % step, 0, "value has 'snapped' to a step" );
});
+
+ test( "empty string value results defaults to slider min value", function() {
+ var slider = $( "#empty-string-val-slider" );
+ same( slider.attr('min'), "10", "slider min is greater than 0" );
+ same( slider.val( '' ).slider( 'refresh' ).val(), slider.attr('min'), "val is equal to min attr");
+ });
})( jQuery );
\ No newline at end of file
From cbaa42d63cb8c178ca8d65e9797294920cc427ab Mon Sep 17 00:00:00 2001
From: John Bender
Date: Mon, 5 Dec 2011 15:38:15 -0800
Subject: [PATCH 08/13] default emptry string val to 0 on refresh Fixes #3029
---
js/jquery.mobile.forms.slider.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/jquery.mobile.forms.slider.js b/js/jquery.mobile.forms.slider.js
index 41bff807..2a0453b7 100644
--- a/js/jquery.mobile.forms.slider.js
+++ b/js/jquery.mobile.forms.slider.js
@@ -269,7 +269,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
percent = Math.round( ( ( data.pageX - this.slider.offset().left ) / this.slider.width() ) * 100 );
} else {
if ( val == null ) {
- val = cType === "input" ? parseFloat( control.val() ) : control[0].selectedIndex;
+ val = cType === "input" ? parseFloat( control.val() || 0 ) : control[0].selectedIndex;
}
percent = ( parseFloat( val ) - min ) / ( max - min ) * 100;
}
From e25a310063b7338b132f6d29efbaccb82e63df74 Mon Sep 17 00:00:00 2001
From: Anne-Gaelle Colom
Date: Tue, 6 Dec 2011 15:23:19 +0000
Subject: [PATCH 09/13] Update docs/about/features.html
---
docs/about/features.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/about/features.html b/docs/about/features.html
index 6921f197..e94eecb3 100755
--- a/docs/about/features.html
+++ b/docs/about/features.html
@@ -37,7 +37,7 @@
Accessibility features such as WAI-ARIA are also included to ensure that the pages work for screen readers (e.g. VoiceOver in iOS) and other assistive technologies.
Touch and mouse event support streamline the process of supporting touch, mouse, and cursor focus-based user input methods with a simple API.
Unified UI widgets for common controls enhance native controls with touch-optimized, themable controls that are platform-agnostic and easy to use.
-
Powerful theming framework and the ThemeRoller application make highly-branded experiences easy to build.
+
Powerful theming framework and the ThemeRoller application make highly-branded experiences easy to build.
From 3f9bca14a6da43224a7bf533d6bc861121e361bf Mon Sep 17 00:00:00 2001
From: John Bender
Date: Tue, 6 Dec 2011 15:53:06 -0800
Subject: [PATCH 10/13] Revert "Merge pull request #3172 from
eddiemonge/issue_3169.1"
This reverts commit 9e58b93cc5b1354e270c9ef933641343390b053c, reversing
changes made to 97bad66016899fe0b777877916efd33f8cca6f25.
---
js/jquery.mobile.support.js | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js
index d4192565..393eea81 100644
--- a/js/jquery.mobile.support.js
+++ b/js/jquery.mobile.support.js
@@ -52,17 +52,13 @@ function baseTagTest() {
// allows for inclusion of IE 6+, including Windows Mobile 7
$.mobile.browser = {};
$.mobile.browser.ie = (function() {
- var undef,
- v = 3,
- div = document.createElement('div'),
- all = div.getElementsByTagName('i');
-
- while (
- div.innerHTML = '',
- all[0]
- );
-
- return v > 4 ? v : undef;
+ var v = 3,
+ div = document.createElement( "div" ),
+ a = div.all || [];
+
+ while ( div.innerHTML = "", a[ 0 ] );
+
+ return v > 4 ? v : !v;
})();
From c0b857ab5e5e19ad8c0c1bf709dccc18705ebba6 Mon Sep 17 00:00:00 2001
From: John Bender
Date: Tue, 6 Dec 2011 15:56:16 -0800
Subject: [PATCH 11/13] fixed closure compiler warning for missing while block
---
js/jquery.mobile.support.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js
index 393eea81..62f44393 100644
--- a/js/jquery.mobile.support.js
+++ b/js/jquery.mobile.support.js
@@ -56,7 +56,9 @@ $.mobile.browser.ie = (function() {
div = document.createElement( "div" ),
a = div.all || [];
- while ( div.innerHTML = "", a[ 0 ] );
+ // added {} to silence closure compiler warnings. registering my dislike of all things
+ // overly clever here for future reference
+ while ( div.innerHTML = "", a[ 0 ] ){};
return v > 4 ? v : !v;
})();
From 7a267e2c7de55dd1d483571d5752a3d224458511 Mon Sep 17 00:00:00 2001
From: John Bender
Date: Tue, 6 Dec 2011 16:09:52 -0800
Subject: [PATCH 12/13] test that the link title value is the selected option
text
---
tests/unit/slider/slider_core.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/unit/slider/slider_core.js b/tests/unit/slider/slider_core.js
index 0c0e351b..7ccf1c15 100644
--- a/tests/unit/slider/slider_core.js
+++ b/tests/unit/slider/slider_core.js
@@ -27,4 +27,12 @@
same( slider.attr('min'), "10", "slider min is greater than 0" );
same( slider.val( '' ).slider( 'refresh' ).val(), slider.attr('min'), "val is equal to min attr");
});
+
+ test( "flip toggle switch title should be current selected value attr", function() {
+ var slider = $( "#slider-switch" );
+
+ same(slider.siblings(".ui-slider").find("a").attr('title'),
+ $(slider.find("option")[slider[0].selectedIndex]).text(),
+ "verify that the link title is set to the selected option text");
+ });
})( jQuery );
\ No newline at end of file
From 1742820c177e07b117ea3da2c57d14a80938a042 Mon Sep 17 00:00:00 2001
From: John Bender
Date: Wed, 7 Dec 2011 10:03:01 -0800
Subject: [PATCH 13/13] removed dead code path in slider
---
js/jquery.mobile.forms.slider.js | 4 ----
1 file changed, 4 deletions(-)
diff --git a/js/jquery.mobile.forms.slider.js b/js/jquery.mobile.forms.slider.js
index 752d8d30..33c624d9 100644
--- a/js/jquery.mobile.forms.slider.js
+++ b/js/jquery.mobile.forms.slider.js
@@ -307,10 +307,6 @@ $.widget( "mobile.slider", $.mobile.widget, {
newval = max;
}
- // Flip the stack of the bg colors
- if ( percent > 60 && cType === "select" ) {
- // TODO: Dead path?
- }
this.handle.css( "left", percent + "%" );
this.handle.attr( {
"aria-valuenow": cType === "input" ? newval : control.find( "option" ).eq( newval ).attr( "value" ),