Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/js/veasy-toastr.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,24 @@ angular.module('veasyToastr', [
}, 0);
};

var _success = function (title, message, timeout) {
_notify({ title: title, message: message, type: 'success', timeout: timeout });
var _success = function (title, message, timeout, skipSanitization) {
_notify({ title: title, message: message, type: 'success', timeout: timeout, sanitize: !skipSanitization });
};

var _info = function (title, message, timeout) {
_notify({ title: title, message: message, type: 'info', timeout: timeout });
var _info = function (title, message, timeout, skipSanitization) {
_notify({ title: title, message: message, type: 'info', timeout: timeout, sanitize: !skipSanitization });
};

var _error = function (title, message, timeout) {
_notify({ title: title, message: message, type: 'error', timeout: timeout });
var _error = function (title, message, timeout, skipSanitization) {
_notify({ title: title, message: message, type: 'error', timeout: timeout, sanitize: !skipSanitization });
};

var _warning = function (title, message, timeout) {
_notify({ title: title, message: message, type: 'warning', timeout: timeout });
var _warning = function (title, message, timeout, skipSanitization) {
_notify({ title: title, message: message, type: 'warning', timeout: timeout, sanitize: !skipSanitization });
};

var _default = function (title, message, timeout) {
_notify({ title: title, message: message, type: 'default', timeout: timeout });
var _default = function (title, message, timeout, skipSanitization) {
_notify({ title: title, message: message, type: 'default', timeout: timeout, sanitize: !skipSanitization });
};

return {
Expand Down
5 changes: 4 additions & 1 deletion src/templates/veasy-toastr.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
<span class="vtbox-title" ng-style="{'font-size': notification.style.title.fontSize + 'px', 'color': notification.style.title.color}">{{notification.title}}</span>
</div>
<div class="vtbox-text-message">
<span class="vtbox-message" ng-style="{'font-size': notification.style.message.fontSize + 'px', 'color': notification.style.message.color}">{{notification.message}}</span>
<span class="vtbox-message" ng-style="{'font-size': notification.style.message.fontSize + 'px', 'color': notification.style.message.color}">
<span ng-if="notification.sanitize">{{notification.message}}</span>
<span ng-if="!notification.sanitize" ng-bind-html="notification.message"></span>
</span>
</div>
</div>
</div>
Expand Down