Skip to content

Commit

Permalink
Add an 'afterrefresh' event to listview
Browse files Browse the repository at this point in the history
This is used as the hook for autodividers to redraw the
dividers on a listview.
  • Loading branch information
townxelliot committed Apr 10, 2012
1 parent 68fc0d8 commit 9c5135a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/jquery.mobile.listview.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ $.widget( "mobile.listview", $.mobile.widget, {
_create: function() {
var t = this,
listviewClasses = "";

listviewClasses += t.options.inset ? " ui-listview-inset ui-corner-all ui-shadow " : "";
listviewClasses += t.element.jqmData( "mini" ) || t.options.mini === true ? " ui-mini" : "";

// create listview markup
t.element.addClass(function( i, orig ) {
return orig + " ui-listview " + listviewClasses;
Expand Down Expand Up @@ -308,6 +308,9 @@ $.widget( "mobile.listview", $.mobile.widget, {
this._addThumbClasses( $list.find( ".ui-link-inherit" ) );

this._refreshCorners( create );

// autodividers binds to this to redraw dividers after the listview refresh
this._trigger( "afterrefresh" );
},

//create a string for ID/subpage url creation
Expand Down

0 comments on commit 9c5135a

Please sign in to comment.