mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 20:41:17 +01:00
toaster components + deprecated alert.location
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user