From 1982501985d52f2b66c4468b68e8904c1e55677d Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 2 Nov 2015 12:23:37 -0500 Subject: [PATCH] toaster components + deprecated alert.location --- public/src/modules/alerts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/modules/alerts.js b/public/src/modules/alerts.js index 78ec9721c5..2a3483218a 100644 --- a/public/src/modules/alerts.js +++ b/public/src/modules/alerts.js @@ -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() {