From fad90ca99a331fcd69f49efd9259912ae3818c73 Mon Sep 17 00:00:00 2001 From: John Bender Date: Fri, 1 Apr 2011 01:48:38 -0700 Subject: [PATCH] navigation white space --- js/jquery.mobile.navigation.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index cccc131a..050901ba 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -120,7 +120,7 @@ } urlHistory.stack.push( {url : url, transition: transition, title: title, page: storedTo } ); - + urlHistory.activeIndex = urlHistory.stack.length - 1; }, @@ -408,7 +408,7 @@ //update hash and history path.set( url ); } - + //if title element wasn't found, try the page div data attr too var newPageTitle = to.attr( ":jqmData(title)" ) || to.find(".ui-header .ui-title" ).text(); if( !!newPageTitle && pageTitle == document.title ){ @@ -419,7 +419,7 @@ if( !back && !forward ){ urlHistory.addNew( url, transition, pageTitle, to ); } - + //set page title document.title = urlHistory.getActive().title; @@ -556,14 +556,14 @@ //use it as the new fileUrl, base path, etc var all = $("
"), redirectLoc, - + //page title regexp newPageTitle = html.match( /]*>([^<]*)/ ) && RegExp.$1, - + // TODO handle dialogs again pageElemRegex = new RegExp(".*(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>).*"), dataUrlRegex = new RegExp("\\bdata-" + $.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?"); - + // data-url must be provided for the base tag so resource requests can be directed to the // correct url. loading into a temprorary element makes these requests immediately @@ -586,11 +586,11 @@ //workaround to allow scripts to execute when included in page divs all.get(0).innerHTML = html; to = all.find( ":jqmData(role='page'), :jqmData(role='dialog')" ).first(); - + //finally, if it's defined now, set the page title for storage in urlHistory if( newPageTitle ){ pageTitle = newPageTitle; - } + } //rewrite src and href attrs to use a base url if( !$.support.dynamicBaseTag ){ @@ -598,7 +598,7 @@ to.find( "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]" ).each(function(){ var thisAttr = $(this).is('[href]') ? 'href' : 'src', thisUrl = $(this).attr(thisAttr); - + //if full path exists and is same, chop it - helps IE out thisUrl = thisUrl.replace( location.protocol + '//' + location.host + location.pathname, '' );