* Keyboard input and completion should now work much more smoothly:
+ When you press space, the current word will be completed (if incomplete)
and a new magnet will be created. If there is more than one possible
completion, no magnet is created, but the common prefix of the possible
completions is added to the text box.
+ Instead of asking the server for possible completions every time a new
letter is added to the curent word, minibar only ask for completions for
whole words and then filters the list locally when more letters are entered,
speeding things up when server responses are slow.
* Code restructuring:
+ The PGF server API has been moved to its own file: pgf_online.js. This
allows it to be reused in other applicaitons without importing the entire
minibar. It also allows minibar to be used with different server interfaces.
+ 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
the names of top-level functions to specify event handlers for buttons
and menus. (The code is no longer introspective, so alpha conversion will
not change its meaning.)
Using AJAX instead of JSONP can give better caching in the browser, since the
URL doesn't need to contain a (dynamically generated) callback function name.
But because of the same origin policy in JavaScript, AJAX can only be used when
the HTML file is served from the same server as the PGF. The new function
http_get_json in support.js uses AJAX if this is the case, and falls back to
JSONP otherwise.
* Add help button at top of page.
* Change style of word buttons to look like fridge magnets again.
* New options to specify locations of other pages: feedback_url, help_url. If
they are left undefined, no Help/Feedback buttons will be created.
* Shorter test in Google Translate button.
1. The text input field is shown form the start, no need to click.
2. The text input field is removed when no more words can be added to the
sentence.
3. When you press Enter, a word is added to the sentence (1) if there is only
one possible completion left (e.g. if you typed "airp" and the only
completion is "airport"), or (2) if what you typed exactly matches one
of the completions (e.g. if you typed "the" and the completions are
"the", "theatre" and "these").