Sha256: c4935f10d070cc5b1f395b9d626af0ca2d7491dcaf66db9353ec9ead43af4523

Contents?: true

Size: 931 Bytes

Versions: 46

Compression:

Stored size: 931 Bytes

Contents

<% if Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.empty? %>
update_main_page_button();
<% end %>
update_identities_rows();

function update_main_page_button() {
  var $endorsementButton = $('#resource-<%= resource.id %>-endorsement-button');
  morphdom($endorsementButton[0], '<%= j(endorsement_buttons_cell(resource).render_user_identity_endorse_button).strip.html_safe %>');
}
function update_identities_rows() {
  <% fully_endorsed= fully_endorsed?(resource, current_user) %>
  var $endorsementsRowCount = $('#resource-<%= resource.id %>-endorsements-count');
  morphdom($endorsementsRowCount[0], '<%= j(endorsement_buttons_cell(resource).render_endorsements_count).strip.html_safe %>');
  var $endorsementsRowButton = $($('#select-identity-button')[0]);
  <% if fully_endorsed %>
    $endorsementsRowButton.addClass('active')
  <% else %>
    $endorsementsRowButton.removeClass('active')
  <% end %>
}

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
decidim-core-0.27.9 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.8 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.7 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.6 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.26.10 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.26.9 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.5 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.26.8 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.4 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.3 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.26.7 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.26.5 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.2 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.1 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.26.4 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.0 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.26.3 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.0.rc2 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.27.0.rc1 app/views/decidim/endorsements/update_buttons_and_counters.js.erb
decidim-core-0.26.2 app/views/decidim/endorsements/update_buttons_and_counters.js.erb