From 04e75b07cd86e29c0455846520be18732772b652 Mon Sep 17 00:00:00 2001 From: Matthias Derer Date: Wed, 8 Jun 2011 17:18:05 +0200 Subject: [PATCH 1/6] fixed binding of orientationchange event (was on document, but only works on window). Moreover, it is now bound using 'bind' and not 'live' --- experiments/scrollview/scrollview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiments/scrollview/scrollview.js b/experiments/scrollview/scrollview.js index 0ed711ca..eb6cb020 100644 --- a/experiments/scrollview/scrollview.js +++ b/experiments/scrollview/scrollview.js @@ -55,6 +55,6 @@ $(":jqmData(role='page')").live("pageshow", function(event) { ResizePageContentHeight(event.target); }); -$(document).live("orientationchange", function(event) { +$(window).bind("orientationchange", function(event) { ResizePageContentHeight($(".ui-page")); }); From 5512c8af02e70b6a3fe20813ed2deba69b983a01 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Wed, 8 Jun 2011 18:12:42 -0400 Subject: [PATCH 2/6] use prop instead of attr for enable/disable --- js/jquery.mobile.forms.checkboxradio.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.forms.checkboxradio.js b/js/jquery.mobile.forms.checkboxradio.js index 1dacb908..3df31422 100644 --- a/js/jquery.mobile.forms.checkboxradio.js +++ b/js/jquery.mobile.forms.checkboxradio.js @@ -150,11 +150,11 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, { }, disable: function(){ - this.element.attr("disabled",true).parent().addClass("ui-disabled"); + this.element.prop("disabled",true).parent().addClass("ui-disabled"); }, enable: function(){ - this.element.attr("disabled",false).parent().removeClass("ui-disabled"); + this.element.prop("disabled",false).parent().removeClass("ui-disabled"); } }); })( jQuery ); From d99d096ab70cb1a0aaa30edd00186286f34733f9 Mon Sep 17 00:00:00 2001 From: frietsch Date: Thu, 9 Jun 2011 08:21:21 -0700 Subject: [PATCH 3/6] Bugfix: ":jqmData(ajax='false')" might also match forms, which have neither of "src" or "href". In that case, thisUrl is undefined, and the following replace results in an error. --- js/jquery.mobile.navigation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 6a4e2439..93c18a6a 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -495,7 +495,8 @@ 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' : 'src', + 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 From e1ed42d8b914f613b135156f85afb50af3685fe2 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 9 Jun 2011 16:17:18 -0400 Subject: [PATCH 4/6] removed height:100% on inner buttons. I think this was a carryover from the old listview markup, but in testing we found no regressions by removing this. Fixes #1507 --- themes/default/jquery.mobile.button.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/jquery.mobile.button.css b/themes/default/jquery.mobile.button.css index 602ffd6d..c03b2c43 100644 --- a/themes/default/jquery.mobile.button.css +++ b/themes/default/jquery.mobile.button.css @@ -7,7 +7,7 @@ .ui-btn:focus, .ui-btn:active { outline: none; } .ui-header .ui-btn, .ui-footer .ui-btn, .ui-bar .ui-btn { display: inline-block; font-size: 13px; margin: 0; } .ui-btn-inline { display: inline-block; } -.ui-btn-inner { padding: .6em 25px; display: block; height: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; position: relative; } +.ui-btn-inner { padding: .6em 25px; display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; position: relative; } .ui-header .ui-btn-inner, .ui-footer .ui-btn-inner, .ui-bar .ui-btn-inner { padding: .4em 8px .5em; } .ui-btn-icon-notext { display: inline-block; width: 20px; height: 20px; padding: 2px 1px 2px 3px; text-indent: -9999px; } .ui-btn-icon-notext .ui-btn-inner { padding: 0; } From c9abc368d80b010f79aab65f142fd82b188f598d Mon Sep 17 00:00:00 2001 From: Ghislain Seguin Date: Fri, 10 Jun 2011 09:40:15 -0700 Subject: [PATCH 5/6] Issue #1762: Removed extra iteration on list items --- js/jquery.mobile.listview.filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.listview.filter.js b/js/jquery.mobile.listview.filter.js index 10b005c2..100094a4 100644 --- a/js/jquery.mobile.listview.filter.js +++ b/js/jquery.mobile.listview.filter.js @@ -53,7 +53,7 @@ $( ":jqmData(role='listview')" ).live( "listviewcreate", function() { childItems = false, itemtext=""; - for (var i = listItems.length; i >= 0; i--) { + for (var i = listItems.length - 1; i >= 0; i--) { item = $( listItems[i] ); itemtext = item.jqmData( 'filtertext' ) || item.text(); From 45722001071a3841959808eb85161c8e29778227 Mon Sep 17 00:00:00 2001 From: Ghislain Seguin Date: Fri, 10 Jun 2011 09:40:41 -0700 Subject: [PATCH 6/6] Coding standards --- js/jquery.mobile.listview.filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.listview.filter.js b/js/jquery.mobile.listview.filter.js index 100094a4..265b54ed 100644 --- a/js/jquery.mobile.listview.filter.js +++ b/js/jquery.mobile.listview.filter.js @@ -53,7 +53,7 @@ $( ":jqmData(role='listview')" ).live( "listviewcreate", function() { childItems = false, itemtext=""; - for (var i = listItems.length - 1; i >= 0; i--) { + for ( var i = listItems.length - 1; i >= 0; i-- ) { item = $( listItems[i] ); itemtext = item.jqmData( 'filtertext' ) || item.text();