mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-03-16 21:30:24 +00:00
adds a fuzzy toggle, fixes Issue #132
This commit is contained in:
parent
6623601878
commit
edfc1d40d3
2 changed files with 14 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ google.setOnLoadCallback(function() {
|
|||
from: sourceLang,
|
||||
to: destLang,
|
||||
text: orig
|
||||
},
|
||||
},
|
||||
function(data) {
|
||||
if (data.success){
|
||||
trans.val(unescape(data.translation).replace(/'/g,'\'').replace(/"/g,'"').replace(/%\s+(\([^\)]+\))\s*s/g,' %$1s '));
|
||||
|
|
@ -85,7 +85,7 @@ google.setOnLoadCallback(function() {
|
|||
$($('.part',td).get(j)).css('top',textareaY + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('.translation textarea').blur(function() {
|
||||
if($(this).val()) {
|
||||
$('.alert', $(this).parents('tr')).remove();
|
||||
|
|
@ -113,5 +113,15 @@ google.setOnLoadCallback(function() {
|
|||
});
|
||||
|
||||
$('.translation textarea').eq(0).focus();
|
||||
|
||||
|
||||
$('#action-toggle').change(function(){
|
||||
jQuery('tbody td.c input[type="checkbox"]').each(function(i, e) {
|
||||
if($('#action-toggle').is(':checked')) {
|
||||
$(e).attr('checked', 'checked');
|
||||
} else {
|
||||
$(e).removeAttr('checked');
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
<th><div class="text">{% trans "Original" %}</div></th>
|
||||
{% if main_language %}<th>{{ main_language }}</th>{% endif %}
|
||||
<th>{{ rosetta_i18n_lang_name }}</th>
|
||||
<th class="c"><span class="checkall">[-]</span> {% trans "Fuzzy" %}</th>
|
||||
<th class="c"><input style="display: inline;" id="action-toggle" type="checkbox"> {% trans "Fuzzy" %}</th>
|
||||
<th>{% trans "Occurrences(s)" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
|||
Loading…
Reference in a new issue