API Docs for: 0.25.0
Show:

CommentableMixin Class

Extends Ember.Mixin
Module: mixins
Parent Module: ember-osf

Controller mixin that implements basic commenting functionality. Uses the base model in the route model hook.

Methods

addComment

(
  • text
)
Promise

Action that adds a new comment targeting the model by GUID.

Parameters:

  • text String

    The text of the new comment

Returns:

Promise:

The newly created comment

apply

(
  • obj
)
private

Parameters:

Returns:

applied object

deleteComment

(
  • comment
)
Promise

Action that handles deletion of an existing comment.

Parameters:

Returns:

detect

(
  • obj
)
Boolean private

Parameters:

Returns:

editComment

(
  • comment
)
Promise

Action that edits an existing comment.

Parameters:

Returns:

reopen

(
  • arguments
)
private

Parameters:

reportComment

() Promise

Action that reports a comment for administrative review

Returns:

restoreComment

(
  • comment
)
Promise

Action that restores a deleted comment.

Parameters:

Returns:

Properties

comments

Comment[] public

The list of comments associated with a model. Defaults to using the model hook, and ensures that new comments are shown first (to match API convention)