Skip to content
This repository

Fix list-dividers use data-theme attribute first #5237

Merged
merged 1 commit into from over 1 year ago

3 participants

dotnetwise Jasper de Groot Jeroen van Warmerdam
dotnetwise

Allow the list-divider to customize its own theme if desired

<ul data-role="listview" data-divider-theme="e">
<li data-role="list-divider">Theme e</li>
<li>some value</li>
<li data-role="list-divider" data-theme="b">Theme b</li>
<li>some other value</li>
</ul>
dotnetwise dotnetwise Fix list-dividers use data-theme attribute first
Allow the list-divider to customize its own theme if desired
<ul data-role="listview" data-divider-theme="e">
<li data-role="list-divider">Theme e</li>
<li>some value</li>
<li data-role="list-divider" data-theme="b">Theme b</li>
<li>some other value</li>
</ul>
e12232b
Jasper de Groot
Collaborator

@dotnetwise

Thanks for the PR. I think we should land this.

Did you run the listview unit tests?

Jeroen van Warmerdam

+1 for landing.

Jasper de Groot
Collaborator

I ran the listview unit test... merging

Jasper de Groot jaspermdegroot merged commit 8b577e1 into from
dotnetwise

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 30, 2012
dotnetwise dotnetwise Fix list-dividers use data-theme attribute first
Allow the list-divider to customize its own theme if desired
<ul data-role="listview" data-divider-theme="e">
<li data-role="list-divider">Theme e</li>
<li>some value</li>
<li data-role="list-divider" data-theme="b">Theme b</li>
<li>some other value</li>
</ul>
e12232b
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  js/widgets/listview.js
2  js/widgets/listview.js
@@ -255,7 +255,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
255 255 }
256 256 } else if ( isDivider ) {
257 257
258   - itemClass += " ui-li-divider ui-bar-" + dividertheme;
  258 + itemClass += " ui-li-divider ui-bar-" + (item.jqmData("theme") || dividertheme);
259 259 item.attr( "role", "heading" );
260 260
261 261 if ( ol ) {

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.