yii2mod / yii2-comments

Comments module for Yii2
MIT License
158 stars 63 forks source link

Pjax support #2

Closed Patroklo closed 8 years ago

Patroklo commented 8 years ago

Hi, I'm trying to use javascript to reload the comments instead of reloading all the page, I thought that using pjax whould be the simplest way, but I can't think of a way of reloading the widget with the new comment once i have sent the data. Does something come to mind to you to be able to use ajax for this comment system?

ihorchepurnyi commented 8 years ago

Hi, a pjax submit feature has been added in the release 1.0.1. Please update your package via composer.

Patroklo commented 8 years ago

Le fuuuuuu-! I was ending a version of the pjax to share with you XD adding edit comments and rbac. Thanks for your hard work man! Would you be interested in comparing versions?

ihorchepurnyi commented 8 years ago

yes, of course. Give us link of your repository.

Patroklo commented 8 years ago

Here it is: https://github.com/Patroklo/yii2-comments-1

Made a lot of changes, probably you wont like a lot of them, but seemed useful at the moment. In the pjax and edition approach I have decide to use a less javascript based solution, since pjax does all the heavy lifting of the work.

Also added changes into the migration, you should add a double index in the entity, entityId columns, will fasten a lot your queries.

Thanks!