|
|
|
@ -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() {
|
|
|
|
|