Commit 0ea054ab authored by Sven Franck's avatar Sven Franck

enable search-param reloads in jQM

parent fa897fd0
......@@ -4740,6 +4740,13 @@ $.widget( "mobile.page", {
return;
}
// if it is the first page, allow to override query parameters
// TODO: calling isFirstPageUrl a lot here.
if ( content.length === 1 &&
path.isFirstPageUrl(fileUrl) ) {
settings.isFirst = true;
}
// Reset base to the default document base
// TODO figure out why we doe this
this._getBase().reset();
......@@ -4914,7 +4921,7 @@ $.widget( "mobile.page", {
// store the original absolute url so that it can be provided
// to events in the triggerData of the subsequent changePage call
options.absUrl = triggerData.absUrl;
options.absUrl = options.isFirst ? url : triggerData.absUrl;
this.transition( content, triggerData, options );
}, this));
......@@ -5040,7 +5047,7 @@ $.widget( "mobile.page", {
// us to avoid generating a document url with an id hash in the case where the
// first-page of the document has an id attribute specified.
if ( toPage[ 0 ] === $.mobile.firstPage[ 0 ] && !settings.dataUrl ) {
settings.dataUrl = documentUrl.hrefNoHash;
settings.dataUrl = settings.isFirst ? settings.absUrl : documentUrl.hrefNoHash;
}
// The caller passed us a real page DOM element. Update our
......@@ -5272,7 +5279,9 @@ $.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 || ( this.documentBaseDiffers && u.hrefNoHash === this.documentBase.hrefNoHash ),
samePath = u.hrefNoHash === this.documentUrl.hrefNoHash ||
u.hrefNoSearch === this.documentUrl.hrefNoSearch ||
( this.documentBaseDiffers && u.hrefNoHash === this.documentBase.hrefNoHash ),
// Get the first page element.
fp = $.mobile.firstPage,
......@@ -7315,10 +7324,8 @@ $.mobile._enhancer.add( "mobile.textinput" );
_completeTransition: function (current, next, events) {
var self = this,
o = self.options;
console.log("3. NEXT: removing 'in out slide'")
next.removeClass("in out " + o.carouseltransition)
.off( events );
console.log("4. CURRENT: setting bindings");
current
.on( events, self._cleanupTransition(current, events) )
},
......@@ -7327,9 +7334,7 @@ $.mobile._enhancer.add( "mobile.textinput" );
var self = this,
o = self.options;
var classes = o.carouseltransition + " out in";
console.log("5. CURRENT: removing 'in out slide'");
current.removeClass(classes)
console.log("6. CURRENT: removing 'active'");
current.removeClass("ui-carousel-active").off(events);
},
......@@ -7353,8 +7358,6 @@ $.mobile._enhancer.add( "mobile.textinput" );
// initialize
nextActive
.on( events, self._completeTransition(currentActive, nextActive, events));
console.log("2. NEXT: adding 'slide in active'");
nextActive
.addClass(transition + " ui-carousel-active in ");
......@@ -9096,15 +9099,6 @@ $.mobile._enhancer.add( "mobile.rangeslider", { dependencies: [ "mobile.slider"
},
_clearBtnClick: function( event ){
this.element.val( "" )
.focus()
.trigger( "change" );
this._actionBtn.addClass( "ui-input-clear-hidden" );
event.preventDefault();
},
_addActionBtn: function(){
if( !this.options.enhanced ) {
......
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