allow passing classes to buttons

This commit is contained in:
Jörn Friedrich Dreyer 2013-09-18 17:13:07 +02:00
parent 715846626e
commit 64cc13a8d3
1 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,9 @@
}
$.each(value, function(idx, val) {
var $button = $('<button>').text(val.text);
if (val.classes) {
$button.addClass(val.classes);
}
if(val.defaultButton) {
$button.addClass('primary');
self.$defaultButton = $button;