models.client.Comment Class
Client Comment model
Item Index
Methods
- addAttachments
- addAttachments
- addAttachments
- attachments
- attachments
- attachments
- createdAt
- deletedAt
- dispose
- getMergedComments
- getMergedComments
- getMergedComments
- hasAttachments
- hasAttachments
- hasAttachments
- hasVisibility
- isSame
- isSoftDeleted
- merge
- merge
- merge
- methodFromMixin
- rel
- save
- ticket
- ticket
- ticket
- toHTML
- toHTML
- toHTML
- toMd static
- toMd static
- toMd static
- uniqueId
- updatedAt
- wasCreatedInVicinity
Properties
Methods
addAttachments
-
files -
progressHandler -
[options} -
[options.onProgress]
Parameters:
-
filesArrayArray of HTML5 file objects
-
progressHandlerFunctionCalled multiple times during the upload progress
-
[options}Object -
[options.onProgress]Function optionalCalled periodically when the upload progresses
Returns:
addAttachments
-
files -
progressHandler -
[options} -
[options.onProgress]
Parameters:
-
filesArrayArray of HTML5 file objects
-
progressHandlerFunctionCalled multiple times during the upload progress
-
[options}Object -
[options.onProgress]Function optionalCalled periodically when the upload progresses
Returns:
addAttachments
-
files -
progressHandler -
[options} -
[options.onProgress]
Parameters:
-
filesArrayArray of HTML5 file objects
-
progressHandlerFunctionCalled multiple times during the upload progress
-
[options}Object -
[options.onProgress]Function optionalCalled periodically when the upload progresses
Returns:
attachments
()
Array
Returns:
of models.client.Attachment
attachments
()
Array
Returns:
of models.client.Attachment
attachments
()
Array
Returns:
of models.client.Attachment
createdAt
()
Date
Returns:
deletedAt
()
Date
Returns:
dispose
()
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:
of models.client.Comment
getMergedComments
()
Array
Return comments that are merged to this comment using Comment#merge(...)
Returns:
of models.client.Comment
getMergedComments
()
Array
Return comments that are merged to this comment using Comment#merge(...)
Returns:
of models.client.Comment
hasAttachments
()
Boolean
Returns:
hasAttachments
()
Boolean
Returns:
hasAttachments
()
Boolean
Returns:
hasVisibility
-
visibility -
models
Visibility assertion helper
Parameters:
-
visibilityString -
modelsArrayArray of models.server.Visibility models
Returns:
Boolean
isSame
-
other
Return true if the other object is built using the same constructor and they have the same id
Parameters:
-
otherBackbone.Model
Returns:
Boolean
isSoftDeleted
()
Boolean
Returns:
merge
-
another
Merge two comments to new one
Parameters:
-
anothermodels.client.Comment
Returns:
merge
-
another
Merge two comments to new one
Parameters:
-
anothermodels.client.Comment
Returns:
merge
-
another
Merge two comments to new one
Parameters:
-
anothermodels.client.Comment
Returns:
methodFromMixin
()
Bar method
rel
-
key
Return relation data for given key or throw if it's not loaded
Parameters:
-
keyString
Returns:
Relation data
save
()
Bluebird.Promise
Save model to server http://backbonejs.org/#Model-save
Returns:
with the new saved model
toHTML
()
String
Convert comment string to a HTML string assuming it is a Markdown string
Returns:
toHTML
()
String
Convert comment string to a HTML string assuming it is a Markdown string
Returns:
toHTML
()
String
Convert comment string to a HTML string assuming it is a Markdown string
Returns:
toMd
-
s
Convert Markdown string to HTML
Parameters:
-
sString
Returns:
toMd
-
s
Convert Markdown string to HTML
Parameters:
-
sString
Returns:
toMd
-
s
Convert Markdown string to HTML
Parameters:
-
sString
Returns:
uniqueId
()
String
Returns:
updatedAt
()
Date
Returns:
wasCreatedInVicinity
()
Boolean
Return true if the another model was created within 60 seconds of this one by the same user
Returns:
Properties
idAttribute
String
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
Promise of the saving operation instantiated by Base#save(). Available only when the operation is ongoing.
