Q.Notice Class
Operates with notices.
Methods
add
-
options
Adds a notice.
Parameters:
-
options
ObjectObject of options
-
[key]
String optionalUnique key for this notice. Need if you want to modify/remove notice by key.
-
content
StringHTML contents of this notice.
-
[closeable=true]
Boolean optionalWhether notice can be closed with red x icon.
-
[handler]
Function | String optionalSomething (callback or URL) to handle with Q.handle()
-
[type=common]
String optionalArbitrary type of notice. Can be used to apply different styles dependent on type, because appropriate CSS class appended to the notice. May be 'error', 'warning'.
-
[timeout=false]
Boolean | Number optionalTime in seconds after which to remove notice.
-
[persistent=false]
Boolean | Number optionalWhether to save this notice to session to show after page refresh.
-
get
-
notice
Get a notice by key.
Parameters:
-
notice
String | HTMLElementHTMLElement or key Unique key of notice which has been provided when notice was added. Or notice HTMLElement
hide
-
notice
Hides a notice.
Parameters:
-
notice
String | HTMLElementHTMLElement or key Unique key of notice which has been provided when notice was added. Or notice HTMLElement
parseNotices
()
Parse notices loaded from backend.
remove
-
notice
Removes a notice.
Parameters:
-
notice
String | HTMLElementHTMLElement or key Unique key of notice which has been provided when notice was added. Or notice HTMLElement
show
-
notice
Shows a previously notice.
Parameters:
-
notice
String | HTMLElementHTMLElement or key Unique key of notice which has been provided when notice was added. Or notice HTMLElement