1
0
forked from GitHub/gf-core

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 f790bd949f
commit a27f58d6ae
2 changed files with 8 additions and 4 deletions

View File

@@ -14,7 +14,7 @@
<body>
<h2>Minibar online</h2>
<div id=minibar1>
<div id=minibar>
</div>
<noscript>
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>]
</small>
<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>
<address>
<a href="http://www.cse.chalmers.se/~hallgren/">TH</a>
@@ -54,9 +54,10 @@ var minibar_options= {
show_trees: true,
show_grouped_translations: false,
default_source_language: "Eng",
//feedback_url: "feedback.html",
try_google: true
}
var minibar=new Minibar(server,minibar_options,"minibar1");
var minibar=new Minibar(server,minibar_options,"minibar");
</script>
</body>

View File

@@ -389,11 +389,14 @@ Minibar.prototype.show_translations=function(translationResults) {
if(options.show_abstract && t.tree)
tbody.appendChild(tr([th(text("Abstract: ")),
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)
tbody.appendChild(tr([th(text(langpart(lin[i].to,grammar.name)+": ")),
tdt(parsetree_button(t.tree,lin[i].to),
text(lin[i].text))]));
}
trans.appendChild(wrap("table",tbody));
}
}