scripty2 icon indicating copy to clipboard operation
scripty2 copied to clipboard

Cannot pass button options to dialog buttons

Open colinmollenhour opened this issue 14 years ago • 2 comments

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'}}
   } ]
}

colinmollenhour avatar Feb 01 '11 23:02 colinmollenhour

Doesn't it already do that? https://github.com/madrobby/scripty2/blob/master/src/ui/controls/dialog.js#L169

justinbaker999 avatar Feb 02 '11 00:02 justinbaker999

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 || {});

colinmollenhour avatar Feb 02 '11 07:02 colinmollenhour