scripty2
scripty2 copied to clipboard
Cannot pass button options to dialog buttons
Simple solution: if a button "options" property exists then pass it to the UI.Button constructor. Resulting example for API would be something like:
new S2.UI.Dialog({
...,
buttons:[ {
primary:true,
label:'OK',
action:someAction,
options:{icons:{primary:'ui-icon-check'}}
} ]
}
Doesn't it already do that? https://github.com/madrobby/scripty2/blob/master/src/ui/controls/dialog.js#L169
No: https://github.com/madrobby/scripty2/blob/master/src/ui/controls/dialog.js#L192 I'm essentially talking about changing that line to: new UI.Button(element,button.options || {});