Skip to content

Cannot pass button options to dialog buttons #23

Open

Description

@colinmollenhour

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

Activity

  1. slayyyyer commented on Feb 2, 2011

    @slayyyyer
  2. colinmollenhour commented on Feb 2, 2011

    @colinmollenhour
    Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions