Fix action do not provide icon.

action might be undefined then button will get no icon.
Prevent throwing an uncatched error and insert warning sign on button

Will do better one I allow text instead of icon
This commit is contained in:
Matthias Bussonnier 2015-03-26 12:36:07 -07:00
parent 49dd77e0ec
commit 9c085a9273

View File

@ -124,7 +124,7 @@ define([
.addClass('btn btn-default')
.attr("title", el.label||action.help)
.append(
$("<i/>").addClass(el.icon||action.icon).addClass('fa')
$("<i/>").addClass(el.icon||(action||{icon:'fa-exclamation-triangle'}).icon).addClass('fa')
);
var id = el.id;
if( id !== undefined ){