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:
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user