minibar: make the feedback form work in the generic minibar

It is still disabled by default, since some manual configuraiton of
feedback.cgi is required.
This commit is contained in:
hallgren
2011-03-01 13:46:00 +00:00
parent 758e2a031d
commit a01704fd3e
2 changed files with 8 additions and 4 deletions

View File

@@ -14,7 +14,7 @@
<body> <body>
<h2>Minibar online</h2> <h2>Minibar online</h2>
<div id=minibar1> <div id=minibar>
</div> </div>
<noscript> <noscript>
This page doesn't works unless JavaScript is enabled. This page doesn't works unless JavaScript is enabled.
@@ -27,7 +27,7 @@ This page doesn't works unless JavaScript is enabled.
&amp; <a href="http://www.grammaticalframework.org:41296/translate/">Translator</a>] &amp; <a href="http://www.grammaticalframework.org:41296/translate/">Translator</a>]
</small> </small>
<small class=modtime> <small class=modtime>
HTML <!-- hhmts start --> Last modified: Thu Jan 27 21:58:51 CET 2011 <!-- hhmts end --> HTML <!-- hhmts start --> Last modified: Tue Mar 1 14:45:49 CET 2011 <!-- hhmts end -->
</small> </small>
<address> <address>
<a href="http://www.cse.chalmers.se/~hallgren/">TH</a> <a href="http://www.cse.chalmers.se/~hallgren/">TH</a>
@@ -54,9 +54,10 @@ var minibar_options= {
show_trees: true, show_trees: true,
show_grouped_translations: false, show_grouped_translations: false,
default_source_language: "Eng", default_source_language: "Eng",
//feedback_url: "feedback.html",
try_google: true try_google: true
} }
var minibar=new Minibar(server,minibar_options,"minibar1"); var minibar=new Minibar(server,minibar_options,"minibar");
</script> </script>
</body> </body>

View File

@@ -389,11 +389,14 @@ Minibar.prototype.show_translations=function(translationResults) {
if(options.show_abstract && t.tree) if(options.show_abstract && t.tree)
tbody.appendChild(tr([th(text("Abstract: ")), tbody.appendChild(tr([th(text("Abstract: ")),
tdt(abstree_button(t.tree),text(" "+t.tree))])); tdt(abstree_button(t.tree),text(" "+t.tree))]));
for(var i=0;i<lin.length;i++) for(var i=0;i<lin.length;i++) {
if(lin[i].to==to)
trans.single_translation.push(lin[i].text);
if(to=="All" || lin[i].to==to) if(to=="All" || lin[i].to==to)
tbody.appendChild(tr([th(text(langpart(lin[i].to,grammar.name)+": ")), tbody.appendChild(tr([th(text(langpart(lin[i].to,grammar.name)+": ")),
tdt(parsetree_button(t.tree,lin[i].to), tdt(parsetree_button(t.tree,lin[i].to),
text(lin[i].text))])); text(lin[i].text))]));
}
trans.appendChild(wrap("table",tbody)); trans.appendChild(wrap("table",tbody));
} }
} }