Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for issue #1470

Modified _removeCorners so it takes which corner to remove as a parameter
Now removes the bottom corners of first list item if it is followed by another one.
  • Loading branch information...
commit fc369ee9809e4a251dcfbefe9093633cc4dac779 1 parent 9dcbee5
Ghislain Seguin authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 js/jquery.mobile.listview.js
View
14 js/jquery.mobile.listview.js
@@ -43,10 +43,16 @@ $.widget( "mobile.listview", $.mobile.widget, {
});
},
- _removeCorners: function( li ) {
+ _removeCorners: function( li, which ) {
+ which = which || ["top", "bottom"];
+ var classes = {
+ top: "ui-corner-top ui-corner-tr ui-corner-tl",
+ bottom: "ui-corner-bottom ui-corner-br ui-corner-bl"
+ };
+ var classesToRemove = $.map(which, function(pos) { return classes[pos];}).join(" ");
li
.add( li.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb") )
- .removeClass( "ui-corner-top ui-corner-bottom ui-corner-br ui-corner-bl ui-corner-tr ui-corner-tl" );
+ .removeClass( classesToRemove );
},
refresh: function( create ) {
@@ -163,7 +169,9 @@ $.widget( "mobile.listview", $.mobile.widget, {
if(item.prev().prev().length){
self._removeCorners( item.prev() );
- }
+ } else if (item.prev().length) {
+ self._removeCorners( item.prev(), ["bottom"]);
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.