summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2016-05-16 14:43:51 +0000
committerhallgren <hallgren@chalmers.se>2016-05-16 14:43:51 +0000
commit5497f88b1535d41344f270a1741a333c60134af4 (patch)
tree7db3abb513fb7f55ce9d54e961dcbe1a90cbd4f0 /src
parent64058500575039a62316c26c51a28ecd939fb748 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/www/js/wc.js3
-rw-r--r--src/www/wc.html3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/www/js/wc.js b/src/www/js/wc.js
index 2b7f6434d..9479fc802 100644
--- a/src/www/js/wc.js
+++ b/src/www/js/wc.js
@@ -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)
diff --git a/src/www/wc.html b/src/www/wc.html
index 6d9b32b92..8cd31824c 100644
--- a/src/www/wc.html
+++ b/src/www/wc.html
@@ -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>