Sha256: cd5b304d23695d96b3b4e8577428092973d05fbf5cf44ba0b439f9364e40b43a

Contents?: true

Size: 684 Bytes

Versions: 6

Compression:

Stored size: 684 Bytes

Contents

const dialogHelper = () => {
  const openTrigger = document.querySelectorAll("[data-open-dialog]");
  const closeTrigger = document.querySelectorAll("[data-close-dialog]");

  openTrigger.forEach((open) => {
    open.addEventListener("click", () => {
      var openTriggerData = open.dataset.openDialog;
      if (document.getElementById(openTriggerData).open) return;
      document.getElementById(openTriggerData).showModal();
    });
  });

  closeTrigger.forEach((close) => {
    close.addEventListener("click", () => {
      var closeTriggerData = close.dataset.closeDialog;
      document.getElementById(closeTriggerData).close();
    });
  });
};

export default dialogHelper;

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
playbook_ui-11.12.1.pre.alpha.charts1 app/pb_kits/playbook/pb_dialog/dialogHelper.js
playbook_ui-11.12.1.pre.alpha.passphrase1 app/pb_kits/playbook/pb_dialog/dialogHelper.js
playbook_ui-11.12.1 app/pb_kits/playbook/pb_dialog/dialogHelper.js
playbook_ui-11.13.0.pre.alpha.fileupload1 app/pb_kits/playbook/pb_dialog/dialogHelper.js
playbook_ui-11.12.0 app/pb_kits/playbook/pb_dialog/dialogHelper.js
playbook_ui-11.11.0.pre.alpha.dialog2 app/pb_kits/playbook/pb_dialog/dialogHelper.js