Permalink
Browse files

Added option corners and shadow for listviews

  • Loading branch information...
jaspermdegroot committed Nov 8, 2012
1 parent 058aeed commit fab9b3f7f52edb3d861ee00b3248081605193417
Showing with 9 additions and 2 deletions.
  1. +9 −2 js/widgets/listview.js
View
@@ -24,6 +24,8 @@ $.widget( "mobile.listview", $.mobile.widget, {
icon: "arrow-r",
splitIcon: "arrow-r",
splitTheme: "b",
corners: true,
shadow: true,
inset: false,
initSelector: ":jqmData(role='listview')"
},
@@ -32,11 +34,16 @@ $.widget( "mobile.listview", $.mobile.widget, {
var t = this,
listviewClasses = "";
listviewClasses += t.options.inset ? " ui-listview-inset ui-corner-all ui-shadow " : "";
listviewClasses += t.options.inset ? " ui-listview-inset" : "";
if ( !!t.options.inset ) {
listviewClasses += t.options.corners ? " ui-corner-all" : "";
listviewClasses += t.options.shadow ? " ui-shadow" : "";
}
// create listview markup
t.element.addClass(function( i, orig ) {
return orig + " ui-listview " + listviewClasses;
return orig + " ui-listview" + listviewClasses;
});
t.refresh( true );

0 comments on commit fab9b3f

Please sign in to comment.