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)

View File

@@ -28,6 +28,7 @@ small { color: #666; }
div.e2 table { background: white; }
span.inflect { color: blue; }
.grammar_pick { margin: 5px; }
h2 > input { float: right; }
.node { cursor: pointer; }
/*.overlay { background-color: #eed; }*/
@@ -114,7 +115,7 @@ span.inflect { color: blue; }
</div>
<hr>
<div class=modtime><small>
<!-- hhmts start -->Last modified: Mon May 16 16:04:21 CEST 2016 <!-- hhmts end -->
<!-- hhmts start -->Last modified: Mon May 16 16:39:48 CEST 2016 <!-- hhmts end -->
</small></div>
<a href="http://www.grammaticalframework.org/demos/translation.html">About</a>
<script src="js/support.js"></script>