diff --git a/CHANGES b/CHANGES index d2cc534..efa42ed 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,8 @@ Version 0.9.5 (unreleased) * Fixed typo in documentation (#232, thanks @timgates42) * Added Kyrgyz translation (#239,thanks @Soyuzbek) * Ignore translator context hints checking unmatched variables (#238, #239, thanks @jeancochrane and @mondeja) +* Uncheck fuzzy on translation keyup instead of change (#235 @mondeja) + Version 0.9.4 ------------- diff --git a/rosetta/templates/rosetta/js/rosetta.js b/rosetta/templates/rosetta/js/rosetta.js index 00928c9..389cd9f 100644 --- a/rosetta/templates/rosetta/js/rosetta.js +++ b/rosetta/templates/rosetta/js/rosetta.js @@ -86,7 +86,9 @@ google.setOnLoadCallback(function() { }); }); - $('.translation textarea').blur(function() { + $('.translation textarea') + + .blur(function() { if($(this).val()) { $('.alert', $(this).parents('tr')).remove(); var RX = /%(?:\([^\s\)]*\))?[sdf]|\{[\w\d_]+?\}/g, @@ -110,9 +112,18 @@ google.setOnLoadCallback(function() { } return true; } - }); + }) - $('.translation textarea').eq(0).focus(); + .keyup(function () { + var cb = $(this).parents('tr').find('td.c input[type="checkbox"]'); + if(cb.is(':checked')){ + cb[0].checked = false; + cb.removeAttr( 'checked') + } + + }) + + .eq(0).focus(); $('#action-toggle').change(function(){ jQuery('tbody td.c input[type="checkbox"]').each(function(i, e) { @@ -123,13 +134,5 @@ google.setOnLoadCallback(function() { } }); }); - $('tbody .translation textarea').change(function () { - var fuzzy = $(this).closest('tr').find('input[type="checkbox"]'); - if(fuzzy[0].checked){ - fuzzy[0].checked = false; - fuzzy.removeAttr( 'checked') - } - - }) });