Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

path.getDocumentUrl is defined twice

  • Loading branch information...
commit bbe20689628d4015cb99fc4fdbf0bf24f60eaaef 1 parent 04b6562
@johnbender johnbender authored
Showing with 12 additions and 15 deletions.
  1. +10 −13 js/jquery.mobile.navigation.js
  2. +2 −2 js/navigation/path.js
View
23 js/jquery.mobile.navigation.js
@@ -52,14 +52,14 @@ define( [
$base = $head.children( "base" ),
//tuck away the original document URL minus any fragment.
- documentUrl = path.parseLocation(),
+ documentUrl = path.documentUrl,
//if the document has an embedded base tag, documentBase is set to its
//initial value. If a base tag does not exist, then we default to the documentUrl.
- documentBase = $base.length ? path.parseUrl( path.makeUrlAbsolute( $base.attr( "href" ), documentUrl.href ) ) : documentUrl,
+ documentBase = path.documentBase,
//cache the comparison once.
- documentBaseDiffers = ( documentUrl.hrefNoHash !== documentBase.hrefNoHash ),
+ documentBaseDiffers = path.documentBaseDiffers,
getScreenHeight = $.mobile.getScreenHeight;
@@ -82,6 +82,13 @@ define( [
} : undefined;
+
+ //return the original document url
+ $.mobile.getDocumentUrl = path.getDocumentUrl;
+
+ //return the original document base url
+ $.mobile.getDocumentBase = path.getDocumentBase;
+
/* internal utility functions */
// NOTE Issue #4950 Android phonegap doesn't navigate back properly
@@ -294,16 +301,6 @@ define( [
//enable cross-domain page support
$.mobile.allowCrossDomainPages = false;
- //return the original document url
- $.mobile.getDocumentUrl = function( asParsedObject ) {
- return asParsedObject ? $.extend( {}, documentUrl ) : documentUrl.href;
- };
-
- //return the original document base url
- $.mobile.getDocumentBase = function( asParsedObject ) {
- return asParsedObject ? $.extend( {}, documentBase ) : documentBase.href;
- };
-
$.mobile._bindPageRemove = function() {
var page = $( this );
View
4 js/navigation/path.js
@@ -379,12 +379,12 @@ define([
path.documentBaseDiffers = (path.documentUrl.hrefNoHash !== path.documentBase.hrefNoHash);
//return the original document url
- path.getDocumentUrl = $.mobile.getDocumentUrl = function( asParsedObject ) {
+ path.getDocumentUrl = function( asParsedObject ) {
return asParsedObject ? $.extend( {}, path.documentUrl ) : path.documentUrl.href;
};
//return the original document base url
- path.getDocumentUrl = $.mobile.getDocumentBase = function( asParsedObject ) {
+ path.getDocumentBase = function( asParsedObject ) {
return asParsedObject ? $.extend( {}, path.documentBase ) : path.documentBase.href;
};
Please sign in to comment.
Something went wrong with that request. Please try again.