mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
changed name of list grouping to list "divider". Affects class names, css applied, data-attr for configuration.
This commit is contained in:
parent
0ec600c1b3
commit
29913434bf
4 changed files with 9 additions and 9 deletions
|
|
@ -130,7 +130,7 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<h2 class="ui-bar ui-bar-b">Same as above with grouping items:</h2>
|
||||
<h2 class="ui-bar ui-bar-b">Same as above with divider items:</h2>
|
||||
<ul data-role="listview">
|
||||
<li>This morning <span class="ui-li-count">3</span></li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
.ui-listview-inset { margin: 1em 15px; }
|
||||
.ui-listview, .ui-li { list-style:none; padding:0; zoom: 1; }
|
||||
.ui-li { display: block; margin:0; position: relative; overflow: hidden; text-align: left; border-width: 0; border-top-width: 1px; }
|
||||
.ui-li-grouping, .ui-li-static { padding: .5em 15px; font-size: 13px; font-weight: bold; counter-reset: listnumbering; }
|
||||
.ui-li-divider, .ui-li-static { padding: .5em 15px; font-size: 13px; font-weight: bold; counter-reset: listnumbering; }
|
||||
ol.ui-listview .ui-link-inherit:before, .ui-li-dec { font-size: .8em; display: inline-block; padding-right: .3em; font-weight: normal;counter-increment: listnumbering; content: counter(listnumbering) ". "; }
|
||||
ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid chance of duplication */
|
||||
.ui-listview-inset .ui-li { border-right-width: 1px; border-left-width: 1px; }
|
||||
|
|
@ -21,7 +21,7 @@ ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid
|
|||
.ui-li-thumb, .ui-li-content { float: left; margin-right: 10px; }
|
||||
.ui-li-aside { float: right; width: 25%; text-align: right; margin: .3em 0; }
|
||||
.ui-li-count { position: absolute; font-size: 11px; font-weight: bold; padding: .2em .5em; top: 50%; margin-top: -.9em; right: 38px; }
|
||||
.ui-li-grouping .ui-li-count { right: 10px; }
|
||||
.ui-li-divider .ui-li-count { right: 10px; }
|
||||
.ui-li-link-alt { position: absolute; width: 40px; height: 100%; border-width: 0; border-left-width: 1px; top: 0; right: 0; margin: 0; padding: 0; }
|
||||
.ui-li-link-alt .ui-btn { overflow: hidden; position: absolute; right: 8px; top: 50%; margin: -11px 0 0 0; border-bottom-width: 1px; }
|
||||
.ui-li-link-alt .ui-btn-inner { padding: 0; position: static; }
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<ul data-role="listview" data-inset="true" data-theme="e" data-groupingtheme="a">
|
||||
<ul data-role="listview" data-inset="true" data-theme="e" data-dividertheme="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>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
theme: "f",
|
||||
countTheme: "f",
|
||||
headerTheme: "b",
|
||||
groupingTheme: "b",
|
||||
dividerTheme: "b",
|
||||
splitTheme: "b",
|
||||
inset: false
|
||||
},
|
||||
|
|
@ -29,7 +29,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
.each(function() {
|
||||
var $li = $( this ),
|
||||
role = $li.data( "role" ),
|
||||
groupingtheme = $list.data( "groupingtheme" ) || o.groupingTheme;
|
||||
dividertheme = $list.data( "dividertheme" ) || o.dividerTheme;
|
||||
if ( $li.is( ":has(img)" ) ) {
|
||||
$li.addClass( "ui-li-has-thumb" );
|
||||
}
|
||||
|
|
@ -53,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-" + groupingtheme ).attr( "role", "heading" );
|
||||
$li.addClass( "ui-li-divider ui-btn ui-body-" + dividertheme ).attr( "role", "heading" );
|
||||
}
|
||||
else {
|
||||
$li.addClass( "ui-li-static ui-btn-up-" + o.theme );
|
||||
|
|
@ -172,8 +172,8 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
var counter = 1;
|
||||
this.element.find( ".ui-li-dec" ).remove();
|
||||
this.element.find( "li:visible" ).each(function() {
|
||||
if( $( this ).is( ".ui-li-grouping" ) ) {
|
||||
//reset counter when a grouping heading is encountered
|
||||
if( $( this ).is( ".ui-li-divider" ) ) {
|
||||
//reset counter when a divider heading is encountered
|
||||
counter = 1;
|
||||
} else {
|
||||
$( this )
|
||||
|
|
|
|||
Loading…
Reference in a new issue