new module:Messages()
Classes
Members
-
$el :jQuery.element
-
jQuery element that represents the message interface. This element contains all the currently displayed messages.
-
count :number
-
number of currently displayed messages, has a specified setter and getter
-
count
-
get the number of currently displayed messages
-
count
-
Set the number of currently displayed messages. Should be called only through functions that add messages.
If the message count is >= 1, the jQuery element for the UI is displayed, if the message count is <1, the UI is hidden.
Methods
-
display()
-
display the message box by removing the
hidden
class to the element -
hide()
-
hide the message box by adding a
hidden
class to the element -
newErrorMessage(text) → {ErrorMessage}
-
create a new error message and add it to the message box
Parameters:
Name Type Description text
string text of the message
Returns:
ErrorMessage -the newly constructed ErrorMessage
-
newLoadingMessage(text) → {LoadingMessage}
-
create a new loading message and add it to the message box
Parameters:
Name Type Description text
string text of the message
Returns:
LoadingMessage -the newly constructed LoadingMessage
-
newMessage(text, constropt) → {Message}
-
add a new message to the message box
Parameters:
Name Type Attributes Default Description text
string text of the message
constr
Message <optional>
Message constructor of the message, must be a derivate of the Message class
Returns:
Message -the newly constructed message (instance made by the specified constructor)
-
newWarningMessage(text) → {WarningMessage}
-
create a new warning message and add it to the message box
Parameters:
Name Type Description text
string text of the message
Returns:
WarningMessage -the newly constructed WarningMessage