Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Dialog: modified the dialog close button icon and icon position. #5297

Closed
wants to merge 1 commit into from

Conversation

thorikiri
Copy link

enabled to change dialogs close button icon and icons position.

@gabrielschulhof
Copy link

Thanks a lot for the pull request. We have, in the meantime, by fixing #3886 made it possible to prevent the dialog from creating a close button at all. This, in turn allows you to add a close button to a dialog by hand, meaning that all the flexibility provided by the button creation HTML is now at your disposal. Starting with at least 1.3.0 you will be able to simply

<div data-role="dialog" data-close-btn="none">
  <div data-role="header">
    <a href="go/to/some/page.html" data-role="button" data-icon="plus" data-iconpos="left">Custom button</a>
  </div>
</div>

and the dialog widget will not add a close button to the dialog, so the button you create yourself can play the role of the close button.

This pull request, as well as #5117 are evidence that there is a significant need to customize the button(s) in a dialog's header. We believe the best way to do that is to provide an option that prevents the dialog from adding its own button, because that enables solutions such as the one above and makes it unnecessary to pass information about the buttons in the dialog's header into the dialog via its options.

@thorikiri
Copy link
Author

Thank you. I'm looking forward to 1.3.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants