I am using Kier's Scratchpad add on as the base for a comments system on a project I'm working on.
So far I've extended it to be included in multiple pages, I've added bbcode support and included the standard XenForo rich text editor.
I have also added permissions and the ability to delete and edit comments based on those permissions.
Deleting is working great. To an extent, editing is working but the part that isn't (for editing) is AJAX.
My edit function loads the rich text editor in an overlay - much the same as editing a post.
The form action takes you to the same function that posts a new comment. I would expect that, at least, the comments would refresh behind the overlay to include the new comment in a lovely AJAX style. Instead what happens is seemingly nothing.
The editor stays on the screen, the overlay doesn't close and it doesn't look as if anything has happened. Yet if you refresh the page the edit has indeed happened.
So tl;dr
Desired result is to save the changes to the comment, close the overlay and refresh the list of comments with the updated message.
Any clues?
So far I've extended it to be included in multiple pages, I've added bbcode support and included the standard XenForo rich text editor.
I have also added permissions and the ability to delete and edit comments based on those permissions.
Deleting is working great. To an extent, editing is working but the part that isn't (for editing) is AJAX.
My edit function loads the rich text editor in an overlay - much the same as editing a post.
The form action takes you to the same function that posts a new comment. I would expect that, at least, the comments would refresh behind the overlay to include the new comment in a lovely AJAX style. Instead what happens is seemingly nothing.
The editor stays on the screen, the overlay doesn't close and it doesn't look as if anything has happened. Yet if you refresh the page the edit has indeed happened.
So tl;dr
Desired result is to save the changes to the comment, close the overlay and refresh the list of comments with the updated message.
Any clues?