Sha256: d9a979fb3e8ad1235b074b09fd5e9ba145b928ffa566a5c849dbd8b89652bfd7
Contents?: true
Size: 921 Bytes
Versions: 70
Compression:
Stored size: 921 Bytes
Contents
Spotlight.onLoad(function() { $('[data-behavior="translation-progress"]').translationProgress(); }); // translationProgress is a plugin that updates the "3/14" progress // counters in the tabs of the translation adminstration dashboard. // This works by counting the number of progress items and translations // present (indicated by data attributes) in each tab's content (function($) { $.fn.translationProgress = function() { var translationTabs = this; $(translationTabs).each(function(){ var currentTab = $(this); var tabName = $(this).attr('aria-controls'); var translationFields = $('#' + tabName).find('[data-translation-progress-item="true"]'); var completedTranslations = $('#' + tabName).find('[data-translation-present="true"]'); currentTab.find('span').text(completedTranslations.length + '/' + translationFields.length); }); return this; }; })(jQuery);
Version data entries
70 entries across 70 versions & 1 rubygems