Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Merge branch 'patch-93' of https://github.com/MauriceG/jquery-mobile
Browse files Browse the repository at this point in the history
…into MauriceG-patch-93
  • Loading branch information
jaspermdegroot committed Jun 15, 2012
2 parents b0a01a9 + 2dad4d6 commit 0992512
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions js/widgets/fixedToolbar.js
Expand Up @@ -124,15 +124,17 @@ define( [ "../jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../j
}
} )
.bind( "webkitAnimationStart animationstart updatelayout", function(){
var thisPage = this;
if( o.updatePagePadding ){
self.updatePagePadding();
self.updatePagePadding( thisPage );
}
})
.bind( "pageshow", function(){
self.updatePagePadding();
var thisPage = this;
if( o.updatePagePadding ){
self.updatePagePadding( thisPage );
$( window ).bind( "throttledresize." + self.widgetName, function(){
self.updatePagePadding();
self.updatePagePadding( thisPage );
});
}
})
Expand Down Expand Up @@ -167,14 +169,15 @@ define( [ "../jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../j
_visible: true,

// This will set the content element's top or bottom padding equal to the toolbar's height
updatePagePadding: function() {
updatePagePadding: function( tbPage ) {
var $el = this.element,
header = $el.is( ".ui-header" );

// This behavior only applies to "fixed", not "fullscreen"
if( this.options.fullscreen ){ return; }

$el.closest( ".ui-page" ).css( "padding-" + ( header ? "top" : "bottom" ), $el.outerHeight() );
tbPage = tbPage || $el.closest( ".ui-page" );
$(tbPage).css( "padding-" + ( header ? "top" : "bottom" ), $el.outerHeight() );
},

_useTransition: function( notransition ){
Expand Down

0 comments on commit 0992512

Please sign in to comment.