Sha256: 55ffb50e01d18c14276a7df1e42b0c6db7e9e87b08b7003bac7a13b398c0d6ac
Contents?: true
Size: 759 Bytes
Versions: 24
Compression:
Stored size: 759 Bytes
Contents
// 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 export default class { connect() { $('[data-behavior="translation-progress"]').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); }) } }
Version data entries
24 entries across 24 versions & 1 rubygems