Sha256: 34223c18f60cde62b3421ffd1eec1a163ba91393c64e80c5faf9077fcc97e6bf
Contents?: true
Size: 673 Bytes
Versions: 6
Compression:
Stored size: 673 Bytes
Contents
/*global Blacklight */ (function($) { 'use strict'; Blacklight.doResizeFacetLabelsAndCounts = function() { // adjust width of facet columns to fit their contents function longer (a,b){ return b.textContent.length - a.textContent.length; } $('ul.facet-values, ul.pivot-facet').each(function(){ var longest = $(this).find('span.facet-count').sort(longer)[0]; if (longest && longest.textContent) { var width = longest.textContent.length + 1 + 'ch'; $(this).find('.facet-count').first().width(width); } }); }; Blacklight.onLoad(function() { Blacklight.doResizeFacetLabelsAndCounts(); }); })(jQuery);
Version data entries
6 entries across 6 versions & 1 rubygems