Sha256: 2d6d178bcfa7d8185d399080af5a4ae15eeb9f7ef1b7e085a98d97c7067ff5c2
Contents?: true
Size: 586 Bytes
Versions: 2
Compression:
Stored size: 586 Bytes
Contents
jQuery(document).ready(function($) { $("*[data-umlaut-toggle-permalink]").click(function(event) { event.preventDefault(); var originalLink = $(this) var valueContainer = $("#umlaut-permalink-value"); if (! valueContainer.data("loaded")) { valueContainer.html('<i class="spinner"></i>').show(); $.getJSON( originalLink.attr('href'), function(data) { var href = data.permalink; var a = $("<a/>"); a.attr("href", href); a.text(href); valueContainer.html(a).data("loaded", true).show(); }); } else { valueContainer.toggle(); } }); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
umlaut-3.1.0.pre2 | app/assets/javascripts/umlaut/load_permalink.js |
umlaut-3.1.0.pre1 | app/assets/javascripts/umlaut/load_permalink.js |