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

Make it more configurable #139

Open
similar75 opened this issue Jun 28, 2021 · 0 comments
Open

Make it more configurable #139

similar75 opened this issue Jun 28, 2021 · 0 comments

Comments

@similar75
Copy link

similar75 commented Jun 28, 2021

Please, make selectors in template configurable, especially BUTTONS , in case if we not like them in "btn-group" when template option is used in configuration: e.g.

$('[data-toggle=confirmation]').confirmation({
  rootSelector: '[data-toggle=confirmation]',
  template:  $('#myTemplateContainingDiv').html()'
  // other options
});

and in HTML:

<div class="d-none" id="myTemplateContainingDiv">
	<div class="popover confirmation">
		<div class="arrow"></div>
		<h3 class="popover-header"></h3>
		<div class="popover-body">
			<p class="confirmation-content"></p>
			<div class="confirmation-buttons text-center">
				<div class="my-custom-btn-div-class"></div>
			</div>
		</div>
	</div>
</div>

I modified it in code here, replacing '.btn-group' with .'my-custom-btn-div-class', but will be very useful if is configurable through options. Can be only 'BUTTONS: '.confirmation-buttons' and we can remove in this case '<div class="my-custom-btn-div-class"></div>' from html. Will be much more flexible if we can control this setting.

const Selector = {
  TITLE  : '.popover-header',
  CONTENT: '.confirmation-content',
  BUTTONS: '.confirmation-buttons .btn-group',
};

Thank you. (Great plugin!)

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

1 participant