* Check if an existing notification is displayed before building. * * @param {string} content The notification content. * @param {string} type The notification type, either info, success, warning or error. * @param {string} [actionLabel] The action b
(content, type, actionLabel, actionCallback)
| 150 | * @param {Function} [actionCallback] The action button callback function called on action button click. |
| 151 | */ |
| 152 | function _notify(content, type, actionLabel, actionCallback) { |
| 153 | const activeNotification = angular.element(`.${CSS_PREFIX}-notification`); |
| 154 | |
| 155 | if (activeNotification.length > 0) { |
| 156 | _hide(activeNotification); |
| 157 | |
| 158 | $timeout(function waitBeforeShowingNext() { |
| 159 | _build(content, type, actionLabel, actionCallback); |
| 160 | }, _TRANSITION_DURATION); |
| 161 | } else { |
| 162 | _build(content, type, actionLabel, actionCallback); |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | ///////////////////////////// |
| 167 | // // |
no test coverage detected