angular-growl-2
angular-growl-2 copied to clipboard
Configuration to disable user close (implements #118)
This pull request fulfills issue #118. Specifically:
- Adds
disableUserClose
configuration. If set totrue
, it disables the close button (same functionality asdisableCloseButton
) and skips closing the message when the growl is clicked upon, effectively preventing the end user from closing the message. - Removes the check for
clickToClose
configuration. I am not sure what the purpose of this was considering I can't find any place that actually sets this option. it seems this was trying to do what I've implemented here. - If TTL is set, that will still close the message. If it is set to
-1
, the message will remain indefinitely (unless programmatically closed)
This change allows the developer to control messages that shouldn't be closed unless something else happens. For our business needs, we are using it to notify the user that they have been disconnected from the server and are attempting a reconnect. This is a message we do not wish the user to close out of.