Fixed #2348 - lists-search-with-dividers breaks fixed footer

- Fixed header/footer code now listens for a custom event "contentmodified" on the document to figure out if it should be repositioned or not. Modified collapsible and listview to fire off contentmodified whenever they modify content. Developers can also fire off this event to trigger position updates for fixed headers/footers, so this could be used to address issue #2042 and the mention of collapsible in #2596.
This commit is contained in:
jblas@adobe.com 2011-10-13 22:45:52 -07:00
parent 4d35966e69
commit 773497b501
3 changed files with 5 additions and 1 deletions

View file

@ -135,6 +135,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
.toggleClass( "ui-corner-bottom", isCollapse );
collapsibleContent.toggleClass( "ui-corner-bottom", !isCollapse );
}
collapsibleContent.trigger( "contentmodified" );
}
})
.trigger( o.collapsed ? "collapse" : "expand" );

View file

@ -148,7 +148,7 @@ $.mobile.fixedToolbars = (function() {
stateBefore = null;
});
$window.bind( "resize", showEventCallback );
$window.bind( "resize contentmodified", showEventCallback );
});
// 1. Before page is shown, check for duplicate footer

View file

@ -106,6 +106,9 @@ $.widget( "mobile.listview", $.mobile.widget, {
.not(".ui-li-icon")
.addClass( "ui-corner-bl" );
}
if ( !create ) {
this.element.trigger( "contentmodified" );
}
},
refresh: function( create ) {