Sha256: 32217383698557ac553aa5688c681c440bb8ded8d07e6b0d8d09075c12c82b3b

Contents?: true

Size: 847 Bytes

Versions: 116

Compression:

Stored size: 847 Bytes

Contents

(function () {
  'use strict';

  var $initiativeVotesCount = $('#initiative-<%= current_initiative.id %>-progress-bar'),
      userIdentitiesDialog = $('#user-identities'),
      refreshUrl;

  $initiativeVotesCount.html('<%= j(render partial: "decidim/initiatives/initiatives/progress_bar", locals: { initiative: current_initiative }) %>');

  // Update the identities dialog, if exists.
  if (userIdentitiesDialog.length) {
    refreshUrl = userIdentitiesDialog.data('refresh-url');

    $.ajax(refreshUrl).done(function(response){
      userIdentitiesDialog.html(response);
    });
  } else {
    var $initiativeVoteButton = $('#initiative-<%= current_initiative.id %>-vote-cabin');
    $initiativeVoteButton.html('<%= j(render partial: "decidim/initiatives/initiatives/vote_cabin", locals: { initiative: current_initiative }) %>');
  }
}());

Version data entries

116 entries across 58 versions & 1 rubygems

Version Path
decidim-initiatives-0.25.0.rc4 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb
decidim-initiatives-0.25.0.rc4 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.25.0.rc3 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.25.0.rc3 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb
decidim-initiatives-0.25.0.rc2 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.25.0.rc2 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb
decidim-initiatives-0.25.0.rc1 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.25.0.rc1 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb
decidim-initiatives-0.24.3 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb
decidim-initiatives-0.24.3 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.23.6 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb
decidim-initiatives-0.23.6 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.24.2 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb
decidim-initiatives-0.24.2 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.23.5 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb
decidim-initiatives-0.23.5 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.24.1 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.24.1 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb
decidim-initiatives-0.24.0 app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb
decidim-initiatives-0.24.0 app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb