Skip to content

Make it more configurable #139

@similar75

Description

@similar75

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!)

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