API Docs for:
Show:

models.client.Comment Class

Client Comment model

Methods

addAttachments

(
  • files
  • progressHandler
  • [options}
  • [options.onProgress]
)
Bluebird.Promise

Parameters:

  • files Array

    Array of HTML5 file objects

  • progressHandler Function

    Called multiple times during the upload progress

  • [options} Object
  • [options.onProgress] Function optional

    Called periodically when the upload progresses

Returns:

addAttachments

(
  • files
  • progressHandler
  • [options}
  • [options.onProgress]
)
Bluebird.Promise

Parameters:

  • files Array

    Array of HTML5 file objects

  • progressHandler Function

    Called multiple times during the upload progress

  • [options} Object
  • [options.onProgress] Function optional

    Called periodically when the upload progresses

Returns:

addAttachments

(
  • files
  • progressHandler
  • [options}
  • [options.onProgress]
)
Bluebird.Promise

Defined in bundle.js:3913

Parameters:

  • files Array

    Array of HTML5 file objects

  • progressHandler Function

    Called multiple times during the upload progress

  • [options} Object
  • [options.onProgress] Function optional

    Called periodically when the upload progresses

Returns:

attachments

() Array

Returns:

Array:

of models.client.Attachment

attachments

() Array

Defined in bundle.js:3901

Returns:

Array:

of models.client.Attachment

attachments

() Array

Returns:

Array:

of models.client.Attachment

createdAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:12

Returns:

Date:

deletedAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:36

Returns:

Date:

dispose

()

Inherited from models.client.Base but overwritten in models/client/Base.js:191

Call when not using this model anymore. Unbinds all event listeners.

getMergedComments

() Array

Return comments that are merged to this comment using Comment#merge(...)

Returns:

Array:

of models.client.Comment

getMergedComments

() Array

Defined in bundle.js:3869

Return comments that are merged to this comment using Comment#merge(...)

Returns:

Array:

of models.client.Comment

getMergedComments

() Array

Return comments that are merged to this comment using Comment#merge(...)

Returns:

Array:

of models.client.Comment

hasAttachments

() Boolean

Returns:

Boolean:

hasAttachments

() Boolean

Returns:

Boolean:

hasAttachments

() Boolean

Defined in bundle.js:3891

Returns:

Boolean:

hasVisibility

(
  • visibility
  • models
)

Visibility assertion helper

Parameters:

  • visibility String
  • models Array

    Array of models.server.Visibility models

Returns:

Boolean

isSame

(
  • other
)

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:48

Return true if the other object is built using the same constructor and they have the same id

Parameters:

Returns:

Boolean

isSoftDeleted

() Boolean

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:28

Returns:

Boolean:

merge

(
  • another
)
models.client.Comment

Merge two comments to new one

Parameters:

merge

(
  • another
)
models.client.Comment

Defined in bundle.js:3957

Merge two comments to new one

Parameters:

merge

(
  • another
)
models.client.Comment

Merge two comments to new one

Parameters:

methodFromMixin

()

Bar method

rel

(
  • key
)
Object | Array

Inherited from models.client.Base but overwritten in models/client/Base.js:145

Return relation data for given key or throw if it's not loaded

Parameters:

  • key String

Returns:

Object | Array:

Relation data

save

() Bluebird.Promise

Inherited from models.client.Base but overwritten in models/client/Base.js:163

Save model to server http://backbonejs.org/#Model-save

Returns:

Bluebird.Promise:

with the new saved model

toHTML

() String

Defined in bundle.js:3854

Convert comment string to a HTML string assuming it is a Markdown string

Returns:

String:

toHTML

() String

Convert comment string to a HTML string assuming it is a Markdown string

Returns:

String:

toHTML

() String

Convert comment string to a HTML string assuming it is a Markdown string

Returns:

String:

toMd

(
  • s
)
String static

Defined in bundle.js:3979

Convert Markdown string to HTML

Parameters:

  • s String

Returns:

String:

toMd

(
  • s
)
String static

Convert Markdown string to HTML

Parameters:

  • s String

Returns:

String:

toMd

(
  • s
)
String static

Convert Markdown string to HTML

Parameters:

  • s String

Returns:

String:

uniqueId

() String

Inherited from models.client.Base but overwritten in models/client/Base.js:134

Returns:

String:

updatedAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:20

Returns:

Date:

wasCreatedInVicinity

() Boolean

Inherited from models.client.Base but overwritten in models/client/Base.js:200

Return true if the another model was created within 60 seconds of this one by the same user

Returns:

Boolean:

Properties

idAttribute

String

Inherited from models.client.Base but overwritten in models/client/Base.js:119

Use unique_id from models.server.Base as the model id. We need this to be able to put models of diffent type to a single Backbone collection http://backbonejs.org/#Model-idAttribute

saving

Bluebird.Promise | Null

Inherited from models.client.Base but overwritten in models/client/Base.js:182

Promise of the saving operation instantiated by Base#save(). Available only when the operation is ongoing.