Modified the listview thumbail-finding logic to specifically find first children of the li or the primary button's inner anchor element. Fixes #1794. Fixes #1458

This commit is contained in:
scottjehl 2011-06-17 00:21:11 -04:00
parent cc809da95c
commit fd738c5b04

View file

@ -38,7 +38,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
.addClass( "ui-btn-up-" + ($list.jqmData( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" ).end()
.find( "h1, h2, h3, h4, h5, h6" ).addClass( "ui-li-heading" ).end()
.find( "p, dl" ).addClass( "ui-li-desc" ).end()
.find("img:first-child:eq(0)").addClass( "ui-li-thumb" ).each(function() {
.find( ">img:eq(0), .ui-link-inherit>img:eq(0)" ).addClass( "ui-li-thumb" ).each(function() {
item.addClass( $(this).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
}).end()
.find( ".ui-li-aside" ).each(function() {