mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Fix for issue 1458 - Listview thumbnails aren't rendering correctly.
Needed to modify _itemApply() to look for the first image that is the first child of its parent. I may need to tweak this at a later point because the selector is still too general.
This commit is contained in:
parent
b83d81962e
commit
8c71ee5dff
1 changed files with 2 additions and 6 deletions
|
|
@ -29,10 +29,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
$list.addClass( "ui-listview-inset ui-corner-all ui-shadow" );
|
||||
}
|
||||
|
||||
this._itemApply( $list, $list );
|
||||
|
||||
this.refresh( true );
|
||||
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
_itemApply: function( $list, item ) {
|
||||
|
|
@ -44,8 +41,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
|
||||
item.find( "p, dl" ).addClass( "ui-li-desc" );
|
||||
|
||||
var children = item.children();
|
||||
children.filter("img:eq(0)").add(children.eq(0).children("img:eq(0)")).addClass( "ui-li-thumb" ).each(function() {
|
||||
item.find("img:first-child:eq(0)").addClass( "ui-li-thumb" ).each(function() {
|
||||
item.addClass( $(this).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue