toaster components + deprecated alert.location

v1.18.x
psychobunny 9 years ago
parent 8cf6fe3aa1
commit 1982501985

@ -1,7 +1,7 @@
'use strict';
/* globals define, templates */
define('alerts', ['translator'], function(translator) {
define('alerts', ['translator', 'components'], function(translator, components) {
var module = {};
module.alert = function (params) {
@ -30,7 +30,7 @@ define('alerts', ['translator'], function(translator) {
alert = $(translatedHTML);
alert.fadeIn(200);
$('.alert-' + params.location).prepend(alert);
components.get('toaster/tray').prepend(alert);
if(typeof params.closefn === 'function') {
alert.find('button').on('click', function() {

Loading…
Cancel
Save