Namespace: msg

OC.msg

A little class to manage a status field for a "saving" process. It can be used to display a starting message (e.g. "Saving...") and then replace it with a green success message or a red error message.
Source:

Methods

(static) finishedAction(selector, response)

Displayes an success/error message in the given selector
Parameters:
Name Type Description
selector Object Placeholder to display the message in
response Object Response of the server
Properties
Name Type Description
data Object Data of the servers response
Properties
Name Type Description
message string Plain text message to display (no HTML allowed)
status string is being used to decide whether the message is displayed as an error/success
Source:

(static) finishedError(selector, message)

Displayes an error message in the given selector
Parameters:
Name Type Description
selector Object Placeholder to display the message in
message string Plain text error message to display (no HTML allowed)
Source:

(static) finishedSaving(selector, response)

Displayes an success/error message in the given selector
Parameters:
Name Type Description
selector Object Placeholder to display the message in
response Object Response of the server
Properties
Name Type Description
data Object Data of the servers response
Properties
Name Type Description
message string Plain text message to display (no HTML allowed)
status string is being used to decide whether the message is displayed as an error/success
Source:

(static) finishedSuccess(selector, message)

Displayes an success message in the given selector
Parameters:
Name Type Description
selector Object Placeholder to display the message in
message string Plain text success message to display (no HTML allowed)
Source:

(static) startAction(selector, message)

Displayes a custom message in the given message placeholder
Parameters:
Name Type Description
selector Object Placeholder to display the message in
message string Plain text message to display (no HTML allowed)
Source:

(static) startSaving(selector)

Displayes a "Saving..." message in the given message placeholder
Parameters:
Name Type Description
selector Object Placeholder to display the message in
Source: