mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-28 15:38:17 +00:00
changed option fillWidth to inset. Can be overidden with data-inset="true" as well
This commit is contained in:
parent
463fa9a620
commit
8e5e6dd8b6
2 changed files with 8 additions and 8 deletions
|
|
@ -29,13 +29,13 @@
|
|||
|
||||
<h2 class="ui-bar ui-bar-b">Basic inset Listview:</h2>
|
||||
|
||||
<ul data-role="listview" data-fill-width="false">
|
||||
<ul data-role="listview" data-inset="true">
|
||||
<li><a href="index.html">Page A</a></li>
|
||||
<li><a href="index.html">Page B</a></li>
|
||||
<li><a href="index.html">Page C</a></li>
|
||||
</ul>
|
||||
|
||||
<h2 class="ui-bar ui-bar-b" data-fill-width="false">Nested Listview:</h2>
|
||||
<h2 class="ui-bar ui-bar-b" data-inset="true">Nested Listview:</h2>
|
||||
|
||||
<ul data-role="listview">
|
||||
<li>Page A
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
|
||||
<h2 class="ui-bar ui-bar-b">Basic Listview w/ split buttons:</h2>
|
||||
|
||||
<ol data-role="listview" data-fill-width="false">
|
||||
<ol data-role="listview" data-inset="true">
|
||||
<li>
|
||||
<img src="images/jb.jpg" alt="jb" />
|
||||
<h3><a href="index.html">Page A</a></h3>
|
||||
|
|
@ -178,7 +178,7 @@
|
|||
|
||||
<h2 class="ui-bar ui-bar-b">Same as above, different theme</h2>
|
||||
|
||||
<ol data-role="listview" data-fill-width="false" data-theme="e" data-split-theme="c" data-count-theme="b">
|
||||
<ol data-role="listview" data-inset="true" data-theme="e" data-split-theme="c" data-count-theme="b">
|
||||
<li>
|
||||
<img src="images/jb.jpg" alt="jb" />
|
||||
<h3><a href="index.html">Page A</a></h3>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ $.fn.listview = function( options ) {
|
|||
countTheme: data( "count-theme", o.theme ),
|
||||
headerTheme: "b",
|
||||
splitTheme: data( "split-theme", "b" ),
|
||||
fillWidth: data( "fill-width", "true" ) === "true"
|
||||
inset: data( "inset", "true" ) === "true"
|
||||
}, o);
|
||||
|
||||
//if it's a nested list, chunk it into ui-page items, recurse through them and call listview on each individual ul
|
||||
|
|
@ -87,7 +87,7 @@ $.fn.listview = function( options ) {
|
|||
.addClass( "ui-link-inherit" );
|
||||
});
|
||||
|
||||
if ( !o.fillWidth ) {
|
||||
if ( o.inset ) {
|
||||
$this
|
||||
.addClass( "ui-listview-inset" )
|
||||
.controlgroup({ shadow: true });
|
||||
|
|
@ -116,7 +116,7 @@ $.fn.listview = function( options ) {
|
|||
} ) );
|
||||
|
||||
//fix corners
|
||||
if ( !o.fillWidth ) {
|
||||
if ( o.inset ) {
|
||||
var closestLi = $( this ).closest( "li" );
|
||||
if ( closestLi.is( "li:first-child" ) ) {
|
||||
$( this ).addClass( "ui-corner-tr" );
|
||||
|
|
@ -129,7 +129,7 @@ $.fn.listview = function( options ) {
|
|||
.find( "img")
|
||||
.addClass( "ui-li-thumb" );
|
||||
|
||||
if ( !o.fillWidth ) {
|
||||
if ( o.inset ) {
|
||||
$this
|
||||
.find( "img" )
|
||||
.filter( "li:first-child img" )
|
||||
|
|
|
|||
Loading…
Reference in a new issue