Permalink
Browse files

Helpers: Remove deprecated $.mobile.getScreenHeight

Fixes gh-6306
Closes gh-8181
  • Loading branch information...
arschmitz committed Jul 3, 2015
1 parent 303c531 commit fee3bab9cfac23c32d7429b5ee89ab6e79ff3653
@@ -220,7 +220,7 @@ $( document )
.on( "popupbeforeposition", ".jqm-view-source", function() {
// max height: screen height - tolerance (2*30px) - 42px for each collapsible heading
var x = $( this ).find( ".ui-collapsible" ).length,
maxHeight = $.mobile.getScreenHeight() - 60 - ( x * 42 );
maxHeight = $( window ).height() - 60 - ( x * 42 );
$( this ).find( ".ui-collapsible-content" ).css( "max-height", maxHeight + "px" );
View
@@ -34,18 +34,6 @@ return $.extend( $.mobile, {
// Keepnative Selector
keepNative: ":jqmData(role='none'), :jqmData(role='nojs')",
// Deprecated in 1.4 remove in 1.5
// Class assigned to page currently in view, and during transitions
activePageClass: "ui-page-active",
// Deprecated in 1.4 remove in 1.5
// Class used for "active" button state, from CSS framework
activeBtnClass: "ui-button-active",
// Deprecated in 1.4 remove in 1.5
// Class used for "focus" form element state, from CSS framework
focusClass: "ui-focus",
// Automatically handle clicks and form submissions through Ajax, when same-domain
ajaxEnabled: true,
View
@@ -227,7 +227,7 @@ $.extend( $.mobile, {
pageOuterHeight = page.outerHeight( true );
height = compensateToolbars( page,
( typeof height === "number" ) ? height : $.mobile.getScreenHeight() );
( typeof height === "number" ) ? height : $( window ).height() );
// Remove any previous min-height setting
page.css( "min-height", "" );
@@ -30,7 +30,7 @@
// generate the handlers from the above
var defaultGetMaxScrollForTransition = function() {
return $.mobile.getScreenHeight() * 3;
return $( window ).height() * 3;
};
//transition handler dictionary for 3rd party transitions
@@ -161,7 +161,7 @@ $.extend( $.mobile.Transition.prototype, {
// it is today. So we wait until transition is invoked to gather the following
var none,
reverseClass = this.reverse ? " reverse" : "",
screenHeight = $.mobile.getScreenHeight(),
screenHeight = $( window ).height(),
maxTransitionOverride = $.mobile.maxTransitionWidth !== false &&
$.mobile.window.width() > $.mobile.maxTransitionWidth;
@@ -200,7 +200,7 @@ return $.widget( "mobile.toolbar", $.mobile.toolbar, {
scroll = $win.scrollTop(),
elHeight = $el.height(),
pHeight = ( !!this.page ) ? $el.closest( ".ui-page" ).height() : $( ".ui-page-active" ).height(),
viewportHeight = $.mobile.getScreenHeight();
viewportHeight = this.window.height();
return !notransition &&
( this.options.transition && this.options.transition !== "none" &&
View
@@ -75,7 +75,7 @@ return $.widget( "mobile.loader", {
checkLoaderPosition: function() {
var offset = this.element.offset(),
scrollTop = this.window.scrollTop(),
screenHeight = $.mobile.getScreenHeight();
screenHeight = this.window.height();
if ( offset.top < scrollTop || ( offset.top - scrollTop ) > screenHeight ) {
this.element.addClass( "ui-loader-fakefix" );
View
@@ -187,7 +187,7 @@ return $.widget( "mobile.panel", {
var heightWithMargins, heightWithoutMargins,
self = this,
panelInnerHeight = self._panelInner.outerHeight(),
expand = panelInnerHeight > $.mobile.getScreenHeight();
expand = panelInnerHeight > this.window.height();
if ( expand || !self.options.positionFixed ) {
if ( expand ) {
@@ -68,7 +68,7 @@ $.testHelper.detailedEventCascade( [
"Successfully changed to page '#panel-stretch-page'" );
// Make the page scroll
$( "#panel-stretch-page .ui-content" ).height( $.mobile.getScreenHeight() * 3 );
$( "#panel-stretch-page .ui-content" ).height( $( window ).height() * 3 );
stretchTestPanel.panel( "open" );
},

0 comments on commit fee3bab

Please sign in to comment.