Commit 682b3a8e authored by Sven Franck's avatar Sven Franck

JQM-hack: allow same page transition with search parameters while not available

parent cbe324f1
......@@ -4742,7 +4742,7 @@ $.widget( "mobile.page", {
// if it is the first page, allow to override query parameters
// TODO: calling isFirstPageUrl a lot here.
if ( content.length === 1 &&
if ( content.length > 0 &&
path.isFirstPageUrl(fileUrl) ) {
settings.isFirst = true;
}
......@@ -5279,9 +5279,7 @@ $.widget( "mobile.page", {
var u = path.parseUrl( path.makeUrlAbsolute( url, this.documentBase ) ),
// Does the url have the same path as the document?
samePath = u.hrefNoHash === this.documentUrl.hrefNoHash ||
u.hrefNoSearch === this.documentUrl.hrefNoSearch ||
( this.documentBaseDiffers && u.hrefNoHash === this.documentBase.hrefNoHash ),
samePath = u.hrefNoSearch === this.documentUrl.hrefNoSearch || ( this.documentBaseDiffers && u.hrefNoHash === this.documentBase.hrefNoHash ),
// Get the first page element.
fp = $.mobile.firstPage,
......@@ -5849,9 +5847,13 @@ $.widget( "mobile.page", {
});
},
cleanFrom: function() {
isSame: function() {
return this.$to[0] === this.$from[0];
},
cleanFrom: function( keepActive ) {
this.$from
.removeClass( $.mobile.activePageClass + " out in reverse " + this.name )
.removeClass( ( keepActive ? "" : $.mobile.activePageClass ) + " out in reverse " + this.name )
.height( "" );
},
......@@ -5984,7 +5986,7 @@ $.widget( "mobile.page", {
beforeDoneOut: function() {
if ( this.$from ) {
this.cleanFrom();
this.cleanFrom( this.isSame );
}
},
......@@ -6009,7 +6011,7 @@ $.widget( "mobile.page", {
beforeDoneIn: function() {
if ( this.$from ) {
this.cleanFrom();
this.cleanFrom( this.isSame );
}
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment