To access the GF web service, it uses the
JSONP method
@@ -94,17 +95,17 @@ Some implementation details:
or if what you have entered exactly matches one of the remaining
magnet.
[Added 2010-05-28] Added a link to make it easy to try the same sentence in
- Google Translate.
- This can be turned of by passing the option {try_google:false} to
+ Google Translate.This can be
+ turned off by passing the option {try_google:false} to
start_minibar.
[Added 2010-06-02] Added support for Help and Feedback buttons, controlled
by the options feedback_url and help_url passed to
start_minibar.
[Added 2010-06-02] New option: default_source_language.
[Added 2010-09-10] Minibar now automatically uses
- AJAX
+ XHR
instead of JSONP when possible (i.e. when the HTML document and the
- PGF server are on the same server).
+ PGF service are on the same server).
[Added 2010-09-10] The default input language is now the user's preferred
language, if possible. This is implemented by consulting the
userLanguage field in the grammar info output by pgf-server.
@@ -131,7 +132,7 @@ Some implementation details:
pgf_online.js.
The minibar code has been rewritten to avoid storing state information
in the document tree and accessing it by referring to named document
- elements. The code now also avoids using string literals contaning
+ elements. The code now also avoids using string literals containing
the names of top-level functions to specify event handlers for buttons
and menus. (The code is no longer introspective, so α conversion
will not change its meaning.)
@@ -150,11 +151,13 @@ Some implementation details:
after every word. On touch-based devices, the on-screen keyboard kept
popping up after every word, which was very annoying if you were
entering a sentence by tapping on the magnets.
+
[Changed 2011-08-03] Moved the initialization code in minibar.html to
+ minibar_online.js.
- Last modified: Mon Apr 11 15:03:31 CEST 2011
+ Last modified: Wed Aug 3 16:14:22 CEST 2011
TH
diff --git a/src/runtime/javascript/minibar/gf-web-api-examples.html b/src/runtime/javascript/minibar/gf-web-api-examples.html
index cc310ec4f..c4be198b1 100644
--- a/src/runtime/javascript/minibar/gf-web-api-examples.html
+++ b/src/runtime/javascript/minibar/gf-web-api-examples.html
@@ -1,10 +1,12 @@
-
+
GF web services API examples
-
+
+
@@ -24,7 +29,7 @@ availiable in the GF shell is also available via the GF web services API.
The
GF
-Web Service API page describes the calls supported by the GF web service
+Web Service API page describes the calls supported by the GF web service
API. Below, we illustrate these calls by examples, and also show
how to make these calls from JavaScript using the API defined in
pgf_online.js.
@@ -63,7 +68,8 @@ incomplete and might be made more complete in a future version...
["Foods.pgf","Phrasebook.pgf"]
// Select which grammar to use
server.switch_grammar("Foods.pgf")
-
// Get grammar info (this method could be renamed)
+
// Get concrete language list and other grammar info
+ (this method could be renamed)
server.get_languages(callback)
http://localhost:41296/grammars/Foods.pgf
{"name":"Foods",
@@ -120,7 +126,9 @@ incomplete and might be made more complete in a future version...
"text":""}]
- Last modified: Mon Apr 11 14:47:59 CEST 2011
+