mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-28 09:54:44 +00:00
groupingtheme option is now exposed as data-groupingtheme. This should probably be renamed to "dividertheme", but for now, this Fixes #128, Fixes #134 (duplicate bugs)
This commit is contained in:
parent
edaa43c479
commit
734e21816a
2 changed files with 6 additions and 4 deletions
|
|
@ -66,7 +66,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<ul data-role="listview" data-inset="true" data-theme="e">
|
||||
<ul data-role="listview" data-inset="true" data-theme="e" data-groupingtheme="a">
|
||||
<li data-role="list-divider">A</li>
|
||||
<li><a href="index.html">Adam Kinkaid</a></li>
|
||||
<li><a href="index.html">Alex Wickerham</a></li>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
},
|
||||
|
||||
_create: function() {
|
||||
var o = this.options;
|
||||
var o = this.options
|
||||
$list = this.element;
|
||||
|
||||
this._createSubPages();
|
||||
|
||||
|
|
@ -27,7 +28,8 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
.find( "li" )
|
||||
.each(function() {
|
||||
var $li = $( this ),
|
||||
role = $li.data( "role" );
|
||||
role = $li.data( "role" ),
|
||||
groupingtheme = $list.data( "groupingtheme" ) || o.groupingTheme;
|
||||
if ( $li.is( ":has(img)" ) ) {
|
||||
$li.addClass( "ui-li-has-thumb" );
|
||||
}
|
||||
|
|
@ -51,7 +53,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
.addClass( "ui-link-inherit" );
|
||||
}
|
||||
else if( role == "list-divider" ){
|
||||
$li.addClass( "ui-li-grouping ui-btn ui-body-" + o.groupingTheme ).attr( "role", "heading" );
|
||||
$li.addClass( "ui-li-grouping ui-btn ui-body-" + groupingtheme ).attr( "role", "heading" );
|
||||
}
|
||||
else {
|
||||
$li.addClass( "ui-li-static ui-btn-up-" + o.theme );
|
||||
|
|
|
|||
Loading…
Reference in a new issue