Skip to content
This repository
Browse code

Fix for issue #779

  • Loading branch information...
commit 2cc8c7ff34d0091a185734a64d62deb39da09dc7 1 parent e98215a
Ghislain Seguin authored August 24, 2011
4  js/jquery.mobile.listview.js
@@ -146,6 +146,10 @@ $.widget( "mobile.listview", $.mobile.widget, {
146 146
 						theme: itemTheme
147 147
 					});
148 148
 
  149
+					if ( ( icon != false ) && ( a.length == 1 ) ) {
  150
+						item.addClass( "ui-li-has-arrow" );
  151
+					}
  152
+
149 153
 					a.first().addClass( "ui-link-inherit" );
150 154
 
151 155
 					if ( a.length > 1 ) {
6  themes/default/jquery.mobile.listview.css
@@ -16,10 +16,12 @@ ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid
16 16
 .ui-listview-inset .ui-li { border-right-width: 1px; border-left-width: 1px; }
17 17
 .ui-li:last-child, .ui-li.ui-field-contain:last-child { border-bottom-width: 1px; }
18 18
 .ui-li>.ui-btn-inner { display: block; position: relative; padding: 0; }
19  
-.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { padding: .7em 25px .7em 15px; display: block; }
  19
+.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { padding: .7em 15px .7em 15px; display: block; }
20 20
 .ui-li-has-thumb .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-thumb  { min-height: 60px; padding-left: 100px; }
21 21
 .ui-li-has-icon .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-icon {  min-height: 20px; padding-left: 40px; }
22  
-.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-count { padding-right: 75px; }
  22
+.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-count { padding-right: 45px; }
  23
+.ui-li-has-arrow .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-arrow { padding-right: 30px; }
  24
+.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; }
23 25
 .ui-li-heading { font-size: 16px; font-weight: bold; display: block; margin: .6em 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;  }
24 26
 .ui-li-desc {  font-size: 12px; font-weight: normal; display: block; margin: -.5em 0 .6em; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
25 27
 .ui-li-thumb, .ui-li-icon { position: absolute; left: 1px; top: 0; max-height: 80px; max-width: 80px; }

1 note on commit 2cc8c7f

Jake Boone

@gseguin Looks great on my test page. Thanks!

Please sign in to comment.
Something went wrong with that request. Please try again.