Sha256: e26b773cfb8715d91c87bcc364e2450ddb1aa13d288b4e55b7bd35c156c00dfa

Contents?: true

Size: 991 Bytes

Versions: 5

Compression:

Stored size: 991 Bytes

Contents

<!-- Tabler Core -->
<script src="https://unpkg.com/@tabler/core@1.0.0-beta9/dist/js/tabler.min.js"></script>

<!-- bring back data-confirm -->
<script>
  document.addEventListener("click", (event) => {
    if (!event.target.matches("[data-confirm]")) return;
    if (!window.confirm(event.target.dataset["confirm"])) event.preventDefault();
  });
</script>

<!-- validation rails -->
<script>
  document.addEventListener("DOMContentLoaded", () => {
    document.querySelectorAll(".field_with_errors").forEach((element) => {
      element.firstChild.classList.add("is-invalid");

      element.parentNode.insertBefore(element.firstChild, element);
      element.parentNode.removeChild(element);
    });
  });
</script>

<!-- flash message -->
<script>
  document.addEventListener("DOMContentLoaded", () => {
    const selector = "[data-controller='flash-message']";

    document.querySelectorAll(selector).forEach((thiz) => {
      new bootstrap.Toast(thiz).show();
    });
  });
</script>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
administration-zero-0.0.11 lib/generators/admin/install/templates/erb/admin/application/_javascript_tags.html.erb
administration-zero-0.0.10 lib/generators/admin/install/templates/erb/admin/application/_javascript_tags.html.erb
administration-zero-0.0.9 lib/generators/admin/install/templates/erb/admin/application/_javascript_tags.html.erb
administration-zero-0.0.8 lib/generators/admin/install/templates/erb/admin/application/_javascript_tags.html.erb
administration-zero-0.0.7 lib/generators/admin/install/templates/erb/admin/application/_javascript_tags.html.erb