mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-18 19:41:06 +00:00
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.
This commit is contained in:
parent
368d3e55b4
commit
8929ac33b9
4 changed files with 2 additions and 20 deletions
|
|
@ -95,12 +95,6 @@ $(document).bind("mobileinit", function(){
|
|||
<dt>ajaxEnabled (<em>boolean</em>, default: true):</dt>
|
||||
<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>
|
||||
|
||||
<dt>ajaxLinksEnabled (<strong>deprecated</strong> <em>boolean</em>, default: true):</dt>
|
||||
<dd>jQuery Mobile will automatically handle link clicks through Ajax, when possible.</dd>
|
||||
|
||||
<dt>ajaxFormsEnabled (<strong>deprecated</strong> <em>boolean</em>, default: true):</dt>
|
||||
<dd>jQuery Mobile will automatically handle form submissions through Ajax, when possible.</dd>
|
||||
|
||||
<dt>hashListeningEnabled (<em>boolean</em>, default: true):</dt>
|
||||
<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>
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<h2>Non-Ajax handling</h2>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<h2>Simple Ajax form example</h2>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -36,14 +36,6 @@
|
|||
//automatically load and show pages based on location.hash
|
||||
hashListeningEnabled: true,
|
||||
|
||||
// TODO: deprecated - remove at 1.0
|
||||
//automatically handle link clicks through Ajax, when possible
|
||||
ajaxLinksEnabled: true,
|
||||
|
||||
// TODO: deprecated - remove at 1.0
|
||||
//automatically handle form submissions through Ajax, when possible
|
||||
ajaxFormsEnabled: true,
|
||||
|
||||
//set default page transition - 'none' for no transitions
|
||||
defaultPageTransition: "slide",
|
||||
|
||||
|
|
|
|||
|
|
@ -735,8 +735,6 @@
|
|||
$( "form" ).live('submit', function( event ) {
|
||||
var $this = $( this );
|
||||
if( !$.mobile.ajaxEnabled ||
|
||||
//TODO: deprecated - remove at 1.0
|
||||
!$.mobile.ajaxFormsEnabled ||
|
||||
$this.is( ":jqmData(ajax='false')" ) ) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -853,9 +851,7 @@
|
|||
|
||||
$activeClickedLink = $link.closest( ".ui-btn" );
|
||||
|
||||
if( isExternal || hasAjaxDisabled || hasTarget || !$.mobile.ajaxEnabled ||
|
||||
// TODO: deprecated - remove at 1.0
|
||||
!$.mobile.ajaxLinksEnabled ) {
|
||||
if( isExternal || hasAjaxDisabled || hasTarget || !$.mobile.ajaxEnabled ) {
|
||||
//remove active link class if external (then it won't be there if you come back)
|
||||
window.setTimeout( function() { removeActiveLinkClass( true ); }, 200 );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue