Commit 67e35457 authored by fvtorres's avatar fvtorres

[FIX] Fixed the display of types in jQuery called feedback, before all were...

[FIX] Fixed the display of types in jQuery called feedback, before all were info no matter what type chosen, because $.inArray doesn`t work with objects, so created a simple array for it to check.
parent e3ed2b41
......@@ -3755,7 +3755,8 @@ function feedback (mes, type, modal, title, icon, killall, custom)
'success': {title:tr('Success'), class:'success', icon:'success'},
'info': {title:tr('Note'), class:'info', icon:'information'}
};
type = $.inArray(type, map) > -1 ? type : 'info';
var check = ['error', 'warning', 'success', 'info'];
type = $.inArray(type, check) > -1 ? type : 'info';
title = title || map[type]['title'];
icon = icon || map[type]['icon'];
icon = $.fn.getIcon(icon);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment