Sha256: 52986f305595c277a5e1403675772379a0ec2205c61d9e00e5f7840990a376d8

Contents?: true

Size: 953 Bytes

Versions: 4

Compression:

Stored size: 953 Bytes

Contents

$(() => {
  const voteButton = $("#vote_button"),
        delegationsButton = $("#delegations-button"),
        delegationCallouts = $(".delegation-callout"),
        delegationCalloutsMessage = $(".delegation-callout-message"),
        delegationDialog = $("#delegations-modal"),
        delegationVoteButtons = $(".delegation-vote-button"),
        delegationField = $("#decidim_consultations_delegation_id"),
        voteDialog = $("#question-vote-modal");

  delegationsButton.click(() => {
    delegationDialog.foundation("open");
  });

  delegationVoteButtons.click((e) => {
    delegationDialog.foundation("close");
    voteDialog.foundation("open");
    delegationField.val($(e.currentTarget).data("delegation-id"));
    delegationCalloutsMessage.text($(e.currentTarget).data("delegation-granter-name"));
    delegationCallouts.removeClass("is-hidden");
  });

  voteButton.click(() => {
    delegationCallouts.addClass("is-hidden");
  });
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-action_delegator-0.6.0 app/packs/src/decidim/action_delegator/questions.js.es6
decidim-action_delegator-0.5.0 app/packs/src/decidim/action_delegator/questions.js.es6
decidim-action_delegator-0.4.1 app/assets/javascripts/decidim/action_delegator/questions.js.es6
decidim-action_delegator-0.4 app/assets/javascripts/decidim/action_delegator/questions.js.es6