Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(ajax): better elgg/Ajax handling of form data and URLs
As `jQuery.serialize` is often used to set post data, this change allows a string form of `options.data` to be passed through. In this case, however, we do not trigger the request hook, as handlers expect an object. Because we want requests to be hookable, we nudge devs toward a new `objectify` method, which "serializes" to an object so it can be passed through the hook. All methods now accept a query string that gets passed to the underlying URL, but does not appear in the hook types. `action()`, `path()`, and `form()` accept absolute site URLs, as one might get from `$anchor.prop('href')`. Fixes Elgg#9534 Fixes Elgg#9564
- Loading branch information
Showing
6 changed files
with
590 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.