1
0
forked from GitHub/gf-core

Wide Coverage Translation Demo: a couple of small fixes

Add missing initalization after a new application grammar has been selected.
Add an "X" close button in the upper left corner of the grammar selection popup.
This commit is contained in:
hallgren
2016-05-16 14:43:51 +00:00
parent ed9715dd92
commit 77d8758a46
2 changed files with 4 additions and 2 deletions

View File

@@ -461,6 +461,7 @@ wc.select_grammars=function() {
for(var i=0;i<glist.length;i++)
if(glist[i].cb.checked) gs.push(glist[i].grammar)
wc.selected_cnls=gs
wc.init_cnls()
wc.local.put("cnls",wc.selected_cnls)
}
function cancel() {
@@ -497,7 +498,7 @@ wc.select_grammars=function() {
}
clear(wc.grammarbox)
wc.grammarbox.appendChild(wrap("h2",text("Select which domain-specific grammars to use")))
wc.grammarbox.appendChild(wrap("h2",[button("X",cancel),text("Select which domain-specific grammars to use")]))
wc.grammarbox.appendChild(text("These grammars are tried before the wide-coverage grammar. They can give higher quality translations within their respective domains."))
var list=empty("dl")
wc.grammarbox.appendChild(list)