Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 53e1acd

Browse files
author
Gabriel Schulhof
committed
Navigation: Rename parameter for getAjaxFormData ($this -> $form)
1 parent 283c567 commit 53e1acd

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

js/jquery.mobile.navigation.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,19 +1264,19 @@ define( [
12641264
//the following deferred is resolved in the init file
12651265
$.mobile.navreadyDeferred = $.Deferred();
12661266
$.mobile._registerInternalEvents = function() {
1267-
var getAjaxFormData = function( $this, calculateOnly ) {
1267+
var getAjaxFormData = function( $form, calculateOnly ) {
12681268
var type, target, url, ret = true;
12691269
if ( !$.mobile.ajaxEnabled ||
12701270
// test that the form is, itself, ajax false
1271-
$this.is( ":jqmData(ajax='false')" ) ||
1271+
$form.is( ":jqmData(ajax='false')" ) ||
12721272
// test that $.mobile.ignoreContentEnabled is set and
12731273
// the form or one of it's parents is ajax=false
1274-
!$this.jqmHijackable().length ) {
1274+
!$form.jqmHijackable().length ) {
12751275
return false;
12761276
}
12771277

1278-
target = $this.attr( "target" );
1279-
url = $this.attr( "action" );
1278+
target = $form.attr( "target" );
1279+
url = $form.attr( "action" );
12801280

12811281
// If no action is specified, browsers default to using the
12821282
// URL of the document containing the form. Since we dynamically
@@ -1285,7 +1285,7 @@ define( [
12851285
// the form.
12861286
if ( !url ) {
12871287
// Get the @data-url for the page containing the form.
1288-
url = getClosestBaseUrl( $this );
1288+
url = getClosestBaseUrl( $form );
12891289
if ( url === documentBase.hrefNoHash ) {
12901290
// The url we got back matches the document base,
12911291
// which means the page must be an internal/embedded page,
@@ -1295,21 +1295,21 @@ define( [
12951295
}
12961296
}
12971297

1298-
url = path.makeUrlAbsolute( url, getClosestBaseUrl( $this ) );
1298+
url = path.makeUrlAbsolute( url, getClosestBaseUrl( $form ) );
12991299

13001300
if ( ( path.isExternal( url ) && !path.isPermittedCrossDomainRequest( documentUrl, url ) ) || target ) {
13011301
return false;
13021302
}
13031303

13041304
if ( !calculateOnly ) {
1305-
type = $this.attr( "method" );
1305+
type = $form.attr( "method" );
13061306
ret = {
13071307
url: url,
13081308
options: {
13091309
type: type && type.length && type.toLowerCase() || "get",
1310-
data: $this.serialize(),
1311-
transition: $this.jqmData( "transition" ),
1312-
reverse: $this.jqmData( "direction" ) === "reverse",
1310+
data: $form.serialize(),
1311+
transition: $form.jqmData( "transition" ),
1312+
reverse: $form.jqmData( "direction" ) === "reverse",
13131313
reloadPage: true
13141314
}
13151315
};

0 commit comments

Comments
 (0)