Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Attempting to remove the need to loop through each list item and dete…

…rmine whether it has a thumbnail attached.
  • Loading branch information...
commit d8fb76424f376840d351d1efe1a50bb67fc7bf7d 1 parent 8089317
@Wilto Wilto authored
View
7 css/structure/jquery.mobile.listview.css
@@ -17,16 +17,15 @@ ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid
.ui-li:last-child, .ui-li.ui-field-contain:last-child { border-bottom-width: 1px; }
.ui-li>.ui-btn-inner { display: block; position: relative; padding: 0; }
.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { padding: .7em 15px .7em 15px; display: block; }
-.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-thumb { min-height: 60px; padding-left: 100px; }
-.ui-li-has-icon .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-icon { min-height: 20px; padding-left: 40px; }
.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-count { padding-right: 45px; }
.ui-li-has-arrow .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-arrow { padding-right: 30px; }
.ui-li-has-arrow.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-arrow.ui-li-has-count { padding-right: 75px; }
.ui-li-has-count .ui-btn-text { padding-right: 15px; }
.ui-li-heading { font-size: 16px; font-weight: bold; display: block; margin: .6em 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.ui-li-desc { font-size: 12px; font-weight: normal; display: block; margin: -.5em 0 .6em; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
-.ui-li-thumb, .ui-listview .ui-li-icon { position: absolute; left: 1px; top: 0; max-height: 80px; max-width: 80px; }
-.ui-listview .ui-li-icon { max-height: 40px; max-width: 40px; left: 10px; top: .9em; }
+
+.ui-li-thumb, .ui-listview .ui-li-icon { max-height: 80px; max-width: 80px; float: left; margin: -16px 0 -14px -15px; padding-right: 10px; position: static; }
+.ui-listview .ui-li-icon { max-height: 45px; max-width: 40px; margin: 3px 0 0 0; }
.ui-li-thumb, .ui-listview .ui-li-icon, .ui-li-content { float: left; margin-right: 10px; }
.ui-li-aside { float: right; width: 50%; text-align: right; margin: .3em 0; }
View
6 js/jquery.mobile.listview.js
@@ -210,11 +210,15 @@ $.widget( "mobile.listview", $.mobile.widget, {
$( this ).closest( "li" ).addClass( "ui-li-has-count" );
}).addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" );
+
+ $list.find('li img:first-child').addClass( "ui-li-thumb" );
+
+/*/
li.find( ".ui-link-inherit>img:eq(0)" ).add( li.children( "img:eq(0)" ) ).addClass( "ui-li-thumb" ).each(function() {
var $this = $( this );
$this.closest( "li" ).addClass( $this.is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
});
-
+//*/
this._refreshCorners( create );
},
Please sign in to comment.
Something went wrong with that request. Please try again.