Releases: dereuromark/cakephp-ajax
3.0.0
3.0.0-RC
CakePHP 5 compatible pre-release
Please test. Once this has been tested and approved, the stable release can be tagged.
2.1.0
Improvements
- CakePHP 4.2+
- PHP 7.3+
2.0.0
CakePHP 4 stable release
DRY (Don't repeat yourself) and easy AJAX handling.
- Auto-handling via View class mapping and making controller actions available both AJAX and non-AJAX by design.
- Flash message and redirect (prevention) support.
2.0.0-rc
CakePHP 4 compatible pre-release.
Please help to finalize for stable release.
2.0.0-beta
CakePHP 4 compatible pre-release.
Please help to finalize for stable release.
1.5.1
Improvements
Removed deprecations.
1.5.0
Improvements
AjaxView extends AppView
This way the AjaxView automatically shares the AppView helpers loaded.
With CakePHP 3 now shifting helper loading from controller to view level this is a required chance at this point to have the AJAX templates being able to use the same helpers as the normal ones do.
Caution
All CakePHP 3 apps by now should have an AppView class present.
If you don't yet, please do that now before pulling this minor release.
1.4.1
Bugfixes
Any non-null
values for error/success can now be used, so boolean true/false would now work.
Also allow "success" key to skip rendering, similar to "error". Sometimes a bool is not enough and you need to transport a more meaningful message here.
This can be used for edit-in-place AJAX or alike.
1.4.0
Improvements
Enable AJAX delete
For usability reasons you might want to delete a row in a paginated table, without the need to refresh the whole page.
All you need to do here is
- Add a specific class to the "post link"
- Add some custom JS to catch the "post link JS"
- Make sure the AjaxComponent is loaded for this action
The default bake action usually already works perfectly:
public function delete($id = null) {
$this->request->allowMethod(['post', 'delete']);
$group = $this->Groups->get($id);
$this->Groups->delete($group);
$this->Flash->success(__('The group has been deleted.'));
return $this->redirect(['action' => 'index']);
}
The JSON response even contains the flash message and redirect URL in case you want to use that in your JS response handling.
A live example can be found in the Sandbox.