Sha256: 59c5a6491a506e60b26cb845d725e47e3e263488aace4e4ad9a6c40c4bd57897
Contents?: true
Size: 1.47 KB
Versions: 2
Compression:
Stored size: 1.47 KB
Contents
Spree.ready(function() { var display_locale_fields; display_locale_fields = function() { var attr, locale, locales, show, _fn, _i, _len; attr = $('#attr_list a.active').data('attr'); locale = $('#locale').val(); available_locales = $('#available_locales').val().split(','); show = $("select[name='show-only']").val(); $('#attr_fields .panel').hide(); _fn = function(locale) { var display, value; value = $('#attr_fields .panel.' + attr + '.' + locale + ' :input').val().replace(/^\s+|\s+$/g, ""); if (show === 'incomplete') { display = value === ''; } else if (show === 'complete') { display = value !== ''; } else { display = true; } if (display) { return $('#attr_fields .panel.' + attr + '.' + locale).show(); } }; if (locale === '') { available_locales.forEach(function(locale) { _fn(locale) }); } else { _fn(locale); } if ($('#attr_fields .panel:visible').length === 0 && show !== 'all') { return $('#attr_fields .no-translations').show(); } }; $(function() { $('#attr_list a').click(function() { $('#attr_list a').removeClass('active'); $(this).addClass('active'); display_locale_fields(); return false; }); $('#locale').change(function() { return display_locale_fields(); }); return $("select[name='show-only']").change(function() { return display_locale_fields(); }); }); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_mobility-1.4.0 | app/assets/javascripts/spree/backend/translations.js |
spree_mobility-1.3.0 | app/assets/javascripts/spree/backend/translations.js |