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

Commit 8929ac3

Browse files
author
scottjehl
committed
Removed the ajaxLinksEnabled and ajaxFormsEnabled settings. These were deprecated in a4 and scheduled for removal. Automated link and form ajax handling can still be globally disabled via the ajaxEnabled option.
1 parent 368d3e5 commit 8929ac3

File tree

4 files changed

+2
-20
lines changed

4 files changed

+2
-20
lines changed

docs/api/globalconfig.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ <h2>Configurable options</h2>
9595
<dt>ajaxEnabled (<em>boolean</em>, default: true):</dt>
9696
<dd>jQuery Mobile will automatically handle link clicks and form submissions through Ajax, when possible. If false, url hash listening will be disabled as well, and urls will load as regular http requests.</dd>
9797

98-
<dt>ajaxLinksEnabled (<strong>deprecated</strong> <em>boolean</em>, default: true):</dt>
99-
<dd>jQuery Mobile will automatically handle link clicks through Ajax, when possible.</dd>
100-
101-
<dt>ajaxFormsEnabled (<strong>deprecated</strong> <em>boolean</em>, default: true):</dt>
102-
<dd>jQuery Mobile will automatically handle form submissions through Ajax, when possible.</dd>
103-
10498
<dt>hashListeningEnabled (<em>boolean</em>, default: true):</dt>
10599
<dd>jQuery Mobile will automatically listen and handle changes to the location.hash. Disabling this will prevent jQuery Mobile from handling hash changes, which allows you to handle them yourself, or simply to use simple deep-links within a document that scroll to a particular ID.</dd>
106100

docs/forms/forms-sample.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h2>Ajax form submission</h2>
2727

2828
<h2>Non-Ajax handling</h2>
2929

30-
<p>To prevent form submissions from being automatically handled with Ajax, add the <code>data-ajax="false"</code> attribute to the form element. You can also turn of Ajax form handling completely via the <code>ajaxFormsEnabled</code> <a href="../api/globalconfig.html">global config option</a>.</p>
30+
<p>To prevent form submissions from being automatically handled with Ajax, add the <code>data-ajax="false"</code> attribute to the form element. You can also turn of Ajax form handling completely via the <code>ajaxEnabled</code> <a href="../api/globalconfig.html">global config option</a>.</p>
3131

3232
<h2>Simple Ajax form example</h2>
3333
<p>This page demonstrates automated ajax handling of form submissions. The form below is configured to send regular a <code>get</code> request to <code>forms-sample-response.php</code>. On submit, jQuery Mobile will make sure that the Url specified is able to be retrieved via Ajax, and handle it appropriately. Keep in mind that just like ordinary HTTP form submissions, jQuery Mobile allows <code>get</code> result pages to be bookmarked by updating the Url hash when the response returns successfully. Also like ordinary form submissions, <code>post</code> requests do not contain query parameters in the hash, so they are not bookmarkable.</p>

js/jquery.mobile.core.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@
3636
//automatically load and show pages based on location.hash
3737
hashListeningEnabled: true,
3838

39-
// TODO: deprecated - remove at 1.0
40-
//automatically handle link clicks through Ajax, when possible
41-
ajaxLinksEnabled: true,
42-
43-
// TODO: deprecated - remove at 1.0
44-
//automatically handle form submissions through Ajax, when possible
45-
ajaxFormsEnabled: true,
46-
4739
//set default page transition - 'none' for no transitions
4840
defaultPageTransition: "slide",
4941

js/jquery.mobile.navigation.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,6 @@
735735
$( "form" ).live('submit', function( event ) {
736736
var $this = $( this );
737737
if( !$.mobile.ajaxEnabled ||
738-
//TODO: deprecated - remove at 1.0
739-
!$.mobile.ajaxFormsEnabled ||
740738
$this.is( ":jqmData(ajax='false')" ) ) {
741739
return;
742740
}
@@ -853,9 +851,7 @@
853851

854852
$activeClickedLink = $link.closest( ".ui-btn" );
855853

856-
if( isExternal || hasAjaxDisabled || hasTarget || !$.mobile.ajaxEnabled ||
857-
// TODO: deprecated - remove at 1.0
858-
!$.mobile.ajaxLinksEnabled ) {
854+
if( isExternal || hasAjaxDisabled || hasTarget || !$.mobile.ajaxEnabled ) {
859855
//remove active link class if external (then it won't be there if you come back)
860856
window.setTimeout( function() { removeActiveLinkClass( true ); }, 200 );
861857

0 commit comments

Comments
 (0)