trimming alert title/message

v1.18.x
psychobunny 10 years ago
parent 40fff367d1
commit ca7f35dd5e

@ -2,12 +2,13 @@
/* globals define, translator, templates */
define('alerts', function() {
var module = {};
module.alert = function (params) {
params.alert_id = 'alert_button_' + (params.alert_id ? params.alert_id : new Date().getTime());
params.title = params.title || '';
params.title = params.title.trim() || '';
params.message = params.message.trim();
params.location = params.location || 'right-top';
params.type = params.type || 'info';

Loading…
Cancel
Save