Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggling of Edit links in comments not working #6667

Closed
teamwebgalli opened this issue Mar 24, 2014 · 5 comments
Closed

Toggling of Edit links in comments not working #6667

teamwebgalli opened this issue Mar 24, 2014 · 5 comments

Comments

@teamwebgalli
Copy link
Contributor

Toggling of "edit" link in comments is not working when a comment is rendered using
elgg_view_entity($comment)

Version - 1.9

@Srokap
Copy link
Contributor

Srokap commented Mar 24, 2014

What do you mean by toggling? That sounds like duplicate of #6666

@teamwebgalli
Copy link
Contributor Author

Toggling means - showing the inline edit form.
Not a duplicate.

The error is due to the selector
https://github.com/Elgg/Elgg/blob/master/js/lib/comments.js#L104

Comments rendered via elgg_view_entity($comment) are not wrapped with in ".elgg-item-object-comment"

@Srokap
Copy link
Contributor

Srokap commented Mar 24, 2014

The class is added by elgg_list_entities in default list view. I assume, you just want it to work on standalone item?

@Srokap Srokap added dev usability and removed ui labels Mar 24, 2014
@teamwebgalli
Copy link
Contributor Author

Yes, It needs to be working even on a standalone item.

The links are supposed to work when ever they are shown, right? But the js selector makes it work only, if it is being rendered by the elgg_list_entities().

@jdalsem jdalsem self-assigned this Oct 20, 2014
@jdalsem
Copy link
Member

jdalsem commented Oct 23, 2014

The inline comment form is a reusable form that is not available on a single comment. The form is part of the listing of the comments and not part of the object view. In core Elgg there are no uses of a single elgg_view_entity($comment). Also there is nothing broken, as the edit link with bring you to a edit form.

If you need the inline form in your own plugin, you can do (something like) the following:

echo "<div class='elgg-comments'>";
echo elgg_list_entities(array("guids" => array($your_comment_guid)));
echo elgg_view_form('comment/save', array(), $vars);
echo "</div>";

@jdalsem jdalsem closed this as completed Oct 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants