Sha256: 4596ab54e7558048e184e030bde10c4055016ef6fde5aee3184a69249099e2d7

Contents?: true

Size: 438 Bytes

Versions: 3

Compression:

Stored size: 438 Bytes

Contents

update_icons = (icons_json)->
  sharing_tags = $("@sharing_tags_share")

  $.each sharing_tags, (_, sharing_link)->
    link = $(sharing_link)
    network = link.data('network')
    link.html icon if icon = icons_json[network]


icons_json = {}
<% SharingTags::Network.lists.each do |network| %>
icons_json['<%= network %>'] = '<%= SharingTags::AssetFile.named("sharing_tags/icons/#{network}.svg") %>';
<% end %>

update_icons(icons_json)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sharing_tags-0.0.14 app/assets/javascripts/sharing_tags/icons.js.coffee.erb
sharing_tags-0.0.13 app/assets/javascripts/sharing_tags/icons.js.coffee.erb
sharing_tags-0.0.12 app/assets/javascripts/sharing_tags/icons.js.coffee.erb