Merge branch 'external-clear' of https://github.com/ajkovar/jquery-mobile into ajkovar-external-clear

This commit is contained in:
John Bender 2011-02-02 23:15:58 -08:00
commit 3a24aa4de6
2 changed files with 15 additions and 15 deletions

View file

@ -117,12 +117,6 @@
urlHistory.stack = urlHistory.stack.slice( 0, urlHistory.activeIndex + 1 );
},
//wipe all urls
clear: function(){
urlHistory.stack = [];
urlHistory.activeIndex = 0;
},
//disable hashchange event listener internally to ignore one change
//toggled internally when location.hash is updated to match the url of a successful page load
ignoreNextHashChange: true
@ -562,7 +556,9 @@
error: function() {
$.mobile.pageLoading( true );
removeActiveLinkClass(true);
base.set(path.get());
if(base){
base.set(path.get());
}
$("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>Error Loading Page</h1></div>")
.css({ "display": "block", "opacity": 0.96, "top": $(window).scrollTop() + 100 })
.appendTo( $.mobile.pageContainer )

View file

@ -40,6 +40,12 @@
}
};
checkTransitionStack();
},
//wipe all urls
clearUrlHistory = function(){
$.mobile.urlHistory.stack = [];
$.mobile.urlHistory.activeIndex = 0;
};
@ -60,7 +66,7 @@
QUnit.testStart = function (name) {
clearPageTransitionStack();
$.mobile.urlHistory.clear();
clearUrlHistory();
};
test( "changePage applys perspective class to mobile viewport for flip", function(){
@ -119,14 +125,12 @@
ok(isTransitioningIn(firstPage), "first page begins transition");
ok(!isTransitioningIn(secondPage), "second page doesn't transition yet");
finishPageTransition();
setTimeout(function(){
finishPageTransition();
setTimeout(function(){
ok(!isTransitioningIn(firstPage), "first page transition should be complete");
ok(isTransitioningIn(secondPage), "second page should begin transitioning");
start();
},0);
ok(!isTransitioningIn(firstPage), "first page transition should be complete");
ok(isTransitioningIn(secondPage), "second page should begin transitioning");
start();
},0);
},0);
});