Skip to content

Releases: dereuromark/cakephp-ajax

3.0.0

22 Jan 15:32
Compare
Choose a tag to compare

CakePHP 5 compatible release

Enjoy

3.0.0-RC

12 Oct 13:29
Compare
Choose a tag to compare

CakePHP 5 compatible pre-release

Please test. Once this has been tested and approved, the stable release can be tagged.

2.1.0

19 Nov 02:16
99c9d03
Compare
Choose a tag to compare

Improvements

  • CakePHP 4.2+
  • PHP 7.3+

2.0.0

30 Mar 00:07
34f1c75
Compare
Choose a tag to compare

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

24 Mar 18:28
Compare
Choose a tag to compare

CakePHP 4 compatible pre-release.

Please help to finalize for stable release.

2.0.0-beta

08 Jan 15:42
Compare
Choose a tag to compare

CakePHP 4 compatible pre-release.

Please help to finalize for stable release.

1.5.1

29 Dec 13:42
Compare
Choose a tag to compare

Improvements

Removed deprecations.

1.5.0

31 Oct 20:48
3accba4
Compare
Choose a tag to compare

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

25 Jul 19:34
Compare
Choose a tag to compare

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

17 Jul 22:29
Compare
Choose a tag to compare

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.