Skip to content

Feature Request: Reactive custom dialog buttons #29

@gentunian

Description

@gentunian

It would be great to have reactive buttons for custom dialogs, example:

bootbox.dialog({
                title: 'Share your thoughts...',
                message: '<div id="createSessionDialogWrapper"></div>',
                buttons: {
                    success: {
                        label: Session.get('someKey'),
                        className: "btn-success",
                        callback: function () { }
                    },
                    main: {
                        label: "Close",
                        className: "btn-default",
                        callback: function () {});
                        }
                    }
                },
            });

It's common to have dialogs that interacts somehow with the user and I prefer my UI buttons to explicit say what they do. For example, I hate the "accept" and "cancel" buttons. I prefer the button saying what it's doing like "save" (although you know you are on a saving instance, the user shouldn't know about it), or buttons like "Discard changes" instead of "cancel".

I wonder if this package won't break by adding this feature, hoping it won't depend on the label value for doing some actions.

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