Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootbox custom dialog support? #1

Closed
roymj88 opened this issue Aug 22, 2014 · 2 comments
Closed

Bootbox custom dialog support? #1

roymj88 opened this issue Aug 22, 2014 · 2 comments

Comments

@roymj88
Copy link

roymj88 commented Aug 22, 2014

Hi.. Does this support custom dialog?

Something similar like :

bootbox.dialog({
  message: "I am a custom dialog",
  title: "Custom title",
  buttons: {
    success: {
      label: "Success!",
      className: "btn-success",
      callback: function() {
        Example.show("great success");
      }
    },
    danger: {
      label: "Danger!",
      className: "btn-danger",
      callback: function() {
        Example.show("uh oh, look out!");
      }
    },
    main: {
      label: "Click ME!",
      className: "btn-primary",
      callback: function() {
        Example.show("Primary button");
      }
    }
  }
});
@eriktufvesson
Copy link
Owner

Hi Roy!

I just pushed support for custom dialogs. See the updated Readme.md.

Regards,
Erik

@roymj88
Copy link
Author

roymj88 commented Aug 27, 2014

Hi Erik,

Thanks a lot for this. Ive gone through your source code and had modified for my purpose for bootbox custom dialog.. Ill revert and use urs.. Also It will be nice if we can do something like trigger bootbox via controller or so?

$rootScope.bootboxShow = function() {
  bootbox.dialog({
    message: "I am a custom dialog",
    title: "Custom title",
    buttons: {
      danger: {
        label: "Danger!",
        className: "btn-danger",
        callback: function() {
          Example.show("uh oh, look out!");
        }
      },
      main: {
        label: "Click ME!",
        className: "btn-primary",
        callback: function() {
          Example.show("Primary button");
        }
      }
    }
  });
  return true;
};

Perhaps i can chip in to get this done. Currently it works via click event. Anyhow very nice extension. Thanks a lot.

@roymj88 roymj88 closed this as completed Aug 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants