Sha256: 8ca6f4c2eaa98584e4aa52a07717d2aca4ee3305d2f6525beaed28a36b147e96

Contents?: true

Size: 574 Bytes

Versions: 6

Compression:

Stored size: 574 Bytes

Contents

/* eslint-disable no-empty */

$(() => {
  let inviteUsersButton = document.querySelector(".invite-users-link");

  if (inviteUsersButton !== null) {
    inviteUsersButton.addEventListener("click", function (event) {
      let link = document.querySelector("div[data-committee_link]"),
          range = document.createRange();

      event.preventDefault();

      range.selectNode(link);
      window.getSelection().addRange(range);

      try {
        document.execCommand("copy");
      } catch (err) { }

      window.getSelection().removeAllRanges();
    });
  }
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-initiatives-0.29.1 app/packs/src/decidim/initiatives/admin/invite_users.js
decidim-initiatives-0.29.0 app/packs/src/decidim/initiatives/admin/invite_users.js
decidim-initiatives-0.29.0.rc4 app/packs/src/decidim/initiatives/admin/invite_users.js
decidim-initiatives-0.29.0.rc3 app/packs/src/decidim/initiatives/admin/invite_users.js
decidim-initiatives-0.29.0.rc2 app/packs/src/decidim/initiatives/admin/invite_users.js
decidim-initiatives-0.29.0.rc1 app/packs/src/decidim/initiatives/admin/invite_users.js