Permalink
Browse files

Move $.mobile.resetActivePageHeight from navigation to core. Fixes #5997

 - Panel depends on resetActivePageHeight
  • Loading branch information...
jzaefferer committed May 27, 2013
1 parent ed1d5f8 commit b39787ba8638bdc05060e418d9db8c8bf2fa161d
Showing with 11 additions and 13 deletions.
  1. +11 −0 js/jquery.mobile.core.js
  2. +0 −13 js/jquery.mobile.navigation.js
View
@@ -246,6 +246,17 @@ define( [ "jquery", "./jquery.mobile.ns", "json!../package.json" ], function( jQ
// Native innerHeight returns more accurate value for this across platforms,
// jQuery version is here as a normalized fallback for platforms like Symbian
return window.innerHeight || $.mobile.window.height();
},
//simply set the active page's minimum height to screen height, depending on orientation
resetActivePageHeight: function( height ) {
var aPage = $( "." + $.mobile.activePageClass ),
aPageHeight = aPage.height(),
aPageOuterHeight = aPage.outerHeight( true );
height = ( typeof height === "number" ) ? height : $.mobile.getScreenHeight();
aPage.css( "min-height", height - ( aPageOuterHeight - aPageHeight ) );
}
});
@@ -97,8 +97,6 @@ define( [
//initial value. If a base tag does not exist, then we default to the documentUrl.
documentBase = path.documentBase,
getScreenHeight = $.mobile.getScreenHeight,
//base element management, defined depending on dynamic base tag support
base = {
//define base element, for use in routing asset urls that are referenced in Ajax-requested markup
@@ -307,17 +305,6 @@ define( [
return promise;
}
//simply set the active page's minimum height to screen height, depending on orientation
$.mobile.resetActivePageHeight = function resetActivePageHeight( height ) {
var aPage = $( "." + $.mobile.activePageClass ),
aPageHeight = aPage.height(),
aPageOuterHeight = aPage.outerHeight( true );
height = ( typeof height === "number" ) ? height : getScreenHeight();
aPage.css( "min-height", height - ( aPageOuterHeight - aPageHeight ) );
};
//shared page enhancements
function enhancePage( $page, role ) {
// If a role was specified, make sure the data-role attribute

0 comments on commit b39787b

Please sign in to comment.